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  virtual ~ESElectronicsSim();
21 
22  void setGain (const int gain) { gain_ = gain; }
23  void setPedestals(const ESPedestals* peds) { peds_ = peds; }
24  void setMIPs(const ESIntercalibConstants* mips) { mips_ = mips; }
25  void setMIPToGeV (const double MIPToGeV) { MIPToGeV_ = MIPToGeV; }
26 
27  virtual void analogToDigital(const CaloSamples& cs, ESDataFrame& df) const;
28  virtual void digitalToAnalog(const ESDataFrame& df, CaloSamples& cs) const;
29 
31  void newEvent() {}
32 
33  private :
34 
35  bool addNoise_;
36  int gain_;
39  double MIPToGeV_;
40 
41  std::vector<ESSample> encode(const CaloSamples& timeframe) const;
42  double decode(const ESSample & sample, const DetId & detId) const;
43 
44 } ;
45 
46 
47 #endif
void setGain(const int gain)
auto_ptr< ClusterSequence > cs
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
virtual ~ESElectronicsSim()
const ESPedestals * peds_