CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ESDigitizer.h
Go to the documentation of this file.
1 #ifndef EcalSimAlgos_ESDigitizer_h
2 #define EcalSimAlgos_ESDigitizer_h
3 
6 
7 namespace CLHEP {
8  class RandGeneral ;
9  class RandPoissonQ ;
10  class RandFlat ;
11  class HepRandomEngine ; }
12 
13 #include <vector>
14 
15 class ESDigitizer : public EcalTDigitizer< ESDigitizerTraits >
16 {
17  public:
18 
20 
22  ElectronicsSim* electronicsSim ,
23  bool addNoise ) ;
24 
25  virtual ~ESDigitizer() ;
26 
27  virtual void run( ESDigiCollection& output ) ;
28 
29  void setDetIds( const std::vector<DetId>& detIds ) ;
30 
31  void setGain( const int gain ) ;
32 
33  private:
34 
35  void createNoisyList( std::vector<DetId>& abThreshCh ) ;
36 
37  const std::vector<DetId>* m_detIds ;
38  CLHEP::HepRandomEngine* m_engine ;
39  CLHEP::RandGeneral* m_ranGeneral ;
40  CLHEP::RandPoissonQ* m_ranPois ;
41  CLHEP::RandFlat* m_ranFlat ;
42  int m_ESGain ;
43  double m_histoBin ;
44  double m_histoInf ;
45  double m_histoWid ;
46  double m_meanNoisy ;
47 
48  class Triplet
49  {
50  public:
51  Triplet() : first ( 0 ), second ( 0 ), third ( 0 ) {}
52  Triplet( uint32_t a0 ,
53  uint32_t a1 ,
54  uint32_t a2 ) :
55  first ( a0 ), second ( a1 ), third ( a2 ) {}
56  ~Triplet() {} ;
57  uint32_t first ;
58  uint32_t second ;
59  uint32_t third ;
60  };
61 
62  std::vector<Triplet> m_trip ;
63 };
64 
65 #endif
66 
void setDetIds(const std::vector< DetId > &detIds)
tell the digitizer which cells exist; cannot change during a run
Definition: ESDigitizer.cc:53
void createNoisyList(std::vector< DetId > &abThreshCh)
Definition: ESDigitizer.cc:234
std::vector< Triplet > m_trip
Definition: ESDigitizer.h:62
CLHEP::RandFlat * m_ranFlat
Definition: ESDigitizer.h:41
CLHEP::RandGeneral * m_ranGeneral
Definition: ESDigitizer.h:39
void setGain(const int gain)
Definition: ESDigitizer.cc:61
double m_meanNoisy
Definition: ESDigitizer.h:46
double m_histoBin
Definition: ESDigitizer.h:43
double m_histoInf
Definition: ESDigitizer.h:44
ESDigitizerTraits::ElectronicsSim ElectronicsSim
Definition: ESDigitizer.h:19
CLHEP::HepRandomEngine * m_engine
Definition: ESDigitizer.h:38
virtual ~ESDigitizer()
Definition: ESDigitizer.cc:44
const std::vector< DetId > * m_detIds
Definition: ESDigitizer.h:37
double m_histoWid
Definition: ESDigitizer.h:45
const EcalHitResponse * hitResponse() const
Triplet(uint32_t a0, uint32_t a1, uint32_t a2)
Definition: ESDigitizer.h:52
ESDigitizer(EcalHitResponse *hitResponse, ElectronicsSim *electronicsSim, bool addNoise)
Definition: ESDigitizer.cc:15
virtual void run(ESDigiCollection &output)
turns hits into digis
Definition: ESDigitizer.cc:189
CLHEP::RandPoissonQ * m_ranPois
Definition: ESDigitizer.h:40