58 energyDepositDigitizer( energyDepositDigitizer ),
59 setMonitorThreshold( NULL ), setVetoCountersThreshold( NULL ),
60 setLeftVetoCounterThreshold( NULL ), setRightVetoCounterThreshold( NULL ),
61 setCalorimetersThreshold( NULL ), setLeftCalorimeterThreshold( NULL ),
62 setRightCalorimeterThreshold( NULL ),
63 setCalorimeterTriggerAlgorithm( NULL ),
64 setOuterCrystalsVetoAlgorithm( NULL ), setOuterCrystalsVetoFraction( NULL ),
65 applyFiniteCrystalResolution( NULL ), addCrystalResolutionRange( NULL ),
66 clearCrystalResolutionData( NULL )
70 setMonitorThreshold->
SetGuidance(
"Monitor trigger threshold" );
80 setVetoCountersThreshold->
SetGuidance(
"Veto counters trigger threshold" );
93 "Left veto counter trigger threshold" );
106 "Right veto counter trigger threshold" );
107 setRightVetoCounterThreshold->
SetParameterName(
"RightVetoCounterThreshold",
118 setCalorimetersThreshold->
SetGuidance(
"Calorimeters trigger threshold" );
131 "Left calorimeter trigger threshold" );
144 "Right calorimeter trigger threshold" );
145 setRightCalorimeterThreshold->
SetParameterName(
"RightCalorimeterThreshold",
155 "calorimeterTriggerAlgorithm" ).c_str(),
this );
157 " all - energy deposit in all crystals in a calorimeter\n"
158 " will be checked against calorimeter threshold "
160 " inner - energy deposit in only inner crystals\n"
161 " will be checked against calorimeter threshold "
164 "CalorimeterTriggerAlgorithm",
false );
165 setCalorimeterTriggerAlgorithm->
SetCandidates(
"all inner" );
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" );
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 );
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 );
214 "addCrystalResolutionRange" ).c_str(),
this );
215 addCrystalResolutionRange->
SetGuidance(
"\n Add new energy range "
216 "(in GeV!) with fwhm percentage\n value of crystal resolution "
219 "CrystalResolutionRangeBottom",
"CrystalResolutionRangeTop",
220 "CrystalResolutionRangeValue",
false );
221 addCrystalResolutionRange->
SetRange(
"CrystalResolutionRangeBottom >= 0. "
222 "&& CrystalResolutionRangeTop >= 0. && "
223 "CrystalResolutionRangeValue >= 0." );
229 "clearCrystalResolutionData" ).c_str(),
this );
230 clearCrystalResolutionData->
SetGuidance(
"\n Clear all crystal "
231 "resolution ranges.\n Can be used to redefine crystal "
240 delete setMonitorThreshold;
241 delete setVetoCountersThreshold;
242 delete setLeftVetoCounterThreshold;
243 delete setRightVetoCounterThreshold;
244 delete setCalorimetersThreshold;
245 delete setLeftCalorimeterThreshold;
246 delete setRightCalorimeterThreshold;
247 delete setCalorimeterTriggerAlgorithm;
248 delete setOuterCrystalsVetoAlgorithm;
249 delete setOuterCrystalsVetoFraction;
250 delete applyFiniteCrystalResolution;
251 delete addCrystalResolutionRange;
252 delete clearCrystalResolutionData;
261 if ( cmd == setMonitorThreshold )
267 if ( cmd == setVetoCountersThreshold )
273 if ( cmd == setLeftVetoCounterThreshold )
279 if ( cmd == setRightVetoCounterThreshold )
285 if ( cmd == setCalorimetersThreshold )
291 if ( cmd == setLeftCalorimeterThreshold )
297 if ( cmd == setRightCalorimeterThreshold )
303 if ( cmd == setCalorimeterTriggerAlgorithm )
309 if ( value ==
"inner" )
311 calorimeterTriggerAlgorithm =
317 calorimeterTriggerAlgorithm );
320 if ( cmd == setOuterCrystalsVetoAlgorithm )
326 if ( value ==
"max" )
328 outerCrystalsVetoAlgorithm =
332 if ( value ==
"fraction" )
334 outerCrystalsVetoAlgorithm =
340 outerCrystalsVetoAlgorithm );
343 if ( cmd == setOuterCrystalsVetoFraction )
349 if ( cmd == applyFiniteCrystalResolution )
355 if ( cmd == addCrystalResolutionRange )
359 G4double bottom( std::min( vec.
x(), vec.
y() ) );
365 if ( cmd == clearCrystalResolutionData )