Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions
CexmcChargeExchangeReconstructorMessenger Class Reference

#include <CexmcChargeExchangeReconstructorMessenger.hh>

Inheritance diagram for CexmcChargeExchangeReconstructorMessenger:
G4UImessenger

Public Member Functions

 CexmcChargeExchangeReconstructorMessenger (CexmcChargeExchangeReconstructor *reconstructor)
 
 ~CexmcChargeExchangeReconstructorMessenger ()
 
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
 

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
 

Detailed Description

Definition at line 56 of file CexmcChargeExchangeReconstructorMessenger.hh.

Constructor & Destructor Documentation

CexmcChargeExchangeReconstructorMessenger::CexmcChargeExchangeReconstructorMessenger ( CexmcChargeExchangeReconstructor reconstructor)
explicit

Definition at line 53 of file CexmcChargeExchangeReconstructorMessenger.cc.

References G4UIcommand::AvailableForStates(), G4State_Idle, G4State_PreInit, CexmcChargeExchangeReconstructor::GetProductionModelData(), CexmcMessenger::reconstructorDirName, G4UIcmdWithAString::SetCandidates(), G4UIcmdWithADoubleAndUnit::SetDefaultUnit(), G4UIcmdWithAString::SetDefaultValue(), G4UIcmdWithABool::SetDefaultValue(), G4UIcmdWithADoubleAndUnit::SetDefaultValue(), G4UIcommand::SetGuidance(), G4UIcmdWithAString::SetParameterName(), G4UIcmdWithABool::SetParameterName(), G4UIcmdWithADoubleAndUnit::SetParameterName(), G4UIcommand::SetRange(), and G4UIcmdWithADoubleAndUnit::SetUnitCandidates().

54  :
55  reconstructor( reconstructor ), useTableMass( NULL ),
56  useMassCut( NULL ), mCutOPCenter( NULL ), mCutNOPCenter( NULL ),
57  mCutOPWidth( NULL ), mCutNOPWidth( NULL ), mCutAngle( NULL ),
58  useAbsorbedEnergyCut( NULL ), aeCutCLCenter( NULL ),
59  aeCutCRCenter( NULL ), aeCutCLWidth( NULL ), aeCutCRWidth( NULL ),
60  aeCutAngle( NULL ), setExpectedMomentumAmp( NULL ),
61  setExpectedMomentumAmpDiff( NULL ), setEDCollectionAlgorithm( NULL )
62 {
63  useTableMass = new G4UIcmdWithABool(
64  ( CexmcMessenger::reconstructorDirName + "useTableMass" ).c_str(),
65  this );
66  useTableMass->SetGuidance( "\n If true then reconstructor will use "
67  "table mass of output\n particle when building output particle "
68  "energy,\n otherwise reconstructed mass will be used" );
69  useTableMass->SetParameterName( "UseTableMass", true );
70  useTableMass->SetDefaultValue( true );
72 
73  useMassCut = new G4UIcmdWithABool(
74  ( CexmcMessenger::reconstructorDirName + "useMassCut" ).c_str(), this );
75  useMassCut->SetGuidance( "\n Use elliptical cut for masses of output "
76  "particle\n and nucleus output particle" );
77  useMassCut->SetParameterName( "UseMassCut", true );
78  useMassCut->SetDefaultValue( true );
80 
81  mCutOPCenter = new G4UIcmdWithADoubleAndUnit(
82  ( CexmcMessenger::reconstructorDirName + "mCutOPCenter" ).c_str(),
83  this );
84  mCutOPCenter->SetGuidance( "\n Center of the ellipse in output particle "
85  "mass coordinate" );
86  mCutOPCenter->SetParameterName( "MCutOPCenter", false );
87  mCutOPCenter->SetDefaultValue( reconstructor->GetProductionModelData().
88  outputParticle->GetPDGMass() );
89  mCutOPCenter->SetUnitCandidates( "eV keV MeV GeV" );
90  mCutOPCenter->SetDefaultUnit( "MeV" );
92 
93  mCutNOPCenter = new G4UIcmdWithADoubleAndUnit(
94  ( CexmcMessenger::reconstructorDirName + "mCutNOPCenter" ).c_str(),
95  this );
96  mCutNOPCenter->SetGuidance( "\n Center of the ellipse in nucleus output "
97  "particle mass\n coordinate" );
98  mCutNOPCenter->SetParameterName( "MCutNOPCenter", false );
99  mCutNOPCenter->SetDefaultValue( reconstructor->GetProductionModelData().
100  nucleusOutputParticle->GetPDGMass() );
101  mCutNOPCenter->SetUnitCandidates( "eV keV MeV GeV" );
102  mCutNOPCenter->SetDefaultUnit( "MeV" );
104 
105  mCutOPWidth = new G4UIcmdWithADoubleAndUnit(
106  ( CexmcMessenger::reconstructorDirName + "mCutOPWidth" ).c_str(),
107  this );
108  mCutOPWidth->SetGuidance( "\n Width of the ellipse in output particle "
109  "mass coordinate" );
110  mCutOPWidth->SetParameterName( "MCutOPWidth", false );
111  mCutOPWidth->SetDefaultValue( reconstructor->GetProductionModelData().
112  outputParticle->GetPDGMass() * 0.1 );
113  mCutOPWidth->SetUnitCandidates( "eV keV MeV GeV" );
114  mCutOPWidth->SetDefaultUnit( "MeV" );
116 
117  mCutNOPWidth = new G4UIcmdWithADoubleAndUnit(
118  ( CexmcMessenger::reconstructorDirName + "mCutNOPWidth" ).c_str(),
119  this );
120  mCutNOPWidth->SetGuidance( "\n Width of the ellipse in nucleus output "
121  "particle mass\n coordinate" );
122  mCutNOPWidth->SetParameterName( "MCutNOPWidth", false );
123  mCutNOPWidth->SetDefaultValue( reconstructor->GetProductionModelData().
124  nucleusOutputParticle->GetPDGMass() * 0.1 );
125  mCutNOPWidth->SetUnitCandidates( "eV keV MeV GeV" );
126  mCutNOPWidth->SetDefaultUnit( "MeV" );
128 
129  mCutAngle = new G4UIcmdWithADoubleAndUnit(
130  ( CexmcMessenger::reconstructorDirName + "mCutAngle" ).c_str(),
131  this );
132  mCutAngle->SetGuidance( "\n Angle of the ellipse" );
133  mCutAngle->SetParameterName( "MCutAngle", false );
134  mCutAngle->SetDefaultValue( 0 );
135  mCutAngle->SetUnitCandidates( "deg rad" );
136  mCutAngle->SetDefaultUnit( "deg" );
138 
139  useAbsorbedEnergyCut = new G4UIcmdWithABool(
140  ( CexmcMessenger::reconstructorDirName + "useAbsorbedEnergyCut" ).
141  c_str(), this );
142  useAbsorbedEnergyCut->SetGuidance( "\n Use elliptical cut for absorbed "
143  "energies in\n calorimeters" );
144  useAbsorbedEnergyCut->SetParameterName( "UseAbsorbedEnergyCut", true );
145  useAbsorbedEnergyCut->SetDefaultValue( true );
146  useAbsorbedEnergyCut->AvailableForStates( G4State_PreInit, G4State_Idle );
147 
148  aeCutCLCenter = new G4UIcmdWithADoubleAndUnit(
149  ( CexmcMessenger::reconstructorDirName + "aeCutCLCenter" ).c_str(),
150  this );
151  aeCutCLCenter->SetGuidance( "\n Center of the ellipse in left "
152  "calorimeter\n absorbed energy coordinate" );
153  aeCutCLCenter->SetParameterName( "AECutCLCenter", false );
154  aeCutCLCenter->SetDefaultValue( 0 );
155  aeCutCLCenter->SetUnitCandidates( "eV keV MeV GeV" );
156  aeCutCLCenter->SetDefaultUnit( "MeV" );
158 
159  aeCutCRCenter = new G4UIcmdWithADoubleAndUnit(
160  ( CexmcMessenger::reconstructorDirName + "aeCutCRCenter" ).c_str(),
161  this );
162  aeCutCRCenter->SetGuidance( "\n Center of the ellipse in right "
163  "calorimeter\n absorbed energy coordinate" );
164  aeCutCRCenter->SetParameterName( "AECutCRCenter", false );
165  aeCutCRCenter->SetDefaultValue( 0 );
166  aeCutCRCenter->SetUnitCandidates( "eV keV MeV GeV" );
167  aeCutCRCenter->SetDefaultUnit( "MeV" );
169 
170  aeCutCLWidth = new G4UIcmdWithADoubleAndUnit(
171  ( CexmcMessenger::reconstructorDirName + "aeCutCLWidth" ).c_str(),
172  this );
173  aeCutCLWidth->SetGuidance( "\n Width of the ellipse in left calorimeter"
174  "\n absorbed energy coordinate" );
175  aeCutCLWidth->SetParameterName( "AECutCLWidth", false );
176  aeCutCLWidth->SetDefaultValue( 0 );
177  aeCutCLWidth->SetUnitCandidates( "eV keV MeV GeV" );
178  aeCutCLWidth->SetDefaultUnit( "MeV" );
180 
181  aeCutCRWidth = new G4UIcmdWithADoubleAndUnit(
182  ( CexmcMessenger::reconstructorDirName + "aeCutCRWidth" ).c_str(),
183  this );
184  aeCutCRWidth->SetGuidance( "\n Width of the ellipse in right calorimeter"
185  "\n absorbed energy coordinate" );
186  aeCutCRWidth->SetParameterName( "AECutCRWidth", false );
187  aeCutCRWidth->SetDefaultValue( 0 );
188  aeCutCRWidth->SetUnitCandidates( "eV keV MeV GeV" );
189  aeCutCRWidth->SetDefaultUnit( "MeV" );
191 
192  aeCutAngle = new G4UIcmdWithADoubleAndUnit(
193  ( CexmcMessenger::reconstructorDirName + "aeCutAngle" ).c_str(),
194  this );
195  aeCutAngle->SetGuidance( "\n Angle of the ellipse" );
196  aeCutAngle->SetParameterName( "AECutAngle", false );
197  aeCutAngle->SetDefaultValue( 0 );
198  aeCutAngle->SetUnitCandidates( "deg rad" );
199  aeCutAngle->SetDefaultUnit( "deg" );
201 
202  setExpectedMomentumAmp = new G4UIcmdWithADoubleAndUnit(
203  ( CexmcMessenger::reconstructorDirName + "momentumAmp" ).c_str(),
204  this );
205  setExpectedMomentumAmp->SetGuidance( "\n Momentum of a beam particle "
206  "expected in the target;\n this value may differ from original "
207  "momentum\n of the beam as far as profile data of the beam refer\n"
208  " to the place where it starts. This parameter is used only\n"
209  " in reconstruction procedure");
210  setExpectedMomentumAmp->SetParameterName( "RecMomentumAmp", false );
211  setExpectedMomentumAmp->SetRange( "RecMomentumAmp > 0" );
212  setExpectedMomentumAmp->SetUnitCandidates( "eV keV MeV GeV" );
213  setExpectedMomentumAmp->SetDefaultUnit( "MeV" );
214  setExpectedMomentumAmp->AvailableForStates( G4State_PreInit, G4State_Idle );
215 
216  setExpectedMomentumAmpDiff = new G4UIcmdWithADoubleAndUnit(
217  ( CexmcMessenger::reconstructorDirName + "momentumAmpDiff" ).c_str(),
218  this );
219  setExpectedMomentumAmpDiff->SetGuidance( "\n Expected difference "
220  "between momenta of the beam\n on its start and in the target. This "
221  "parameter can\n be used to automatically calculate value of the\n"
222  " previous parameter 'momentumAmp'" );
223  setExpectedMomentumAmpDiff->SetParameterName( "RecMomentumAmpDiff", false );
224  setExpectedMomentumAmpDiff->SetDefaultValue( 0 );
225  setExpectedMomentumAmpDiff->SetUnitCandidates( "eV keV MeV GeV" );
226  setExpectedMomentumAmpDiff->SetDefaultUnit( "MeV" );
227  setExpectedMomentumAmpDiff->AvailableForStates( G4State_PreInit,
228  G4State_Idle );
229 
230  setEDCollectionAlgorithm = new G4UIcmdWithAString(
231  ( CexmcMessenger::reconstructorDirName + "edCollectionAlgo" ).c_str(),
232  this );
233  setEDCollectionAlgorithm->SetGuidance(
234  "\n Choose crystals to be selected when energy deposit collected\n"
235  " all - all,\n"
236  " adjacent - crystal with maximum energy deposit and\n"
237  " adjacent crystals" );
238  setEDCollectionAlgorithm->SetParameterName( "EDCollectionAlgo", false );
239  setEDCollectionAlgorithm->SetCandidates( "all adjacent" );
240  setEDCollectionAlgorithm->SetDefaultValue( "all" );
241  setEDCollectionAlgorithm->AvailableForStates( G4State_PreInit,
242  G4State_Idle );
243 }
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 SetRange(const char *rs)
Definition: G4UIcommand.hh:125
void SetGuidance(const char *aGuidance)
Definition: G4UIcommand.hh:161
static G4String reconstructorDirName
void AvailableForStates(G4ApplicationState s1)
Definition: G4UIcommand.cc:225
const CexmcProductionModelData & GetProductionModelData(void) const
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)
CexmcChargeExchangeReconstructorMessenger::~CexmcChargeExchangeReconstructorMessenger ( )

Definition at line 247 of file CexmcChargeExchangeReconstructorMessenger.cc.

248 {
249  delete useTableMass;
250  delete useMassCut;
251  delete mCutOPCenter;
252  delete mCutNOPCenter;
253  delete mCutOPWidth;
254  delete mCutNOPWidth;
255  delete mCutAngle;
256  delete useAbsorbedEnergyCut;
257  delete aeCutCLCenter;
258  delete aeCutCRCenter;
259  delete aeCutCLWidth;
260  delete aeCutCRWidth;
261  delete aeCutAngle;
262  delete setExpectedMomentumAmp;
263  delete setExpectedMomentumAmpDiff;
264  delete setEDCollectionAlgorithm;
265 }

Member Function Documentation

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

Reimplemented from G4UImessenger.

Definition at line 268 of file CexmcChargeExchangeReconstructorMessenger.cc.

References CexmcCollectEDInAdjacentCrystals, CexmcCollectEDInAllCrystals, G4UIcmdWithABool::GetNewBoolValue(), G4UIcmdWithADoubleAndUnit::GetNewDoubleValue(), CexmcChargeExchangeReconstructor::SetAbsorbedEnergyCutCLCenter(), CexmcChargeExchangeReconstructor::SetAbsorbedEnergyCutCLWidth(), CexmcChargeExchangeReconstructor::SetAbsorbedEnergyCutCRCenter(), CexmcChargeExchangeReconstructor::SetAbsorbedEnergyCutCRWidth(), CexmcChargeExchangeReconstructor::SetAbsorbedEnergyCutEllipseAngle(), CexmcChargeExchangeReconstructor::SetEDCollectionAlgorithm(), CexmcChargeExchangeReconstructor::SetExpectedMomentumAmp(), CexmcChargeExchangeReconstructor::SetExpectedMomentumAmpDiff(), CexmcChargeExchangeReconstructor::SetMassCutEllipseAngle(), CexmcChargeExchangeReconstructor::SetMassCutNOPCenter(), CexmcChargeExchangeReconstructor::SetMassCutNOPWidth(), CexmcChargeExchangeReconstructor::SetMassCutOPCenter(), CexmcChargeExchangeReconstructor::SetMassCutOPWidth(), CexmcChargeExchangeReconstructor::UseAbsorbedEnergyCut(), CexmcChargeExchangeReconstructor::UseMassCut(), and CexmcChargeExchangeReconstructor::UseTableMass().

270 {
271  do
272  {
273  if ( cmd == useTableMass )
274  {
275  reconstructor->UseTableMass(
277  break;
278  }
279  if ( cmd == useMassCut )
280  {
281  reconstructor->UseMassCut(
283  break;
284  }
285  if ( cmd == mCutOPCenter )
286  {
287  reconstructor->SetMassCutOPCenter(
289  break;
290  }
291  if ( cmd == mCutNOPCenter )
292  {
293  reconstructor->SetMassCutNOPCenter(
295  break;
296  }
297  if ( cmd == mCutOPWidth )
298  {
299  reconstructor->SetMassCutOPWidth(
301  break;
302  }
303  if ( cmd == mCutNOPWidth )
304  {
305  reconstructor->SetMassCutNOPWidth(
307  break;
308  }
309  if ( cmd == mCutAngle )
310  {
311  reconstructor->SetMassCutEllipseAngle(
313  break;
314  }
315  if ( cmd == useAbsorbedEnergyCut )
316  {
317  reconstructor->UseAbsorbedEnergyCut(
319  break;
320  }
321  if ( cmd == aeCutCLCenter )
322  {
323  reconstructor->SetAbsorbedEnergyCutCLCenter(
325  break;
326  }
327  if ( cmd == aeCutCRCenter )
328  {
329  reconstructor->SetAbsorbedEnergyCutCRCenter(
331  break;
332  }
333  if ( cmd == aeCutCLWidth )
334  {
335  reconstructor->SetAbsorbedEnergyCutCLWidth(
337  break;
338  }
339  if ( cmd == aeCutCRWidth )
340  {
341  reconstructor->SetAbsorbedEnergyCutCRWidth(
343  break;
344  }
345  if ( cmd == aeCutAngle )
346  {
347  reconstructor->SetAbsorbedEnergyCutEllipseAngle(
349  break;
350  }
351  if ( cmd == setExpectedMomentumAmp )
352  {
353  reconstructor->SetExpectedMomentumAmp(
355  break;
356  }
357  if ( cmd == setExpectedMomentumAmpDiff )
358  {
359  reconstructor->SetExpectedMomentumAmpDiff(
361  break;
362  }
363  if ( cmd == setEDCollectionAlgorithm )
364  {
366  edCollectionAlgorithm( CexmcCollectEDInAllCrystals );
367  do
368  {
369  if ( value == "adjacent" )
370  {
371  edCollectionAlgorithm = CexmcCollectEDInAdjacentCrystals;
372  break;
373  }
374  } while ( false );
375  reconstructor->SetEDCollectionAlgorithm( edCollectionAlgorithm );
376  break;
377  }
378  } while ( false );
379 }
static G4double GetNewDoubleValue(const char *paramString)
static G4bool GetNewBoolValue(const char *paramString)
void SetEDCollectionAlgorithm(CexmcEDCollectionAlgoritm value)
CexmcEDCollectionAlgoritm
Definition: CexmcCommon.hh:177

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