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 
12 namespace CLHEP {
13  class HepRandomEngine;
14 }
15 
17 {
18  public:
19 
20  enum {MAXADC = 4095};
21  enum {MINADC = 0};
22 
23  ESElectronicsSim (bool addNoise);
24  virtual ~ESElectronicsSim();
25 
26  void setGain (const int gain) { gain_ = gain; }
27  void setPedestals(const ESPedestals* peds) { peds_ = peds; }
28  void setMIPs(const ESIntercalibConstants* mips) { mips_ = mips; }
29  void setMIPToGeV (const double MIPToGeV) { MIPToGeV_ = MIPToGeV; }
30 
31  virtual void analogToDigital(CLHEP::HepRandomEngine*, const CaloSamples& cs, ESDataFrame& df) const;
32  virtual void digitalToAnalog(const ESDataFrame& df, CaloSamples& cs) const;
33 
35  void newEvent(CLHEP::HepRandomEngine*) {}
36 
37  private :
38 
39  bool addNoise_;
40  int gain_;
43  double MIPToGeV_;
44 
45  std::vector<ESSample> encode(const CaloSamples& timeframe, CLHEP::HepRandomEngine*) const;
46  double decode(const ESSample & sample, const DetId & detId) const;
47 
48 } ;
49 
50 
51 #endif
void setGain(const int gain)
auto_ptr< ClusterSequence > cs
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
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:18
virtual ~ESElectronicsSim()
const ESPedestals * peds_