CMS 3D CMS Logo

HcalDigitizer.h
Go to the documentation of this file.
1 #ifndef HcalSimProducers_HcalDigitizer_h
2 #define HcalSimProducers_HcalDigitizer_h
3 
21 
22 #include <vector>
23 
24 class CaloHitResponse;
26 class HcalAmplifier;
27 class HPDIonFeedbackSim;
28 class HcalCoderFactory;
29 class HcalElectronicsSim;
30 class HcalTimeSlewSim;
32 class HcalShapes;
34 class HcalTopology;
35 
36 namespace edm {
37  class ConsumesCollector;
38 }
39 
40 namespace CLHEP {
41  class HepRandomEngine;
42 }
43 
45 {
46 public:
47 
49  virtual ~HcalDigitizer();
50 
52  void initializeEvent(edm::Event const& e, edm::EventSetup const& c);
53  void accumulate(edm::Event const& e, edm::EventSetup const& c, CLHEP::HepRandomEngine*);
54  void accumulate(PileUpEventPrincipal const& e, edm::EventSetup const& c, CLHEP::HepRandomEngine*);
55  void finalizeEvent(edm::Event& e, edm::EventSetup const& c, CLHEP::HepRandomEngine*);
56 
57  void setHBHENoiseSignalGenerator(HcalBaseSignalGenerator * noiseGenerator);
58  void setHFNoiseSignalGenerator(HcalBaseSignalGenerator * noiseGenerator);
59  void setHONoiseSignalGenerator(HcalBaseSignalGenerator * noiseGenerator);
60  void setZDCNoiseSignalGenerator(HcalBaseSignalGenerator * noiseGenerator);
61  void setQIE10NoiseSignalGenerator(HcalBaseSignalGenerator * noiseGenerator);
62  void setQIE11NoiseSignalGenerator(HcalBaseSignalGenerator * noiseGenerator);
63 
64 private:
65  void setup(const edm::EventSetup & es);
66  void accumulateCaloHits(edm::Handle<std::vector<PCaloHit> > const& hcalHits, edm::Handle<std::vector<PCaloHit> > const& zdcHits, int bunchCrossing, CLHEP::HepRandomEngine*, const HcalTopology *h);
67 
69  void fillFakeHits();
72  void checkGeometry(const edm::EventSetup& eventSetup);
77  void updateGeometry(const edm::EventSetup& eventSetup);
78 
79  void buildHOSiPMCells(const std::vector<DetId>& allCells, const edm::EventSetup& eventSetup);
80  void buildHFQIECells(const std::vector<DetId>& allCells, const edm::EventSetup& eventSetup);
81  void buildHBHEQIECells(const std::vector<DetId>& allCells, const edm::EventSetup& eventSetup);
82 
83  //function to evaluate aging at the digi level
84  void darkening(std::vector<PCaloHit>& hcalHits);
85 
93 
96 
104 
105  // we need separate amplifiers (and electronicssims)
106  // because they might have separate noise generators
113 
116 
123 
131 
133 
134  HBHEDigitizer * theHBHEDigitizer;
135  HODigitizer* theHODigitizer;
136  HODigitizer* theHOSiPMDigitizer;
137  HFDigitizer* theHFDigitizer;
138  ZDCDigitizer* theZDCDigitizer;
139  QIE10Digitizer * theHFQIE10Digitizer;
140  QIE11Digitizer * theHBHEQIE11Digitizer;
142 
143  // need to cache some DetIds for the digitizers,
144  // if they don't come straight from the geometry
145  std::vector<DetId> hbheCells;
146  std::vector<DetId> theHBHEQIE8DetIds, theHBHEQIE11DetIds;
147  std::vector<DetId> theHOHPDDetIds;
148  std::vector<DetId> theHOSiPMDetIds;
149  std::vector<DetId> theHFQIE8DetIds, theHFQIE10DetIds;
150 
151  bool isZDC,isHCAL,zdcgeo,hbhegeo,hogeo,hfgeo;
154  bool killHE_;
155  bool debugCS_;
158 
160 
162 
164  bool agingFlagHB, agingFlagHE;
167  std::unique_ptr<HFRecalibration> m_HFRecalibration;
168 
170 
171  std::vector<double> injectedHitsEnergy_;
172  std::vector<double> injectedHitsTime_;
173  std::vector<int> injectedHitsCells_;
174  std::vector<PCaloHit> injectedHits_;
175 };
176 
177 #endif
178 
179 
180 
HFHitFilter theHFQIE10HitFilter
QIE10Digitizer * theHFQIE10Digitizer
std::vector< int > injectedHitsCells_
HBHEHitFilter theHBHEHitFilter
CaloHitResponse * theHFQIE10Response
const HcalDDDRecConstants * theRecNumber
Definition: HcalDigitizer.h:76
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
HcalElectronicsSim * theHFElectronicsSim
HBHEDigitizer * theHBHEDigitizer
HcalElectronicsSim * theHBHEQIE11ElectronicsSim
HOHitFilter theHOHitFilter
def setup(process, global_tag, zero_tesla=False)
Definition: GeneralSetup.py:1
HFDigitizer * theHFDigitizer
HFHitFilter theHFHitFilter
CaloTDigitizer< HODigitizerTraits, CaloTDigitizerQIE8Run > HODigitizer
Definition: HcalDigitizer.h:88
HcalSimParameterMap * theParameterMap
Definition: HcalDigitizer.h:94
CaloTDigitizer< HBHEDigitizerTraits, CaloTDigitizerQIE8Run > HBHEDigitizer
Definition: HcalDigitizer.h:87
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
edm::ESWatcher< HcalRecNumberingRecord > theRecNumberWatcher_
Definition: HcalDigitizer.h:74
std::string hitsProducer_
HcalElectronicsSim * theHOElectronicsSim
double deliveredLumi
HcalShapes * theShapes
Definition: HcalDigitizer.h:95
Creates electronics signals from hits.
const HcalTimeSlew * hcalTimeSlew_delay_
ZDCHitFilter theZDCHitFilter
HPDIonFeedbackSim * theIonFeedback
CaloTDigitizer< ZDCDigitizerTraits, CaloTDigitizerQIE8Run > ZDCDigitizer
Definition: HcalDigitizer.h:90
CaloHitResponse * theHOResponse
Definition: HcalDigitizer.h:99
CaloHitResponse * theHOSiPMResponse
std::vector< double > injectedHitsTime_
ZDCDigitizer * theZDCDigitizer
std::vector< DetId > theHOHPDDetIds
CaloHitResponse * theZDCResponse
CaloTDigitizer< HFDigitizerTraits, CaloTDigitizerQIE8Run > HFDigitizer
Definition: HcalDigitizer.h:89
HcalElectronicsSim * theZDCElectronicsSim
edm::ESWatcher< CaloGeometryRecord > theGeometryWatcher_
Definition: HcalDigitizer.h:73
HcalAmplifier * theHOAmplifier
std::vector< DetId > theHFQIE8DetIds
HcalElectronicsSim * theHBHEElectronicsSim
CaloHitResponse * theHBHEResponse
Definition: HcalDigitizer.h:97
HODigitizer * theHODigitizer
std::vector< DetId > theHOSiPMDetIds
HOHitFilter theHOSiPMHitFilter
const CaloGeometry * theGeometry
Definition: HcalDigitizer.h:75
std::vector< DetId > hbheCells
const HBHEDarkening * m_HBDarkening
CaloHitResponse * theHFResponse
CaloTDigitizer< HcalQIE11DigitizerTraits, CaloTDigitizerQIE1011Run > QIE11Digitizer
Definition: HcalDigitizer.h:92
HLT enums.
HcalElectronicsSim * theHFQIE10ElectronicsSim
HODigitizer * theHOSiPMDigitizer
QIE11Digitizer * theHBHEQIE11Digitizer
HBHEHitFilter theHBHEQIE11HitFilter
std::vector< DetId > theHBHEQIE8DetIds
CaloHitResponse * theHBHESiPMResponse
Definition: HcalDigitizer.h:98
CaloTDigitizer< HcalQIE10DigitizerTraits, CaloTDigitizerQIE1011Run > QIE10Digitizer
Definition: HcalDigitizer.h:91
bool checkGeometry(bool=true)
HcalAmplifier * theZDCAmplifier
std::vector< PCaloHit > injectedHits_
HcalAmplifier * theHFQIE10Amplifier