CMS 3D CMS Logo

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