CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ESElectronicsSimFast.h
Go to the documentation of this file.
1 #ifndef EcalSimAlgos_ESElectronicsSimFast_h
2 #define EcalSimAlgos_ESElectronicsSimFast_h 1
3 
7 #include "CLHEP/Random/RandGeneral.h"
10 
11 #include <vector>
12 #include "TFile.h"
13 
15 {
16  public:
17 
18  enum {MAXADC = 4095};
19  enum {MINADC = 0};
20 
21  ESElectronicsSimFast (bool addNoise);
22 
23  void setGain (const int gain) { gain_ = gain; }
24  void setPedestals(const ESPedestals* peds) { peds_ = peds; }
25  void setMIPs(const ESIntercalibConstants* mips) { mips_ = mips; }
26  void setMIPToGeV (const double MIPToGeV) { MIPToGeV_ = MIPToGeV; }
27 
28  virtual void analogToDigital(const CaloSamples& cs, ESDataFrame& df, bool wasEmpty, CLHEP::RandGeneral *histoDistribution, double hInf, double hSup, double hBin) const;
29 
30  void digitalToAnalog(const ESDataFrame& df, CaloSamples& cs) const;
31 
33  void newEvent() {}
34 
35  private :
36 
37  bool addNoise_;
38  int gain_;
41  double MIPToGeV_;
42 
43  std::vector<ESSample> standEncode(const CaloSamples& timeframe) const;
44  std::vector<ESSample> fastEncode(const CaloSamples& timeframe, CLHEP::RandGeneral *histoDistribution, double hInf, double hSup, double hBin) const;
45 
46  double decode(const ESSample & sample, const DetId & detId) const;
47 
48 } ;
49 
50 
51 #endif
const ESPedestals * peds_
void setGain(const int gain)
void setMIPToGeV(const double MIPToGeV)
double decode(const ESSample &sample, const DetId &detId) const
const ESIntercalibConstants * mips_
void setPedestals(const ESPedestals *peds)
void digitalToAnalog(const ESDataFrame &df, CaloSamples &cs) const
virtual void analogToDigital(const CaloSamples &cs, ESDataFrame &df, bool wasEmpty, CLHEP::RandGeneral *histoDistribution, double hInf, double hSup, double hBin) const
std::vector< ESSample > fastEncode(const CaloSamples &timeframe, CLHEP::RandGeneral *histoDistribution, double hInf, double hSup, double hBin) const
Definition: DetId.h:20
void newEvent()
anything that needs to be done once per event
ESElectronicsSimFast(bool addNoise)
void setMIPs(const ESIntercalibConstants *mips)
std::vector< ESSample > standEncode(const CaloSamples &timeframe) const