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 public:
18  enum { MAXADC = 4095 };
19  enum { MINADC = 0 };
20 
21  ESElectronicsSim(bool addNoise);
22  virtual ~ESElectronicsSim();
23 
24  void setGain(const int gain) { gain_ = gain; }
25  void setPedestals(const ESPedestals* peds) { peds_ = peds; }
26  void setMIPs(const ESIntercalibConstants* mips) { mips_ = mips; }
27  void setMIPToGeV(const double MIPToGeV) { MIPToGeV_ = MIPToGeV; }
28 
29  virtual void analogToDigital(CLHEP::HepRandomEngine*, const CaloSamples& cs, ESDataFrame& df) const;
30  virtual void digitalToAnalog(const ESDataFrame& df, CaloSamples& cs) const;
31 
33  void newEvent(CLHEP::HepRandomEngine*) {}
34 
35 private:
36  bool addNoise_;
37  int gain_;
40  double MIPToGeV_;
41 
42  std::vector<ESSample> encode(const CaloSamples& timeframe, CLHEP::HepRandomEngine*) const;
43  double decode(const ESSample& sample, const DetId& detId) const;
44 };
45 
46 #endif
ESElectronicsSim::setPedestals
void setPedestals(const ESPedestals *peds)
Definition: ESElectronicsSim.h:25
simplePhotonAnalyzer_cfi.sample
sample
Definition: simplePhotonAnalyzer_cfi.py:12
ESElectronicsSim::MIPToGeV_
double MIPToGeV_
Definition: ESElectronicsSim.h:40
ESIntercalibConstants.h
ESElectronicsSim
Definition: ESElectronicsSim.h:16
fwrapper::cs
unique_ptr< ClusterSequence > cs
Definition: fastjetfortran_madfks.cc:47
CaloSamples.h
ESElectronicsSim::encode
std::vector< ESSample > encode(const CaloSamples &timeframe, CLHEP::HepRandomEngine *) const
Definition: ESElectronicsSim.cc:35
ESElectronicsSim::peds_
const ESPedestals * peds_
Definition: ESElectronicsSim.h:38
ESDataFrame
Definition: ESDataFrame.h:10
ESDataFrame.h
DetId
Definition: DetId.h:17
ESPedestals.h
ESElectronicsSim::mips_
const ESIntercalibConstants * mips_
Definition: ESElectronicsSim.h:39
ESElectronicsSim::~ESElectronicsSim
virtual ~ESElectronicsSim()
Definition: ESElectronicsSim.cc:18
CLHEP
Definition: CocoaGlobals.h:27
ESSample
Definition: ESSample.h:7
ESElectronicsSim::digitalToAnalog
virtual void digitalToAnalog(const ESDataFrame &df, CaloSamples &cs) const
Definition: ESElectronicsSim.cc:29
ESSample.h
ESElectronicsSim::MAXADC
Definition: ESElectronicsSim.h:18
ESElectronicsSim::addNoise_
bool addNoise_
Definition: ESElectronicsSim.h:36
ESElectronicsSim::setGain
void setGain(const int gain)
Definition: ESElectronicsSim.h:24
ESElectronicsSim::newEvent
void newEvent(CLHEP::HepRandomEngine *)
anything that needs to be done once per event
Definition: ESElectronicsSim.h:33
CaloSamples
Definition: CaloSamples.h:14
ESElectronicsSim::setMIPs
void setMIPs(const ESIntercalibConstants *mips)
Definition: ESElectronicsSim.h:26
ESElectronicsSim::setMIPToGeV
void setMIPToGeV(const double MIPToGeV)
Definition: ESElectronicsSim.h:27
ESCondObjectContainer< ESPedestal >
ESElectronicsSim::decode
double decode(const ESSample &sample, const DetId &detId) const
Definition: ESElectronicsSim.cc:84
PedestalClient_cfi.gain
gain
Definition: PedestalClient_cfi.py:37
hgcalPerformanceValidation.df
df
Definition: hgcalPerformanceValidation.py:733
ESElectronicsSim::MINADC
Definition: ESElectronicsSim.h:19
ESElectronicsSim::gain_
int gain_
Definition: ESElectronicsSim.h:37
ESElectronicsSim::ESElectronicsSim
ESElectronicsSim(bool addNoise)
Definition: ESElectronicsSim.cc:11
ESElectronicsSim::analogToDigital
virtual void analogToDigital(CLHEP::HepRandomEngine *, const CaloSamples &cs, ESDataFrame &df) const
Definition: ESElectronicsSim.cc:20