CMS 3D CMS Logo

HcalElectronicsSim.h
Go to the documentation of this file.
1 #ifndef HcalSimAlgos_HcalElectronicsSim_h
2 #define HcalSimAlgos_HcalElectronicsSim_h
3 
12 
13 class HBHEDataFrame;
14 class HODataFrame;
15 class HFDataFrame;
16 class ZDCDataFrame;
17 class QIE10DataFrame;
18 class QIE11DataFrame;
19 
20 namespace CLHEP {
21  class HepRandomEngine;
22 }
23 
25 public:
26  HcalElectronicsSim(HcalAmplifier * amplifier, const HcalCoderFactory * coderFactory, bool PreMix);
28 
29  void setDbService(const HcalDbService * service);
30 
31  //these need to be overloads instead of templates to avoid linking issues when calling private member function templates
32  void analogToDigital(CLHEP::HepRandomEngine*, CaloSamples & linearFrame, HBHEDataFrame & result, double preMixFactor=10.0, unsigned preMixBits=126);
33  void analogToDigital(CLHEP::HepRandomEngine*, CaloSamples & linearFrame, HODataFrame & result, double preMixFactor=10.0, unsigned preMixBits=126);
34  void analogToDigital(CLHEP::HepRandomEngine*, CaloSamples & linearFrame, HFDataFrame & result, double preMixFactor=10.0, unsigned preMixBits=126);
35  void analogToDigital(CLHEP::HepRandomEngine*, CaloSamples & linearFrame, ZDCDataFrame & result, double preMixFactor=10.0, unsigned preMixBits=126);
36  void analogToDigital(CLHEP::HepRandomEngine*, CaloSamples & linearFrame, QIE10DataFrame& result, double preMixFactor=10.0, unsigned preMixBits=126);
37  void analogToDigital(CLHEP::HepRandomEngine*, CaloSamples & linearFrame, QIE11DataFrame& result, double preMixFactor=10.0, unsigned preMixBits=126);
40  void newEvent(CLHEP::HepRandomEngine*);
41  void setStartingCapId(int startingCapId);
42 
43 private:
44  template<class Digi> void analogToDigitalImpl(CLHEP::HepRandomEngine*, CaloSamples & linearFrame, Digi & result, double preMixFactor, unsigned preMixBits);
45  template<class Digi> void convert(CaloSamples & frame, Digi & result, CLHEP::HepRandomEngine*);
46  template<class Digi> void premix(CaloSamples & frame, Digi & result, double preMixFactor, unsigned preMixBits);
47 
51 
55 };
56 
57 #endif
HcalAmplifier * theAmplifier
std::tuple< unsigned int, int, int, DigiType, int, int, int, float > Digi
Definition: GenericDigi.h:40
const HcalCoderFactory * theCoderFactory
def convert(infile, ofile)