Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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
 

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 ( CexmcReconstructor reconstructor)
explicit

Definition at line 53 of file CexmcReconstructorMessenger.cc.

54  :
55  reconstructor( reconstructor ),
56  setCalorimeterEntryPointDefinitionAlgorithm( NULL ),
57  setCrystalSelectionAlgorithm( NULL ), useInnerRefCrystal( NULL ),
58  setCalorimeterEntryPointDepth( NULL )
59 {
60  setCalorimeterEntryPointDefinitionAlgorithm = new G4UIcmdWithAString(
61  ( CexmcMessenger::reconstructorDirName + "entryPointDefinitionAlgo" ).
62  c_str(), this );
63  setCalorimeterEntryPointDefinitionAlgorithm->SetGuidance(
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" );
75  setCalorimeterEntryPointDefinitionAlgorithm->SetParameterName(
76  "EntryPointDefinitionAlgo", false );
77  setCalorimeterEntryPointDefinitionAlgorithm->SetCandidates(
78  "center simple linear sqrt" );
79  setCalorimeterEntryPointDefinitionAlgorithm->SetDefaultValue( "sqrt" );
80  setCalorimeterEntryPointDefinitionAlgorithm->AvailableForStates(
82 
83  setCalorimeterEntryPointDepthDefinitionAlgorithm = new G4UIcmdWithAString(
85  "entryPointDepthDefinitionAlgo" ).c_str(), this );
86  setCalorimeterEntryPointDepthDefinitionAlgorithm->SetGuidance(
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" );
96  setCalorimeterEntryPointDepthDefinitionAlgorithm->SetParameterName(
97  "EntryPointDepthDefinitionAlgo", false );
98  setCalorimeterEntryPointDepthDefinitionAlgorithm->SetCandidates(
99  "plain sphere" );
100  setCalorimeterEntryPointDepthDefinitionAlgorithm->SetDefaultValue(
101  "plain" );
102  setCalorimeterEntryPointDepthDefinitionAlgorithm->AvailableForStates(
104 
105  setCrystalSelectionAlgorithm = new G4UIcmdWithAString(
106  ( CexmcMessenger::reconstructorDirName + "crystalSelectionAlgo" ).
107  c_str(), this );
108  setCrystalSelectionAlgorithm->SetGuidance(
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" );
116  setCrystalSelectionAlgorithm->SetDefaultValue( "all" );
117  setCrystalSelectionAlgorithm->AvailableForStates( G4State_PreInit,
118  G4State_Idle );
119 
120  useInnerRefCrystal = new G4UIcmdWithABool(
121  ( CexmcMessenger::reconstructorDirName + "useInnerRefCrystal" ).
122  c_str(), this );
123  useInnerRefCrystal->SetGuidance(
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 );
132  useInnerRefCrystal->SetDefaultValue( true );
133  useInnerRefCrystal->AvailableForStates( G4State_PreInit, G4State_Idle );
134 
135  setCalorimeterEntryPointDepth = new G4UIcmdWithADoubleAndUnit(
136  ( CexmcMessenger::reconstructorDirName + "entryPointDepth" ).c_str(),
137  this );
138  setCalorimeterEntryPointDepth->SetGuidance(
139  "\n Depth of entry point used in reconstruction of angle\n"
140  " between output particle decay products" );
141  setCalorimeterEntryPointDepth->SetParameterName( "EntryPointDepth", false );
142  setCalorimeterEntryPointDepth->SetDefaultValue( 0 );
143  setCalorimeterEntryPointDepth->SetUnitCandidates( "mm cm m" );
144  setCalorimeterEntryPointDepth->SetDefaultUnit( "cm" );
145  setCalorimeterEntryPointDepth->AvailableForStates( G4State_PreInit,
146  G4State_Idle );
147 }
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
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:240
void SetDefaultValue(const char *defVal)
void SetDefaultUnit(const char *defUnit)
void SetCandidates(const char *candidateList)
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 ( )

Definition at line 150 of file CexmcReconstructorMessenger.cc.

151 {
152  delete setCalorimeterEntryPointDefinitionAlgorithm;
153  delete setCalorimeterEntryPointDepthDefinitionAlgorithm;
154  delete setCrystalSelectionAlgorithm;
155  delete useInnerRefCrystal;
156  delete setCalorimeterEntryPointDepth;
157 }

Member Function Documentation

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

Reimplemented from G4UImessenger.

Definition at line 160 of file CexmcReconstructorMessenger.cc.

162 {
163  do
164  {
165  if ( cmd == setCalorimeterEntryPointDefinitionAlgorithm )
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  }
192  if ( cmd == setCalorimeterEntryPointDepthDefinitionAlgorithm )
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 );
220  reconstructor->SetCrystalSelectionAlgorithm( csAlgorithm );
221  break;
222  }
223  if ( cmd == useInnerRefCrystal )
224  {
225  reconstructor->UseInnerRefCrystal(
227  break;
228  }
229  if ( cmd == setCalorimeterEntryPointDepth )
230  {
231  reconstructor->SetCalorimeterEntryPointDepth(
233  break;
234  }
235  } while ( false );
236 }
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)
void UseInnerRefCrystal(G4bool on=true)
void SetCalorimeterEntryPointDepthDefinitionAlgorithm(CexmcCalorimeterEntryPointDepthDefinitionAlgorithm algo)
CexmcCalorimeterEntryPointDepthDefinitionAlgorithm
Definition: CexmcCommon.hh:163
CexmcCalorimeterEntryPointDefinitionAlgorithm
Definition: CexmcCommon.hh:154

Here is the call graph for this function:


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