Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:28:32

0001 #ifndef EcalSimAlgos_ESElectronicsSimFast_h
0002 #define EcalSimAlgos_ESElectronicsSimFast_h 1
0003 
0004 #include "CalibFormats/CaloObjects/interface/CaloTSamples.h"
0005 #include "DataFormats/EcalDigi/interface/ESDataFrame.h"
0006 #include "DataFormats/EcalDigi/interface/ESSample.h"
0007 #include "CondFormats/ESObjects/interface/ESPedestals.h"
0008 #include "CondFormats/ESObjects/interface/ESIntercalibConstants.h"
0009 
0010 #include <vector>
0011 
0012 namespace CLHEP {
0013   class HepRandomEngine;
0014 }
0015 
0016 class ESElectronicsSimFast {
0017 public:
0018   typedef CaloTSamples<float, 3> ESSamples;
0019 
0020   enum { MAXADC = 4095, MINADC = 0 };
0021 
0022   ESElectronicsSimFast(bool addNoise, bool PreMix1);
0023   ~ESElectronicsSimFast();
0024 
0025   void setPedestals(const ESPedestals* peds);
0026 
0027   void setMIPs(const ESIntercalibConstants* mips);
0028 
0029   void setMIPToGeV(double MIPToGeV);
0030 
0031   void analogToDigital(CLHEP::HepRandomEngine*, ESSamples& cs, ESDataFrame& df, bool isNoise = false) const;
0032 
0033   void newEvent() {}
0034 
0035 private:
0036   bool m_addNoise;
0037 
0038   bool m_PreMix1;
0039 
0040   double m_MIPToGeV;
0041 
0042   const ESPedestals* m_peds;
0043 
0044   const ESIntercalibConstants* m_mips;
0045 };
0046 
0047 #endif