CMS 3D CMS Logo

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
void setMIPs(const ESIntercalibConstants *mips)
void setMIPToGeV(const double MIPToGeV)
void setPedestals(const ESPedestals *peds)
bool decode(bool &, std::string const &)
Definition: types.cc:62
Definition: DetId.h:18
def encode(args, files)
static const char gain_[]
const ESPedestals * peds_