Geant4  10.01.p01
CexmcEnergyDepositDigitizer.hh
Go to the documentation of this file.
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
26 /*
27  * =============================================================================
28  *
29  * Filename: CexmcEnergyDepositDigitizer.hh
30  *
31  * Description: digitizes of energy deposit in a single event
32  *
33  * Version: 1.0
34  * Created: 23.11.2009 14:14:47
35  * Revision: none
36  * Compiler: gcc
37  *
38  * Author: Alexey Radkov (),
39  * Company: PNPI
40  *
41  * =============================================================================
42  */
43 
44 #ifndef CEXMC_ENERGY_DEPOSIT_DIGITIZER_HH
45 #define CEXMC_ENERGY_DEPOSIT_DIGITIZER_HH
46 
47 #include <iosfwd>
48 #include <G4VDigitizerModule.hh>
49 #include <G4SystemOfUnits.hh>
52 #include "CexmcException.hh"
53 #include "CexmcCommon.hh"
54 
55 class G4String;
57 
58 
60 {
61  public:
62  explicit CexmcEnergyDepositDigitizer( const G4String & name );
63 
65 
66  public:
67  void Digitize( void );
68 
69  public:
70  G4double GetMonitorED( void ) const;
71 
72  G4double GetVetoCounterEDLeft( void ) const;
73 
74  G4double GetVetoCounterEDRight( void ) const;
75 
76  G4double GetCalorimeterEDLeft( void ) const;
77 
78  G4double GetCalorimeterEDRight( void ) const;
79 
80  G4int GetCalorimeterEDLeftMaxX( void ) const;
81 
82  G4int GetCalorimeterEDLeftMaxY( void ) const;
83 
84  G4int GetCalorimeterEDRightMaxX( void ) const;
85 
86  G4int GetCalorimeterEDRightMaxY( void ) const;
87 
89  GetCalorimeterEDLeftCollection( void ) const;
90 
92  GetCalorimeterEDRightCollection( void ) const;
93 
94  public:
95  G4bool MonitorHasTriggered( void ) const;
96 
97  G4bool HasTriggered( void ) const;
98 
99  public:
100  void SetMonitorThreshold( G4double value,
101  G4bool fromMessenger = true );
102 
104  G4bool fromMessenger = true );
105 
107  G4bool fromMessenger = true );
108 
109  void SetVetoCountersThreshold( G4double value );
110 
112  G4bool fromMessenger = true );
113 
115  G4bool fromMessenger = true );
116 
117  void SetCalorimetersThreshold( G4double value );
118 
121  G4bool fromMessenger = true );
122 
125  G4bool fromMessenger = true );
126 
128  G4bool fromMessenger = true );
129 
131  G4bool fromMessenger = true );
132 
133  void AddCrystalResolutionRange( G4double bottom, G4double top,
134  G4double value,
135  G4bool fromMessenger = true );
136 
137  void ClearCrystalResolutionData( G4bool fromMessenger = true );
138 
141 
142  G4double GetMonitorThreshold( void ) const;
143 
145 
147 
149 
151 
153  GetCalorimeterTriggerAlgorithm( void ) const;
154 
156  GetOuterCrystalsVetoAlgorithm( void ) const;
157 
159 
161 
163  GetCrystalResolutionData( void ) const;
164 
165  public:
166  G4bool IsOuterCrystal( G4int column, G4int row ) const;
167 
168  private:
169  void InitializeData( void );
170 
171  private:
173 
175 
177 
179 
181 
183 
185 
187 
189 
191 
193 
195 
197 
198  private:
200 
202 
204 
206 
208 
210 
212 
214 
216 
218 
220 
222 
224 
226 
228 
230 
231  private:
233 
235 
236  private:
238 
240 
241  private:
243 };
244 
245 
247 {
248  return monitorED;
249 }
250 
251 
253 {
254  return vetoCounterEDLeft;
255 }
256 
257 
259  const
260 {
261  return vetoCounterEDRight;
262 }
263 
264 
266 {
267  return calorimeterEDLeft;
268 }
269 
270 
272  const
273 {
274  return calorimeterEDRight;
275 }
276 
277 
279  const
280 {
281  return calorimeterEDLeftMaxX;
282 }
283 
284 
286  const
287 {
288  return calorimeterEDLeftMaxY;
289 }
290 
291 
293  const
294 {
295  return calorimeterEDRightMaxX;
296 }
297 
298 
300  const
301 {
302  return calorimeterEDRightMaxY;
303 }
304 
305 
308 {
310 }
311 
312 
315 {
317 }
318 
319 
321 {
322  return monitorHasTriggered;
323 }
324 
325 
327 {
328  return hasTriggered;
329 }
330 
331 
333  G4double value, G4bool fromMessenger )
334 {
335  if ( fromMessenger )
337  value < monitorEDThresholdRef );
338  else
339  monitorEDThresholdRef = value;
340 
341  monitorEDThreshold = value;
342 }
343 
344 
346  G4double value, G4bool fromMessenger )
347 {
348  if ( fromMessenger )
351  else
353 
355 }
356 
357 
359  G4double value, G4bool fromMessenger )
360 {
361  if ( fromMessenger )
364  else
366 
368 }
369 
370 
372  G4double value )
373 {
377 
380 }
381 
382 
384  G4double value, G4bool fromMessenger )
385 {
386  if ( fromMessenger )
389  else
391 
393 }
394 
395 
397  G4double value, G4bool fromMessenger )
398 {
399  if ( fromMessenger )
402  else
404 
406 }
407 
408 
410  G4double value )
411 {
415 
418 }
419 
420 
422  CexmcCalorimeterTriggerAlgorithm value, G4bool fromMessenger )
423 {
424  if ( fromMessenger )
428  value == calorimeterTriggerAlgorithmRef ) );
429  else
431 
433 }
434 
435 
437  CexmcOuterCrystalsVetoAlgorithm value, G4bool fromMessenger )
438 {
439  if ( fromMessenger )
442  value == outerCrystalsVetoAlgorithmRef ) );
443  else
445 
447 }
448 
449 
451  G4double value, G4bool fromMessenger )
452 {
453  if ( fromMessenger )
456  else
458 
460 }
461 
462 
464  G4bool value, G4bool fromMessenger )
465 {
466  if ( fromMessenger )
468 
470 }
471 
472 
474  G4double bottom, G4double top,
475  G4double value, G4bool fromMessenger )
476 {
477  if ( fromMessenger )
479 
480  /* range boundaries are given in GeV */
482  bottom * GeV, top * GeV, value ) );
483 }
484 
485 
487  G4bool fromMessenger )
488 {
489  if ( fromMessenger )
491 
492  crystalResolutionData.clear();
493 }
494 
495 
498 {
500  crystalResolutionData = data;
501 }
502 
503 
505  G4int row ) const
506 {
507  return column == 0 || column == nCrystalsInRow - 1 ||
508  row == 0 || row == nCrystalsInColumn - 1;
509 }
510 
511 
513 {
514  return monitorEDThreshold;
515 }
516 
517 
519  void ) const
520 {
522 }
523 
524 
526  void ) const
527 {
529 }
530 
531 
533  void ) const
534 {
536 }
537 
538 
540  void ) const
541 {
543 }
544 
545 
548  void ) const
549 {
551 }
552 
553 
556  void ) const
557 {
559 }
560 
561 
563  void ) const
564 {
566 }
567 
568 
570  void ) const
571 {
573 }
574 
575 
578 {
579  return crystalResolutionData;
580 }
581 
582 
583 std::ostream & operator<<( std::ostream & out,
584  const CexmcEnergyDepositCalorimeterCollection & edCollection );
585 
586 
587 #endif
588 
void SetOuterCrystalsVetoFraction(G4double value, G4bool fromMessenger=true)
CexmcOuterCrystalsVetoAlgorithm outerCrystalsVetoAlgorithmRef
void SetCalorimeterLeftThreshold(G4double value, G4bool fromMessenger=true)
CexmcEnergyDepositCalorimeterCollection calorimeterEDRightCollection
G4String name
Definition: TRTMaterials.hh:40
CexmcEnergyDepositDigitizer(const G4String &name)
CexmcEnergyRangeWithDoubleValueList crystalResolutionData
void SetOuterCrystalsVetoAlgorithm(CexmcOuterCrystalsVetoAlgorithm value, G4bool fromMessenger=true)
CexmcCalorimeterTriggerAlgorithm calorimeterTriggerAlgorithmRef
CexmcSimpleRangeWithValue< CexmcEnergyValueCategory > CexmcEnergyRangeWithDoubleValue
void ClearCrystalResolutionData(G4bool fromMessenger=true)
void SetCalorimeterRightThreshold(G4double value, G4bool fromMessenger=true)
void SetVetoCounterRightThreshold(G4double value, G4bool fromMessenger=true)
CexmcCalorimeterTriggerAlgorithm calorimeterTriggerAlgorithm
int G4int
Definition: G4Types.hh:78
CexmcOuterCrystalsVetoAlgorithm GetOuterCrystalsVetoAlgorithm(void) const
G4bool IsOuterCrystal(G4int column, G4int row) const
G4bool IsFiniteCrystalResolutionApplied(void) const
CexmcEnergyDepositDigitizerMessenger * messenger
std::ostream & operator<<(std::ostream &out, const CexmcEnergyDepositCalorimeterCollection &edCollection)
std::vector< CexmcEnergyDepositCrystalRowCollection > CexmcEnergyDepositCalorimeterCollection
Definition: CexmcCommon.hh:58
void AddCrystalResolutionRange(G4double bottom, G4double top, G4double value, G4bool fromMessenger=true)
bool G4bool
Definition: G4Types.hh:79
static const double GeV
Definition: G4SIunits.hh:196
void SetCrystalResolutionData(const CexmcEnergyRangeWithDoubleValueList &data)
const CexmcEnergyRangeWithDoubleValueList & GetCrystalResolutionData(void) const
CexmcCalorimeterTriggerAlgorithm GetCalorimeterTriggerAlgorithm(void) const
G4double GetCalorimeterRightThreshold(void) const
CexmcOuterCrystalsVetoAlgorithm outerCrystalsVetoAlgorithm
CexmcEnergyDepositCalorimeterCollection calorimeterEDLeftCollection
void ApplyFiniteCrystalResolution(G4bool value, G4bool fromMessenger=true)
const CexmcEnergyDepositCalorimeterCollection & GetCalorimeterEDRightCollection(void) const
CexmcOuterCrystalsVetoAlgorithm
Definition: CexmcCommon.hh:139
void SetCalorimeterTriggerAlgorithm(CexmcCalorimeterTriggerAlgorithm value, G4bool fromMessenger=true)
void SetVetoCounterLeftThreshold(G4double value, G4bool fromMessenger=true)
void ThrowExceptionIfProjectIsRead(CexmcExceptionType type, G4bool extraCond=true)
const CexmcEnergyDepositCalorimeterCollection & GetCalorimeterEDLeftCollection(void) const
double G4double
Definition: G4Types.hh:76
G4double GetVetoCounterLeftThreshold(void) const
G4double GetOuterCrystalsVetoFraction(void) const
G4double GetCalorimeterLeftThreshold(void) const
void SetMonitorThreshold(G4double value, G4bool fromMessenger=true)
CexmcCalorimeterTriggerAlgorithm
Definition: CexmcCommon.hh:147
std::vector< CexmcEnergyRangeWithDoubleValue > CexmcEnergyRangeWithDoubleValueList
G4double GetVetoCounterRightThreshold(void) const