CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ESElectronicsSim.h
Go to the documentation of this file.
1 #ifndef EcalSimAlgos_ESElectronicsSim_h
2 #define EcalSimAlgos_ESElectronicsSim_h 1
3 
9 
10 #include <vector>
11 
12 namespace CLHEP {
13  class HepRandomEngine;
14 }
15 
17 public:
18  enum { MAXADC = 4095 };
19  enum { MINADC = 0 };
20 
22  virtual ~ESElectronicsSim();
23 
24  void setGain(const int gain) { gain_ = gain; }
25  void setPedestals(const ESPedestals* peds) { peds_ = peds; }
26  void setMIPs(const ESIntercalibConstants* mips) { mips_ = mips; }
27  void setMIPToGeV(const double MIPToGeV) { MIPToGeV_ = MIPToGeV; }
28 
29  virtual void analogToDigital(CLHEP::HepRandomEngine*, const CaloSamples& cs, ESDataFrame& df) const;
30  virtual void digitalToAnalog(const ESDataFrame& df, CaloSamples& cs) const;
31 
33  void newEvent(CLHEP::HepRandomEngine*) {}
34 
35 private:
36  bool addNoise_;
37  int gain_;
40  double MIPToGeV_;
41 
42  std::vector<ESSample> encode(const CaloSamples& timeframe, CLHEP::HepRandomEngine*) const;
43  double decode(const ESSample& sample, const DetId& detId) const;
44 };
45 
46 #endif
void setGain(const int gain)
const ESIntercalibConstants * mips_
void newEvent(CLHEP::HepRandomEngine *)
anything that needs to be done once per event
virtual void digitalToAnalog(const ESDataFrame &df, CaloSamples &cs) const
unique_ptr< ClusterSequence > cs
void setMIPs(const ESIntercalibConstants *mips)
void setMIPToGeV(const double MIPToGeV)
std::vector< ESSample > encode(const CaloSamples &timeframe, CLHEP::HepRandomEngine *) const
virtual void analogToDigital(CLHEP::HepRandomEngine *, const CaloSamples &cs, ESDataFrame &df) const
void setPedestals(const ESPedestals *peds)
ESElectronicsSim(bool addNoise)
double decode(const ESSample &sample, const DetId &detId) const
Definition: DetId.h:17
virtual ~ESElectronicsSim()
const bool addNoise
const ESPedestals * peds_