CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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 HepRandomEngine;
10 } // namespace CLHEP
11 
12 #include <vector>
13 
14 class ESDigitizer : public EcalTDigitizer<ESDigitizerTraits> {
15 public:
17 
19 
20  ~ESDigitizer() override;
21 
22  void run(ESDigiCollection& output, CLHEP::HepRandomEngine*) override;
23 
24  void setDetIds(const std::vector<DetId>& detIds);
25 
26  void setGain(const int gain);
27 
28 private:
29  void createNoisyList(std::vector<DetId>& abThreshCh, CLHEP::HepRandomEngine*);
30 
31  const std::vector<DetId>* m_detIds;
32  CLHEP::RandGeneral* m_ranGeneral;
33  int m_ESGain;
34  double m_histoBin;
35  double m_histoInf;
36  double m_histoWid;
37  double m_meanNoisy;
38 
39  class Triplet {
40  public:
41  Triplet() : first(0), second(0), third(0) {}
42  Triplet(uint32_t a0, uint32_t a1, uint32_t a2) : first(a0), second(a1), third(a2) {}
43  ~Triplet(){};
44  uint32_t first;
45  uint32_t second;
46  uint32_t third;
47  };
48 
49  std::vector<Triplet> m_trip;
50 };
51 
52 #endif
void setDetIds(const std::vector< DetId > &detIds)
tell the digitizer which cells exist; cannot change during a run
Definition: ESDigitizer.cc:29
std::vector< Triplet > m_trip
Definition: ESDigitizer.h:49
CLHEP::RandGeneral * m_ranGeneral
Definition: ESDigitizer.h:32
void createNoisyList(std::vector< DetId > &abThreshCh, CLHEP::HepRandomEngine *)
Definition: ESDigitizer.cc:164
void setGain(const int gain)
Definition: ESDigitizer.cc:34
double m_meanNoisy
Definition: ESDigitizer.h:37
double m_histoBin
Definition: ESDigitizer.h:34
double m_histoInf
Definition: ESDigitizer.h:35
ESDigitizerTraits::ElectronicsSim ElectronicsSim
Definition: ESDigitizer.h:16
static constexpr float a0
const std::vector< DetId > * m_detIds
Definition: ESDigitizer.h:31
~ESDigitizer() override
Definition: ESDigitizer.cc:26
void run(ESDigiCollection &output, CLHEP::HepRandomEngine *) override
turns hits into digis
Definition: ESDigitizer.cc:130
double m_histoWid
Definition: ESDigitizer.h:36
const EcalHitResponse * hitResponse() const
Triplet(uint32_t a0, uint32_t a1, uint32_t a2)
Definition: ESDigitizer.h:42
ESDigitizer(EcalHitResponse *hitResponse, ElectronicsSim *electronicsSim, bool addNoise)
Definition: ESDigitizer.cc:13