CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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 
13 {
14  public:
15 
16  enum {MAXADC = 4095};
17  enum {MINADC = 0};
18 
19  ESElectronicsSim (bool addNoise);
20 
21  void setGain (const int gain) { gain_ = gain; }
22  void setPedestals(const ESPedestals* peds) { peds_ = peds; }
23  void setMIPs(const ESIntercalibConstants* mips) { mips_ = mips; }
24  void setMIPToGeV (const double MIPToGeV) { MIPToGeV_ = MIPToGeV; }
25 
26  virtual void analogToDigital(const CaloSamples& cs, ESDataFrame& df) const;
27  virtual void digitalToAnalog(const ESDataFrame& df, CaloSamples& cs) const;
28 
30  void newEvent() {}
31 
32  private :
33 
34  bool addNoise_;
35  int gain_;
38  double MIPToGeV_;
39 
40  std::vector<ESSample> encode(const CaloSamples& timeframe) const;
41  double decode(const ESSample & sample, const DetId & detId) const;
42 
43 } ;
44 
45 
46 #endif
void setGain(const int gain)
const ESIntercalibConstants * mips_
virtual void digitalToAnalog(const ESDataFrame &df, CaloSamples &cs) const
void setMIPs(const ESIntercalibConstants *mips)
void setMIPToGeV(const double MIPToGeV)
std::vector< ESSample > encode(const CaloSamples &timeframe) const
void setPedestals(const ESPedestals *peds)
ESElectronicsSim(bool addNoise)
double decode(const ESSample &sample, const DetId &detId) const
void newEvent()
anything that needs to be done once per event
virtual void analogToDigital(const CaloSamples &cs, ESDataFrame &df) const
Definition: DetId.h:20
const ESPedestals * peds_