CMS 3D CMS Logo

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