Geant4  10.02.p03
CexmcReconstructorMessenger Class Reference

#include <CexmcReconstructorMessenger.hh>

Inheritance diagram for CexmcReconstructorMessenger:
Collaboration diagram for CexmcReconstructorMessenger:

Public Member Functions

 CexmcReconstructorMessenger (CexmcReconstructor *reconstructor)
 
 ~CexmcReconstructorMessenger ()
 
void SetNewValue (G4UIcommand *cmd, G4String value)
 
- Public Member Functions inherited from G4UImessenger
 G4UImessenger ()
 
 G4UImessenger (const G4String &path, const G4String &dsc, G4bool commandsToBeBroadcasted=true)
 
virtual ~G4UImessenger ()
 
virtual G4String GetCurrentValue (G4UIcommand *command)
 
G4bool operator== (const G4UImessenger &messenger) const
 
G4bool CommandsShouldBeInMaster () const
 

Private Attributes

CexmcReconstructorreconstructor
 
G4UIcmdWithAStringsetCalorimeterEntryPointDefinitionAlgorithm
 
G4UIcmdWithAStringsetCalorimeterEntryPointDepthDefinitionAlgorithm
 
G4UIcmdWithAStringsetCrystalSelectionAlgorithm
 
G4UIcmdWithABooluseInnerRefCrystal
 
G4UIcmdWithADoubleAndUnitsetCalorimeterEntryPointDepth
 

Additional Inherited Members

- Protected Member Functions inherited from G4UImessenger
G4String ItoS (G4int i)
 
G4String DtoS (G4double a)
 
G4String BtoS (G4bool b)
 
G4int StoI (G4String s)
 
G4double StoD (G4String s)
 
G4bool StoB (G4String s)
 
void AddUIcommand (G4UIcommand *newCommand)
 
void CreateDirectory (const G4String &path, const G4String &dsc, G4bool commandsToBeBroadcasted=true)
 
template<typename T >
T * CreateCommand (const G4String &cname, const G4String &dsc)
 
- Protected Attributes inherited from G4UImessenger
G4UIdirectorybaseDir
 
G4String baseDirName
 
G4bool commandsShouldBeInMaster
 

Detailed Description

Definition at line 56 of file CexmcReconstructorMessenger.hh.

Constructor & Destructor Documentation

◆ CexmcReconstructorMessenger()

CexmcReconstructorMessenger::CexmcReconstructorMessenger ( CexmcReconstructor reconstructor)
explicit

Definition at line 53 of file CexmcReconstructorMessenger.cc.

54  :
55  reconstructor( reconstructor ),
59 {
61  ( CexmcMessenger::reconstructorDirName + "entryPointDefinitionAlgo" ).
62  c_str(), this );
64  "\n Algorithm to reconstruct entry point of output particle"
65  "\n decay products in calorimeter"
66  "\n (none of the following algorithms reconstruct directions)\n"
67  " center - entry points defined in the center of the\n"
68  " calorimeters,\n"
69  " simple - entry points defined in the center of the crystal\n"
70  " that has maximum energy deposit value,\n"
71  " linear - entry points defined by linear weights of energy\n"
72  " deposit in crystals,\n"
73  " sqrt - entry points defined by square root weights of\n"
74  " energy deposit in crystals" );
76  "EntryPointDefinitionAlgo", false );
78  "center simple linear sqrt" );
82 
85  "entryPointDepthDefinitionAlgo" ).c_str(), this );
87  "\n Algorithm to reconstruct entry point depth of output\n"
88  " particle decay products in calorimeter\n"
89  " (value is defined by 'entryPointDepth' parameter)\n"
90  " plain - depth is a constant\n"
91  " sphere - depth depends on X and Y of calorimeter entry\n"
92  " points and locates on surface of a sphere\n"
93  " with origin in the center of the target;\n"
94  " radius of the sphere is sum of distance to\n"
95  " the calorimeter and 'entryPointDepth' value" );
97  "EntryPointDepthDefinitionAlgo", false );
99  "plain sphere" );
101  "plain" );
104 
106  ( CexmcMessenger::reconstructorDirName + "crystalSelectionAlgo" ).
107  c_str(), this );
109  "\n Choose crystals to be selected in weighted entry point\n"
110  " reconstruction algorithms\n"
111  " all - all,\n"
112  " adjacent - crystal with maximum energy deposit and\n"
113  " adjacent crystals" );
114  setCrystalSelectionAlgorithm->SetParameterName( "CrystalSelAlgo", false );
115  setCrystalSelectionAlgorithm->SetCandidates( "all adjacent" );
118  G4State_Idle );
119 
121  ( CexmcMessenger::reconstructorDirName + "useInnerRefCrystal" ).
122  c_str(), this );
124  "\n Defines that if the crystal with maximum energy deposit in\n"
125  " calorimeter is an outer crystal then the closest inner crystal\n"
126  " will be chosen as the reference for adjacent crystal selection\n"
127  " algorithm and simple entry point definition algorithm. It also\n"
128  " affects energy deposit collection if adjacent crystals\n"
129  " algorithm was chosen for that. If not set then the reference\n"
130  " crystal will be found from all crystals in calorimeter" );
131  useInnerRefCrystal->SetParameterName( "UseInnerRefCrystal", true );
134 
136  ( CexmcMessenger::reconstructorDirName + "entryPointDepth" ).c_str(),
137  this );
139  "\n Depth of entry point used in reconstruction of angle\n"
140  " between output particle decay products" );
141  setCalorimeterEntryPointDepth->SetParameterName( "EntryPointDepth", false );
146  G4State_Idle );
147 }
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
G4UIcmdWithAString * setCrystalSelectionAlgorithm
void SetDefaultValue(G4bool defVal)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetGuidance(const char *aGuidance)
Definition: G4UIcommand.hh:161
static G4String reconstructorDirName
void AvailableForStates(G4ApplicationState s1)
Definition: G4UIcommand.cc:239
G4UIcmdWithADoubleAndUnit * setCalorimeterEntryPointDepth
void SetDefaultValue(const char *defVal)
void SetDefaultUnit(const char *defUnit)
void SetCandidates(const char *candidateList)
G4UIcmdWithAString * setCalorimeterEntryPointDefinitionAlgorithm
G4UIcmdWithAString * setCalorimeterEntryPointDepthDefinitionAlgorithm
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetUnitCandidates(const char *candidateList)
Here is the call graph for this function:

◆ ~CexmcReconstructorMessenger()

CexmcReconstructorMessenger::~CexmcReconstructorMessenger ( )

Definition at line 150 of file CexmcReconstructorMessenger.cc.

151 {
155  delete useInnerRefCrystal;
157 }
G4UIcmdWithAString * setCrystalSelectionAlgorithm
G4UIcmdWithADoubleAndUnit * setCalorimeterEntryPointDepth
G4UIcmdWithAString * setCalorimeterEntryPointDefinitionAlgorithm
G4UIcmdWithAString * setCalorimeterEntryPointDepthDefinitionAlgorithm

Member Function Documentation

◆ SetNewValue()

void CexmcReconstructorMessenger::SetNewValue ( G4UIcommand cmd,
G4String  value 
)
virtual

Reimplemented from G4UImessenger.

Definition at line 160 of file CexmcReconstructorMessenger.cc.

162 {
163  do
164  {
166  {
168  epDefinitionAlgorithm( CexmcEntryPointInTheCenter );
169  do
170  {
171  if ( value == "simple" )
172  {
173  epDefinitionAlgorithm =
175  break;
176  }
177  if ( value == "linear" )
178  {
179  epDefinitionAlgorithm = CexmcEntryPointByLinearEDWeights;
180  break;
181  }
182  if ( value == "sqrt" )
183  {
184  epDefinitionAlgorithm = CexmcEntryPointBySqrtEDWeights;
185  break;
186  }
187  } while ( false );
189  epDefinitionAlgorithm );
190  break;
191  }
193  {
195  epDepthDefinitionAlgorithm( CexmcEntryPointDepthPlain );
196  do
197  {
198  if ( value == "sphere" )
199  {
200  epDepthDefinitionAlgorithm = CexmcEntryPointDepthSphere;
201  break;
202  }
203  } while ( false );
205  epDepthDefinitionAlgorithm );
206  break;
207  }
208  if ( cmd == setCrystalSelectionAlgorithm )
209  {
211  csAlgorithm( CexmcSelectAllCrystals );
212  do
213  {
214  if ( value == "adjacent" )
215  {
216  csAlgorithm = CexmcSelectAdjacentCrystals;
217  break;
218  }
219  } while ( false );
221  break;
222  }
223  if ( cmd == useInnerRefCrystal )
224  {
227  break;
228  }
229  if ( cmd == setCalorimeterEntryPointDepth )
230  {
233  break;
234  }
235  } while ( false );
236 }
G4UIcmdWithAString * setCrystalSelectionAlgorithm
static G4double GetNewDoubleValue(const char *paramString)
static G4bool GetNewBoolValue(const char *paramString)
void SetCalorimeterEntryPointDepth(G4double depth)
CexmcCrystalSelectionAlgorithm
Definition: CexmcCommon.hh:170
void SetCrystalSelectionAlgorithm(CexmcCrystalSelectionAlgorithm algo)
void SetCalorimeterEntryPointDefinitionAlgorithm(CexmcCalorimeterEntryPointDefinitionAlgorithm algo)
G4UIcmdWithADoubleAndUnit * setCalorimeterEntryPointDepth
void UseInnerRefCrystal(G4bool on=true)
void SetCalorimeterEntryPointDepthDefinitionAlgorithm(CexmcCalorimeterEntryPointDepthDefinitionAlgorithm algo)
G4UIcmdWithAString * setCalorimeterEntryPointDefinitionAlgorithm
G4UIcmdWithAString * setCalorimeterEntryPointDepthDefinitionAlgorithm
CexmcCalorimeterEntryPointDepthDefinitionAlgorithm
Definition: CexmcCommon.hh:163
CexmcCalorimeterEntryPointDefinitionAlgorithm
Definition: CexmcCommon.hh:154
Here is the call graph for this function:

Member Data Documentation

◆ reconstructor

CexmcReconstructor* CexmcReconstructorMessenger::reconstructor
private

Definition at line 68 of file CexmcReconstructorMessenger.hh.

◆ setCalorimeterEntryPointDefinitionAlgorithm

G4UIcmdWithAString* CexmcReconstructorMessenger::setCalorimeterEntryPointDefinitionAlgorithm
private

Definition at line 70 of file CexmcReconstructorMessenger.hh.

◆ setCalorimeterEntryPointDepth

G4UIcmdWithADoubleAndUnit* CexmcReconstructorMessenger::setCalorimeterEntryPointDepth
private

Definition at line 78 of file CexmcReconstructorMessenger.hh.

◆ setCalorimeterEntryPointDepthDefinitionAlgorithm

G4UIcmdWithAString* CexmcReconstructorMessenger::setCalorimeterEntryPointDepthDefinitionAlgorithm
private

Definition at line 72 of file CexmcReconstructorMessenger.hh.

◆ setCrystalSelectionAlgorithm

G4UIcmdWithAString* CexmcReconstructorMessenger::setCrystalSelectionAlgorithm
private

Definition at line 74 of file CexmcReconstructorMessenger.hh.

◆ useInnerRefCrystal

G4UIcmdWithABool* CexmcReconstructorMessenger::useInnerRefCrystal
private

Definition at line 76 of file CexmcReconstructorMessenger.hh.


The documentation for this class was generated from the following files: