CMS 3D CMS Logo

EcalDigiProducer.cc
Go to the documentation of this file.
14 //#include "SimCalorimetry/EcalSimAlgos/interface/ESFastTDigitizer.h"
44 
54 
56  edm::ProducesCollector producesCollector,
58  : EcalDigiProducer(params, iC) {
60  producesCollector.produces<EBDigiCollection>(m_apdDigiTag);
61 
62  producesCollector.produces<EBDigiCollection>(m_EBdigiCollection);
63  producesCollector.produces<EEDigiCollection>(m_EEdigiCollection);
64  producesCollector.produces<ESDigiCollection>(m_ESdigiCollection);
65 }
66 
67 // version for Pre-Mixing, for use outside of MixingModule
70  m_APDShape(true),
71  m_EBShape(true),
72  m_EEShape(true),
73  m_ESShape(),
74  m_EBdigiCollection(params.getParameter<std::string>("EBdigiCollection")),
75  m_EEdigiCollection(params.getParameter<std::string>("EEdigiCollection")),
76  m_ESdigiCollection(params.getParameter<std::string>("ESdigiCollection")),
77  m_hitsProducerTag(params.getParameter<std::string>("hitsProducer")),
78  m_useLCcorrection(params.getUntrackedParameter<bool>("UseLCcorrection")),
79  m_apdSeparateDigi(params.getParameter<bool>("apdSeparateDigi")),
80 
81  m_EBs25notCont(params.getParameter<double>("EBs25notContainment")),
82  m_EEs25notCont(params.getParameter<double>("EEs25notContainment")),
83 
84  m_readoutFrameSize(params.getParameter<int>("readoutFrameSize")),
85  m_ParameterMap(new EcalSimParameterMap(params.getParameter<double>("simHitToPhotoelectronsBarrel"),
86  params.getParameter<double>("simHitToPhotoelectronsEndcap"),
87  params.getParameter<double>("photoelectronsToAnalogBarrel"),
88  params.getParameter<double>("photoelectronsToAnalogEndcap"),
89  params.getParameter<double>("samplingFactor"),
90  params.getParameter<double>("timePhase"),
91  m_readoutFrameSize,
92  params.getParameter<int>("binOfMaximum"),
93  params.getParameter<bool>("doPhotostatistics"),
94  params.getParameter<bool>("syncPhase"))),
95 
96  m_apdDigiTag(params.getParameter<std::string>("apdDigiTag")),
97  m_apdParameters(new APDSimParameters(params.getParameter<bool>("apdAddToBarrel"),
98  m_apdSeparateDigi,
99  params.getParameter<double>("apdSimToPELow"),
100  params.getParameter<double>("apdSimToPEHigh"),
101  params.getParameter<double>("apdTimeOffset"),
102  params.getParameter<double>("apdTimeOffWidth"),
103  params.getParameter<bool>("apdDoPEStats"),
104  m_apdDigiTag,
105  params.getParameter<std::vector<double>>("apdNonlParms"))),
106 
107  m_APDResponse(
108  !m_apdSeparateDigi
109  ? nullptr
110  : new EBHitResponse(m_ParameterMap.get(), &m_EBShape, true, m_apdParameters.get(), &m_APDShape)),
111 
112  m_EBResponse(new EBHitResponse(m_ParameterMap.get(),
113  &m_EBShape,
114  false, // barrel
115  m_apdParameters.get(),
116  &m_APDShape)),
117 
118  m_EEResponse(new EEHitResponse(m_ParameterMap.get(), &m_EEShape)),
119  m_ESResponse(new ESHitResponse(m_ParameterMap.get(), &m_ESShape)),
120  m_ESOldResponse(new CaloHitResponse(m_ParameterMap.get(), &m_ESShape)),
121 
122  m_addESNoise(params.getParameter<bool>("doESNoise")),
123  m_PreMix1(params.getParameter<bool>("EcalPreMixStage1")),
124  m_PreMix2(params.getParameter<bool>("EcalPreMixStage2")),
125 
126  m_doFastES(params.getParameter<bool>("doFast")),
127 
128  m_doEB(params.getParameter<bool>("doEB")),
129  m_doEE(params.getParameter<bool>("doEE")),
130  m_doES(params.getParameter<bool>("doES")),
131 
132  m_ESElectronicsSim(m_doFastES ? nullptr : new ESElectronicsSim(m_addESNoise)),
133 
134  m_ESOldDigitizer(m_doFastES ? nullptr
135  : new ESOldDigitizer(m_ESOldResponse.get(), m_ESElectronicsSim.get(), m_addESNoise)),
136 
137  m_ESElectronicsSimFast(!m_doFastES ? nullptr : new ESElectronicsSimFast(m_addESNoise, m_PreMix1)),
138 
139  m_ESDigitizer(!m_doFastES ? nullptr
140  : new ESDigitizer(m_ESResponse.get(), m_ESElectronicsSimFast.get(), m_addESNoise)),
141 
142  m_APDDigitizer(nullptr),
143  m_BarrelDigitizer(nullptr),
144  m_EndcapDigitizer(nullptr),
145  m_ElectronicsSim(nullptr),
146  m_Coder(nullptr),
147  m_APDElectronicsSim(nullptr),
148  m_APDCoder(nullptr),
149  m_Geometry(nullptr),
150  m_EBCorrNoise({{nullptr, nullptr, nullptr}}),
151  m_EECorrNoise({{nullptr, nullptr, nullptr}}) {
152  // "produces" statements taken care of elsewhere.
153  // if(m_apdSeparateDigi) mixMod.produces<EBDigiCollection>(m_apdDigiTag);
154  // mixMod.produces<EBDigiCollection>(m_EBdigiCollection);
155  // mixMod.produces<EEDigiCollection>(m_EEdigiCollection);
156  // mixMod.produces<ESDigiCollection>(m_ESdigiCollection);
157  if (m_doEB)
158  iC.consumes<std::vector<PCaloHit>>(edm::InputTag(m_hitsProducerTag, "EcalHitsEB"));
159  if (m_doEE)
160  iC.consumes<std::vector<PCaloHit>>(edm::InputTag(m_hitsProducerTag, "EcalHitsEE"));
161  if (m_doES)
162  iC.consumes<std::vector<PCaloHit>>(edm::InputTag(m_hitsProducerTag, "EcalHitsES"));
163 
164  const std::vector<double> ebCorMatG12 = params.getParameter<std::vector<double>>("EBCorrNoiseMatrixG12");
165  const std::vector<double> eeCorMatG12 = params.getParameter<std::vector<double>>("EECorrNoiseMatrixG12");
166  const std::vector<double> ebCorMatG06 = params.getParameter<std::vector<double>>("EBCorrNoiseMatrixG06");
167  const std::vector<double> eeCorMatG06 = params.getParameter<std::vector<double>>("EECorrNoiseMatrixG06");
168  const std::vector<double> ebCorMatG01 = params.getParameter<std::vector<double>>("EBCorrNoiseMatrixG01");
169  const std::vector<double> eeCorMatG01 = params.getParameter<std::vector<double>>("EECorrNoiseMatrixG01");
170 
171  const bool applyConstantTerm = params.getParameter<bool>("applyConstantTerm");
172  const double rmsConstantTerm = params.getParameter<double>("ConstantTerm");
173 
174  const bool addNoise = params.getParameter<bool>("doENoise");
175  const bool cosmicsPhase = params.getParameter<bool>("cosmicsPhase");
176  const double cosmicsShift = params.getParameter<double>("cosmicsShift");
177 
178  //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
179 
180  // further phase for cosmics studies
181  if (cosmicsPhase) {
182  if (m_doEB)
183  m_EBResponse->setPhaseShift(1. + cosmicsShift);
184  if (m_doEE)
185  m_EEResponse->setPhaseShift(1. + cosmicsShift);
186  }
187 
188  EcalCorrMatrix ebMatrix[3];
189  EcalCorrMatrix eeMatrix[3];
190 
191  assert(ebCorMatG12.size() == m_readoutFrameSize);
192  assert(eeCorMatG12.size() == m_readoutFrameSize);
193  assert(ebCorMatG06.size() == m_readoutFrameSize);
194  assert(eeCorMatG06.size() == m_readoutFrameSize);
195  assert(ebCorMatG01.size() == m_readoutFrameSize);
196  assert(eeCorMatG01.size() == m_readoutFrameSize);
197 
198  assert(1.e-7 > fabs(ebCorMatG12[0] - 1.0));
199  assert(1.e-7 > fabs(ebCorMatG06[0] - 1.0));
200  assert(1.e-7 > fabs(ebCorMatG01[0] - 1.0));
201  assert(1.e-7 > fabs(eeCorMatG12[0] - 1.0));
202  assert(1.e-7 > fabs(eeCorMatG06[0] - 1.0));
203  assert(1.e-7 > fabs(eeCorMatG01[0] - 1.0));
204 
205  for (unsigned int row(0); row != m_readoutFrameSize; ++row) {
206  assert(0 == row || 1. >= ebCorMatG12[row]);
207  assert(0 == row || 1. >= ebCorMatG06[row]);
208  assert(0 == row || 1. >= ebCorMatG01[row]);
209  assert(0 == row || 1. >= eeCorMatG12[row]);
210  assert(0 == row || 1. >= eeCorMatG06[row]);
211  assert(0 == row || 1. >= eeCorMatG01[row]);
212  for (unsigned int column(0); column <= row; ++column) {
213  const unsigned int index(row - column);
214  ebMatrix[0](row, column) = ebCorMatG12[index];
215  eeMatrix[0](row, column) = eeCorMatG12[index];
216  ebMatrix[1](row, column) = ebCorMatG06[index];
217  eeMatrix[1](row, column) = eeCorMatG06[index];
218  ebMatrix[2](row, column) = ebCorMatG01[index];
219  eeMatrix[2](row, column) = eeCorMatG01[index];
220  }
221  }
222 
223  m_EBCorrNoise[0].reset(new CorrelatedNoisifier<EcalCorrMatrix>(ebMatrix[0]));
224  m_EECorrNoise[0].reset(new CorrelatedNoisifier<EcalCorrMatrix>(eeMatrix[0]));
225  m_EBCorrNoise[1].reset(new CorrelatedNoisifier<EcalCorrMatrix>(ebMatrix[1]));
226  m_EECorrNoise[1].reset(new CorrelatedNoisifier<EcalCorrMatrix>(eeMatrix[1]));
227  m_EBCorrNoise[2].reset(new CorrelatedNoisifier<EcalCorrMatrix>(ebMatrix[2]));
228  m_EECorrNoise[2].reset(new CorrelatedNoisifier<EcalCorrMatrix>(eeMatrix[2]));
229 
230  m_Coder.reset(new EcalCoder(addNoise,
231  m_PreMix1,
232  m_EBCorrNoise[0].get(),
233  m_EECorrNoise[0].get(),
234  m_EBCorrNoise[1].get(),
235  m_EECorrNoise[1].get(),
236  m_EBCorrNoise[2].get(),
237  m_EECorrNoise[2].get()));
238 
239  m_ElectronicsSim.reset(
240  new EcalElectronicsSim(m_ParameterMap.get(), m_Coder.get(), applyConstantTerm, rmsConstantTerm));
241 
242  if (m_apdSeparateDigi) {
243  m_APDCoder.reset(new EcalCoder(false,
244  m_PreMix1,
245  m_EBCorrNoise[0].get(),
246  m_EECorrNoise[0].get(),
247  m_EBCorrNoise[1].get(),
248  m_EECorrNoise[1].get(),
249  m_EBCorrNoise[2].get(),
250  m_EECorrNoise[2].get()));
251 
252  m_APDElectronicsSim.reset(
253  new EcalElectronicsSim(m_ParameterMap.get(), m_APDCoder.get(), applyConstantTerm, rmsConstantTerm));
254 
255  m_APDDigitizer.reset(new EBDigitizer(m_APDResponse.get(), m_APDElectronicsSim.get(), false));
256  }
257 
258  if (m_doEB) {
259  m_BarrelDigitizer.reset(new EBDigitizer(m_EBResponse.get(), m_ElectronicsSim.get(), addNoise));
260  }
261 
262  if (m_doEE) {
263  m_EndcapDigitizer.reset(new EEDigitizer(m_EEResponse.get(), m_ElectronicsSim.get(), addNoise));
264  }
265 }
266 
268 
271  randomEngine_ = &rng->getEngine(event.streamID());
272 
273  checkGeometry(eventSetup);
274  checkCalibrations(event, eventSetup);
275  if (m_doEB) {
276  m_BarrelDigitizer->initializeHits();
277  if (m_apdSeparateDigi) {
278  m_APDDigitizer->initializeHits();
279  }
280  }
281  if (m_doEE) {
282  m_EndcapDigitizer->initializeHits();
283  }
284  if (m_doES) {
285  if (m_doFastES) {
286  m_ESDigitizer->initializeHits();
287  } else {
288  m_ESOldDigitizer->initializeHits();
289  }
290  }
291 }
292 
294  HitsHandle const &eeHandle,
295  HitsHandle const &esHandle,
296  int bunchCrossing) {
297  if (m_doEB && ebHandle.isValid()) {
298  m_BarrelDigitizer->add(*ebHandle.product(), bunchCrossing, randomEngine_);
299 
300  if (m_apdSeparateDigi) {
301  m_APDDigitizer->add(*ebHandle.product(), bunchCrossing, randomEngine_);
302  }
303  }
304 
305  if (m_doEE && eeHandle.isValid()) {
306  m_EndcapDigitizer->add(*eeHandle.product(), bunchCrossing, randomEngine_);
307  }
308 
309  if (m_doES && esHandle.isValid()) {
310  if (m_doFastES) {
311  m_ESDigitizer->add(*esHandle.product(), bunchCrossing, randomEngine_);
312  } else {
313  m_ESOldDigitizer->add(*esHandle.product(), bunchCrossing, randomEngine_);
314  }
315  }
316 }
317 
318 void EcalDigiProducer::accumulate(edm::Event const &e, edm::EventSetup const &eventSetup) {
319  // Step A: Get Inputs
321  if (m_doEB) {
322  m_EBShape.setEventSetup(eventSetup); // need to set the eventSetup here, otherwise pre-mixing
323  // module will not wrk
324  m_APDShape.setEventSetup(eventSetup); //
325  edm::InputTag ebTag(m_hitsProducerTag, "EcalHitsEB");
326  e.getByLabel(ebTag, ebHandle);
327  }
328 
330  if (m_doEE) {
331  m_EEShape.setEventSetup(eventSetup); // need to set the eventSetup here, otherwise pre-mixing
332  // module will not work
333  edm::InputTag eeTag(m_hitsProducerTag, "EcalHitsEE");
334  e.getByLabel(eeTag, eeHandle);
335  }
336 
338  if (m_doES) {
339  edm::InputTag esTag(m_hitsProducerTag, "EcalHitsES");
340  e.getByLabel(esTag, esHandle);
341  }
342 
343  accumulateCaloHits(ebHandle, eeHandle, esHandle, 0);
344 }
345 
347  edm::EventSetup const &eventSetup,
348  edm::StreamID const &streamID) {
349  // Step A: Get Inputs
351  if (m_doEB) {
352  edm::InputTag ebTag(m_hitsProducerTag, "EcalHitsEB");
353  e.getByLabel(ebTag, ebHandle);
354  }
355 
357  if (m_doEE) {
358  edm::InputTag eeTag(m_hitsProducerTag, "EcalHitsEE");
359  e.getByLabel(eeTag, eeHandle);
360  }
361 
363  if (m_doES) {
364  edm::InputTag esTag(m_hitsProducerTag, "EcalHitsES");
365  e.getByLabel(esTag, esHandle);
366  }
367 
368  accumulateCaloHits(ebHandle, eeHandle, esHandle, e.bunchCrossing());
369 }
370 
372  // Step B: Create empty output
373  std::unique_ptr<EBDigiCollection> apdResult(!m_apdSeparateDigi || !m_doEB ? nullptr : new EBDigiCollection());
374  std::unique_ptr<EBDigiCollection> barrelResult(new EBDigiCollection());
375  std::unique_ptr<EEDigiCollection> endcapResult(new EEDigiCollection());
376  std::unique_ptr<ESDigiCollection> preshowerResult(new ESDigiCollection());
377 
378  // run the algorithm
379 
380  if (m_doEB) {
381  m_BarrelDigitizer->run(*barrelResult, randomEngine_);
382  cacheEBDigis(&*barrelResult);
383 
384  edm::LogInfo("DigiInfo") << "EB Digis: " << barrelResult->size();
385 
386  if (m_apdSeparateDigi) {
387  m_APDDigitizer->run(*apdResult, randomEngine_);
388  edm::LogInfo("DigiInfo") << "APD Digis: " << apdResult->size();
389  }
390  }
391 
392  if (m_doEE) {
393  m_EndcapDigitizer->run(*endcapResult, randomEngine_);
394  edm::LogInfo("EcalDigi") << "EE Digis: " << endcapResult->size();
395  cacheEEDigis(&*endcapResult);
396  }
397  if (m_doES) {
398  if (m_doFastES) {
399  m_ESDigitizer->run(*preshowerResult, randomEngine_);
400  } else {
401  m_ESOldDigitizer->run(*preshowerResult, randomEngine_);
402  }
403  edm::LogInfo("EcalDigi") << "ES Digis: " << preshowerResult->size();
404  }
405 
406  // Step D: Put outputs into event
407  if (m_apdSeparateDigi) {
408  // event.put(std::move(apdResult), m_apdDigiTag ) ;
409  }
410 
411  event.put(std::move(barrelResult), m_EBdigiCollection);
412  event.put(std::move(endcapResult), m_EEdigiCollection);
413  event.put(std::move(preshowerResult), m_ESdigiCollection);
414 
415  randomEngine_ = nullptr; // to prevent access outside event
416 }
417 
420  if (!rng.isAvailable()) {
421  throw cms::Exception("Configuration") << "RandomNumberGenerator service is not available.\n"
422  "You must add the service in the configuration file\n"
423  "or remove the module that requires it.";
424  }
425  CLHEP::HepRandomEngine *engine = &rng->getEngine(lumi.index());
426 
427  if (m_doEB) {
428  if (nullptr != m_APDResponse)
429  m_APDResponse->initialize(engine);
430  m_EBResponse->initialize(engine);
431  }
432 }
433 
435  // Pedestals from event setup
436 
438  eventSetup.get<EcalPedestalsRcd>().get(dbPed);
439  const EcalPedestals *pedestals(dbPed.product());
440 
441  m_Coder->setPedestals(pedestals);
442  if (nullptr != m_APDCoder)
443  m_APDCoder->setPedestals(pedestals);
444 
445  // Ecal Intercalibration Constants
447  eventSetup.get<EcalIntercalibConstantsMCRcd>().get(pIcal);
448  const EcalIntercalibConstantsMC *ical(pIcal.product());
449 
450  m_Coder->setIntercalibConstants(ical);
451  if (nullptr != m_APDCoder)
452  m_APDCoder->setIntercalibConstants(ical);
453 
454  m_EBResponse->setIntercal(ical);
455  if (nullptr != m_APDResponse)
456  m_APDResponse->setIntercal(ical);
457 
458  // Ecal LaserCorrection Constants
460  eventSetup.get<EcalLaserDbRecord>().get(laser);
461  const edm::TimeValue_t eventTimeValue = event.time().value();
462 
463  m_EBResponse->setEventTime(eventTimeValue);
464  m_EBResponse->setLaserConstants(laser.product(), m_useLCcorrection);
465 
466  m_EEResponse->setEventTime(eventTimeValue);
467  m_EEResponse->setLaserConstants(laser.product(), m_useLCcorrection);
468 
469  // ADC -> GeV Scale
471  eventSetup.get<EcalADCToGeVConstantRcd>().get(pAgc);
472  const EcalADCToGeVConstant *agc = pAgc.product();
473 
474  // Gain Ratios
476  eventSetup.get<EcalGainRatiosRcd>().get(pRatio);
477  const EcalGainRatios *gr = pRatio.product();
478 
479  m_Coder->setGainRatios(gr);
480  if (nullptr != m_APDCoder)
481  m_APDCoder->setGainRatios(gr);
482 
483  EcalMGPAGainRatio *defaultRatios = new EcalMGPAGainRatio();
484 
485  double theGains[m_Coder->NGAINS + 1];
486  theGains[0] = 0.;
487  theGains[3] = 1.;
488  theGains[2] = defaultRatios->gain6Over1();
489  theGains[1] = theGains[2] * (defaultRatios->gain12Over6());
490 
491  LogDebug("EcalDigi") << " Gains: "
492  << "\n"
493  << " g1 = " << theGains[1] << "\n"
494  << " g2 = " << theGains[2] << "\n"
495  << " g3 = " << theGains[3];
496 
497  delete defaultRatios;
498 
499  const double EBscale((agc->getEBValue()) * theGains[1] * (m_Coder->MAXADC) * m_EBs25notCont);
500 
501  LogDebug("EcalDigi") << " GeV/ADC = " << agc->getEBValue() << "\n"
502  << " notCont = " << m_EBs25notCont << "\n"
503  << " saturation for EB = " << EBscale << ", " << m_EBs25notCont;
504 
505  const double EEscale((agc->getEEValue()) * theGains[1] * (m_Coder->MAXADC) * m_EEs25notCont);
506 
507  LogDebug("EcalDigi") << " GeV/ADC = " << agc->getEEValue() << "\n"
508  << " notCont = " << m_EEs25notCont << "\n"
509  << " saturation for EB = " << EEscale << ", " << m_EEs25notCont;
510 
511  m_Coder->setFullScaleEnergy(EBscale, EEscale);
512  if (nullptr != m_APDCoder)
513  m_APDCoder->setFullScaleEnergy(EBscale, EEscale);
514 
515  if (nullptr != m_ESOldDigitizer || nullptr != m_ESDigitizer) {
516  // ES condition objects
517  edm::ESHandle<ESGain> hesgain;
519  edm::ESHandle<ESPedestals> hesPedestals;
521 
522  eventSetup.get<ESGainRcd>().get(hesgain);
523  eventSetup.get<ESMIPToGeVConstantRcd>().get(hesMIPToGeV);
524  eventSetup.get<ESPedestalsRcd>().get(hesPedestals);
525  eventSetup.get<ESIntercalibConstantsRcd>().get(hesMIPs);
526 
527  const ESGain *esgain(hesgain.product());
528  const ESPedestals *espeds(hesPedestals.product());
529  const ESIntercalibConstants *esmips(hesMIPs.product());
530  const ESMIPToGeVConstant *esMipToGeV(hesMIPToGeV.product());
531  const int ESGain(1.1 > esgain->getESGain() ? 1 : 2);
532  const double ESMIPToGeV((1 == ESGain) ? esMipToGeV->getESValueLow() : esMipToGeV->getESValueHigh());
533 
534  if (m_doES) {
536  if (!m_doFastES) {
537  m_ESElectronicsSim->setGain(ESGain);
538  m_ESElectronicsSim->setPedestals(espeds);
539  m_ESElectronicsSim->setMIPs(esmips);
540  m_ESElectronicsSim->setMIPToGeV(ESMIPToGeV);
541  } else {
542  m_ESDigitizer->setGain(ESGain);
543  m_ESElectronicsSimFast->setPedestals(espeds);
544  m_ESElectronicsSimFast->setMIPs(esmips);
545  m_ESElectronicsSimFast->setMIPToGeV(ESMIPToGeV);
546  }
547  }
548  }
549 }
550 
552  // TODO find a way to avoid doing this every event
553  edm::ESHandle<CaloGeometry> hGeometry;
554  eventSetup.get<CaloGeometryRecord>().get(hGeometry);
555 
556  const CaloGeometry *pGeometry = &*hGeometry;
557 
558  if (pGeometry != m_Geometry) {
559  m_Geometry = pGeometry;
560  updateGeometry();
561  }
562 }
563 
565  if (m_doEB) {
566  if (nullptr != m_APDResponse)
569  }
570  if (m_doEE) {
572  }
573  if (m_doES) {
575  m_ESOldResponse->setGeometry(m_Geometry);
576 
577  const std::vector<DetId> *theESDets(
580  : nullptr);
581 
582  if (!m_doFastES) {
583  if (nullptr != m_ESOldDigitizer && nullptr != theESDets)
584  m_ESOldDigitizer->setDetIds(*theESDets);
585  } else {
586  if (nullptr != m_ESDigitizer && nullptr != theESDets)
587  m_ESDigitizer->setDetIds(*theESDets);
588  }
589  }
590 }
591 
593  // noiseGenerator->setParameterMap(theParameterMap);
594  if (nullptr != m_BarrelDigitizer)
595  m_BarrelDigitizer->setNoiseSignalGenerator(noiseGenerator);
596 }
597 
599  // noiseGenerator->setParameterMap(theParameterMap);
600  if (nullptr != m_EndcapDigitizer)
601  m_EndcapDigitizer->setNoiseSignalGenerator(noiseGenerator);
602 }
603 
605  // noiseGenerator->setParameterMap(theParameterMap);
606  if (nullptr != m_ESDigitizer)
607  m_ESDigitizer->setNoiseSignalGenerator(noiseGenerator);
608 }
609 
614 }
CaloTDigitizer
Definition: CaloTDigitizer.h:42
EcalDigiProducer::accumulate
void accumulate(edm::Event const &e, edm::EventSetup const &c) override
Definition: EcalDigiProducer.cc:318
EcalDigiProducer::beginLuminosityBlock
void beginLuminosityBlock(edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) override
Definition: EcalDigiProducer.cc:418
EEHitResponse
Definition: EEHitResponse.h:7
EcalDigiProducer::m_EBs25notCont
const double m_EBs25notCont
Definition: EcalDigiProducer.h:105
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
ESPedestalsRcd
Definition: ESPedestalsRcd.h:5
edm::StreamID
Definition: StreamID.h:30
EcalIntercalibConstantsMC.h
ESGain
Definition: ESGain.h:7
EcalShapeBase::setEventSetup
void setEventSetup(const edm::EventSetup &evtSetup)
Definition: EcalShapeBase.cc:19
edm::RandomNumberGenerator::getEngine
virtual CLHEP::HepRandomEngine & getEngine(StreamID const &)=0
Use this engine in event methods.
Handle.h
electrons_cff.bool
bool
Definition: electrons_cff.py:372
EcalPedestals.h
EcalDigiProducer::m_Geometry
const CaloGeometry * m_Geometry
Definition: EcalDigiProducer.h:150
MessageLogger.h
EBHitResponse
Definition: EBHitResponse.h:14
funct::false
false
Definition: Factorize.h:34
EcalDigiProducer::m_doEB
const bool m_doEB
Definition: EcalDigiProducer.h:133
edm::Handle::product
T const * product() const
Definition: Handle.h:70
ESHandle.h
ESGainRcd
Definition: ESGainRcd.h:5
EcalDigiProducer::m_doFastES
const bool m_doFastES
Definition: EcalDigiProducer.h:131
ESIntercalibConstants.h
ESElectronicsSim
Definition: ESElectronicsSim.h:16
EcalDigiProducer::m_EEShape
EEShape m_EEShape
Definition: EcalDigiProducer.h:93
edm::LuminosityBlock
Definition: LuminosityBlock.h:50
EcalDigiProducer.h
CalibrationSummaryClient_cfi.params
params
Definition: CalibrationSummaryClient_cfi.py:14
edm::Run
Definition: Run.h:45
ecalElectronicsSim_cff.applyConstantTerm
applyConstantTerm
Definition: ecalElectronicsSim_cff.py:6
CaloGeometryRecord
Definition: CaloGeometryRecord.h:30
LuminosityBlock.h
CaloSamples.h
RandomNumberGenerator.h
ESMIPToGeVConstantRcd
Definition: ESMIPToGeVConstantRcd.h:5
EcalDigiProducer::m_EEResponse
std::unique_ptr< EEHitResponse > m_EEResponse
Definition: EcalDigiProducer.h:121
EcalDigiProducer::m_ESOldResponse
std::unique_ptr< CaloHitResponse > m_ESOldResponse
Definition: EcalDigiProducer.h:125
edm::LogInfo
Definition: MessageLogger.h:254
EcalDigiProducer::m_apdDigiTag
const std::string m_apdDigiTag
Definition: EcalDigiProducer.h:114
CaloGeometry::getSubdetectorGeometry
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
Definition: CaloGeometry.cc:34
cms::cuda::assert
assert(be >=bs)
EcalDigiProducer::randomEngine_
CLHEP::HepRandomEngine * randomEngine_
Definition: EcalDigiProducer.h:155
ecalCosmicsSim_cff.cosmicsPhase
cosmicsPhase
Definition: ecalCosmicsSim_cff.py:4
EEHitResponse.h
PileUpEventPrincipal
Definition: PileUpEventPrincipal.h:19
EcalADCToGeVConstant
Definition: EcalADCToGeVConstant.h:13
EBHitResponse.h
ESGain.h
APDSimParameters
Definition: APDSimParameters.h:8
EcalDigiProducer::EcalDigiProducer
EcalDigiProducer(const edm::ParameterSet &params, edm::ProducesCollector, edm::ConsumesCollector &iC)
Definition: EcalDigiProducer.cc:55
ESDigitizer.h
EcalDigiProducer::~EcalDigiProducer
~EcalDigiProducer() override
Definition: EcalDigiProducer.cc:267
EcalCondObjectContainer< EcalPedestal >
edm::Handle
Definition: AssociativeIterator.h:50
edm::Service::isAvailable
bool isAvailable() const
Definition: Service.h:40
ESGainRcd.h
EcalDigiProducer::m_ESElectronicsSimFast
std::unique_ptr< ESElectronicsSimFast > m_ESElectronicsSimFast
Definition: EcalDigiProducer.h:137
EcalDigiProducer::m_doES
const bool m_doES
Definition: EcalDigiProducer.h:133
EcalBarrel
Definition: EcalSubdetector.h:10
singleTopDQM_cfi.setup
setup
Definition: singleTopDQM_cfi.py:37
EcalDigiProducer::m_useLCcorrection
bool m_useLCcorrection
Definition: EcalDigiProducer.h:101
EcalDigiProducer::m_ESOldDigitizer
std::unique_ptr< ESOldDigitizer > m_ESOldDigitizer
Definition: EcalDigiProducer.h:136
EcalSimParameterMap.h
EcalDigiProducer::m_ESElectronicsSim
std::unique_ptr< ESElectronicsSim > m_ESElectronicsSim
Definition: EcalDigiProducer.h:135
CaloGeometry
Definition: CaloGeometry.h:21
ESPedestals.h
EcalSimParameterMap
Definition: EcalSimParameterMap.h:11
EcalDigiProducer::m_EBdigiCollection
const std::string m_EBdigiCollection
Definition: EcalDigiProducer.h:96
EcalDigiProducer::beginRun
void beginRun(edm::Run const &run, edm::EventSetup const &setup) override
Definition: EcalDigiProducer.cc:610
edm::EventSetup::get
T get() const
Definition: EventSetup.h:73
EcalIntercalibConstantsMCRcd.h
EcalBaseSignalGenerator
Definition: EcalBaseSignalGenerator.h:8
EcalDigiProducer::m_apdSeparateDigi
const bool m_apdSeparateDigi
Definition: EcalDigiProducer.h:103
Service.h
EcalDigiProducer::finalizeEvent
void finalizeEvent(edm::Event &e, edm::EventSetup const &c) override
Definition: EcalDigiProducer.cc:371
EcalLaserDbService.h
EcalDigiCollections.h
edm::ESHandle
Definition: DTSurvey.h:22
ESMIPToGeVConstantRcd.h
EcalDigiProducer::m_ESDigitizer
std::unique_ptr< ESDigitizer > m_ESDigitizer
Definition: EcalDigiProducer.h:138
PileUpEventPrincipal.h
DigiAccumulatorMixMod
Definition: DigiAccumulatorMixMod.h:41
ESIntercalibConstantsRcd
Definition: ESIntercalibConstantsRcd.h:5
EcalDigiProducer::m_APDDigitizer
std::unique_ptr< EBDigitizer > m_APDDigitizer
Definition: EcalDigiProducer.h:140
CaloSubdetectorGeometry::getValidDetIds
virtual const std::vector< DetId > & getValidDetIds(DetId::Detector det=DetId::Detector(0), int subdet=0) const
Get a list of valid detector ids (for the given subdetector)
Definition: CaloSubdetectorGeometry.cc:32
EcalMGPAGainRatio::gain12Over6
float gain12Over6() const
Definition: EcalMGPAGainRatio.h:19
EcalLaserDbRecord
Definition: EcalLaserDbRecord.h:19
EcalDigiProducer::m_EBResponse
std::unique_ptr< EBHitResponse > m_EBResponse
Definition: EcalDigiProducer.h:120
CaloGeometryRecord.h
EcalGainRatiosRcd
Definition: EcalGainRatiosRcd.h:5
ESDigiCollection
Definition: EcalDigiCollections.h:58
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
EcalEndcap
Definition: EcalSubdetector.h:10
EcalADCToGeVConstant.h
EcalDigiProducer::m_EEs25notCont
const double m_EEs25notCont
Definition: EcalDigiProducer.h:106
ESIntercalibConstantsRcd.h
funct::true
true
Definition: Factorize.h:173
CaloSubdetectorGeometry.h
HLT_2018_cff.InputTag
InputTag
Definition: HLT_2018_cff.py:79016
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:670
EcalDigiProducer::cacheEEDigis
virtual void cacheEEDigis(const EEDigiCollection *eeDigiPtr) const
Definition: EcalDigiProducer.h:77
EcalIntercalibConstantsMCRcd
Definition: EcalIntercalibConstantsMCRcd.h:5
edm::ParameterSet
Definition: ParameterSet.h:36
EcalADCToGeVConstant::getEEValue
float getEEValue() const
Definition: EcalADCToGeVConstant.h:21
Event.h
EcalDigiProducer::m_APDCoder
std::unique_ptr< EcalCoder > m_APDCoder
Definition: EcalDigiProducer.h:148
ESHitResponse.h
EcalElectronicsSim
Definition: EcalElectronicsSim.h:20
EcalEndcapGeometry.h
EBDigiCollection
Definition: EcalDigiCollections.h:32
ecalCosmicsSim_cff.cosmicsShift
cosmicsShift
Definition: ecalCosmicsSim_cff.py:5
EEDigiCollection
Definition: EcalDigiCollections.h:45
EEDigitizer
EcalTDigitizer< EEDigitizerTraits > EEDigitizer
Definition: EcalDigiProducer.h:22
PCaloHit.h
EcalADCToGeVConstantRcd.h
CaloHitResponse
Creates electronics signals from hits.
Definition: CaloHitResponse.h:33
edm::Service< edm::RandomNumberGenerator >
createfilelist.int
int
Definition: createfilelist.py:10
es_dqm_sourceclient-live_cfg.ESGain
ESGain
Definition: es_dqm_sourceclient-live_cfg.py:36
edm::ProducesCollector::produces
ProductRegistryHelper::BranchAliasSetterT< ProductType > produces()
Definition: ProducesCollector.h:52
ESMIPToGeVConstant
Definition: ESMIPToGeVConstant.h:7
edm::EventSetup
Definition: EventSetup.h:57
EcalGainRatiosRcd.h
DetId::Ecal
Definition: DetId.h:27
ESElectronicsSimFast
Definition: ESElectronicsSimFast.h:16
CaloHitResponse.h
get
#define get
ESCondObjectContainer< ESPedestal >
EcalGainRatios.h
EcalDigiProducer::initializeEvent
void initializeEvent(edm::Event const &e, edm::EventSetup const &c) override
Definition: EcalDigiProducer.cc:269
EcalDigiProducer::cacheEBDigis
virtual void cacheEBDigis(const EBDigiCollection *ebDigiPtr) const
Definition: EcalDigiProducer.h:76
EcalDigiProducer::m_ESShape
ESShape m_ESShape
Definition: EcalDigiProducer.h:94
EcalDigiProducer::m_doEE
const bool m_doEE
Definition: EcalDigiProducer.h:133
APDSimParameters.h
EcalDigiProducer::m_APDResponse
std::unique_ptr< EBHitResponse > m_APDResponse
Definition: EcalDigiProducer.h:117
EcalPreshower
Definition: EcalSubdetector.h:10
EcalLaserDbRecord.h
CorrelatedNoisifier
adds noise to the given frame.
Definition: EcalCoder.h:12
EcalDigiProducer::updateGeometry
void updateGeometry()
Definition: EcalDigiProducer.cc:564
EcalDigiProducer::m_hitsProducerTag
const std::string m_hitsProducerTag
Definition: EcalDigiProducer.h:99
EcalDigiProducer
Definition: EcalDigiProducer.h:58
eostools.move
def move(src, dest)
Definition: eostools.py:511
std
Definition: JetResolutionObject.h:76
writedatasetfile.run
run
Definition: writedatasetfile.py:27
EcalDigiProducer::m_EEdigiCollection
const std::string m_EEdigiCollection
Definition: EcalDigiProducer.h:97
edm::ProducesCollector
Definition: ProducesCollector.h:43
EcalDigiProducer::accumulateCaloHits
void accumulateCaloHits(HitsHandle const &ebHandle, HitsHandle const &eeHandle, HitsHandle const &esHandle, int bunchCrossing)
Definition: EcalDigiProducer.cc:293
EcalDigiProducer::setESNoiseSignalGenerator
void setESNoiseSignalGenerator(EcalBaseSignalGenerator *noiseGenerator)
Definition: EcalDigiProducer.cc:604
EcalDigiProducer::m_EndcapDigitizer
std::unique_ptr< EEDigitizer > m_EndcapDigitizer
Definition: EcalDigiProducer.h:142
EcalCorrMatrix
math::ErrorD< CaloSamples::MAXSAMPLES >::type EcalCorrMatrix
Definition: EcalCorrelatedNoiseMatrix.h:7
EcalDigiProducer::m_ESdigiCollection
const std::string m_ESdigiCollection
Definition: EcalDigiProducer.h:98
ESDigitizer
Definition: ESDigitizer.h:14
EcalMGPAGainRatio::gain6Over1
float gain6Over1() const
Definition: EcalMGPAGainRatio.h:20
Exception
Definition: hltDiff.cc:246
CaloGeometry.h
EcalCoder.h
EcalCoder
Definition: EcalCoder.h:27
ESMIPToGeVConstant.h
EcalElectronicsSim.h
EventSetup.h
EcalDigiProducer::m_Coder
std::unique_ptr< EcalCoder > m_Coder
Definition: EcalDigiProducer.h:145
Exception.h
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
EBDigitizer
EcalTDigitizer< EBDigitizerTraits > EBDigitizer
Definition: EcalDigiProducer.h:21
EcalPedestalsRcd.h
ESHitResponse
Definition: ESHitResponse.h:7
ConsumesCollector.h
ParameterSet.h
EcalDigiProducer::setEENoiseSignalGenerator
void setEENoiseSignalGenerator(EcalBaseSignalGenerator *noiseGenerator)
Definition: EcalDigiProducer.cc:598
EcalPedestalsRcd
Definition: EcalPedestalsRcd.h:5
ESShape::setGain
void setGain(const int gain)
Definition: ESShape.h:23
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
event
Definition: event.py:1
edm::Event
Definition: Event.h:73
ESElectronicsSimFast.h
lumi
Definition: LumiSectionData.h:20
StreamID.h
EcalADCToGeVConstant::getEBValue
float getEBValue() const
Definition: EcalADCToGeVConstant.h:20
EcalADCToGeVConstantRcd
Definition: EcalADCToGeVConstantRcd.h:5
edm::InputTag
Definition: InputTag.h:15
EcalDigiProducer::checkCalibrations
void checkCalibrations(const edm::Event &event, const edm::EventSetup &eventSetup)
Definition: EcalDigiProducer.cc:434
edm::ConsumesCollector
Definition: ConsumesCollector.h:39
EcalDigiProducer::m_ESResponse
std::unique_ptr< ESHitResponse > m_ESResponse
Definition: EcalDigiProducer.h:124
EcalCondDBWriter_cfi.laser
laser
Definition: EcalCondDBWriter_cfi.py:46
ESPedestalsRcd.h
EcalDigiProducer::m_BarrelDigitizer
std::unique_ptr< EBDigitizer > m_BarrelDigitizer
Definition: EcalDigiProducer.h:141
EcalDigiProducer::setEBNoiseSignalGenerator
void setEBNoiseSignalGenerator(EcalBaseSignalGenerator *noiseGenerator)
Definition: EcalDigiProducer.cc:592
EcalDigiProducer::checkGeometry
void checkGeometry(const edm::EventSetup &eventSetup)
Definition: EcalDigiProducer.cc:551
EcalDigiProducer::m_APDShape
APDShape m_APDShape
Definition: EcalDigiProducer.h:91
edm::TimeValue_t
unsigned long long TimeValue_t
Definition: Timestamp.h:28
EcalDigiProducer::m_EBShape
EBShape m_EBShape
Definition: EcalDigiProducer.h:92
EcalMGPAGainRatio
Definition: EcalMGPAGainRatio.h:13
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
ESElectronicsSim.h