CMS 3D CMS Logo

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