ATLAS Offline Software
LUCID_DigitizationToolBox.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef LUCID_DIGITIZATION_TOOLBOX_H
6 #define LUCID_DIGITIZATION_TOOLBOX_H
7 
8 #include "TTree.h"
9 #include "GaudiKernel/Algorithm.h"
10 #include "GaudiKernel/ServiceHandle.h"
11 #include "GaudiKernel/MsgStream.h"
15 
16 class StoreGateSvc;
17 
19 
20  public:
21 
23  LUCID_DigitizationToolBox(int numTubes,
24  double qdcChannelsPerPE,
25  double qdcPedestal,
26  double qdcFedNoiseFactor,
27  double tdcPmtNoiseFactor,
28  double tdcFedNoiseFactor,
29  double TotalPMTgain,
30  double AmpFactor,
31  double Q1bin,
32  int NoiseCharge,
33  int numDyinodes,
34  double dynodeGammaFactor,
35  std::vector<double> pmtSmearing,
36  std::vector<double> pmtScaling,
37  std::vector<double> gasScaling,
38  std::vector<double> npeThreshold,
39  bool fillRootTree);
40 
41  StatusCode recordContainers(const ServiceHandle<StoreGateSvc>&, const std::string&);
42 
44  StatusCode fillDigitContainer(LUCID_SimHitCollection* , CLHEP::HepRandomEngine*);
45 
47 
48  protected:
49 
50  TTree* getDebugTree(){ return m_tubeInfo; }
51 
52  static unsigned int roundoff(double x);
53 
54  StatusCode createAndStoreDigit(unsigned short tubeID, CLHEP::HepRandomEngine* rndEngine);
55 
56  double DynodeChainSimulation(double npe, CLHEP::HepRandomEngine* rndEngine) const;
57  static double DynodeGainSmearing (double npe, CLHEP::HepRandomEngine* rndEngine);
58 
60 
61  int m_numTubes{};
63  double m_qdcPedestal{};
67 
68  double m_TotalPMTgain{};
69  double m_AmpFactor{};
70  double m_Q1bin{};
74 
75  double m_gainPerDynode{};
77 
78  std::vector<double> m_pmtSmearing{};
79  std::vector<double> m_pmtScaling{};
80  std::vector<double> m_gasScaling{};
81  std::vector<double> m_npeThreshold{};
82 
84 
85  unsigned short m_tubeID{};
86  double m_npe{};
87  unsigned short m_npeGas{};
88  unsigned short m_npePmt{};
89  unsigned short m_qdc{};
90  double m_tdcTot{};
91  unsigned short m_tdc{};
92 
93  TTree* m_tubeInfo{};
94 };
95 
96 #endif
LUCID_DigitizationToolBox::m_numTubes
int m_numTubes
Definition: LUCID_DigitizationToolBox.h:61
LUCID_DigitizationToolBox::DynodeGainSmearing
static double DynodeGainSmearing(double npe, CLHEP::HepRandomEngine *rndEngine)
Definition: LUCID_DigitizationToolBox.cxx:260
LUCID_DigitizationToolBox
Definition: LUCID_DigitizationToolBox.h:18
LUCID_DigitizationToolBox::m_gainPerDynode
double m_gainPerDynode
Definition: LUCID_DigitizationToolBox.h:75
LUCID_DigitContainer
Definition: LUCID_DigitContainer.h:13
LUCID_DigitizationToolBox::LUCID_DigitizationToolBox
LUCID_DigitizationToolBox()
Definition: LUCID_DigitizationToolBox.cxx:19
LUCID_DigitizationToolBox::recordContainers
StatusCode recordContainers(const ServiceHandle< StoreGateSvc > &, const std::string &)
Definition: LUCID_DigitizationToolBox.cxx:232
LUCID_DigitizationToolBox::m_pmtSmearing
std::vector< double > m_pmtSmearing
Definition: LUCID_DigitizationToolBox.h:78
AtlasHitsVector
Definition: AtlasHitsVector.h:33
LUCID_DigitizationToolBox::m_gasScaling
std::vector< double > m_gasScaling
Definition: LUCID_DigitizationToolBox.h:80
LUCID_DigitizationToolBox::m_tdc
unsigned short m_tdc
Definition: LUCID_DigitizationToolBox.h:91
LUCID_DigitizationToolBox::m_tdcFedNoiseFactor
double m_tdcFedNoiseFactor
Definition: LUCID_DigitizationToolBox.h:66
x
#define x
LUCID_DigitizationToolBox::m_digitContainer
LUCID_DigitContainer * m_digitContainer
Definition: LUCID_DigitizationToolBox.h:59
LUCID_DigitizationToolBox::m_tdcTot
double m_tdcTot
Definition: LUCID_DigitizationToolBox.h:90
LUCID_DigitizationToolBox::m_npe
double m_npe
Definition: LUCID_DigitizationToolBox.h:86
StoreGateSvc
The Athena Transient Store API.
Definition: StoreGateSvc.h:125
LUCID_DigitizationToolBox::m_tubeInfo
TTree * m_tubeInfo
Definition: LUCID_DigitizationToolBox.h:93
LUCID_DigitizationToolBox::m_fillRootTree
bool m_fillRootTree
Definition: LUCID_DigitizationToolBox.h:83
LUCID_DigitizationToolBox::m_Q1bin
double m_Q1bin
Definition: LUCID_DigitizationToolBox.h:70
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
LUCID_DigitizationToolBox::createAndStoreDigit
StatusCode createAndStoreDigit(unsigned short tubeID, CLHEP::HepRandomEngine *rndEngine)
Definition: LUCID_DigitizationToolBox.cxx:133
LUCID_DigitizationToolBox::setDebugTree
StatusCode setDebugTree()
Definition: LUCID_DigitizationToolBox.cxx:101
LUCID_DigitizationToolBox::m_npePmt
unsigned short m_npePmt
Definition: LUCID_DigitizationToolBox.h:88
TimedHitCollection.h
LUCID_DigitizationToolBox::m_dynodeGammaFactor
double m_dynodeGammaFactor
Definition: LUCID_DigitizationToolBox.h:73
LUCID_DigitizationToolBox::fillDigitContainer
StatusCode fillDigitContainer(TimedHitCollection< LUCID_SimHit > &, CLHEP::HepRandomEngine *)
Definition: LUCID_DigitizationToolBox.cxx:166
LUCID_DigitizationToolBox::m_TotalPMTgain
double m_TotalPMTgain
Definition: LUCID_DigitizationToolBox.h:68
LUCID_DigitizationToolBox::roundoff
static unsigned int roundoff(double x)
Definition: LUCID_DigitizationToolBox.cxx:122
LUCID_SimHitCollection.h
LUCID_DigitizationToolBox::m_qdc
unsigned short m_qdc
Definition: LUCID_DigitizationToolBox.h:89
LUCID_DigitizationToolBox::m_ChargeToQdcFactor
double m_ChargeToQdcFactor
Definition: LUCID_DigitizationToolBox.h:76
LUCID_DigitizationToolBox::m_NoiseCharge
int m_NoiseCharge
Definition: LUCID_DigitizationToolBox.h:71
LUCID_DigitizationToolBox::getDebugTree
TTree * getDebugTree()
Definition: LUCID_DigitizationToolBox.h:50
LUCID_DigitizationToolBox::m_qdcPedestal
double m_qdcPedestal
Definition: LUCID_DigitizationToolBox.h:63
LUCID_DigitizationToolBox::m_tubeID
unsigned short m_tubeID
Definition: LUCID_DigitizationToolBox.h:85
LUCID_DigitizationToolBox::m_npeThreshold
std::vector< double > m_npeThreshold
Definition: LUCID_DigitizationToolBox.h:81
LUCID_DigitizationToolBox::m_qdcChannelsPerPE
double m_qdcChannelsPerPE
Definition: LUCID_DigitizationToolBox.h:62
LUCID_DigitizationToolBox::m_tdcPmtNoiseFactor
double m_tdcPmtNoiseFactor
Definition: LUCID_DigitizationToolBox.h:65
LUCID_DigitizationToolBox::m_npeGas
unsigned short m_npeGas
Definition: LUCID_DigitizationToolBox.h:87
LUCID_DigitContainer.h
LUCID_DigitizationToolBox::m_numDyinodes
int m_numDyinodes
Definition: LUCID_DigitizationToolBox.h:72
LUCID_DigitizationToolBox::m_AmpFactor
double m_AmpFactor
Definition: LUCID_DigitizationToolBox.h:69
LUCID_DigitizationToolBox::DynodeChainSimulation
double DynodeChainSimulation(double npe, CLHEP::HepRandomEngine *rndEngine) const
Definition: LUCID_DigitizationToolBox.cxx:242
LUCID_DigitizationToolBox::m_pmtScaling
std::vector< double > m_pmtScaling
Definition: LUCID_DigitizationToolBox.h:79
LUCID_DigitizationToolBox::m_qdcFedNoiseFactor
double m_qdcFedNoiseFactor
Definition: LUCID_DigitizationToolBox.h:64
TimedHitCollection
Definition: TimedHitCollection.h:15
ServiceHandle< StoreGateSvc >