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( MixCollection<PCaloHit>& input ,
29 
30  void setDetIds( const std::vector<DetId>& detIds ) ;
31 
32  void setGain( const int gain ) ;
33 
34  private:
35 
36  void createNoisyList( std::vector<DetId>& abThreshCh ) ;
37 
38  const std::vector<DetId>* m_detIds ;
39  CLHEP::HepRandomEngine* m_engine ;
40  CLHEP::RandGeneral* m_ranGeneral ;
41  CLHEP::RandPoissonQ* m_ranPois ;
42  CLHEP::RandFlat* m_ranFlat ;
43  int m_ESGain ;
44  double m_histoBin ;
45  double m_histoInf ;
46  double m_histoWid ;
47  double m_meanNoisy ;
48 
49  class Triplet
50  {
51  public:
52  Triplet() : first ( 0 ), second ( 0 ), third ( 0 ) {}
53  Triplet( uint32_t a0 ,
54  uint32_t a1 ,
55  uint32_t a2 ) :
56  first ( a0 ), second ( a1 ), third ( a2 ) {}
57  ~Triplet() {} ;
58  uint32_t first ;
59  uint32_t second ;
60  uint32_t third ;
61  };
62 
63  std::vector<Triplet> m_trip ;
64 };
65 
66 #endif
67 
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:235
std::vector< Triplet > m_trip
Definition: ESDigitizer.h:63
virtual void run(MixCollection< PCaloHit > &input, DigiCollection &output)
turns hits into digis
Definition: ESDigitizer.cc:189
CLHEP::RandFlat * m_ranFlat
Definition: ESDigitizer.h:42
CLHEP::RandGeneral * m_ranGeneral
Definition: ESDigitizer.h:40
void setGain(const int gain)
Definition: ESDigitizer.cc:61
double m_meanNoisy
Definition: ESDigitizer.h:47
double m_histoBin
Definition: ESDigitizer.h:44
double m_histoInf
Definition: ESDigitizer.h:45
ESDigitizerTraits::ElectronicsSim ElectronicsSim
Definition: ESDigitizer.h:19
CLHEP::HepRandomEngine * m_engine
Definition: ESDigitizer.h:39
virtual ~ESDigitizer()
Definition: ESDigitizer.cc:44
const std::vector< DetId > * m_detIds
Definition: ESDigitizer.h:38
double m_histoWid
Definition: ESDigitizer.h:46
const EcalHitResponse * hitResponse() const
Triplet(uint32_t a0, uint32_t a1, uint32_t a2)
Definition: ESDigitizer.h:53
ESDigitizer(EcalHitResponse *hitResponse, ElectronicsSim *electronicsSim, bool addNoise)
Definition: ESDigitizer.cc:15
CLHEP::RandPoissonQ * m_ranPois
Definition: ESDigitizer.h:41