CMS 3D CMS Logo

HcalDigitizer.h
Go to the documentation of this file.
1 #ifndef HcalSimProducers_HcalDigitizer_h
2 #define HcalSimProducers_HcalDigitizer_h
3 
18 
19 #include <vector>
20 
21 class CaloHitResponse;
23 class HcalAmplifier;
24 class HPDIonFeedbackSim;
25 class HcalCoderFactory;
26 class HcalElectronicsSim;
27 class HcalTimeSlewSim;
29 class HcalShapes;
31 class HcalTopology;
32 
33 namespace edm {
34  class ConsumesCollector;
35 }
36 
37 namespace CLHEP {
38  class HepRandomEngine;
39 }
40 
42 {
43 public:
44 
46  virtual ~HcalDigitizer();
47 
49  void initializeEvent(edm::Event const& e, edm::EventSetup const& c);
50  void accumulate(edm::Event const& e, edm::EventSetup const& c, CLHEP::HepRandomEngine*);
51  void accumulate(PileUpEventPrincipal const& e, edm::EventSetup const& c, CLHEP::HepRandomEngine*);
52  void finalizeEvent(edm::Event& e, edm::EventSetup const& c, CLHEP::HepRandomEngine*);
53  void beginRun(const edm::EventSetup & es);
54  void endRun();
55 
56  void setHBHENoiseSignalGenerator(HcalBaseSignalGenerator * noiseGenerator);
57  void setHFNoiseSignalGenerator(HcalBaseSignalGenerator * noiseGenerator);
58  void setHONoiseSignalGenerator(HcalBaseSignalGenerator * noiseGenerator);
59  void setZDCNoiseSignalGenerator(HcalBaseSignalGenerator * noiseGenerator);
60  void setQIE10NoiseSignalGenerator(HcalBaseSignalGenerator * noiseGenerator);
61  void setQIE11NoiseSignalGenerator(HcalBaseSignalGenerator * noiseGenerator);
62 
63 private:
64  void accumulateCaloHits(edm::Handle<std::vector<PCaloHit> > const& hcalHits, edm::Handle<std::vector<PCaloHit> > const& zdcHits, int bunchCrossing, CLHEP::HepRandomEngine*, const HcalTopology *h);
65 
67  void fillFakeHits();
70  void checkGeometry(const edm::EventSetup& eventSetup);
73  void updateGeometry(const edm::EventSetup& eventSetup);
74 
75  void buildHOSiPMCells(const std::vector<DetId>& allCells, const edm::EventSetup& eventSetup);
76  void buildHFQIECells(const std::vector<DetId>& allCells, const edm::EventSetup& eventSetup);
77  void buildHBHEQIECells(const std::vector<DetId>& allCells, const edm::EventSetup& eventSetup);
78 
79  //function to evaluate aging at the digi level
80  void darkening(std::vector<PCaloHit>& hcalHits);
81 
89 
92 
100 
101  // we need separate amplifiers (and electronicssims)
102  // because they might have separate noise generators
109 
112 
119 
127 
129 
130  HBHEDigitizer * theHBHEDigitizer;
131  HODigitizer* theHODigitizer;
132  HODigitizer* theHOSiPMDigitizer;
133  HFDigitizer* theHFDigitizer;
134  ZDCDigitizer* theZDCDigitizer;
135  QIE10Digitizer * theHFQIE10Digitizer;
136  QIE11Digitizer * theHBHEQIE11Digitizer;
138 
139  // need to cache some DetIds for the digitizers,
140  // if they don't come straight from the geometry
141  std::vector<DetId> hbheCells;
142  std::vector<DetId> theHBHEQIE8DetIds, theHBHEQIE11DetIds;
143  std::vector<DetId> theHOHPDDetIds;
144  std::vector<DetId> theHOSiPMDetIds;
145  std::vector<DetId> theHFQIE8DetIds, theHFQIE10DetIds;
146 
147  bool isZDC,isHCAL,zdcgeo,hbhegeo,hogeo,hfgeo;
150  bool killHE_;
151  bool debugCS_;
154 
156 
158 
160  bool agingFlagHB, agingFlagHE;
163  std::unique_ptr<HFRecalibration> m_HFRecalibration;
164 
166 
167  std::vector<double> injectedHitsEnergy_;
168  std::vector<double> injectedHitsTime_;
169  std::vector<int> injectedHitsCells_;
170  std::vector<PCaloHit> injectedHits_;
171 };
172 
173 #endif
174 
175 
176 
HFHitFilter theHFQIE10HitFilter
QIE10Digitizer * theHFQIE10Digitizer
std::vector< int > injectedHitsCells_
HBHEHitFilter theHBHEHitFilter
CaloHitResponse * theHFQIE10Response
Definition: HcalDigitizer.h:98
const HcalDDDRecConstants * theRecNumber
Definition: HcalDigitizer.h:72
HcalElectronicsSim * theHFElectronicsSim
HBHEDigitizer * theHBHEDigitizer
HcalElectronicsSim * theHBHEQIE11ElectronicsSim
HOHitFilter theHOHitFilter
HFDigitizer * theHFDigitizer
HFHitFilter theHFHitFilter
CaloTDigitizer< HODigitizerTraits, CaloTDigitizerQIE8Run > HODigitizer
Definition: HcalDigitizer.h:84
HcalSimParameterMap * theParameterMap
Definition: HcalDigitizer.h:90
CaloTDigitizer< HBHEDigitizerTraits, CaloTDigitizerQIE8Run > HBHEDigitizer
Definition: HcalDigitizer.h:83
HcalTimeSlewSim * theTimeSlewSim
HcalAmplifier * theHFAmplifier
HcalCoderFactory * theCoderFactory
HcalHitRelabeller * theRelabeller
std::unique_ptr< HFRecalibration > m_HFRecalibration
HcalAmplifier * theHBHEQIE11Amplifier
std::vector< double > injectedHitsEnergy_
const HBHEDarkening * m_HEDarkening
HcalAmplifier * theHBHEAmplifier
std::string hitsProducer_
HcalElectronicsSim * theHOElectronicsSim
double deliveredLumi
HcalShapes * theShapes
Definition: HcalDigitizer.h:91
Creates electronics signals from hits.
const HcalTimeSlew * hcalTimeSlew_delay_
ZDCHitFilter theZDCHitFilter
HPDIonFeedbackSim * theIonFeedback
CaloTDigitizer< ZDCDigitizerTraits, CaloTDigitizerQIE8Run > ZDCDigitizer
Definition: HcalDigitizer.h:86
CaloHitResponse * theHOResponse
Definition: HcalDigitizer.h:95
CaloHitResponse * theHOSiPMResponse
Definition: HcalDigitizer.h:96
std::vector< double > injectedHitsTime_
ZDCDigitizer * theZDCDigitizer
std::vector< DetId > theHOHPDDetIds
CaloHitResponse * theZDCResponse
Definition: HcalDigitizer.h:99
CaloTDigitizer< HFDigitizerTraits, CaloTDigitizerQIE8Run > HFDigitizer
Definition: HcalDigitizer.h:85
HcalElectronicsSim * theZDCElectronicsSim
HcalAmplifier * theHOAmplifier
std::vector< DetId > theHFQIE8DetIds
HcalElectronicsSim * theHBHEElectronicsSim
CaloHitResponse * theHBHEResponse
Definition: HcalDigitizer.h:93
HODigitizer * theHODigitizer
std::vector< DetId > theHOSiPMDetIds
HOHitFilter theHOSiPMHitFilter
const CaloGeometry * theGeometry
Definition: HcalDigitizer.h:71
std::vector< DetId > hbheCells
const HBHEDarkening * m_HBDarkening
CaloHitResponse * theHFResponse
Definition: HcalDigitizer.h:97
CaloTDigitizer< HcalQIE11DigitizerTraits, CaloTDigitizerQIE1011Run > QIE11Digitizer
Definition: HcalDigitizer.h:88
HLT enums.
HcalElectronicsSim * theHFQIE10ElectronicsSim
HODigitizer * theHOSiPMDigitizer
QIE11Digitizer * theHBHEQIE11Digitizer
HBHEHitFilter theHBHEQIE11HitFilter
std::vector< DetId > theHBHEQIE8DetIds
CaloHitResponse * theHBHESiPMResponse
Definition: HcalDigitizer.h:94
CaloTDigitizer< HcalQIE10DigitizerTraits, CaloTDigitizerQIE1011Run > QIE10Digitizer
Definition: HcalDigitizer.h:87
bool checkGeometry(bool=true)
HcalAmplifier * theZDCAmplifier
std::vector< PCaloHit > injectedHits_
HcalAmplifier * theHFQIE10Amplifier