CMS 3D CMS Logo

HcalDigitizer.h
Go to the documentation of this file.
1 #ifndef HcalSimProducers_HcalDigitizer_h
2 #define HcalSimProducers_HcalDigitizer_h
3 
23 
24 #include <vector>
25 
26 class CaloHitResponse;
28 class HcalAmplifier;
29 class HPDIonFeedbackSim;
30 class HcalCoderFactory;
31 class HcalElectronicsSim;
32 class HcalTimeSlewSim;
34 class HcalShapes;
36 class HcalTopology;
37 
38 namespace edm {
39  class ConsumesCollector;
40 }
41 
42 namespace CLHEP {
43  class HepRandomEngine;
44 }
45 
47 public:
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 
63 
64 private:
65  void setup(const edm::EventSetup &es);
66  void accumulateCaloHits(edm::Handle<std::vector<PCaloHit>> const &hcalHits,
67  edm::Handle<std::vector<PCaloHit>> const &zdcHits,
68  int bunchCrossing,
69  CLHEP::HepRandomEngine *,
70  const HcalTopology *h);
71 
73  void fillFakeHits();
76  void checkGeometry(const edm::EventSetup &eventSetup);
81  void updateGeometry(const edm::EventSetup &eventSetup);
82 
83  void buildHOSiPMCells(const std::vector<DetId> &allCells, const edm::EventSetup &eventSetup);
84  void buildHFQIECells(const std::vector<DetId> &allCells, const edm::EventSetup &eventSetup);
85  void buildHBHEQIECells(const std::vector<DetId> &allCells, const edm::EventSetup &eventSetup);
86 
87  // function to evaluate aging at the digi level
88  void darkening(std::vector<PCaloHit> &hcalHits);
89 
97 
100 
101  std::unique_ptr<CaloHitResponse> theHBHEResponse;
102  std::unique_ptr<HcalSiPMHitResponse> theHBHESiPMResponse;
103  std::unique_ptr<CaloHitResponse> theHOResponse;
104  std::unique_ptr<HcalSiPMHitResponse> theHOSiPMResponse;
105  std::unique_ptr<CaloHitResponse> theHFResponse;
106  std::unique_ptr<CaloHitResponse> theHFQIE10Response;
107  std::unique_ptr<CaloHitResponse> theZDCResponse;
108 
109  // we need separate amplifiers (and electronicssims)
110  // because they might have separate noise generators
111  std::unique_ptr<HcalAmplifier> theHBHEAmplifier;
112  std::unique_ptr<HcalAmplifier> theHFAmplifier;
113  std::unique_ptr<HcalAmplifier> theHOAmplifier;
114  std::unique_ptr<HcalAmplifier> theZDCAmplifier;
115  std::unique_ptr<HcalAmplifier> theHFQIE10Amplifier;
116  std::unique_ptr<HcalAmplifier> theHBHEQIE11Amplifier;
117 
118  std::unique_ptr<HPDIonFeedbackSim> theIonFeedback;
119  std::unique_ptr<HcalCoderFactory> theCoderFactory;
120 
121  std::unique_ptr<HcalElectronicsSim> theHBHEElectronicsSim;
122  std::unique_ptr<HcalElectronicsSim> theHFElectronicsSim;
123  std::unique_ptr<HcalElectronicsSim> theHOElectronicsSim;
124  std::unique_ptr<HcalElectronicsSim> theZDCElectronicsSim;
125  std::unique_ptr<HcalElectronicsSim> theHFQIE10ElectronicsSim;
126  std::unique_ptr<HcalElectronicsSim> theHBHEQIE11ElectronicsSim;
127 
135 
136  std::unique_ptr<HcalTimeSlewSim> theTimeSlewSim;
137 
138  std::unique_ptr<HBHEDigitizer> theHBHEDigitizer;
139  std::unique_ptr<HODigitizer> theHODigitizer;
140  std::unique_ptr<HODigitizer> theHOSiPMDigitizer;
141  std::unique_ptr<HFDigitizer> theHFDigitizer;
142  std::unique_ptr<ZDCDigitizer> theZDCDigitizer;
143  std::unique_ptr<QIE10Digitizer> theHFQIE10Digitizer;
144  std::unique_ptr<QIE11Digitizer> theHBHEQIE11Digitizer;
145  std::unique_ptr<HcalHitRelabeller> theRelabeller;
146 
147  // need to cache some DetIds for the digitizers,
148  // if they don't come straight from the geometry
149  std::vector<DetId> hbheCells;
151  std::vector<DetId> theHOHPDDetIds;
152  std::vector<DetId> theHOSiPMDetIds;
153  std::vector<DetId> theHFQIE8DetIds, theHFQIE10DetIds;
154 
158  bool killHE_;
159  bool debugCS_;
162 
164 
166 
171  std::unique_ptr<HFRecalibration> m_HFRecalibration;
172 
174 
175  std::vector<double> injectedHitsEnergy_;
176  std::vector<double> injectedHitsTime_;
177  std::vector<int> injectedHitsCells_;
178  std::vector<PCaloHit> injectedHits_;
179 };
180 
181 #endif
CaloTDigitizer
Definition: CaloTDigitizer.h:42
HcalDigitizer::theHFQIE8DetIds
std::vector< DetId > theHFQIE8DetIds
Definition: HcalDigitizer.h:153
HcalDigitizer::theHFQIE10Digitizer
std::unique_ptr< QIE10Digitizer > theHFQIE10Digitizer
Definition: HcalDigitizer.h:143
HcalDigitizer::theZDCElectronicsSim
std::unique_ptr< HcalElectronicsSim > theZDCElectronicsSim
Definition: HcalDigitizer.h:124
HcalHitFilter.h
HcalDigitizer::testNumbering_
bool testNumbering_
Definition: HcalDigitizer.h:156
HcalDigitizer::theHBHEResponse
std::unique_ptr< CaloHitResponse > theHBHEResponse
Definition: HcalDigitizer.h:101
HcalDigitizer::accumulate
void accumulate(edm::Event const &e, edm::EventSetup const &c, CLHEP::HepRandomEngine *)
Definition: HcalDigitizer.cc:414
HcalDigitizer::injectedHitsEnergy_
std::vector< double > injectedHitsEnergy_
Definition: HcalDigitizer.h:175
HcalDigitizer::theHOHPDDetIds
std::vector< DetId > theHOHPDDetIds
Definition: HcalDigitizer.h:151
HcalDigitizer::theShapes
HcalShapes theShapes
Definition: HcalDigitizer.h:99
HcalDigitizer::theZDCResponse
std::unique_ptr< CaloHitResponse > theZDCResponse
Definition: HcalDigitizer.h:107
HcalDigitizer::setQIE11NoiseSignalGenerator
void setQIE11NoiseSignalGenerator(HcalBaseSignalGenerator *noiseGenerator)
Definition: HcalDigitizer.cc:251
HcalDigitizer::ignoreTime_
bool ignoreTime_
Definition: HcalDigitizer.h:160
edm::ESWatcher< CaloGeometryRecord >
HcalDigitizer::killHE_
bool killHE_
Definition: HcalDigitizer.h:158
HcalDigitizer::debugCS_
bool debugCS_
Definition: HcalDigitizer.h:159
HBHEDarkening.h
HcalDigitizer::theHOResponse
std::unique_ptr< CaloHitResponse > theHOResponse
Definition: HcalDigitizer.h:103
HcalDigitizer::theIonFeedback
std::unique_ptr< HPDIonFeedbackSim > theIonFeedback
Definition: HcalDigitizer.h:118
HcalDigitizer::theHFQIE10Response
std::unique_ptr< CaloHitResponse > theHFQIE10Response
Definition: HcalDigitizer.h:106
edm
HLT enums.
Definition: AlignableModifier.h:19
HcalDigitizer::accumulateCaloHits
void accumulateCaloHits(edm::Handle< std::vector< PCaloHit >> const &hcalHits, edm::Handle< std::vector< PCaloHit >> const &zdcHits, int bunchCrossing, CLHEP::HepRandomEngine *, const HcalTopology *h)
Definition: HcalDigitizer.cc:330
HcalDigitizer::injectTestHits_
bool injectTestHits_
Definition: HcalDigitizer.h:161
HcalTopology
Definition: HcalTopology.h:26
HcalDigitizer::theGeometryWatcher_
edm::ESWatcher< CaloGeometryRecord > theGeometryWatcher_
Definition: HcalDigitizer.h:77
HcalShapes.h
HcalDigitizer::isZDC
bool isZDC
Definition: HcalDigitizer.h:155
HcalTimeSlew.h
ZDCHitFilter.h
HcalDigitizer::theHBHEQIE11ElectronicsSim
std::unique_ptr< HcalElectronicsSim > theHBHEQIE11ElectronicsSim
Definition: HcalDigitizer.h:126
HcalRecNumberingRecord.h
HcalDigitizer::theHBHEQIE11Digitizer
std::unique_ptr< QIE11Digitizer > theHBHEQIE11Digitizer
Definition: HcalDigitizer.h:144
HcalHitFilter< HcalBarrel, HcalEndcap >
PileUpEventPrincipal
Definition: PileUpEventPrincipal.h:19
HcalDigitizer::hfgeo
bool hfgeo
Definition: HcalDigitizer.h:155
HcalDigitizer::theGeometry
const CaloGeometry * theGeometry
Definition: HcalDigitizer.h:79
HcalDigitizer::theHOSiPMDetIds
std::vector< DetId > theHOSiPMDetIds
Definition: HcalDigitizer.h:152
HcalDigitizer::theHOAmplifier
std::unique_ptr< HcalAmplifier > theHOAmplifier
Definition: HcalDigitizer.h:113
HcalDigitizer::theHOSiPMHitFilter
HOHitFilter theHOSiPMHitFilter
Definition: HcalDigitizer.h:133
HcalDigitizer::theHOSiPMResponse
std::unique_ptr< HcalSiPMHitResponse > theHOSiPMResponse
Definition: HcalDigitizer.h:104
HcalDigitizer::hbheCells
std::vector< DetId > hbheCells
Definition: HcalDigitizer.h:149
edm::Handle
Definition: AssociativeIterator.h:50
HFRecalibration.h
HcalDigitizer::m_HBDarkening
const HBHEDarkening * m_HBDarkening
Definition: HcalDigitizer.h:169
HcalDigitizer::theParameterMap
HcalSimParameterMap theParameterMap
Definition: HcalDigitizer.h:98
HcalTimeSlew
Definition: HcalTimeSlew.h:19
HcalDigitizer::theHOElectronicsSim
std::unique_ptr< HcalElectronicsSim > theHOElectronicsSim
Definition: HcalDigitizer.h:123
HcalDigitizer::theHBHEElectronicsSim
std::unique_ptr< HcalElectronicsSim > theHBHEElectronicsSim
Definition: HcalDigitizer.h:121
HcalDigitizer::setHONoiseSignalGenerator
void setHONoiseSignalGenerator(HcalBaseSignalGenerator *noiseGenerator)
Definition: HcalDigitizer.cc:275
HcalCoderFactory
Definition: HcalCoderFactory.h:8
HcalDigitizerTraits.h
HcalDigitizer::theHBHEQIE11HitFilter
HBHEHitFilter theHBHEQIE11HitFilter
Definition: HcalDigitizer.h:129
HPDIonFeedbackSim
Definition: HPDIonFeedbackSim.h:27
HcalDigitizer::setZDCNoiseSignalGenerator
void setZDCNoiseSignalGenerator(HcalBaseSignalGenerator *noiseGenerator)
Definition: HcalDigitizer.cc:285
HcalDigitizer::theZDCAmplifier
std::unique_ptr< HcalAmplifier > theZDCAmplifier
Definition: HcalDigitizer.h:114
HcalSimParameterMap.h
HcalDigitizer::theHBHEHitFilter
HBHEHitFilter theHBHEHitFilter
Definition: HcalDigitizer.h:128
CaloGeometry
Definition: CaloGeometry.h:21
HcalDigitizer::theHFQIE10Amplifier
std::unique_ptr< HcalAmplifier > theHFQIE10Amplifier
Definition: HcalDigitizer.h:115
HcalDigitizer::QIE11Digitizer
CaloTDigitizer< HcalQIE11DigitizerTraits, CaloTDigitizerQIE1011Run > QIE11Digitizer
Definition: HcalDigitizer.h:96
HcalDigitizer::setHBHENoiseSignalGenerator
void setHBHENoiseSignalGenerator(HcalBaseSignalGenerator *noiseGenerator)
Definition: HcalDigitizer.cc:243
HcalSimParameterMap
Definition: HcalSimParameterMap.h:10
HcalDigitizer::~HcalDigitizer
virtual ~HcalDigitizer()
Definition: HcalDigitizer.cc:241
h
HcalDigitizer::injectedHits_
std::vector< PCaloHit > injectedHits_
Definition: HcalDigitizer.h:178
HcalDigitizer::buildHFQIECells
void buildHFQIECells(const std::vector< DetId > &allCells, const edm::EventSetup &eventSetup)
Definition: HcalDigitizer.cc:689
HcalDigitizer::QIE10Digitizer
CaloTDigitizer< HcalQIE10DigitizerTraits, CaloTDigitizerQIE1011Run > QIE10Digitizer
Definition: HcalDigitizer.h:95
HcalDigitizer::agingFlagHB
bool agingFlagHB
Definition: HcalDigitizer.h:168
HcalDigitizer::finalizeEvent
void finalizeEvent(edm::Event &e, edm::EventSetup const &c, CLHEP::HepRandomEngine *)
Definition: HcalDigitizer.cc:454
CaloGeometryRecord.h
CLHEP
Definition: CocoaGlobals.h:27
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
HcalDigitizer::theHBHEQIE8DetIds
std::vector< DetId > theHBHEQIE8DetIds
Definition: HcalDigitizer.h:150
HcalDigitizer::theHFQIE10HitFilter
HFHitFilter theHFQIE10HitFilter
Definition: HcalDigitizer.h:131
HcalDigitizer::theRelabeller
std::unique_ptr< HcalHitRelabeller > theRelabeller
Definition: HcalDigitizer.h:145
edm::ParameterSet
Definition: ParameterSet.h:36
HcalDigitizer::hbhegeo
bool hbhegeo
Definition: HcalDigitizer.h:155
HcalDigitizer::setQIE10NoiseSignalGenerator
void setQIE10NoiseSignalGenerator(HcalBaseSignalGenerator *noiseGenerator)
Definition: HcalDigitizer.cc:267
HcalDigitizer::theHFHitFilter
HFHitFilter theHFHitFilter
Definition: HcalDigitizer.h:130
HcalDigitizer::HODigitizer
CaloTDigitizer< HODigitizerTraits, CaloTDigitizerQIE8Run > HODigitizer
Definition: HcalDigitizer.h:92
HcalDigitizer::ZDCDigitizer
CaloTDigitizer< ZDCDigitizerTraits, CaloTDigitizerQIE8Run > ZDCDigitizer
Definition: HcalDigitizer.h:94
HcalDigitizer::theRecNumber
const HcalDDDRecConstants * theRecNumber
Definition: HcalDigitizer.h:80
HcalHitRelabeller.h
HcalDigitizer::updateGeometry
void updateGeometry(const edm::EventSetup &eventSetup)
Definition: HcalDigitizer.cc:609
HBHEDarkening
Definition: HBHEDarkening.h:17
HcalDigitizer::buildHBHEQIECells
void buildHBHEQIECells(const std::vector< DetId > &allCells, const edm::EventSetup &eventSetup)
Definition: HcalDigitizer.cc:729
CaloHitResponse
Creates electronics signals from hits.
Definition: CaloHitResponse.h:33
HcalDigitizer::theTimeSlewSim
std::unique_ptr< HcalTimeSlewSim > theTimeSlewSim
Definition: HcalDigitizer.h:136
HcalDigitizer::setup
void setup(const edm::EventSetup &es)
Definition: HcalDigitizer.cc:555
ZDCHitFilter
Definition: ZDCHitFilter.h:8
HcalDigitizer::zdcgeo
bool zdcgeo
Definition: HcalDigitizer.h:155
HcalDigitizer::theHBHEAmplifier
std::unique_ptr< HcalAmplifier > theHBHEAmplifier
Definition: HcalDigitizer.h:111
HcalDigitizer::theHBHEQIE11DetIds
std::vector< DetId > theHBHEQIE11DetIds
Definition: HcalDigitizer.h:150
edm::EventSetup
Definition: EventSetup.h:57
HcalShapes
Definition: HcalShapes.h:18
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
HcalDigitizer
Definition: HcalDigitizer.h:46
CaloTDigitizer.h
HcalDigitizer::HcalDigitizer
HcalDigitizer(const edm::ParameterSet &ps, edm::ConsumesCollector &iC)
Definition: HcalDigitizer.cc:37
HcalSiPMHitResponse
Definition: HcalSiPMHitResponse.h:22
HcalDigitizer::theHFQIE10DetIds
std::vector< DetId > theHFQIE10DetIds
Definition: HcalDigitizer.h:153
HcalDigitizer::theZDCDigitizer
std::unique_ptr< ZDCDigitizer > theZDCDigitizer
Definition: HcalDigitizer.h:142
HcalDigitizer::darkening
void darkening(std::vector< PCaloHit > &hcalHits)
Definition: HcalDigitizer.cc:832
HcalDigitizer::injectedHitsCells_
std::vector< int > injectedHitsCells_
Definition: HcalDigitizer.h:177
HcalQIE1011Traits.h
HcalDigitizer::HBHEDigitizer
CaloTDigitizer< HBHEDigitizerTraits, CaloTDigitizerQIE8Run > HBHEDigitizer
Definition: HcalDigitizer.h:91
HcalDigitizer::setHFNoiseSignalGenerator
void setHFNoiseSignalGenerator(HcalBaseSignalGenerator *noiseGenerator)
Definition: HcalDigitizer.cc:259
HcalDigitizer::HFDigitizer
CaloTDigitizer< HFDigitizerTraits, CaloTDigitizerQIE8Run > HFDigitizer
Definition: HcalDigitizer.h:93
DetId.h
Frameworkfwd.h
ESWatcher.h
HcalDigitizer::theHFResponse
std::unique_ptr< CaloHitResponse > theHFResponse
Definition: HcalDigitizer.h:105
HcalAmplifier
Definition: HcalAmplifier.h:20
HcalDigitizer::theZDCHitFilter
ZDCHitFilter theZDCHitFilter
Definition: HcalDigitizer.h:134
HcalDigitizer::theHBHESiPMResponse
std::unique_ptr< HcalSiPMHitResponse > theHBHESiPMResponse
Definition: HcalDigitizer.h:102
HcalDigitizer::theHODigitizer
std::unique_ptr< HODigitizer > theHODigitizer
Definition: HcalDigitizer.h:139
CaloGeometry.h
HcalDigitizer::doHFWindow_
bool doHFWindow_
Definition: HcalDigitizer.h:157
HcalDigitizer::theHFAmplifier
std::unique_ptr< HcalAmplifier > theHFAmplifier
Definition: HcalDigitizer.h:112
HcalTimeSlewSim
Definition: HcalTimeSlewSim.h:19
HcalDDDRecConstants.h
HcalElectronicsSim
Definition: HcalElectronicsSim.h:25
HcalDigitizer::hogeo
bool hogeo
Definition: HcalDigitizer.h:155
HcalDigitizer::theCoderFactory
std::unique_ptr< HcalCoderFactory > theCoderFactory
Definition: HcalDigitizer.h:119
HcalDigitizer::theHOSiPMCode
int theHOSiPMCode
Definition: HcalDigitizer.h:165
HcalDigitizer::initializeEvent
void initializeEvent(edm::Event const &e, edm::EventSetup const &c)
Definition: HcalDigitizer.cc:292
PCaloHitContainer.h
HcalDigitizer::theHBHEDigitizer
std::unique_ptr< HBHEDigitizer > theHBHEDigitizer
Definition: HcalDigitizer.h:138
HcalDigitizer::m_HFRecalibration
std::unique_ptr< HFRecalibration > m_HFRecalibration
Definition: HcalDigitizer.h:171
HcalDigitizer::injectedHitsTime_
std::vector< double > injectedHitsTime_
Definition: HcalDigitizer.h:176
HcalDDDRecConstants
Definition: HcalDDDRecConstants.h:23
HcalDigitizer::theHFQIE10ElectronicsSim
std::unique_ptr< HcalElectronicsSim > theHFQIE10ElectronicsSim
Definition: HcalDigitizer.h:125
HcalDigitizer::m_HEDarkening
const HBHEDarkening * m_HEDarkening
Definition: HcalDigitizer.h:170
HcalDigitizer::theHOHitFilter
HOHitFilter theHOHitFilter
Definition: HcalDigitizer.h:132
HcalBaseSignalGenerator
Definition: HcalBaseSignalGenerator.h:8
HcalDigitizer::theRecNumberWatcher_
edm::ESWatcher< HcalRecNumberingRecord > theRecNumberWatcher_
Definition: HcalDigitizer.h:78
HcalDigitizer::theHFElectronicsSim
std::unique_ptr< HcalElectronicsSim > theHFElectronicsSim
Definition: HcalDigitizer.h:122
HcalDigitizer::isHCAL
bool isHCAL
Definition: HcalDigitizer.h:155
HcalDigitizer::hitsProducer_
std::string hitsProducer_
Definition: HcalDigitizer.h:163
HcalDigitizer::deliveredLumi
double deliveredLumi
Definition: HcalDigitizer.h:167
edm::Event
Definition: Event.h:73
HcalDigitizer::theHOSiPMDigitizer
std::unique_ptr< HODigitizer > theHOSiPMDigitizer
Definition: HcalDigitizer.h:140
HcalDigitizer::checkGeometry
void checkGeometry(const edm::EventSetup &eventSetup)
Definition: HcalDigitizer.cc:579
HcalDigitizer::hcalTimeSlew_delay_
const HcalTimeSlew * hcalTimeSlew_delay_
Definition: HcalDigitizer.h:173
HcalDigitizer::agingFlagHE
bool agingFlagHE
Definition: HcalDigitizer.h:168
edm::ConsumesCollector
Definition: ConsumesCollector.h:39
HcalDigitizer::theHBHEQIE11Amplifier
std::unique_ptr< HcalAmplifier > theHBHEQIE11Amplifier
Definition: HcalDigitizer.h:116
HcalDigitizer::fillFakeHits
void fillFakeHits()
some hits in each subdetector, just for testing purposes
HcalDigitizer::buildHOSiPMCells
void buildHOSiPMCells(const std::vector< DetId > &allCells, const edm::EventSetup &eventSetup)
Definition: HcalDigitizer.cc:774
HcalDigitizer::theHFDigitizer
std::unique_ptr< HFDigitizer > theHFDigitizer
Definition: HcalDigitizer.h:141
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37