Geant4  10.02.p03
CexmcEnergyDepositDigitizerMessenger Class Reference

#include <CexmcEnergyDepositDigitizerMessenger.hh>

Inheritance diagram for CexmcEnergyDepositDigitizerMessenger:
Collaboration diagram for CexmcEnergyDepositDigitizerMessenger:

Public Member Functions

 CexmcEnergyDepositDigitizerMessenger (CexmcEnergyDepositDigitizer *energyDepositDigitiser)
 
 ~CexmcEnergyDepositDigitizerMessenger ()
 
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

CexmcEnergyDepositDigitizerenergyDepositDigitizer
 
G4UIcmdWithADoubleAndUnitsetMonitorThreshold
 
G4UIcmdWithADoubleAndUnitsetVetoCountersThreshold
 
G4UIcmdWithADoubleAndUnitsetLeftVetoCounterThreshold
 
G4UIcmdWithADoubleAndUnitsetRightVetoCounterThreshold
 
G4UIcmdWithADoubleAndUnitsetCalorimetersThreshold
 
G4UIcmdWithADoubleAndUnitsetLeftCalorimeterThreshold
 
G4UIcmdWithADoubleAndUnitsetRightCalorimeterThreshold
 
G4UIcmdWithAStringsetCalorimeterTriggerAlgorithm
 
G4UIcmdWithAStringsetOuterCrystalsVetoAlgorithm
 
G4UIcmdWithADoublesetOuterCrystalsVetoFraction
 
G4UIcmdWithABoolapplyFiniteCrystalResolution
 
G4UIcmdWith3VectoraddCrystalResolutionRange
 
G4UIcmdWithoutParameterclearCrystalResolutionData
 

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 59 of file CexmcEnergyDepositDigitizerMessenger.hh.

Constructor & Destructor Documentation

◆ CexmcEnergyDepositDigitizerMessenger()

CexmcEnergyDepositDigitizerMessenger::CexmcEnergyDepositDigitizerMessenger ( CexmcEnergyDepositDigitizer energyDepositDigitiser)
explicit

Definition at line 56 of file CexmcEnergyDepositDigitizerMessenger.cc.

57  :
67 {
69  ( CexmcMessenger::monitorEDDirName + "threshold" ).c_str(), this );
70  setMonitorThreshold->SetGuidance( "Monitor trigger threshold" );
71  setMonitorThreshold->SetParameterName( "MonitorThreshold", false );
73  setMonitorThreshold->SetUnitCandidates( "ev keV MeV GeV" );
76 
78  ( CexmcMessenger::vetoCounterEDDirName + "threshold" ).c_str(),
79  this );
80  setVetoCountersThreshold->SetGuidance( "Veto counters trigger threshold" );
81  setVetoCountersThreshold->SetParameterName( "VetoCountersThreshold",
82  false );
84  setVetoCountersThreshold->SetUnitCandidates( "ev keV MeV GeV" );
87  G4State_Idle );
88 
90  ( CexmcMessenger::vetoCounterLeftEDDirName + "threshold" ).c_str(),
91  this );
93  "Left veto counter trigger threshold" );
94  setLeftVetoCounterThreshold->SetParameterName( "LeftVetoCounterThreshold",
95  false );
100  G4State_Idle );
101 
103  ( CexmcMessenger::vetoCounterRightEDDirName + "threshold" ).c_str(),
104  this );
106  "Right veto counter trigger threshold" );
107  setRightVetoCounterThreshold->SetParameterName( "RightVetoCounterThreshold",
108  false );
110  setRightVetoCounterThreshold->SetUnitCandidates( "ev keV MeV GeV" );
113  G4State_Idle );
114 
116  ( CexmcMessenger::calorimeterEDDirName + "threshold" ).c_str(),
117  this );
118  setCalorimetersThreshold->SetGuidance( "Calorimeters trigger threshold" );
119  setCalorimetersThreshold->SetParameterName( "CalorimetersThreshold",
120  false );
122  setCalorimetersThreshold->SetUnitCandidates( "ev keV MeV GeV" );
125  G4State_Idle );
126 
128  ( CexmcMessenger::calorimeterLeftEDDirName + "threshold" ).c_str(),
129  this );
131  "Left calorimeter trigger threshold" );
132  setLeftCalorimeterThreshold->SetParameterName( "LeftCalorimeterThreshold",
133  false );
135  setLeftCalorimeterThreshold->SetUnitCandidates( "ev keV MeV GeV" );
138  G4State_Idle );
139 
141  ( CexmcMessenger::calorimeterRightEDDirName + "threshold" ).c_str(),
142  this );
144  "Right calorimeter trigger threshold" );
145  setRightCalorimeterThreshold->SetParameterName( "RightCalorimeterThreshold",
146  false );
148  setRightCalorimeterThreshold->SetUnitCandidates( "ev keV MeV GeV" );
151  G4State_Idle );
152 
155  "calorimeterTriggerAlgorithm" ).c_str(), this );
157  " all - energy deposit in all crystals in a calorimeter\n"
158  " will be checked against calorimeter threshold "
159  "value,\n"
160  " inner - energy deposit in only inner crystals\n"
161  " will be checked against calorimeter threshold "
162  "value" );
164  "CalorimeterTriggerAlgorithm", false );
168  G4State_Idle );
169 
172  "outerCrystalsVetoAlgorithm" ).c_str(), this );
174  " none - events will not be rejected by any algorithm,\n"
175  " max - reject event trigger if crystal with maximum energy "
176  "\n deposit is one of outer crystals,\n"
177  " fraction - reject event trigger if energy deposit "
178  "fraction in\n outer crystals is more than "
179  "value of\n 'outerCrystalsVetoFraction'" );
181  "OuterCrystalsVetoAlgorithm", false );
182  setOuterCrystalsVetoAlgorithm->SetCandidates( "none max fraction" );
185  G4State_Idle );
186 
189  "outerCrystalsVetoFraction" ).c_str(), this );
190  setOuterCrystalsVetoFraction->SetGuidance( "\n Fraction of whole energy "
191  "deposit in one calorimeter\n that belongs to outer crystals.\n"
192  " If 'outerCrystalsVetoAlgorithm' is 'fraction' and\n"
193  " the outer crystals energy deposit fraction exceeds "
194  "this\n value then event won't trigger" );
196  "OuterCrystalsVetoFraction", false );
199  G4State_Idle );
200 
203  "applyFiniteCrystalResolution" ).c_str(), this );
204  applyFiniteCrystalResolution->SetGuidance( "\n Specify if finite "
205  "energy resolution of the crystals\n will be accounted" );
207  "ApplyFiniteCrystalResolution", true );
210  G4State_Idle );
211 
214  "addCrystalResolutionRange" ).c_str(), this );
215  addCrystalResolutionRange->SetGuidance( "\n Add new energy range "
216  "(in GeV!) with fwhm percentage\n value of crystal resolution "
217  "in this range" );
219  "CrystalResolutionRangeBottom", "CrystalResolutionRangeTop",
220  "CrystalResolutionRangeValue", false );
221  addCrystalResolutionRange->SetRange( "CrystalResolutionRangeBottom >= 0. "
222  "&& CrystalResolutionRangeTop >= 0. && "
223  "CrystalResolutionRangeValue >= 0." );
225  G4State_Idle );
226 
229  "clearCrystalResolutionData" ).c_str(), this );
230  clearCrystalResolutionData->SetGuidance( "\n Clear all crystal "
231  "resolution ranges.\n Can be used to redefine crystal "
232  "resolution data" );
234  G4State_Idle );
235 }
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
static G4String vetoCounterEDDirName
void SetParameterName(const char *theNameX, const char *theNameY, const char *theNameZ, G4bool omittable, G4bool currentAsDefault=false)
static G4String monitorEDDirName
static G4String detectorDirName
static G4String calorimeterEDDirName
void SetDefaultValue(G4bool defVal)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
static G4String calorimeterRightEDDirName
void SetRange(const char *rs)
Definition: G4UIcommand.hh:125
void SetGuidance(const char *aGuidance)
Definition: G4UIcommand.hh:161
void AvailableForStates(G4ApplicationState s1)
Definition: G4UIcommand.cc:239
static G4String calorimeterLeftEDDirName
void SetDefaultValue(const char *defVal)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetDefaultUnit(const char *defUnit)
void SetDefaultValue(G4double defVal)
void SetCandidates(const char *candidateList)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
static G4String vetoCounterRightEDDirName
void SetUnitCandidates(const char *candidateList)
static G4String vetoCounterLeftEDDirName
Here is the call graph for this function:

◆ ~CexmcEnergyDepositDigitizerMessenger()

CexmcEnergyDepositDigitizerMessenger::~CexmcEnergyDepositDigitizerMessenger ( )

Definition at line 238 of file CexmcEnergyDepositDigitizerMessenger.cc.

239 {
240  delete setMonitorThreshold;
253 }

Member Function Documentation

◆ SetNewValue()

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

Reimplemented from G4UImessenger.

Definition at line 256 of file CexmcEnergyDepositDigitizerMessenger.cc.

258 {
259  do
260  {
261  if ( cmd == setMonitorThreshold )
262  {
265  break;
266  }
267  if ( cmd == setVetoCountersThreshold )
268  {
271  break;
272  }
273  if ( cmd == setLeftVetoCounterThreshold )
274  {
277  break;
278  }
279  if ( cmd == setRightVetoCounterThreshold )
280  {
283  break;
284  }
285  if ( cmd == setCalorimetersThreshold )
286  {
289  break;
290  }
291  if ( cmd == setLeftCalorimeterThreshold )
292  {
295  break;
296  }
297  if ( cmd == setRightCalorimeterThreshold )
298  {
301  break;
302  }
303  if ( cmd == setCalorimeterTriggerAlgorithm )
304  {
305  CexmcCalorimeterTriggerAlgorithm calorimeterTriggerAlgorithm(
307  do
308  {
309  if ( value == "inner" )
310  {
311  calorimeterTriggerAlgorithm =
313  break;
314  }
315  } while ( false );
317  calorimeterTriggerAlgorithm );
318  break;
319  }
320  if ( cmd == setOuterCrystalsVetoAlgorithm )
321  {
322  CexmcOuterCrystalsVetoAlgorithm outerCrystalsVetoAlgorithm(
324  do
325  {
326  if ( value == "max" )
327  {
328  outerCrystalsVetoAlgorithm =
330  break;
331  }
332  if ( value == "fraction" )
333  {
334  outerCrystalsVetoAlgorithm =
336  break;
337  }
338  } while ( false );
340  outerCrystalsVetoAlgorithm );
341  break;
342  }
343  if ( cmd == setOuterCrystalsVetoFraction )
344  {
347  break;
348  }
349  if ( cmd == applyFiniteCrystalResolution )
350  {
353  break;
354  }
355  if ( cmd == addCrystalResolutionRange )
356  {
358  value ) );
359  G4double bottom( std::min( vec.x(), vec.y() ) );
360  G4double top( std::max( vec.x(), vec.y() ) );
362  vec.z() );
363  break;
364  }
365  if ( cmd == clearCrystalResolutionData )
366  {
368  break;
369  }
370  } while ( false );
371 }
void SetOuterCrystalsVetoFraction(G4double value, G4bool fromMessenger=true)
void SetCalorimeterLeftThreshold(G4double value, G4bool fromMessenger=true)
void SetOuterCrystalsVetoAlgorithm(CexmcOuterCrystalsVetoAlgorithm value, G4bool fromMessenger=true)
void ClearCrystalResolutionData(G4bool fromMessenger=true)
void SetCalorimeterRightThreshold(G4double value, G4bool fromMessenger=true)
void SetVetoCounterRightThreshold(G4double value, G4bool fromMessenger=true)
static G4double GetNewDoubleValue(const char *paramString)
static G4bool GetNewBoolValue(const char *paramString)
static G4ThreeVector GetNew3VectorValue(const char *paramString)
void AddCrystalResolutionRange(G4double bottom, G4double top, G4double value, G4bool fromMessenger=true)
static G4double GetNewDoubleValue(const char *paramString)
void ApplyFiniteCrystalResolution(G4bool value, G4bool fromMessenger=true)
CexmcOuterCrystalsVetoAlgorithm
Definition: CexmcCommon.hh:139
void SetCalorimeterTriggerAlgorithm(CexmcCalorimeterTriggerAlgorithm value, G4bool fromMessenger=true)
void SetVetoCounterLeftThreshold(G4double value, G4bool fromMessenger=true)
double G4double
Definition: G4Types.hh:76
void SetMonitorThreshold(G4double value, G4bool fromMessenger=true)
CexmcCalorimeterTriggerAlgorithm
Definition: CexmcCommon.hh:147
Here is the call graph for this function:

Member Data Documentation

◆ addCrystalResolutionRange

G4UIcmdWith3Vector* CexmcEnergyDepositDigitizerMessenger::addCrystalResolutionRange
private

Definition at line 95 of file CexmcEnergyDepositDigitizerMessenger.hh.

◆ applyFiniteCrystalResolution

G4UIcmdWithABool* CexmcEnergyDepositDigitizerMessenger::applyFiniteCrystalResolution
private

Definition at line 93 of file CexmcEnergyDepositDigitizerMessenger.hh.

◆ clearCrystalResolutionData

G4UIcmdWithoutParameter* CexmcEnergyDepositDigitizerMessenger::clearCrystalResolutionData
private

Definition at line 97 of file CexmcEnergyDepositDigitizerMessenger.hh.

◆ energyDepositDigitizer

CexmcEnergyDepositDigitizer* CexmcEnergyDepositDigitizerMessenger::energyDepositDigitizer
private

Definition at line 71 of file CexmcEnergyDepositDigitizerMessenger.hh.

◆ setCalorimetersThreshold

G4UIcmdWithADoubleAndUnit* CexmcEnergyDepositDigitizerMessenger::setCalorimetersThreshold
private

Definition at line 81 of file CexmcEnergyDepositDigitizerMessenger.hh.

◆ setCalorimeterTriggerAlgorithm

G4UIcmdWithAString* CexmcEnergyDepositDigitizerMessenger::setCalorimeterTriggerAlgorithm
private

Definition at line 87 of file CexmcEnergyDepositDigitizerMessenger.hh.

◆ setLeftCalorimeterThreshold

G4UIcmdWithADoubleAndUnit* CexmcEnergyDepositDigitizerMessenger::setLeftCalorimeterThreshold
private

Definition at line 83 of file CexmcEnergyDepositDigitizerMessenger.hh.

◆ setLeftVetoCounterThreshold

G4UIcmdWithADoubleAndUnit* CexmcEnergyDepositDigitizerMessenger::setLeftVetoCounterThreshold
private

Definition at line 77 of file CexmcEnergyDepositDigitizerMessenger.hh.

◆ setMonitorThreshold

G4UIcmdWithADoubleAndUnit* CexmcEnergyDepositDigitizerMessenger::setMonitorThreshold
private

Definition at line 73 of file CexmcEnergyDepositDigitizerMessenger.hh.

◆ setOuterCrystalsVetoAlgorithm

G4UIcmdWithAString* CexmcEnergyDepositDigitizerMessenger::setOuterCrystalsVetoAlgorithm
private

Definition at line 89 of file CexmcEnergyDepositDigitizerMessenger.hh.

◆ setOuterCrystalsVetoFraction

G4UIcmdWithADouble* CexmcEnergyDepositDigitizerMessenger::setOuterCrystalsVetoFraction
private

Definition at line 91 of file CexmcEnergyDepositDigitizerMessenger.hh.

◆ setRightCalorimeterThreshold

G4UIcmdWithADoubleAndUnit* CexmcEnergyDepositDigitizerMessenger::setRightCalorimeterThreshold
private

Definition at line 85 of file CexmcEnergyDepositDigitizerMessenger.hh.

◆ setRightVetoCounterThreshold

G4UIcmdWithADoubleAndUnit* CexmcEnergyDepositDigitizerMessenger::setRightVetoCounterThreshold
private

Definition at line 79 of file CexmcEnergyDepositDigitizerMessenger.hh.

◆ setVetoCountersThreshold

G4UIcmdWithADoubleAndUnit* CexmcEnergyDepositDigitizerMessenger::setVetoCountersThreshold
private

Definition at line 75 of file CexmcEnergyDepositDigitizerMessenger.hh.


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