CMS 3D CMS Logo

HcalDigitizer.cc
Go to the documentation of this file.
29 #include <boost/foreach.hpp>
30 #include <memory>
31 
32 //#define DebugLog
33 
35  : conditionsToken_(iC.esConsumes()),
36  topoToken_(iC.esConsumes()),
37  hcalTimeSlew_delay_token_(iC.esConsumes(edm::ESInputTag("", "HBHE"))),
38  theGeometryToken(iC.esConsumes()),
39  theRecNumberToken(iC.esConsumes()),
40  qieTypesToken_(iC.esConsumes()),
41  theGeometry(nullptr),
42  theRecNumber(nullptr),
43  theParameterMap(ps),
44  theShapes(),
45  theHBHEResponse(std::make_unique<CaloHitResponse>(&theParameterMap, &theShapes)),
46  theHBHESiPMResponse(std::make_unique<HcalSiPMHitResponse>(
47  &theParameterMap, &theShapes, ps.getParameter<bool>("HcalPreMixStage1"), true)),
48  theHOResponse(std::make_unique<CaloHitResponse>(&theParameterMap, &theShapes)),
49  theHOSiPMResponse(std::make_unique<HcalSiPMHitResponse>(
50  &theParameterMap, &theShapes, ps.getParameter<bool>("HcalPreMixStage1"), false)),
51  theHFResponse(std::make_unique<CaloHitResponse>(&theParameterMap, &theShapes)),
52  theHFQIE10Response(std::make_unique<CaloHitResponse>(&theParameterMap, &theShapes)),
53  theZDCResponse(std::make_unique<CaloHitResponse>(&theParameterMap, &theShapes)),
54  theHBHEAmplifier(nullptr),
55  theHFAmplifier(nullptr),
56  theHOAmplifier(nullptr),
57  theZDCAmplifier(nullptr),
58  theHFQIE10Amplifier(nullptr),
59  theHBHEQIE11Amplifier(nullptr),
60  theIonFeedback(nullptr),
61  theCoderFactory(nullptr),
62  theHBHEElectronicsSim(nullptr),
63  theHFElectronicsSim(nullptr),
64  theHOElectronicsSim(nullptr),
65  theZDCElectronicsSim(nullptr),
66  theHFQIE10ElectronicsSim(nullptr),
67  theHBHEQIE11ElectronicsSim(nullptr),
68  theHBHEHitFilter(),
69  theHBHEQIE11HitFilter(),
70  theHFHitFilter(),
71  theHFQIE10HitFilter(),
72  theHOHitFilter(),
73  theHOSiPMHitFilter(),
74  theZDCHitFilter(),
75  theHBHEDigitizer(nullptr),
76  theHODigitizer(nullptr),
77  theHOSiPMDigitizer(nullptr),
78  theHFDigitizer(nullptr),
79  theZDCDigitizer(nullptr),
80  theHFQIE10Digitizer(nullptr),
81  theHBHEQIE11Digitizer(nullptr),
82  theRelabeller(nullptr),
83  isZDC(true),
84  isHCAL(true),
85  zdcgeo(true),
86  hbhegeo(true),
87  hogeo(true),
88  hfgeo(true),
89  doHFWindow_(ps.getParameter<bool>("doHFWindow")),
90  killHE_(ps.getParameter<bool>("killHE")),
91  debugCS_(ps.getParameter<bool>("debugCaloSamples")),
92  ignoreTime_(ps.getParameter<bool>("ignoreGeantTime")),
93  injectTestHits_(ps.getParameter<bool>("injectTestHits")),
94  hitsProducer_(ps.getParameter<std::string>("hitsProducer")),
95  theHOSiPMCode(ps.getParameter<edm::ParameterSet>("ho").getParameter<int>("siPMCode")),
96  deliveredLumi(0.),
97  agingFlagHB(ps.getParameter<bool>("HBDarkening")),
98  agingFlagHE(ps.getParameter<bool>("HEDarkening")),
99  m_HBDarkening(nullptr),
100  m_HEDarkening(nullptr),
101  m_HFRecalibration(nullptr),
102  injectedHitsEnergy_(ps.getParameter<std::vector<double>>("injectTestHitsEnergy")),
103  injectedHitsTime_(ps.getParameter<std::vector<double>>("injectTestHitsTime")),
104  injectedHitsCells_(ps.getParameter<std::vector<int>>("injectTestHitsCells")) {
105  iC.consumes<std::vector<PCaloHit>>(edm::InputTag(hitsProducer_, "ZDCHITS"));
106  iC.consumes<std::vector<PCaloHit>>(edm::InputTag(hitsProducer_, "HcalHits"));
107 
108  if (agingFlagHB) {
110  }
111  if (agingFlagHE) {
113  }
114  if (theHOSiPMCode == 2) {
115  mcParamsToken_ = iC.esConsumes();
116  }
117 
118  bool doNoise = ps.getParameter<bool>("doNoise");
119 
120  bool PreMix1 = ps.getParameter<bool>("HcalPreMixStage1"); // special threshold/pedestal treatment
121  bool PreMix2 = ps.getParameter<bool>("HcalPreMixStage2"); // special threshold/pedestal treatment
122  bool doEmpty = ps.getParameter<bool>("doEmpty");
123  deliveredLumi = ps.getParameter<double>("DelivLuminosity");
124  bool agingFlagHF = ps.getParameter<bool>("HFDarkening");
125  double minFCToDelay = ps.getParameter<double>("minFCToDelay");
126 
127  if (PreMix1 && PreMix2) {
128  throw cms::Exception("Configuration") << "HcalDigitizer cannot operate in PreMixing digitization and "
129  "PreMixing\n"
130  "digi combination modes at the same time. Please set one mode to "
131  "False\n"
132  "in the configuration file.";
133  }
134 
135  // need to make copies, because they might get different noise generators
136  theHBHEAmplifier = std::make_unique<HcalAmplifier>(&theParameterMap, doNoise, PreMix1, PreMix2);
137  theHFAmplifier = std::make_unique<HcalAmplifier>(&theParameterMap, doNoise, PreMix1, PreMix2);
138  theHOAmplifier = std::make_unique<HcalAmplifier>(&theParameterMap, doNoise, PreMix1, PreMix2);
139  theZDCAmplifier = std::make_unique<HcalAmplifier>(&theParameterMap, doNoise, PreMix1, PreMix2);
140  theHFQIE10Amplifier = std::make_unique<HcalAmplifier>(&theParameterMap, doNoise, PreMix1, PreMix2);
141  theHBHEQIE11Amplifier = std::make_unique<HcalAmplifier>(&theParameterMap, doNoise, PreMix1, PreMix2);
142 
143  theCoderFactory = std::make_unique<HcalCoderFactory>(HcalCoderFactory::DB);
144 
146  std::make_unique<HcalElectronicsSim>(&theParameterMap, theHBHEAmplifier.get(), theCoderFactory.get(), PreMix1);
148  std::make_unique<HcalElectronicsSim>(&theParameterMap, theHFAmplifier.get(), theCoderFactory.get(), PreMix1);
150  std::make_unique<HcalElectronicsSim>(&theParameterMap, theHOAmplifier.get(), theCoderFactory.get(), PreMix1);
152  std::make_unique<HcalElectronicsSim>(&theParameterMap, theZDCAmplifier.get(), theCoderFactory.get(), PreMix1);
154  std::make_unique<HcalElectronicsSim>(&theParameterMap,
155  theHFQIE10Amplifier.get(),
156  theCoderFactory.get(),
157  PreMix1); // should this use a different coder factory?
159  std::make_unique<HcalElectronicsSim>(&theParameterMap,
160  theHBHEQIE11Amplifier.get(),
161  theCoderFactory.get(),
162  PreMix1); // should this use a different coder factory?
163 
164  bool doHOHPD = (theHOSiPMCode != 1);
165  bool doHOSiPM = (theHOSiPMCode != 0);
166  if (doHOHPD) {
167  theHOResponse = std::make_unique<CaloHitResponse>(&theParameterMap, &theShapes);
168  theHOResponse->setHitFilter(&theHOHitFilter);
169  theHODigitizer = std::make_unique<HODigitizer>(theHOResponse.get(), theHOElectronicsSim.get(), doEmpty);
170  }
171  if (doHOSiPM) {
172  theHOSiPMResponse->setHitFilter(&theHOSiPMHitFilter);
173  theHOSiPMDigitizer = std::make_unique<HODigitizer>(theHOSiPMResponse.get(), theHOElectronicsSim.get(), doEmpty);
174  }
175 
176  theHBHEResponse->setHitFilter(&theHBHEHitFilter);
178 
179  // QIE8 and QIE11 can coexist in HBHE
181  std::make_unique<QIE11Digitizer>(theHBHESiPMResponse.get(), theHBHEQIE11ElectronicsSim.get(), doEmpty);
182  theHBHEDigitizer = std::make_unique<HBHEDigitizer>(theHBHEResponse.get(), theHBHEElectronicsSim.get(), doEmpty);
183 
184  bool doTimeSlew = ps.getParameter<bool>("doTimeSlew");
185  // initialize: they won't be called later if flag is set
186  hcalTimeSlew_delay_ = nullptr;
187  theTimeSlewSim.reset(nullptr);
188  if (doTimeSlew) {
189  // no time slewing for HF
190  theTimeSlewSim = std::make_unique<HcalTimeSlewSim>(&theParameterMap, minFCToDelay);
191  theHBHEAmplifier->setTimeSlewSim(theTimeSlewSim.get());
192  theHBHEQIE11Amplifier->setTimeSlewSim(theTimeSlewSim.get());
193  theHOAmplifier->setTimeSlewSim(theTimeSlewSim.get());
194  theZDCAmplifier->setTimeSlewSim(theTimeSlewSim.get());
195  }
196 
197  theHFResponse->setHitFilter(&theHFHitFilter);
198  theHFQIE10Response->setHitFilter(&theHFQIE10HitFilter);
199  theZDCResponse->setHitFilter(&theZDCHitFilter);
200 
201  // QIE8 and QIE10 can coexist in HF
203  std::make_unique<QIE10Digitizer>(theHFQIE10Response.get(), theHFQIE10ElectronicsSim.get(), doEmpty);
204  theHFDigitizer = std::make_unique<HFDigitizer>(theHFResponse.get(), theHFElectronicsSim.get(), doEmpty);
205 
206  theZDCDigitizer = std::make_unique<ZDCDigitizer>(theZDCResponse.get(), theZDCElectronicsSim.get(), doEmpty);
207 
208  testNumbering_ = ps.getParameter<bool>("TestNumbering");
209  // std::cout << "Flag to see if Hit Relabeller to be initiated " <<
210  // testNumbering_ << std::endl;
211  if (testNumbering_)
212  theRelabeller = std::make_unique<HcalHitRelabeller>(ps.getParameter<bool>("doNeutralDensityFilter"));
213 
214  if (ps.getParameter<bool>("doIonFeedback") && theHBHEResponse) {
215  theIonFeedback = std::make_unique<HPDIonFeedbackSim>(ps, &theShapes);
216  theHBHEResponse->setPECorrection(theIonFeedback.get());
217  if (ps.getParameter<bool>("doThermalNoise")) {
218  theHBHEAmplifier->setIonFeedbackSim(theIonFeedback.get());
219  }
220  }
221 
222  // option to save CaloSamples as event product for debugging
223  if (debugCS_) {
224  if (theHBHEDigitizer)
225  theHBHEDigitizer->setDebugCaloSamples(true);
227  theHBHEQIE11Digitizer->setDebugCaloSamples(true);
228  if (theHODigitizer)
229  theHODigitizer->setDebugCaloSamples(true);
230  if (theHOSiPMDigitizer)
231  theHOSiPMDigitizer->setDebugCaloSamples(true);
232  if (theHFDigitizer)
233  theHFDigitizer->setDebugCaloSamples(true);
235  theHFQIE10Digitizer->setDebugCaloSamples(true);
236  theZDCDigitizer->setDebugCaloSamples(true);
237  }
238 
239  // option to ignore Geant time distribution in SimHits, for debugging
240  if (ignoreTime_) {
241  theHBHEResponse->setIgnoreGeantTime(ignoreTime_);
242  theHBHESiPMResponse->setIgnoreGeantTime(ignoreTime_);
243  theHOResponse->setIgnoreGeantTime(ignoreTime_);
244  theHOSiPMResponse->setIgnoreGeantTime(ignoreTime_);
245  theHFResponse->setIgnoreGeantTime(ignoreTime_);
246  theHFQIE10Response->setIgnoreGeantTime(ignoreTime_);
247  theZDCResponse->setIgnoreGeantTime(ignoreTime_);
248  }
249 
250  if (agingFlagHF)
251  m_HFRecalibration = std::make_unique<HFRecalibration>(ps.getParameter<edm::ParameterSet>("HFRecalParameterBlock"));
252 }
253 
255 
257  noiseGenerator->setParameterMap(&theParameterMap);
258  noiseGenerator->setElectronicsSim(theHBHEElectronicsSim.get());
259  if (theHBHEDigitizer)
260  theHBHEDigitizer->setNoiseSignalGenerator(noiseGenerator);
261  theHBHEAmplifier->setNoiseSignalGenerator(noiseGenerator);
262 }
263 
265  noiseGenerator->setParameterMap(&theParameterMap);
266  noiseGenerator->setElectronicsSim(theHBHEQIE11ElectronicsSim.get());
268  theHBHEQIE11Digitizer->setNoiseSignalGenerator(noiseGenerator);
269  theHBHEQIE11Amplifier->setNoiseSignalGenerator(noiseGenerator);
270 }
271 
273  noiseGenerator->setParameterMap(&theParameterMap);
274  noiseGenerator->setElectronicsSim(theHFElectronicsSim.get());
275  if (theHFDigitizer)
276  theHFDigitizer->setNoiseSignalGenerator(noiseGenerator);
277  theHFAmplifier->setNoiseSignalGenerator(noiseGenerator);
278 }
279 
281  noiseGenerator->setParameterMap(&theParameterMap);
282  noiseGenerator->setElectronicsSim(theHFQIE10ElectronicsSim.get());
284  theHFQIE10Digitizer->setNoiseSignalGenerator(noiseGenerator);
285  theHFQIE10Amplifier->setNoiseSignalGenerator(noiseGenerator);
286 }
287 
289  noiseGenerator->setParameterMap(&theParameterMap);
290  noiseGenerator->setElectronicsSim(theHOElectronicsSim.get());
291  if (theHODigitizer)
292  theHODigitizer->setNoiseSignalGenerator(noiseGenerator);
293  if (theHOSiPMDigitizer)
294  theHOSiPMDigitizer->setNoiseSignalGenerator(noiseGenerator);
295  theHOAmplifier->setNoiseSignalGenerator(noiseGenerator);
296 }
297 
299  noiseGenerator->setParameterMap(&theParameterMap);
300  noiseGenerator->setElectronicsSim(theZDCElectronicsSim.get());
301  theZDCDigitizer->setNoiseSignalGenerator(noiseGenerator);
302  theZDCAmplifier->setNoiseSignalGenerator(noiseGenerator);
303 }
304 
306  setup(eventSetup);
307 
308  // get the appropriate gains, noises, & widths for this event
309  const HcalDbService *conditions = &eventSetup.getData(conditionsToken_);
310 
312 
313  theHBHEAmplifier->setDbService(conditions);
314  theHFAmplifier->setDbService(conditions);
315  theHOAmplifier->setDbService(conditions);
316  theZDCAmplifier->setDbService(conditions);
317  theHFQIE10Amplifier->setDbService(conditions);
318  theHBHEQIE11Amplifier->setDbService(conditions);
319 
320  theHFQIE10ElectronicsSim->setDbService(conditions);
321  theHBHEQIE11ElectronicsSim->setDbService(conditions);
322 
323  theCoderFactory->setDbService(conditions);
325 
326  // initialize hits
327  if (theHBHEDigitizer)
328  theHBHEDigitizer->initializeHits();
330  theHBHEQIE11Digitizer->initializeHits();
331  if (theHODigitizer)
332  theHODigitizer->initializeHits();
333  if (theHOSiPMDigitizer)
334  theHOSiPMDigitizer->initializeHits();
336  theHFQIE10Digitizer->initializeHits();
337  if (theHFDigitizer)
338  theHFDigitizer->initializeHits();
339  theZDCDigitizer->initializeHits();
340 }
341 
342 void HcalDigitizer::accumulateCaloHits(edm::Handle<std::vector<PCaloHit>> const &hcalHandle,
343  edm::Handle<std::vector<PCaloHit>> const &zdcHandle,
344  int bunchCrossing,
345  CLHEP::HepRandomEngine *engine,
346  const HcalTopology *htopoP) {
347  // Step A: pass in inputs, and accumulate digis
348  if (isHCAL) {
349  std::vector<PCaloHit> hcalHitsOrig = *hcalHandle.product();
350  if (injectTestHits_)
351  hcalHitsOrig = injectedHits_;
352  std::vector<PCaloHit> hcalHits;
353  hcalHits.reserve(hcalHitsOrig.size());
354 
355  // evaluate darkening before relabeling
356  if (testNumbering_) {
358  darkening(hcalHitsOrig);
359  }
360  // Relabel PCaloHits if necessary
361  edm::LogInfo("HcalDigitizer") << "Calling Relabeller";
362  theRelabeller->process(hcalHitsOrig);
363  }
364 
365  // eliminate bad hits
366  for (unsigned int i = 0; i < hcalHitsOrig.size(); i++) {
367  DetId id(hcalHitsOrig[i].id());
368  HcalDetId hid(id);
369  if (!htopoP->validHcal(hid)) {
370  edm::LogError("HcalDigitizer") << "bad hcal id found in digitizer. Skipping " << id.rawId() << " " << hid
371  << std::endl;
372  continue;
373  } else if (hid.subdet() == HcalForward && !doHFWindow_ && hcalHitsOrig[i].depth() != 0) {
374  // skip HF window hits unless desired
375  continue;
376  } else if (killHE_ && hid.subdet() == HcalEndcap) {
377  // remove HE hits if asked for (phase 2)
378  continue;
379  } else {
380 #ifdef DebugLog
381  std::cout << "HcalDigitizer format " << hid.oldFormat() << " for " << hid << std::endl;
382 #endif
383  DetId newid = DetId(hid.newForm());
384 #ifdef DebugLog
385  std::cout << "Hit " << i << " out of " << hcalHits.size() << " " << std::hex << id.rawId() << " --> "
386  << newid.rawId() << std::dec << " " << HcalDetId(newid.rawId()) << '\n';
387 #endif
388  hcalHitsOrig[i].setID(newid.rawId());
389  hcalHits.push_back(hcalHitsOrig[i]);
390  }
391  }
392 
393  if (hbhegeo) {
394  if (theHBHEDigitizer)
395  theHBHEDigitizer->add(hcalHits, bunchCrossing, engine);
397  theHBHEQIE11Digitizer->add(hcalHits, bunchCrossing, engine);
398  }
399 
400  if (hogeo) {
401  if (theHODigitizer)
402  theHODigitizer->add(hcalHits, bunchCrossing, engine);
403  if (theHOSiPMDigitizer)
404  theHOSiPMDigitizer->add(hcalHits, bunchCrossing, engine);
405  }
406 
407  if (hfgeo) {
408  if (theHFDigitizer)
409  theHFDigitizer->add(hcalHits, bunchCrossing, engine);
411  theHFQIE10Digitizer->add(hcalHits, bunchCrossing, engine);
412  }
413  } else {
414  edm::LogInfo("HcalDigitizer") << "We don't have HCAL hit collection available ";
415  }
416 
417  if (isZDC) {
418  if (zdcgeo) {
419  theZDCDigitizer->add(*zdcHandle.product(), bunchCrossing, engine);
420  }
421  } else {
422  edm::LogInfo("HcalDigitizer") << "We don't have ZDC hit collection available ";
423  }
424 }
425 
426 void HcalDigitizer::accumulate(edm::Event const &e, edm::EventSetup const &eventSetup, CLHEP::HepRandomEngine *engine) {
427  // Step A: Get Inputs
428  edm::InputTag zdcTag(hitsProducer_, "ZDCHITS");
430  e.getByLabel(zdcTag, zdcHandle);
431  isZDC = zdcHandle.isValid();
432 
433  edm::InputTag hcalTag(hitsProducer_, "HcalHits");
435  e.getByLabel(hcalTag, hcalHandle);
436  isHCAL = hcalHandle.isValid() or injectTestHits_;
437 
438  const HcalTopology *htopoP = &eventSetup.getData(topoToken_);
439 
440  accumulateCaloHits(hcalHandle, zdcHandle, 0, engine, htopoP);
441 }
442 
444  edm::EventSetup const &eventSetup,
445  CLHEP::HepRandomEngine *engine) {
446  // Step A: Get Inputs
447  edm::InputTag zdcTag(hitsProducer_, "ZDCHITS");
449  e.getByLabel(zdcTag, zdcHandle);
450  isZDC = zdcHandle.isValid();
451 
452  edm::InputTag hcalTag(hitsProducer_, "HcalHits");
454  e.getByLabel(hcalTag, hcalHandle);
455  isHCAL = hcalHandle.isValid();
456 
457  const HcalTopology *htopoP = &eventSetup.getData(topoToken_);
458 
459  accumulateCaloHits(hcalHandle, zdcHandle, e.bunchCrossing(), engine, htopoP);
460 }
461 
462 void HcalDigitizer::finalizeEvent(edm::Event &e, const edm::EventSetup &eventSetup, CLHEP::HepRandomEngine *engine) {
463  // Step B: Create empty output
464  std::unique_ptr<HBHEDigiCollection> hbheResult(new HBHEDigiCollection());
465  std::unique_ptr<HODigiCollection> hoResult(new HODigiCollection());
466  std::unique_ptr<HFDigiCollection> hfResult(new HFDigiCollection());
467  std::unique_ptr<ZDCDigiCollection> zdcResult(new ZDCDigiCollection());
468  std::unique_ptr<QIE10DigiCollection> hfQIE10Result(new QIE10DigiCollection(
471  std::unique_ptr<QIE11DigiCollection> hbheQIE11Result(new QIE11DigiCollection(
472  !theHBHEQIE11DetIds.empty() ? theHBHESiPMResponse.get()->getReadoutFrameSize(theHBHEQIE11DetIds[0]) :
473  // theParameterMap->simParameters(theHBHEQIE11DetIds[0]).readoutFrameSize()
474  // :
476 
477  // Step C: Invoke the algorithm, getting back outputs.
478  if (isHCAL && hbhegeo) {
479  if (theHBHEDigitizer)
480  theHBHEDigitizer->run(*hbheResult, engine);
482  theHBHEQIE11Digitizer->run(*hbheQIE11Result, engine);
483  }
484  if (isHCAL && hogeo) {
485  if (theHODigitizer)
486  theHODigitizer->run(*hoResult, engine);
487  if (theHOSiPMDigitizer)
488  theHOSiPMDigitizer->run(*hoResult, engine);
489  }
490  if (isHCAL && hfgeo) {
491  if (theHFDigitizer)
492  theHFDigitizer->run(*hfResult, engine);
494  theHFQIE10Digitizer->run(*hfQIE10Result, engine);
495  }
496  if (isZDC && zdcgeo) {
497  theZDCDigitizer->run(*zdcResult, engine);
498  }
499 
500  edm::LogInfo("HcalDigitizer") << "HCAL HBHE digis : " << hbheResult->size();
501  edm::LogInfo("HcalDigitizer") << "HCAL HO digis : " << hoResult->size();
502  edm::LogInfo("HcalDigitizer") << "HCAL HF digis : " << hfResult->size();
503  edm::LogInfo("HcalDigitizer") << "HCAL ZDC digis : " << zdcResult->size();
504  edm::LogInfo("HcalDigitizer") << "HCAL HF QIE10 digis : " << hfQIE10Result->size();
505  edm::LogInfo("HcalDigitizer") << "HCAL HBHE QIE11 digis : " << hbheQIE11Result->size();
506 
507 #ifdef DebugLog
508  std::cout << std::endl;
509  std::cout << "HCAL HBHE digis : " << hbheResult->size() << std::endl;
510  std::cout << "HCAL HO digis : " << hoResult->size() << std::endl;
511  std::cout << "HCAL HF digis : " << hfResult->size() << std::endl;
512  std::cout << "HCAL ZDC digis : " << zdcResult->size() << std::endl;
513  std::cout << "HCAL HF QIE10 digis : " << hfQIE10Result->size() << std::endl;
514  std::cout << "HCAL HBHE QIE11 digis : " << hbheQIE11Result->size() << std::endl;
515 #endif
516 
517  // Step D: Put outputs into event
518  e.put(std::move(hbheResult));
519  e.put(std::move(hoResult));
520  e.put(std::move(hfResult));
521  e.put(std::move(zdcResult));
522  e.put(std::move(hfQIE10Result), "HFQIE10DigiCollection");
523  e.put(std::move(hbheQIE11Result), "HBHEQIE11DigiCollection");
524 
525  if (debugCS_) {
526  std::unique_ptr<CaloSamplesCollection> csResult(new CaloSamplesCollection());
527  // smush together all the results
528  if (theHBHEDigitizer)
529  csResult->insert(
530  csResult->end(), theHBHEDigitizer->getCaloSamples().begin(), theHBHEDigitizer->getCaloSamples().end());
532  csResult->insert(csResult->end(),
533  theHBHEQIE11Digitizer->getCaloSamples().begin(),
534  theHBHEQIE11Digitizer->getCaloSamples().end());
535  if (theHODigitizer)
536  csResult->insert(
537  csResult->end(), theHODigitizer->getCaloSamples().begin(), theHODigitizer->getCaloSamples().end());
538  if (theHOSiPMDigitizer)
539  csResult->insert(
540  csResult->end(), theHOSiPMDigitizer->getCaloSamples().begin(), theHOSiPMDigitizer->getCaloSamples().end());
541  if (theHFDigitizer)
542  csResult->insert(
543  csResult->end(), theHFDigitizer->getCaloSamples().begin(), theHFDigitizer->getCaloSamples().end());
545  csResult->insert(
546  csResult->end(), theHFQIE10Digitizer->getCaloSamples().begin(), theHFQIE10Digitizer->getCaloSamples().end());
547  csResult->insert(
548  csResult->end(), theZDCDigitizer->getCaloSamples().begin(), theZDCDigitizer->getCaloSamples().end());
549  e.put(std::move(csResult), "HcalSamples");
550  }
551 
552  if (injectTestHits_) {
553  std::unique_ptr<edm::PCaloHitContainer> pcResult(new edm::PCaloHitContainer());
554  pcResult->insert(pcResult->end(), injectedHits_.begin(), injectedHits_.end());
555  e.put(std::move(pcResult), "HcalHits");
556  }
557 
558 #ifdef DebugLog
559  std::cout << std::endl << "========> HcalDigitizer e.put " << std::endl << std::endl;
560 #endif
561 }
562 
564  checkGeometry(es);
565 
566  if (agingFlagHB) {
568  }
569  if (agingFlagHE) {
571  }
572 
574 
577  theHOAmplifier->setTimeSlew(hcalTimeSlew_delay_);
578  theZDCAmplifier->setTimeSlew(hcalTimeSlew_delay_);
579 }
580 
582  theGeometry = &eventSetup.getData(theGeometryToken);
583  theRecNumber = &eventSetup.getData(theRecNumberToken);
584 
585  if (theHBHEResponse)
586  theHBHEResponse->setGeometry(theGeometry);
588  theHBHESiPMResponse->setGeometry(theGeometry);
589  if (theHOResponse)
590  theHOResponse->setGeometry(theGeometry);
591  if (theHOSiPMResponse)
592  theHOSiPMResponse->setGeometry(theGeometry);
593  theHFResponse->setGeometry(theGeometry);
594  theHFQIE10Response->setGeometry(theGeometry);
595  theZDCResponse->setGeometry(theGeometry);
596  if (theRelabeller)
597  theRelabeller->setGeometry(theRecNumber);
598 
599  // See if it's been updated
600  bool check1 = theGeometryWatcher_.check(eventSetup);
601  bool check2 = theRecNumberWatcher_.check(eventSetup);
602  if (check1 or check2) {
603  updateGeometry(eventSetup);
604  }
605 }
606 
608  const std::vector<DetId> &hbCells = theGeometry->getValidDetIds(DetId::Hcal, HcalBarrel);
609  const std::vector<DetId> &heCells = theGeometry->getValidDetIds(DetId::Hcal, HcalEndcap);
610  const std::vector<DetId> &hoCells = theGeometry->getValidDetIds(DetId::Hcal, HcalOuter);
611  const std::vector<DetId> &hfCells = theGeometry->getValidDetIds(DetId::Hcal, HcalForward);
612  const std::vector<DetId> &zdcCells = theGeometry->getValidDetIds(DetId::Calo, HcalZDCDetId::SubdetectorId);
613  // const std::vector<DetId>& hcalTrigCells =
614  // geometry->getValidDetIds(DetId::Hcal, HcalTriggerTower); const
615  // std::vector<DetId>& hcalCalib = geometry->getValidDetIds(DetId::Calo,
616  // HcalCastorDetId::SubdetectorId);
617  // std::cout<<"HcalDigitizer::CheckGeometry number of cells:
618  // "<<zdcCells.size()<<std::endl;
619  if (zdcCells.empty())
620  zdcgeo = false;
621  if (hbCells.empty() && heCells.empty())
622  hbhegeo = false;
623  if (hoCells.empty())
624  hogeo = false;
625  if (hfCells.empty())
626  hfgeo = false;
627  // combine HB & HE
628 
629  hbheCells = hbCells;
630  if (!killHE_) {
631  hbheCells.insert(hbheCells.end(), heCells.begin(), heCells.end());
632  }
633  // handle mixed QIE8/11 scenario in HBHE
634  buildHBHEQIECells(hbheCells, eventSetup);
637 
638  if (theHOSiPMDigitizer) {
639  buildHOSiPMCells(hoCells, eventSetup);
640  if (theHOSiPMResponse)
641  theHOSiPMResponse->setDetIds(hoCells);
642  }
643 
644  // handle mixed QIE8/10 scenario in HF
645  buildHFQIECells(hfCells, eventSetup);
646 
647  theZDCDigitizer->setDetIds(zdcCells);
648 
649  // fill test hits collection if desired and empty
650  if (injectTestHits_ && injectedHits_.empty() && !injectedHitsCells_.empty() && !injectedHitsEnergy_.empty()) {
651  // make list of specified cells if desired
652  std::vector<DetId> testCells;
653  if (injectedHitsCells_.size() >= 4) {
654  testCells.reserve(injectedHitsCells_.size() / 4);
655  for (unsigned ic = 0; ic < injectedHitsCells_.size(); ic += 4) {
656  if (ic + 4 > injectedHitsCells_.size())
657  break;
658  testCells.push_back(HcalDetId((HcalSubdetector)injectedHitsCells_[ic],
659  injectedHitsCells_[ic + 1],
660  injectedHitsCells_[ic + 2],
661  injectedHitsCells_[ic + 3]));
662  }
663  } else {
664  int testSubdet = injectedHitsCells_[0];
665  if (testSubdet == HcalBarrel)
666  testCells = hbCells;
667  else if (testSubdet == HcalEndcap)
668  testCells = heCells;
669  else if (testSubdet == HcalForward)
670  testCells = hfCells;
671  else if (testSubdet == HcalOuter)
672  testCells = hoCells;
673  else
674  throw cms::Exception("Configuration") << "Unknown subdet " << testSubdet << " for HCAL test hit injection";
675  }
676  bool useHitTimes = (injectedHitsTime_.size() == injectedHitsEnergy_.size());
677  injectedHits_.reserve(testCells.size() * injectedHitsEnergy_.size());
678  for (unsigned ih = 0; ih < injectedHitsEnergy_.size(); ++ih) {
679  double tmp = useHitTimes ? injectedHitsTime_[ih] : 0.;
680  for (auto &aCell : testCells) {
681  injectedHits_.emplace_back(aCell, injectedHitsEnergy_[ih], tmp);
682  }
683  }
684  }
685 }
686 
687 void HcalDigitizer::buildHFQIECells(const std::vector<DetId> &allCells, const edm::EventSetup &eventSetup) {
688  // if results are already cached, no need to look again
689  if (!theHFQIE8DetIds.empty() || !theHFQIE10DetIds.empty())
690  return;
691 
692  // get the QIETypes
693  // intentional copy
694  HcalQIETypes qieTypes = eventSetup.getData(qieTypesToken_);
695  if (qieTypes.topo() == nullptr) {
696  qieTypes.setTopo(&eventSetup.getData(topoToken_));
697  }
698 
699  for (std::vector<DetId>::const_iterator detItr = allCells.begin(); detItr != allCells.end(); ++detItr) {
700  HcalQIENum qieType = HcalQIENum(qieTypes.getValues(*detItr)->getValue());
701  if (qieType == QIE8) {
702  theHFQIE8DetIds.push_back(*detItr);
703  } else if (qieType == QIE10) {
704  theHFQIE10DetIds.push_back(*detItr);
705  } else { // default is QIE8
706  theHFQIE8DetIds.push_back(*detItr);
707  }
708  }
709 
710  if (!theHFQIE8DetIds.empty())
711  theHFDigitizer->setDetIds(theHFQIE8DetIds);
712  else {
713  theHFDigitizer.reset();
714  }
715 
716  if (!theHFQIE10DetIds.empty())
718  else {
719  theHFQIE10Digitizer.reset();
720  }
721 }
722 
723 void HcalDigitizer::buildHBHEQIECells(const std::vector<DetId> &allCells, const edm::EventSetup &eventSetup) {
724  // if results are already cached, no need to look again
725  if (!theHBHEQIE8DetIds.empty() || !theHBHEQIE11DetIds.empty())
726  return;
727 
728  // get the QIETypes
729  // intentional copy
730  HcalQIETypes qieTypes = eventSetup.getData(qieTypesToken_);
731  if (qieTypes.topo() == nullptr) {
732  qieTypes.setTopo(&eventSetup.getData(topoToken_));
733  }
734 
735  for (std::vector<DetId>::const_iterator detItr = allCells.begin(); detItr != allCells.end(); ++detItr) {
736  HcalQIENum qieType = HcalQIENum(qieTypes.getValues(*detItr)->getValue());
737  if (qieType == QIE8) {
738  theHBHEQIE8DetIds.push_back(*detItr);
739  } else if (qieType == QIE11) {
740  theHBHEQIE11DetIds.push_back(*detItr);
741  } else { // default is QIE8
742  theHBHEQIE8DetIds.push_back(*detItr);
743  }
744  }
745 
746  if (!theHBHEQIE8DetIds.empty())
748  else {
749  theHBHEDigitizer.reset();
750  }
751 
752  if (!theHBHEQIE11DetIds.empty())
754  else {
755  theHBHEQIE11Digitizer.reset();
756  }
757 
758  if (!theHBHEQIE8DetIds.empty() && !theHBHEQIE11DetIds.empty()) {
761  }
762 }
763 
764 void HcalDigitizer::buildHOSiPMCells(const std::vector<DetId> &allCells, const edm::EventSetup &eventSetup) {
765  // all HPD
766 
767  if (theHOSiPMCode == 0) {
768  theHODigitizer->setDetIds(allCells);
769  } else if (theHOSiPMCode == 1) {
770  theHOSiPMDigitizer->setDetIds(allCells);
771  // FIXME pick Zecotek or hamamatsu?
772  } else if (theHOSiPMCode == 2) {
773  std::vector<HcalDetId> zecotekDetIds, hamamatsuDetIds;
774 
775  // intentional copy
776  HcalMCParams mcParams = eventSetup.getData(mcParamsToken_);
777  if (mcParams.topo() == nullptr) {
778  mcParams.setTopo(&eventSetup.getData(topoToken_));
779  }
780 
781  for (std::vector<DetId>::const_iterator detItr = allCells.begin(); detItr != allCells.end(); ++detItr) {
782  int shapeType = mcParams.getValues(*detItr)->signalShape();
783  if (shapeType == HcalShapes::ZECOTEK) {
784  zecotekDetIds.emplace_back(*detItr);
785  theHOSiPMDetIds.push_back(*detItr);
786  } else if (shapeType == HcalShapes::HAMAMATSU) {
787  hamamatsuDetIds.emplace_back(*detItr);
788  theHOSiPMDetIds.push_back(*detItr);
789  } else {
790  theHOHPDDetIds.push_back(*detItr);
791  }
792  }
793 
794  if (!theHOHPDDetIds.empty())
795  theHODigitizer->setDetIds(theHOHPDDetIds);
796  else {
797  theHODigitizer.reset();
798  }
799 
800  if (!theHOSiPMDetIds.empty())
802  else {
803  theHOSiPMDigitizer.reset();
804  }
805 
806  if (!theHOHPDDetIds.empty() && !theHOSiPMDetIds.empty()) {
809  }
810 
811  theParameterMap.setHOZecotekDetIds(zecotekDetIds);
812  theParameterMap.setHOHamamatsuDetIds(hamamatsuDetIds);
813 
814  // make sure we don't got through this exercise again
815  theHOSiPMCode = -2;
816  }
817 }
818 
819 void HcalDigitizer::darkening(std::vector<PCaloHit> &hcalHits) {
820  for (unsigned int ii = 0; ii < hcalHits.size(); ++ii) {
821  uint32_t tmpId = hcalHits[ii].id();
822  int det, z, depth, ieta, phi, lay;
823  HcalTestNumbering::unpackHcalIndex(tmpId, det, z, depth, ieta, phi, lay);
824 
825  bool darkened = false;
826  float dweight = 1.;
827 
828  if (det == int(HcalBarrel) && m_HBDarkening) {
829  // HB darkening
830  dweight = m_HBDarkening->degradation(deliveredLumi, ieta, lay);
831  darkened = true;
832  } else if (det == int(HcalEndcap) && m_HEDarkening) {
833  // HE darkening
834  dweight = m_HEDarkening->degradation(deliveredLumi, ieta, lay);
835  darkened = true;
836  } else if (det == int(HcalForward) && m_HFRecalibration) {
837  // HF darkening - approximate: invert recalibration factor
838  dweight = 1.0 / m_HFRecalibration->getCorr(ieta, depth, deliveredLumi);
839  darkened = true;
840  }
841 
842  // reset hit energy
843  if (darkened)
844  hcalHits[ii].setEnergy(hcalHits[ii].energy() * dweight);
845  }
846 }
HcalDigitizer::theHFQIE8DetIds
std::vector< DetId > theHFQIE8DetIds
Definition: HcalDigitizer.h:161
edm::ESWatcher::check
bool check(const edm::EventSetup &iSetup)
Definition: ESWatcher.h:57
HcalDigitizer::theHFQIE10Digitizer
std::unique_ptr< QIE10Digitizer > theHFQIE10Digitizer
Definition: HcalDigitizer.h:151
HcalDigitizer::theZDCElectronicsSim
std::unique_ptr< HcalElectronicsSim > theZDCElectronicsSim
Definition: HcalDigitizer.h:132
Handle.h
HcalDigitizer::testNumbering_
bool testNumbering_
Definition: HcalDigitizer.h:164
electrons_cff.bool
bool
Definition: electrons_cff.py:366
mps_fire.i
i
Definition: mps_fire.py:428
HcalBaseSignalGenerator::setParameterMap
void setParameterMap(HcalSimParameterMap *map)
Definition: HcalBaseSignalGenerator.h:14
HcalDigitizer::theHBHEResponse
std::unique_ptr< CaloHitResponse > theHBHEResponse
Definition: HcalDigitizer.h:109
edm::ESInputTag
Definition: ESInputTag.h:87
HcalDigitizer::accumulate
void accumulate(edm::Event const &e, edm::EventSetup const &c, CLHEP::HepRandomEngine *)
Definition: HcalDigitizer.cc:426
HcalDigitizer::injectedHitsEnergy_
std::vector< double > injectedHitsEnergy_
Definition: HcalDigitizer.h:183
HcalDigitizer::theHOHPDDetIds
std::vector< DetId > theHOHPDDetIds
Definition: HcalDigitizer.h:159
HcalDigitizer::theShapes
HcalShapes theShapes
Definition: HcalDigitizer.h:107
HcalDigitizer::theZDCResponse
std::unique_ptr< CaloHitResponse > theZDCResponse
Definition: HcalDigitizer.h:115
HcalMCParams
Definition: HcalMCParams.h:9
MessageLogger.h
HcalTopology::validHcal
bool validHcal(const HcalDetId &id) const
Definition: HcalTopology.cc:230
HcalDigitizer::setQIE11NoiseSignalGenerator
void setQIE11NoiseSignalGenerator(HcalBaseSignalGenerator *noiseGenerator)
Definition: HcalDigitizer.cc:264
HcalDigitizer::ignoreTime_
bool ignoreTime_
Definition: HcalDigitizer.h:168
funct::false
false
Definition: Factorize.h:29
HcalCondObjectContainerBase::setTopo
void setTopo(const HcalTopology *topo)
Definition: HcalCondObjectContainerBase.cc:17
QIE8
Definition: HcalQIENum.h:4
HcalDigitizer::killHE_
bool killHE_
Definition: HcalDigitizer.h:166
ESInputTag
HcalDigitizer::debugCS_
bool debugCS_
Definition: HcalDigitizer.h:167
HcalSiPMHitResponse.h
CaloSimParameters::readoutFrameSize
int readoutFrameSize() const
for now, the LinearFrames and trhe digis will be one-to-one.
Definition: CaloSimParameters.h:45
HcalDigitizer::topoToken_
const edm::ESGetToken< HcalTopology, HcalRecNumberingRecord > topoToken_
Definition: HcalDigitizer.h:77
HcalDigitizer::theHOResponse
std::unique_ptr< CaloHitResponse > theHOResponse
Definition: HcalDigitizer.h:111
HcalDigitizer::qieTypesToken_
const edm::ESGetToken< HcalQIETypes, HcalQIETypesRcd > qieTypesToken_
Definition: HcalDigitizer.h:83
HcalQIENum
HcalQIENum
Definition: HcalQIENum.h:4
HcalDigitizer::theIonFeedback
std::unique_ptr< HPDIonFeedbackSim > theIonFeedback
Definition: HcalDigitizer.h:126
HcalDigitizer::theHFQIE10Response
std::unique_ptr< CaloHitResponse > theHFQIE10Response
Definition: HcalDigitizer.h:114
edm
HLT enums.
Definition: AlignableModifier.h:19
HcalShapes::setDbService
void setDbService(const HcalDbService *service)
Definition: HcalShapes.h:24
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:342
HcalDigitizer::injectTestHits_
bool injectTestHits_
Definition: HcalDigitizer.h:169
CrossingFrame.h
gather_cfg.cout
cout
Definition: gather_cfg.py:144
HcalTopology
Definition: HcalTopology.h:26
DetId::Hcal
Definition: DetId.h:28
HcalDigitizer::theGeometryWatcher_
edm::ESWatcher< CaloGeometryRecord > theGeometryWatcher_
Definition: HcalDigitizer.h:85
HcalQIEType::getValue
int getValue() const
Definition: HcalQIEType.h:19
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89301
HcalDigitizer::isZDC
bool isZDC
Definition: HcalDigitizer.h:163
HcalDigitizer::theHBHEQIE11ElectronicsSim
std::unique_ptr< HcalElectronicsSim > theHBHEQIE11ElectronicsSim
Definition: HcalDigitizer.h:134
HcalDigitizer::theHBHEQIE11Digitizer
std::unique_ptr< QIE11Digitizer > theHBHEQIE11Digitizer
Definition: HcalDigitizer.h:152
PileUpEventPrincipal
Definition: PileUpEventPrincipal.h:19
HcalTestNumbering.h
HcalDigitizer::hfgeo
bool hfgeo
Definition: HcalDigitizer.h:163
HcalDigitizer::theGeometry
const CaloGeometry * theGeometry
Definition: HcalDigitizer.h:87
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
HcalBarrel
Definition: HcalAssistant.h:33
HODigiCollection
edm::SortedCollection< HODataFrame > HODigiCollection
Definition: HcalDigiCollections.h:21
HcalZDCDetId.h
HcalDigitizer::theHOSiPMDetIds
std::vector< DetId > theHOSiPMDetIds
Definition: HcalDigitizer.h:160
HcalDigitizer::theHOAmplifier
std::unique_ptr< HcalAmplifier > theHOAmplifier
Definition: HcalDigitizer.h:121
HcalDigitizer::theHOSiPMHitFilter
HOHitFilter theHOSiPMHitFilter
Definition: HcalDigitizer.h:141
HcalDigitizer::theHOSiPMResponse
std::unique_ptr< HcalSiPMHitResponse > theHOSiPMResponse
Definition: HcalDigitizer.h:112
createJobs.tmp
tmp
align.sh
Definition: createJobs.py:716
HcalDigitizer::hbheCells
std::vector< DetId > hbheCells
Definition: HcalDigitizer.h:157
edm::ConsumesCollector::esConsumes
auto esConsumes()
Definition: ConsumesCollector.h:97
edm::Handle
Definition: AssociativeIterator.h:50
HcalSimParameterMap::setDbService
void setDbService(const HcalDbService *service)
Definition: HcalSimParameterMap.cc:57
DetId::Calo
Definition: DetId.h:29
HcalDigitizer::m_HBDarkening
const HBHEDarkening * m_HBDarkening
Definition: HcalDigitizer.h:177
HcalCondObjectContainer::getValues
const Item * getValues(DetId fId, bool throwOnFail=true) const
Definition: HcalCondObjectContainer.h:159
HcalDigitizer::theParameterMap
HcalSimParameterMap theParameterMap
Definition: HcalDigitizer.h:106
HcalDigitizer::theHOElectronicsSim
std::unique_ptr< HcalElectronicsSim > theHOElectronicsSim
Definition: HcalDigitizer.h:131
HcalDigitizer::theHBHEElectronicsSim
std::unique_ptr< HcalElectronicsSim > theHBHEElectronicsSim
Definition: HcalDigitizer.h:129
HcalDigitizer::setHONoiseSignalGenerator
void setHONoiseSignalGenerator(HcalBaseSignalGenerator *noiseGenerator)
Definition: HcalDigitizer.cc:288
QIE10DigiCollection
HcalDataFrameContainer< QIE10DataFrame > QIE10DigiCollection
Definition: HcalDigiCollections.h:52
HcalDigitizer::theHBHEQIE11HitFilter
HBHEHitFilter theHBHEQIE11HitFilter
Definition: HcalDigitizer.h:137
HcalDigitizer::setZDCNoiseSignalGenerator
void setZDCNoiseSignalGenerator(HcalBaseSignalGenerator *noiseGenerator)
Definition: HcalDigitizer.cc:298
DigiDM_cff.doNoise
doNoise
Definition: DigiDM_cff.py:32
DetId
Definition: DetId.h:17
HcalDigitizer::theZDCAmplifier
std::unique_ptr< HcalAmplifier > theZDCAmplifier
Definition: HcalDigitizer.h:122
HcalSimParameterMap.h
HcalDigitizer::theHBHEHitFilter
HBHEHitFilter theHBHEHitFilter
Definition: HcalDigitizer.h:136
HcalDigitizer.h
HcalDigitizer::mcParamsToken_
edm::ESGetToken< HcalMCParams, HcalMCParamsRcd > mcParamsToken_
Definition: HcalDigitizer.h:84
HcalDigitizer::conditionsToken_
const edm::ESGetToken< HcalDbService, HcalDbRecord > conditionsToken_
Definition: HcalDigitizer.h:76
HcalDigitizer::theHFQIE10Amplifier
std::unique_ptr< HcalAmplifier > theHFQIE10Amplifier
Definition: HcalDigitizer.h:123
HcalTestNumbering::unpackHcalIndex
static void unpackHcalIndex(const uint32_t &idx, int &det, int &z, int &depth, int &eta, int &phi, int &lay)
Definition: HcalTestNumbering.cc:18
ZDCDigiCollection
edm::SortedCollection< ZDCDataFrame > ZDCDigiCollection
Definition: HcalDigiCollections.h:26
MixCollection.h
HcalDataFrameContainer::MAXSAMPLES
static const size_type MAXSAMPLES
Definition: HcalDigiCollections.h:38
HcalDigiCollections.h
HcalDigitizer::setHBHENoiseSignalGenerator
void setHBHENoiseSignalGenerator(HcalBaseSignalGenerator *noiseGenerator)
Definition: HcalDigitizer.cc:256
HcalBaseSignalGenerator.h
DDAxes::z
DataMixerDataOnData_cff.doEmpty
doEmpty
Definition: DataMixerDataOnData_cff.py:54
HcalShapes::HAMAMATSU
Definition: HcalShapes.h:20
HcalDetId::newForm
constexpr uint32_t newForm() const
Definition: HcalDetId.h:199
PileUpEventPrincipal.h
HcalDigitizer::~HcalDigitizer
virtual ~HcalDigitizer()
Definition: HcalDigitizer.cc:254
edm::ConsumesCollector::consumes
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Definition: ConsumesCollector.h:55
HcalOuter
Definition: HcalAssistant.h:35
HCALHighEnergyHPDFilter_cfi.energy
energy
Definition: HCALHighEnergyHPDFilter_cfi.py:5
HcalZDCDetId::SubdetectorId
static const int SubdetectorId
Definition: HcalZDCDetId.h:25
HcalDigitizer::injectedHits_
std::vector< PCaloHit > injectedHits_
Definition: HcalDigitizer.h:186
HcalBaseSignalGenerator::setElectronicsSim
void setElectronicsSim(HcalElectronicsSim *electronicsSim)
Definition: HcalBaseSignalGenerator.h:17
HcalDigitizer::buildHFQIECells
void buildHFQIECells(const std::vector< DetId > &allCells, const edm::EventSetup &eventSetup)
Definition: HcalDigitizer.cc:687
HcalDigitizer::agingFlagHB
bool agingFlagHB
Definition: HcalDigitizer.h:176
hcalUnsuppressedDigis_cfi.doTimeSlew
doTimeSlew
Definition: hcalUnsuppressedDigis_cfi.py:20
LEDCalibrationChannels.depth
depth
Definition: LEDCalibrationChannels.py:65
HcalDigitizer::finalizeEvent
void finalizeEvent(edm::Event &e, edm::EventSetup const &c, CLHEP::HepRandomEngine *)
Definition: HcalDigitizer.cc:462
HcalDigitizer::hcalTimeSlew_delay_token_
const edm::ESGetToken< HcalTimeSlew, HcalTimeSlewRecord > hcalTimeSlew_delay_token_
Definition: HcalDigitizer.h:80
HcalCoderFactory.h
HcalDigitizer::theHBHEQIE8DetIds
std::vector< DetId > theHBHEQIE8DetIds
Definition: HcalDigitizer.h:158
HcalDigitizer::theHFQIE10HitFilter
HFHitFilter theHFQIE10HitFilter
Definition: HcalDigitizer.h:139
HcalSimParameterMap::setHOZecotekDetIds
void setHOZecotekDetIds(const std::vector< HcalDetId > &ids)
Definition: HcalSimParameterMap.h:33
funct::true
true
Definition: Factorize.h:173
LEDCalibrationChannels.ieta
ieta
Definition: LEDCalibrationChannels.py:63
HcalDigitizer::theRelabeller
std::unique_ptr< HcalHitRelabeller > theRelabeller
Definition: HcalDigitizer.h:153
edm::ParameterSet
Definition: ParameterSet.h:47
HcalDigitizer::hbhegeo
bool hbhegeo
Definition: HcalDigitizer.h:163
Event.h
ParameterSet
Definition: Functions.h:16
HcalDigitizer::setQIE10NoiseSignalGenerator
void setQIE10NoiseSignalGenerator(HcalBaseSignalGenerator *noiseGenerator)
Definition: HcalDigitizer.cc:280
HcalDigitizer::theHFHitFilter
HFHitFilter theHFHitFilter
Definition: HcalDigitizer.h:138
HcalDigitizer::theRecNumber
const HcalDDDRecConstants * theRecNumber
Definition: HcalDigitizer.h:88
HcalDigitizer::updateGeometry
void updateGeometry(const edm::EventSetup &eventSetup)
Definition: HcalDigitizer.cc:607
HcalShapes::ZECOTEK
Definition: HcalShapes.h:20
HcalCondObjectContainerBase::topo
const HcalTopology * topo() const
Definition: HcalCondObjectContainer.h:22
HcalDigitizer::buildHBHEQIECells
void buildHBHEQIECells(const std::vector< DetId > &allCells, const edm::EventSetup &eventSetup)
Definition: HcalDigitizer.cc:723
HcalDetId::subdet
constexpr HcalSubdetector subdet() const
get the subdetector
Definition: HcalDetId.h:138
CaloHitResponse
Creates electronics signals from hits.
Definition: CaloHitResponse.h:33
HcalDigitizer::theTimeSlewSim
std::unique_ptr< HcalTimeSlewSim > theTimeSlewSim
Definition: HcalDigitizer.h:144
HcalDetId
Definition: HcalDetId.h:12
createfilelist.int
int
Definition: createfilelist.py:10
HcalDigitizer::setup
void setup(const edm::EventSetup &es)
Definition: HcalDigitizer.cc:563
HcalDigitizer::theRecNumberToken
const edm::ESGetToken< HcalDDDRecConstants, HcalRecNumberingRecord > theRecNumberToken
Definition: HcalDigitizer.h:82
HcalDigitizer::zdcgeo
bool zdcgeo
Definition: HcalDigitizer.h:163
HcalDigitizer::theHBHEAmplifier
std::unique_ptr< HcalAmplifier > theHBHEAmplifier
Definition: HcalDigitizer.h:119
trackerHitRTTI::vector
Definition: trackerHitRTTI.h:21
HcalDigitizer::theHBHEQIE11DetIds
std::vector< DetId > theHBHEQIE11DetIds
Definition: HcalDigitizer.h:158
edm::EventSetup
Definition: EventSetup.h:58
HcalSubdetector.h
HcalHitFilter::setDetIds
void setDetIds(const std::vector< DetId > &detIds)
Definition: HcalHitFilter.h:17
HcalQIETypes
Definition: HcalQIETypes.h:17
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
CaloTDigitizer.h
CaloHitResponse.h
HcalDigitizer::HcalDigitizer
HcalDigitizer(const edm::ParameterSet &ps, edm::ConsumesCollector &iC)
Definition: HcalDigitizer.cc:34
QIE11DigiCollection
HcalDataFrameContainer< QIE11DataFrame > QIE11DigiCollection
Definition: HcalDigiCollections.h:53
HcalSiPMHitResponse
Definition: HcalSiPMHitResponse.h:22
HcalDetId::oldFormat
constexpr bool oldFormat() const
Definition: HcalDetId.h:139
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
HcalDigitizer::theHFQIE10DetIds
std::vector< DetId > theHFQIE10DetIds
Definition: HcalDigitizer.h:161
HcalDigitizer::theZDCDigitizer
std::unique_ptr< ZDCDigitizer > theZDCDigitizer
Definition: HcalDigitizer.h:150
HcalDigitizer::darkening
void darkening(std::vector< PCaloHit > &hcalHits)
Definition: HcalDigitizer.cc:819
edm::EventSetup::getData
bool getData(T &iHolder) const
Definition: EventSetup.h:127
HcalDigitizer::injectedHitsCells_
std::vector< int > injectedHitsCells_
Definition: HcalDigitizer.h:185
HcalSubdetector
HcalSubdetector
Definition: HcalAssistant.h:31
HPDIonFeedbackSim.h
HcalForward
Definition: HcalAssistant.h:36
DDAxes::phi
HcalMCParam::signalShape
unsigned int signalShape() const
Definition: HcalMCParam.h:38
HcalTopology.h
HcalDbService
Definition: HcalDbService.h:23
submitPVValidationJobs.conditions
list conditions
Definition: submitPVValidationJobs.py:674
Wrapper.h
eostools.move
def move(src, dest)
Definition: eostools.py:511
std
Definition: JetResolutionObject.h:76
DetId::rawId
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
CaloGeometry::getValidDetIds
std::vector< DetId > getValidDetIds() const
Get the list of all valid detector ids.
Definition: CaloGeometry.cc:75
HcalDigitizer::setHFNoiseSignalGenerator
void setHFNoiseSignalGenerator(HcalBaseSignalGenerator *noiseGenerator)
Definition: HcalDigitizer.cc:272
HBHEDarkening::degradation
float degradation(float intlumi, int ieta, int lay) const
Definition: HBHEDarkening.cc:98
HcalEndcap
Definition: HcalAssistant.h:34
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:29
HcalDigitizer::theHFResponse
std::unique_ptr< CaloHitResponse > theHFResponse
Definition: HcalDigitizer.h:113
HcalDigitizer::theGeometryToken
const edm::ESGetToken< CaloGeometry, CaloGeometryRecord > theGeometryToken
Definition: HcalDigitizer.h:81
HcalDigitizer::theZDCHitFilter
ZDCHitFilter theZDCHitFilter
Definition: HcalDigitizer.h:142
HcalDigitizer::theHBHESiPMResponse
std::unique_ptr< HcalSiPMHitResponse > theHBHESiPMResponse
Definition: HcalDigitizer.h:110
HcalDigitizer::theHODigitizer
std::unique_ptr< HODigitizer > theHODigitizer
Definition: HcalDigitizer.h:147
Exception
Definition: hltDiff.cc:245
HcalDigitizer::doHFWindow_
bool doHFWindow_
Definition: HcalDigitizer.h:165
HcalDigitizer::theHFAmplifier
std::unique_ptr< HcalAmplifier > theHFAmplifier
Definition: HcalDigitizer.h:120
HcalSimParameterMap::setHOHamamatsuDetIds
void setHOHamamatsuDetIds(const std::vector< HcalDetId > &ids)
Definition: HcalSimParameterMap.h:34
HcalElectronicsSim.h
edm::PCaloHitContainer
std::vector< PCaloHit > PCaloHitContainer
Definition: PCaloHitContainer.h:8
HcalDigitizer::m_HBDarkeningToken
edm::ESGetToken< HBHEDarkening, HBHEDarkeningRecord > m_HBDarkeningToken
Definition: HcalDigitizer.h:78
HcalQIENum.h
EventSetup.h
or
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
HcalDigitizer::hogeo
bool hogeo
Definition: HcalDigitizer.h:163
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
HcalDigitizer::theCoderFactory
std::unique_ptr< HcalCoderFactory > theCoderFactory
Definition: HcalDigitizer.h:127
HcalDigitizer::theHOSiPMCode
int theHOSiPMCode
Definition: HcalDigitizer.h:173
HcalDigitizer::initializeEvent
void initializeEvent(edm::Event const &e, edm::EventSetup const &c)
Definition: HcalDigitizer.cc:305
HcalDigitizer::theHBHEDigitizer
std::unique_ptr< HBHEDigitizer > theHBHEDigitizer
Definition: HcalDigitizer.h:146
HcalDigitizer::m_HFRecalibration
std::unique_ptr< HFRecalibration > m_HFRecalibration
Definition: HcalDigitizer.h:179
HcalDigitizer::injectedHitsTime_
std::vector< double > injectedHitsTime_
Definition: HcalDigitizer.h:184
HcalDbService.h
HcalDigitizer::theHFQIE10ElectronicsSim
std::unique_ptr< HcalElectronicsSim > theHFQIE10ElectronicsSim
Definition: HcalDigitizer.h:133
HcalDigitizer::m_HEDarkening
const HBHEDarkening * m_HEDarkening
Definition: HcalDigitizer.h:178
HcalDigitizer::theHOHitFilter
HOHitFilter theHOHitFilter
Definition: HcalDigitizer.h:140
ConsumesCollector.h
HcalCoderFactory::DB
Definition: HcalCoderFactory.h:10
HFDigiCollection
edm::SortedCollection< HFDataFrame > HFDigiCollection
Definition: HcalDigiCollections.h:22
HcalAmplifier.h
ParameterSet.h
HcalDigitizer::m_HEDarkeningToken
edm::ESGetToken< HBHEDarkening, HBHEDarkeningRecord > m_HEDarkeningToken
Definition: HcalDigitizer.h:79
HcalBaseSignalGenerator
Definition: HcalBaseSignalGenerator.h:8
hcalUnsuppressedDigis_cfi.minFCToDelay
minFCToDelay
Definition: hcalUnsuppressedDigis_cfi.py:29
HcalDigitizer::theRecNumberWatcher_
edm::ESWatcher< HcalRecNumberingRecord > theRecNumberWatcher_
Definition: HcalDigitizer.h:86
HcalDigitizer::theHFElectronicsSim
std::unique_ptr< HcalElectronicsSim > theHFElectronicsSim
Definition: HcalDigitizer.h:130
HcalDigitizer::isHCAL
bool isHCAL
Definition: HcalDigitizer.h:163
CaloSamplesCollection
std::vector< CaloSamples > CaloSamplesCollection
Definition: CaloSamples.h:99
HBHEDigiCollection
edm::SortedCollection< HBHEDataFrame > HBHEDigiCollection
Definition: HcalDigiCollections.h:20
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
DeDxTools::esConsumes
ESGetTokenH3DDVariant esConsumes(std::string const &Reccord, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
HcalDigitizer::hitsProducer_
std::string hitsProducer_
Definition: HcalDigitizer.h:171
HcalDigitizer::deliveredLumi
double deliveredLumi
Definition: HcalDigitizer.h:175
edm::Event
Definition: Event.h:73
QIE11
Definition: HcalQIENum.h:4
HcalDigitizer::theHOSiPMDigitizer
std::unique_ptr< HODigitizer > theHOSiPMDigitizer
Definition: HcalDigitizer.h:148
HcalSimParameterMap::simParameters
const CaloSimParameters & simParameters(const DetId &id) const override
Definition: HcalSimParameterMap.cc:30
HcalDigitizer::checkGeometry
void checkGeometry(const edm::EventSetup &eventSetup)
Definition: HcalDigitizer.cc:581
TauDecayModes.dec
dec
Definition: TauDecayModes.py:142
HcalDigitizer::hcalTimeSlew_delay_
const HcalTimeSlew * hcalTimeSlew_delay_
Definition: HcalDigitizer.h:181
cuy.ii
ii
Definition: cuy.py:589
edm::InputTag
Definition: InputTag.h:15
HcalDigitizer::agingFlagHE
bool agingFlagHE
Definition: HcalDigitizer.h:176
edm::ConsumesCollector
Definition: ConsumesCollector.h:45
HcalDigitizer::theHBHEQIE11Amplifier
std::unique_ptr< HcalAmplifier > theHBHEQIE11Amplifier
Definition: HcalDigitizer.h:124
QIE10
Definition: HcalQIENum.h:4
HcalDigitizer::buildHOSiPMCells
void buildHOSiPMCells(const std::vector< DetId > &allCells, const edm::EventSetup &eventSetup)
Definition: HcalDigitizer.cc:764
HcalTimeSlewSim.h
HcalDigitizer::theHFDigitizer
std::unique_ptr< HFDigitizer > theHFDigitizer
Definition: HcalDigitizer.h:149
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37