CMS 3D CMS Logo

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