CMS 3D CMS Logo

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