CMS 3D CMS Logo

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