CMS 3D CMS Logo

EcalMixingModuleValidation.cc
Go to the documentation of this file.
1 /*
2  * \file EcalMixingModuleValidation.cc
3  *
4  * \author F. Cossutti
5  *
6 */
7 
18 
20  : HepMCToken_(consumes<edm::HepMCProduct>(edm::InputTag(ps.getParameter<std::string>("moduleLabelMC")))),
21  EBdigiCollectionToken_(consumes<EBDigiCollection>(ps.getParameter<edm::InputTag>("EBdigiCollection"))),
22  EEdigiCollectionToken_(consumes<EEDigiCollection>(ps.getParameter<edm::InputTag>("EEdigiCollection"))),
23  ESdigiCollectionToken_(consumes<ESDigiCollection>(ps.getParameter<edm::InputTag>("ESdigiCollection"))),
24  crossingFramePCaloHitEBToken_(consumes<CrossingFrame<PCaloHit> >(
25  edm::InputTag(std::string("mix"), ps.getParameter<std::string>("hitsProducer") + std::string("EcalHitsEB")))),
26  crossingFramePCaloHitEEToken_(consumes<CrossingFrame<PCaloHit> >(
27  edm::InputTag(std::string("mix"), ps.getParameter<std::string>("hitsProducer") + std::string("EcalHitsEE")))),
28  crossingFramePCaloHitESToken_(consumes<CrossingFrame<PCaloHit> >(edm::InputTag(
29  std::string("mix"), ps.getParameter<std::string>("hitsProducer") + std::string("EcalHitsES")))) {
30  // needed for MixingModule checks
31 
32  double simHitToPhotoelectronsBarrel = ps.getParameter<double>("simHitToPhotoelectronsBarrel");
33  double simHitToPhotoelectronsEndcap = ps.getParameter<double>("simHitToPhotoelectronsEndcap");
34  double photoelectronsToAnalogBarrel = ps.getParameter<double>("photoelectronsToAnalogBarrel");
35  double photoelectronsToAnalogEndcap = ps.getParameter<double>("photoelectronsToAnalogEndcap");
36  double samplingFactor = ps.getParameter<double>("samplingFactor");
37  double timePhase = ps.getParameter<double>("timePhase");
38  int readoutFrameSize = ps.getParameter<int>("readoutFrameSize");
39  int binOfMaximum = ps.getParameter<int>("binOfMaximum");
40  bool doPhotostatistics = ps.getParameter<bool>("doPhotostatistics");
41  bool syncPhase = ps.getParameter<bool>("syncPhase");
42 
43  doPhotostatistics = false;
44 
50  timePhase,
54  syncPhase);
55  //theEcalShape = new EcalShape(timePhase);
56 
57  //theEcalResponse = new CaloHitResponse(theParameterMap, theEcalShape);
58 
59  /*
60  int ESGain = ps.getParameter<int>("ESGain");
61  double ESNoiseSigma = ps.getParameter<double> ("ESNoiseSigma");
62  int ESBaseline = ps.getParameter<int>("ESBaseline");
63  double ESMIPADC = ps.getParameter<double>("ESMIPADC");
64  double ESMIPkeV = ps.getParameter<double>("ESMIPkeV");
65 */
66 
67  theESShape = new ESShape();
68  theEBShape = new EBShape(true);
69  theEEShape = new EEShape(true);
70 
74 
75  // double effwei = 1.;
76 
77  /*
78  if (ESGain == 0)
79  effwei = 1.45;
80  else if (ESGain == 1)
81  effwei = 0.9066;
82  else if (ESGain == 2)
83  effwei = 0.8815;
84 
85  esBaseline_ = (double)ESBaseline;
86  esADCtokeV_ = 1000000.*ESMIPADC/ESMIPkeV;
87  esThreshold_ = 3.*effwei*ESNoiseSigma/esADCtokeV_;
88 */
89  theMinBunch = -10;
90  theMaxBunch = 10;
91 
92  // verbosity switch
93  verbose_ = ps.getUntrackedParameter<bool>("verbose", false);
94 
95  gainConv_[1] = 1.;
96  gainConv_[2] = 2.;
97  gainConv_[3] = 12.;
98  gainConv_[0] = 12.;
99  barrelADCtoGeV_ = 0.035;
100  endcapADCtoGeV_ = 0.06;
101 
102  meEBDigiMixRatiogt100ADC_ = nullptr;
103  meEEDigiMixRatiogt100ADC_ = nullptr;
104 
105  meEBDigiMixRatioOriggt50pc_ = nullptr;
106  meEEDigiMixRatioOriggt40pc_ = nullptr;
107 
108  meEBbunchCrossing_ = nullptr;
109  meEEbunchCrossing_ = nullptr;
110  meESbunchCrossing_ = nullptr;
111 
112  for (int i = 0; i < nBunch; i++) {
113  meEBBunchShape_[i] = nullptr;
114  meEEBunchShape_[i] = nullptr;
115  meESBunchShape_[i] = nullptr;
116  }
117 
118  meEBShape_ = nullptr;
119  meEEShape_ = nullptr;
120  meESShape_ = nullptr;
121 
122  meEBShapeRatio_ = nullptr;
123  meEEShapeRatio_ = nullptr;
124  meESShapeRatio_ = nullptr;
125 }
126 
128 
133 }
134 
136  Char_t histo[200];
137 
138  ibooker.setCurrentFolder("EcalDigisV/EcalDigiTask");
139 
140  sprintf(histo, "EcalDigiTask Barrel maximum Digi over sim signal ratio gt 100 ADC");
141  meEBDigiMixRatiogt100ADC_ = ibooker.book1D(histo, histo, 200, 0., 100.);
142 
143  sprintf(histo, "EcalDigiTask Endcap maximum Digi over sim signal ratio gt 100 ADC");
144  meEEDigiMixRatiogt100ADC_ = ibooker.book1D(histo, histo, 200, 0., 100.);
145 
146  sprintf(histo, "EcalDigiTask Barrel maximum Digi over sim signal ratio signal gt 50pc gun");
147  meEBDigiMixRatioOriggt50pc_ = ibooker.book1D(histo, histo, 200, 0., 100.);
148 
149  sprintf(histo, "EcalDigiTask Endcap maximum Digi over sim signal ratio signal gt 40pc gun");
150  meEEDigiMixRatioOriggt40pc_ = ibooker.book1D(histo, histo, 200, 0., 100.);
151 
152  sprintf(histo, "EcalDigiTask Barrel bunch crossing");
153  meEBbunchCrossing_ = ibooker.book1D(histo, histo, 20, -10., 10.);
154 
155  sprintf(histo, "EcalDigiTask Endcap bunch crossing");
156  meEEbunchCrossing_ = ibooker.book1D(histo, histo, 20, -10., 10.);
157 
158  sprintf(histo, "EcalDigiTask Preshower bunch crossing");
159  meESbunchCrossing_ = ibooker.book1D(histo, histo, 20, -10., 10.);
160 
161  for (int i = 0; i < nBunch; i++) {
162  sprintf(histo, "EcalDigiTask Barrel shape bunch crossing %02d", i - 10);
163  meEBBunchShape_[i] = ibooker.bookProfile(histo, histo, 10, 0, 10, 4000, 0., 400.);
164 
165  sprintf(histo, "EcalDigiTask Endcap shape bunch crossing %02d", i - 10);
166  meEEBunchShape_[i] = ibooker.bookProfile(histo, histo, 10, 0, 10, 4000, 0., 400.);
167 
168  sprintf(histo, "EcalDigiTask Preshower shape bunch crossing %02d", i - 10);
169  meESBunchShape_[i] = ibooker.bookProfile(histo, histo, 3, 0, 3, 4000, 0., 400.);
170  }
171 
172  sprintf(histo, "EcalDigiTask Barrel shape digi");
173  meEBShape_ = ibooker.bookProfile(histo, histo, 10, 0, 10, 4000, 0., 2000.);
174 
175  sprintf(histo, "EcalDigiTask Endcap shape digi");
176  meEEShape_ = ibooker.bookProfile(histo, histo, 10, 0, 10, 4000, 0., 2000.);
177 
178  sprintf(histo, "EcalDigiTask Preshower shape digi");
179  meESShape_ = ibooker.bookProfile(histo, histo, 3, 0, 3, 4000, 0., 2000.);
180 
181  sprintf(histo, "EcalDigiTask Barrel shape digi ratio");
182  meEBShapeRatio_ = ibooker.book1D(histo, histo, 10, 0, 10.);
183 
184  sprintf(histo, "EcalDigiTask Endcap shape digi ratio");
185  meEEShapeRatio_ = ibooker.book1D(histo, histo, 10, 0, 10.);
186 
187  sprintf(histo, "EcalDigiTask Preshower shape digi ratio");
188  meESShapeRatio_ = ibooker.book1D(histo, histo, 3, 0, 3.);
189 }
190 
192  // add shapes for each bunch crossing and divide the digi by the result
193 
194  std::vector<MonitorElement*> theBunches;
195  theBunches.reserve(nBunch);
196  for (int i = 0; i < nBunch; i++) {
197  theBunches.push_back(meEBBunchShape_[i]);
198  }
200 
201  theBunches.clear();
202 
203  for (int i = 0; i < nBunch; i++) {
204  theBunches.push_back(meEEBunchShape_[i]);
205  }
207 
208  theBunches.clear();
209 
210  for (int i = 0; i < nBunch; i++) {
211  theBunches.push_back(meESBunchShape_[i]);
212  }
214 }
215 
216 void EcalMixingModuleValidation::bunchSumTest(std::vector<MonitorElement*>& theBunches,
217  MonitorElement*& theTotal,
218  MonitorElement*& theRatio,
219  int nSample) {
220  std::vector<double> bunchSum;
221  bunchSum.reserve(nSample);
222  std::vector<double> bunchSumErro;
223  bunchSumErro.reserve(nSample);
224  std::vector<double> total;
225  total.reserve(nSample);
226  std::vector<double> totalErro;
227  totalErro.reserve(nSample);
228  std::vector<double> ratio;
229  ratio.reserve(nSample);
230  std::vector<double> ratioErro;
231  ratioErro.reserve(nSample);
232 
233  for (int iEl = 0; iEl < nSample; iEl++) {
234  bunchSum[iEl] = 0.;
235  bunchSumErro[iEl] = 0.;
236  total[iEl] = 0.;
237  totalErro[iEl] = 0.;
238  ratio[iEl] = 0.;
239  ratioErro[iEl] = 0.;
240  }
241 
242  for (int iSample = 0; iSample < nSample; iSample++) {
243  total[iSample] += theTotal->getBinContent(iSample + 1);
244  totalErro[iSample] += theTotal->getBinError(iSample + 1);
245 
246  for (int iBunch = theMinBunch; iBunch <= theMaxBunch; iBunch++) {
247  int iHisto = iBunch - theMinBunch;
248 
249  bunchSum[iSample] += theBunches[iHisto]->getBinContent(iSample + 1);
250  bunchSumErro[iSample] += pow(theBunches[iHisto]->getBinError(iSample + 1), 2);
251  }
252  bunchSumErro[iSample] = sqrt(bunchSumErro[iSample]);
253 
254  if (bunchSum[iSample] > 0.) {
255  ratio[iSample] = total[iSample] / bunchSum[iSample];
256  ratioErro[iSample] =
257  sqrt(pow(totalErro[iSample] / bunchSum[iSample], 2) +
258  pow((total[iSample] * bunchSumErro[iSample]) / (bunchSum[iSample] * bunchSum[iSample]), 2));
259  }
260 
261  std::cout << " Sample = " << iSample << " Total = " << total[iSample] << " +- " << totalErro[iSample] << "\n"
262  << " Sum = " << bunchSum[iSample] << " +- " << bunchSumErro[iSample] << "\n"
263  << " Ratio = " << ratio[iSample] << " +- " << ratioErro[iSample] << std::endl;
264 
265  theRatio->setBinContent(iSample + 1, (float)ratio[iSample]);
266  theRatio->setBinError(iSample + 1, (float)ratioErro[iSample]);
267  }
268 }
269 
271  //LogInfo("EventInfo") << " Run = " << e.id().run() << " Event = " << e.id().event();
272 
273  checkPedestals(c);
274 
275  std::vector<SimTrack> theSimTracks;
276  std::vector<SimVertex> theSimVertexes;
277 
279  edm::Handle<CrossingFrame<PCaloHit> > crossingFrame;
283 
284  bool skipMC = false;
285  e.getByToken(HepMCToken_, MCEvt);
286  if (!MCEvt.isValid()) {
287  skipMC = true;
288  }
289 
290  const EBDigiCollection* EBdigis = nullptr;
291  const EEDigiCollection* EEdigis = nullptr;
292  const ESDigiCollection* ESdigis = nullptr;
293 
294  bool isBarrel = true;
295  e.getByToken(EBdigiCollectionToken_, EcalDigiEB);
296  if (EcalDigiEB.isValid()) {
297  EBdigis = EcalDigiEB.product();
298  LogDebug("DigiInfo") << "total # EBdigis: " << EBdigis->size();
299  if (EBdigis->empty())
300  isBarrel = false;
301  } else {
302  isBarrel = false;
303  }
304 
305  bool isEndcap = true;
306  e.getByToken(EEdigiCollectionToken_, EcalDigiEE);
307  if (EcalDigiEE.isValid()) {
308  EEdigis = EcalDigiEE.product();
309  LogDebug("DigiInfo") << "total # EEdigis: " << EEdigis->size();
310  if (EEdigis->empty())
311  isEndcap = false;
312  } else {
313  isEndcap = false;
314  }
315 
316  bool isPreshower = true;
317  e.getByToken(ESdigiCollectionToken_, EcalDigiES);
318  if (EcalDigiES.isValid()) {
319  ESdigis = EcalDigiES.product();
320  LogDebug("DigiInfo") << "total # ESdigis: " << ESdigis->size();
321  if (ESdigis->empty())
322  isPreshower = false;
323  } else {
324  isPreshower = false;
325  }
326 
327  double theGunEnergy = 0.;
328  if (!skipMC) {
329  for (HepMC::GenEvent::particle_const_iterator p = MCEvt->GetEvent()->particles_begin();
330  p != MCEvt->GetEvent()->particles_end();
331  ++p) {
332  theGunEnergy = (*p)->momentum().e();
333  }
334  }
335  // in case no HepMC available, assume an arbitrary average energy for an interesting "gun"
336  else {
337  edm::LogWarning("DigiInfo") << "No HepMC available, using 30 GeV as giun energy";
338  theGunEnergy = 30.;
339  }
340 
341  // BARREL
342 
343  // loop over simHits
344 
345  if (isBarrel) {
346  e.getByToken(crossingFramePCaloHitEBToken_, crossingFrame);
347  const MixCollection<PCaloHit> barrelHits(crossingFrame.product());
348 
349  MapType ebSignalSimMap;
350 
351  double ebSimThreshold = 0.5 * theGunEnergy;
352 
353  for (auto const& iHit : barrelHits) {
354  EBDetId ebid = EBDetId(iHit.id());
355 
356  LogDebug("HitInfo") << " CaloHit " << iHit.getName() << "\n"
357  << " DetID = " << iHit.id() << " EBDetId = " << ebid.ieta() << " " << ebid.iphi() << "\n"
358  << " Time = " << iHit.time() << " Event id. = " << iHit.eventId().rawId() << "\n"
359  << " Track Id = " << iHit.geantTrackId() << "\n"
360  << " Energy = " << iHit.energy();
361 
362  uint32_t crystid = ebid.rawId();
363 
364  if (iHit.eventId().rawId() == 0)
365  ebSignalSimMap[crystid] += iHit.energy();
366 
367  if (meEBbunchCrossing_)
368  meEBbunchCrossing_->Fill(iHit.eventId().bunchCrossing());
369  }
370 
371  // loop over Digis
372 
373  const EBDigiCollection* barrelDigi = EcalDigiEB.product();
374 
375  std::vector<double> ebAnalogSignal;
376  std::vector<double> ebADCCounts;
377  std::vector<double> ebADCGains;
378  ebAnalogSignal.reserve(EBDataFrame::MAXSAMPLES);
379  ebADCCounts.reserve(EBDataFrame::MAXSAMPLES);
380  ebADCGains.reserve(EBDataFrame::MAXSAMPLES);
381 
382  for (unsigned int digis = 0; digis < EcalDigiEB->size(); ++digis) {
383  EBDataFrame ebdf = (*barrelDigi)[digis];
384  int nrSamples = ebdf.size();
385 
386  EBDetId ebid = ebdf.id();
387 
388  double Emax = 0.;
389  int Pmax = 0;
390 
391  for (int sample = 0; sample < nrSamples; ++sample) {
392  ebAnalogSignal[sample] = 0.;
393  ebADCCounts[sample] = 0.;
394  ebADCGains[sample] = -1.;
395  }
396 
397  for (int sample = 0; sample < nrSamples; ++sample) {
399 
400  ebADCCounts[sample] = (mySample.adc());
401  ebADCGains[sample] = (mySample.gainId());
402  ebAnalogSignal[sample] = (ebADCCounts[sample] * gainConv_[(int)ebADCGains[sample]] * barrelADCtoGeV_);
403  if (Emax < ebAnalogSignal[sample]) {
404  Emax = ebAnalogSignal[sample];
405  Pmax = sample;
406  }
407  LogDebug("DigiInfo") << "EB sample " << sample << " ADC counts = " << ebADCCounts[sample]
408  << " Gain Id = " << ebADCGains[sample] << " Analog eq = " << ebAnalogSignal[sample];
409  }
410  double pedestalPreSampleAnalog = 0.;
411  findPedestal(ebid, (int)ebADCGains[Pmax], pedestalPreSampleAnalog);
412  pedestalPreSampleAnalog *= gainConv_[(int)ebADCGains[Pmax]] * barrelADCtoGeV_;
413  double Erec = Emax - pedestalPreSampleAnalog;
414 
415  if (ebSignalSimMap[ebid.rawId()] != 0.) {
416  LogDebug("DigiInfo") << " Digi / Signal Hit = " << Erec << " / " << ebSignalSimMap[ebid.rawId()] << " gainConv "
417  << gainConv_[(int)ebADCGains[Pmax]];
418  if (Erec > 100. * barrelADCtoGeV_ && meEBDigiMixRatiogt100ADC_)
419  meEBDigiMixRatiogt100ADC_->Fill(Erec / ebSignalSimMap[ebid.rawId()]);
420  if (ebSignalSimMap[ebid.rawId()] > ebSimThreshold && meEBDigiMixRatioOriggt50pc_)
421  meEBDigiMixRatioOriggt50pc_->Fill(Erec / ebSignalSimMap[ebid.rawId()]);
422  if (ebSignalSimMap[ebid.rawId()] > ebSimThreshold && meEBShape_) {
423  for (int i = 0; i < 10; i++) {
424  pedestalPreSampleAnalog = 0.;
425  findPedestal(ebid, (int)ebADCGains[i], pedestalPreSampleAnalog);
426  pedestalPreSampleAnalog *= gainConv_[(int)ebADCGains[i]] * barrelADCtoGeV_;
427  meEBShape_->Fill(i, ebAnalogSignal[i] - pedestalPreSampleAnalog);
428  }
429  }
430  }
431  }
432 
433  EcalSubdetector thisDet = EcalBarrel;
434  computeSDBunchDigi(c, barrelHits, ebSignalSimMap, thisDet, ebSimThreshold, randomEngine(e.streamID()));
435  }
436 
437  // ENDCAP
438 
439  // loop over simHits
440 
441  if (isEndcap) {
442  e.getByToken(crossingFramePCaloHitEEToken_, crossingFrame);
443  const MixCollection<PCaloHit> endcapHits(crossingFrame.product());
444  MapType eeSignalSimMap;
445 
446  double eeSimThreshold = 0.4 * theGunEnergy;
447 
448  for (auto const& iHit : endcapHits) {
449  EEDetId eeid = EEDetId(iHit.id());
450 
451  LogDebug("HitInfo") << " CaloHit " << iHit.getName() << "\n"
452  << " DetID = " << iHit.id() << " EEDetId side = " << eeid.zside() << " = " << eeid.ix() << " "
453  << eeid.iy() << "\n"
454  << " Time = " << iHit.time() << " Event id. = " << iHit.eventId().rawId() << "\n"
455  << " Track Id = " << iHit.geantTrackId() << "\n"
456  << " Energy = " << iHit.energy();
457 
458  uint32_t crystid = eeid.rawId();
459 
460  if (iHit.eventId().rawId() == 0)
461  eeSignalSimMap[crystid] += iHit.energy();
462 
463  if (meEEbunchCrossing_)
464  meEEbunchCrossing_->Fill(iHit.eventId().bunchCrossing());
465  }
466 
467  // loop over Digis
468 
469  const EEDigiCollection* endcapDigi = EcalDigiEE.product();
470 
471  std::vector<double> eeAnalogSignal;
472  std::vector<double> eeADCCounts;
473  std::vector<double> eeADCGains;
474  eeAnalogSignal.reserve(EEDataFrame::MAXSAMPLES);
475  eeADCCounts.reserve(EEDataFrame::MAXSAMPLES);
476  eeADCGains.reserve(EEDataFrame::MAXSAMPLES);
477 
478  for (unsigned int digis = 0; digis < EcalDigiEE->size(); ++digis) {
479  EEDataFrame eedf = (*endcapDigi)[digis];
480  int nrSamples = eedf.size();
481 
482  EEDetId eeid = eedf.id();
483 
484  double Emax = 0.;
485  int Pmax = 0;
486 
487  for (int sample = 0; sample < nrSamples; ++sample) {
488  eeAnalogSignal[sample] = 0.;
489  eeADCCounts[sample] = 0.;
490  eeADCGains[sample] = -1.;
491  }
492 
493  for (int sample = 0; sample < nrSamples; ++sample) {
495 
496  eeADCCounts[sample] = (mySample.adc());
497  eeADCGains[sample] = (mySample.gainId());
498  eeAnalogSignal[sample] = (eeADCCounts[sample] * gainConv_[(int)eeADCGains[sample]] * endcapADCtoGeV_);
499  if (Emax < eeAnalogSignal[sample]) {
500  Emax = eeAnalogSignal[sample];
501  Pmax = sample;
502  }
503  LogDebug("DigiInfo") << "EE sample " << sample << " ADC counts = " << eeADCCounts[sample]
504  << " Gain Id = " << eeADCGains[sample] << " Analog eq = " << eeAnalogSignal[sample];
505  }
506  double pedestalPreSampleAnalog = 0.;
507  findPedestal(eeid, (int)eeADCGains[Pmax], pedestalPreSampleAnalog);
508  pedestalPreSampleAnalog *= gainConv_[(int)eeADCGains[Pmax]] * endcapADCtoGeV_;
509  double Erec = Emax - pedestalPreSampleAnalog;
510 
511  if (eeSignalSimMap[eeid.rawId()] != 0.) {
512  LogDebug("DigiInfo") << " Digi / Signal Hit = " << Erec << " / " << eeSignalSimMap[eeid.rawId()] << " gainConv "
513  << gainConv_[(int)eeADCGains[Pmax]];
514  if (Erec > 100. * endcapADCtoGeV_ && meEEDigiMixRatiogt100ADC_)
515  meEEDigiMixRatiogt100ADC_->Fill(Erec / eeSignalSimMap[eeid.rawId()]);
516  if (eeSignalSimMap[eeid.rawId()] > eeSimThreshold && meEEDigiMixRatioOriggt40pc_)
517  meEEDigiMixRatioOriggt40pc_->Fill(Erec / eeSignalSimMap[eeid.rawId()]);
518  if (eeSignalSimMap[eeid.rawId()] > eeSimThreshold && meEBShape_) {
519  for (int i = 0; i < 10; i++) {
520  pedestalPreSampleAnalog = 0.;
521  findPedestal(eeid, (int)eeADCGains[i], pedestalPreSampleAnalog);
522  pedestalPreSampleAnalog *= gainConv_[(int)eeADCGains[i]] * endcapADCtoGeV_;
523  meEEShape_->Fill(i, eeAnalogSignal[i] - pedestalPreSampleAnalog);
524  }
525  }
526  }
527  }
528 
529  EcalSubdetector thisDet = EcalEndcap;
530  computeSDBunchDigi(c, endcapHits, eeSignalSimMap, thisDet, eeSimThreshold, randomEngine(e.streamID()));
531  }
532 
533  if (isPreshower) {
534  e.getByToken(crossingFramePCaloHitESToken_, crossingFrame);
535  const MixCollection<PCaloHit> preshowerHits(crossingFrame.product());
536 
537  MapType esSignalSimMap;
538 
539  for (auto const& iHit : preshowerHits) {
540  ESDetId esid = ESDetId(iHit.id());
541 
542  LogDebug("HitInfo") << " CaloHit " << iHit.getName() << "\n"
543  << " DetID = " << iHit.id() << "ESDetId: z side " << esid.zside() << " plane "
544  << esid.plane() << esid.six() << ',' << esid.siy() << ':' << esid.strip() << "\n"
545  << " Time = " << iHit.time() << " Event id. = " << iHit.eventId().rawId() << "\n"
546  << " Track Id = " << iHit.geantTrackId() << "\n"
547  << " Energy = " << iHit.energy();
548 
549  uint32_t stripid = esid.rawId();
550 
551  if (iHit.eventId().rawId() == 0)
552  esSignalSimMap[stripid] += iHit.energy();
553 
554  if (meESbunchCrossing_)
555  meESbunchCrossing_->Fill(iHit.eventId().bunchCrossing());
556 
557  // loop over Digis
558 
559  const ESDigiCollection* preshowerDigi = EcalDigiES.product();
560 
561  std::vector<double> esADCCounts;
562  std::vector<double> esADCAnalogSignal;
563  esADCCounts.reserve(ESDataFrame::MAXSAMPLES);
564  esADCAnalogSignal.reserve(ESDataFrame::MAXSAMPLES);
565 
566  for (unsigned int digis = 0; digis < EcalDigiES->size(); ++digis) {
567  ESDataFrame esdf = (*preshowerDigi)[digis];
568  int nrSamples = esdf.size();
569 
570  ESDetId esid = esdf.id();
571 
572  for (int sample = 0; sample < nrSamples; ++sample) {
573  esADCCounts[sample] = 0.;
574  esADCAnalogSignal[sample] = 0.;
575  }
576 
577  for (int sample = 0; sample < nrSamples; ++sample) {
578  ESSample mySample = esdf[sample];
579 
580  esADCCounts[sample] = (mySample.adc());
581  esBaseline_ = m_ESpeds->find(esid)->getMean();
582  const double factor(esADCtokeV_ / (*(m_ESmips->getMap().find(esid))));
583  esThreshold_ = 3. * m_ESeffwei * ((*m_ESpeds->find(esid)).getRms()) / factor;
584  esADCAnalogSignal[sample] = (esADCCounts[sample] - esBaseline_) / factor;
585  }
586  LogDebug("DigiInfo") << "Preshower Digi for ESDetId: z side " << esid.zside() << " plane " << esid.plane()
587  << esid.six() << ',' << esid.siy() << ':' << esid.strip();
588  for (int i = 0; i < 3; i++) {
589  LogDebug("DigiInfo") << "sample " << i << " ADC = " << esADCCounts[i]
590  << " Analog eq = " << esADCAnalogSignal[i];
591  }
592 
593  if (esSignalSimMap[esid.rawId()] > esThreshold_ && meESShape_) {
594  for (int i = 0; i < 3; i++) {
595  meESShape_->Fill(i, esADCAnalogSignal[i]);
596  }
597  }
598  }
599  }
600 
601  EcalSubdetector thisDet = EcalPreshower;
602  computeSDBunchDigi(c, preshowerHits, esSignalSimMap, thisDet, esThreshold_, randomEngine(e.streamID()));
603  }
604 }
605 
607  // ADC -> GeV Scale
609  eventSetup.get<EcalADCToGeVConstantRcd>().get(pAgc);
610  const EcalADCToGeVConstant* agc = pAgc.product();
611 
612  EcalMGPAGainRatio* defaultRatios = new EcalMGPAGainRatio();
613 
614  gainConv_[1] = 1.;
615  gainConv_[2] = defaultRatios->gain12Over6();
616  gainConv_[3] = gainConv_[2] * (defaultRatios->gain6Over1());
617  gainConv_[0] = gainConv_[2] * (defaultRatios->gain6Over1());
618 
619  LogDebug("EcalDigi") << " Gains conversions: "
620  << "\n"
621  << " g1 = " << gainConv_[1] << "\n"
622  << " g2 = " << gainConv_[2] << "\n"
623  << " g3 = " << gainConv_[3];
624 
625  delete defaultRatios;
626 
627  const double barrelADCtoGeV_ = agc->getEBValue();
628  LogDebug("EcalDigi") << " Barrel GeV/ADC = " << barrelADCtoGeV_;
629  const double endcapADCtoGeV_ = agc->getEEValue();
630  LogDebug("EcalDigi") << " Endcap GeV/ADC = " << endcapADCtoGeV_;
631 
632  // ES condition objects
633  edm::ESHandle<ESGain> esgain_;
635  edm::ESHandle<ESPedestals> esPedestals_;
637 
638  eventSetup.get<ESGainRcd>().get(esgain_);
639  eventSetup.get<ESMIPToGeVConstantRcd>().get(esMIPToGeV_);
640  eventSetup.get<ESPedestalsRcd>().get(esPedestals_);
641  eventSetup.get<ESIntercalibConstantsRcd>().get(esMIPs_);
642 
643  const ESGain* esgain = esgain_.product();
644  m_ESpeds = esPedestals_.product();
645  m_ESmips = esMIPs_.product();
646  const ESMIPToGeVConstant* esMipToGeV = esMIPToGeV_.product();
647  m_ESgain = (int)esgain->getESGain();
648  const double valESMIPToGeV = (m_ESgain == 1) ? esMipToGeV->getESValueLow() : esMipToGeV->getESValueHigh();
649 
651 
652  esADCtokeV_ = 1000000. * valESMIPToGeV;
653 
654  m_ESeffwei = (0 == m_ESgain ? 1.45 : (1 == m_ESgain ? 0.9066 : (2 == m_ESgain ? 0.8815 : 1.0)));
655 }
656 
658  // Pedestals from event setup
659 
661  eventSetup.get<EcalPedestalsRcd>().get(dbPed);
662  thePedestals = dbPed.product();
663 }
664 
665 void EcalMixingModuleValidation::findPedestal(const DetId& detId, int gainId, double& ped) const {
667  // should I care if it doesn't get found?
668  if (mapItr == thePedestals->getMap().end()) {
669  edm::LogError("EcalMMValid") << "Could not find pedestal for " << detId.rawId() << " among the "
670  << thePedestals->getMap().size();
671  } else {
672  EcalPedestals::Item item = (*mapItr);
673 
674  switch (gainId) {
675  case 0:
676  ped = item.mean_x1;
677  break;
678  case 1:
679  ped = item.mean_x12;
680  break;
681  case 2:
682  ped = item.mean_x6;
683  break;
684  case 3:
685  ped = item.mean_x1;
686  break;
687  default:
688  edm::LogError("EcalMMValid") << "Bad Pedestal " << gainId;
689  break;
690  }
691  LogDebug("EcalMMValid") << "Pedestals for " << detId.rawId() << " gain range " << gainId << " : \n"
692  << "Mean = " << ped;
693  }
694 }
695 
698  MapType& SignalSimMap,
699  const EcalSubdetector& thisDet,
700  const double& theSimThreshold,
701  CLHEP::HepRandomEngine* engine) {
702  if (thisDet != EcalBarrel && thisDet != EcalEndcap && thisDet != EcalPreshower) {
703  edm::LogError("EcalMMValid") << "Invalid subdetector type";
704  return;
705  }
706  //bool isCrystal = true;
707  //if ( thisDet == EcalPreshower ) isCrystal = false;
708 
709  // load the geometry
710 
711  edm::ESHandle<CaloGeometry> hGeometry;
712  eventSetup.get<CaloGeometryRecord>().get(hGeometry);
713 
714  const CaloGeometry* pGeometry = &*hGeometry;
715 
716  // see if we need to update
717  if (pGeometry != theGeometry) {
718  theGeometry = pGeometry;
719  //theEcalResponse->setGeometry(theGeometry);
723  }
724 
725  // vector of DetId with energy above a fraction of the gun's energy
726 
727  const std::vector<DetId>& theSDId = theGeometry->getValidDetIds(DetId::Ecal, thisDet);
728 
729  std::vector<DetId> theOverThresholdId;
730  for (unsigned int i = 0; i < theSDId.size(); i++) {
731  int sdId = theSDId[i].rawId();
732  if (SignalSimMap[sdId] > theSimThreshold)
733  theOverThresholdId.push_back(theSDId[i]);
734  }
735 
737  if (thisDet == EcalPreshower)
739 
740  for (int iBunch = theMinBunch; iBunch <= theMaxBunch; iBunch++) {
741  //if ( isCrystal ) {
742  if (thisDet == EcalBarrel) {
743  theEBResponse->setBunchRange(iBunch, iBunch);
744  theEBResponse->clear();
745  theEBResponse->run(theHits, engine);
746  } else if (thisDet == EcalEndcap) {
747  theEEResponse->setBunchRange(iBunch, iBunch);
748  theEEResponse->clear();
749  theEEResponse->run(theHits, engine);
750  } else {
751  theESResponse->setBunchRange(iBunch, iBunch);
752  theESResponse->clear();
753  theESResponse->run(theHits, engine);
754  }
755 
756  int iHisto = iBunch - theMinBunch;
757 
758  for (std::vector<DetId>::const_iterator idItr = theOverThresholdId.begin(); idItr != theOverThresholdId.end();
759  ++idItr) {
760  CaloSamples* analogSignal;
761  //if ( isCrystal )
762  if (thisDet == EcalBarrel) {
763  analogSignal = theEBResponse->findSignal(*idItr);
764  } else if (thisDet == EcalEndcap) {
765  analogSignal = theEEResponse->findSignal(*idItr);
766  } else {
767  analogSignal = theESResponse->findSignal(*idItr);
768  }
769 
770  if (analogSignal) {
771  (*analogSignal) *= theParameterMap->simParameters(analogSignal->id()).photoelectronsToAnalog();
772 
773  for (int i = 0; i < limit; i++) {
774  if (thisDet == EcalBarrel) {
775  meEBBunchShape_[iHisto]->Fill(i, (float)(*analogSignal)[i]);
776  } else if (thisDet == EcalEndcap) {
777  meEEBunchShape_[iHisto]->Fill(i, (float)(*analogSignal)[i]);
778  } else if (thisDet == EcalPreshower) {
779  meESBunchShape_[iHisto]->Fill(i, (float)(*analogSignal)[i]);
780  }
781  }
782  }
783  }
784  }
785 }
786 
787 CLHEP::HepRandomEngine* EcalMixingModuleValidation::randomEngine(edm::StreamID const& streamID) {
788  unsigned int index = streamID.value();
789  if (index >= randomEngines_.size()) {
790  randomEngines_.resize(index + 1, nullptr);
791  }
792  CLHEP::HepRandomEngine* ptr = randomEngines_[index];
793  if (!ptr) {
795  ptr = &rng->getEngine(streamID);
796  randomEngines_[index] = ptr;
797  }
798  return ptr;
799 }
EcalDataFrame::MAXSAMPLES
static constexpr int MAXSAMPLES
Definition: EcalDataFrame.h:48
EcalCondObjectContainer::getMap
const self & getMap() const
Definition: EcalCondObjectContainer.h:78
EcalMixingModuleValidation::~EcalMixingModuleValidation
~EcalMixingModuleValidation() override
Destructor.
Definition: EcalMixingModuleValidation.cc:127
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
EcalCondObjectContainer::end
const_iterator end() const
Definition: EcalCondObjectContainer.h:74
ESPedestalsRcd
Definition: ESPedestalsRcd.h:5
edm::StreamID
Definition: StreamID.h:30
ESGain
Definition: ESGain.h:7
dqm::impl::MonitorElement
Definition: MonitorElement.h:98
EcalMixingModuleValidation::crossingFramePCaloHitEEToken_
edm::EDGetTokenT< CrossingFrame< PCaloHit > > crossingFramePCaloHitEEToken_
Definition: EcalMixingModuleValidation.h:110
EcalShapeBase::setEventSetup
void setEventSetup(const edm::EventSetup &evtSetup)
Definition: EcalShapeBase.cc:19
ecalLiteDTU::gainId
constexpr int gainId(sample_type sample)
get the gainId (2 bits)
Definition: EcalLiteDTUSample.h:14
edm::RandomNumberGenerator::getEngine
virtual CLHEP::HepRandomEngine & getEngine(StreamID const &)=0
Use this engine in event methods.
EBDetId::ieta
int ieta() const
get the crystal ieta
Definition: EBDetId.h:49
mps_fire.i
i
Definition: mps_fire.py:428
EcalMixingModuleValidation::thePedestals
const EcalPedestals * thePedestals
Definition: EcalMixingModuleValidation.h:177
ecalSimParameterMap_cff.syncPhase
syncPhase
Definition: ecalSimParameterMap_cff.py:10
HLT_FULL_cff.endcapHits
endcapHits
Definition: HLT_FULL_cff.py:84472
edm::Handle::product
T const * product() const
Definition: Handle.h:70
EcalMixingModuleValidation::HepMCToken_
edm::EDGetTokenT< edm::HepMCProduct > HepMCToken_
Definition: EcalMixingModuleValidation.h:104
ESGainRcd
Definition: ESGainRcd.h:5
simplePhotonAnalyzer_cfi.sample
sample
Definition: simplePhotonAnalyzer_cfi.py:12
EBShape
Definition: EBShape.h:6
EcalMixingModuleValidation::meEEbunchCrossing_
MonitorElement * meEEbunchCrossing_
Definition: EcalMixingModuleValidation.h:125
edm::Run
Definition: Run.h:45
CaloGeometryRecord
Definition: CaloGeometryRecord.h:30
EBDetId
Definition: EBDetId.h:17
edm
HLT enums.
Definition: AlignableModifier.h:19
RandomNumberGenerator.h
ESMIPToGeVConstantRcd
Definition: ESMIPToGeVConstantRcd.h:5
EBDataFrame
Definition: EBDataFrame.h:11
ecalSimParameterMap_cff.photoelectronsToAnalogEndcap
photoelectronsToAnalogEndcap
Definition: ecalSimParameterMap_cff.py:4
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
ESDetId::strip
int strip() const
Definition: ESDetId.h:47
EcalMixingModuleValidation::computeSDBunchDigi
void computeSDBunchDigi(const edm::EventSetup &eventSetup, const MixCollection< PCaloHit > &theHits, MapType &ebSignalSimMap, const EcalSubdetector &thisDet, const double &theSimThreshold, CLHEP::HepRandomEngine *)
Definition: EcalMixingModuleValidation.cc:696
gather_cfg.cout
cout
Definition: gather_cfg.py:144
EBDetId.h
EEDetId.h
ecalSimParameterMap_cff.samplingFactor
samplingFactor
Definition: ecalSimParameterMap_cff.py:7
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89281
ESCondObjectContainer::find
const_iterator find(uint32_t rawId) const
Definition: ESCondObjectContainer.h:33
ESDataFrame::size
int size() const
Definition: ESDataFrame.h:21
EcalMixingModuleValidation::meEBDigiMixRatiogt100ADC_
MonitorElement * meEBDigiMixRatiogt100ADC_
Definition: EcalMixingModuleValidation.h:118
dqm::implementation::NavigatorBase::setCurrentFolder
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
EcalMixingModuleValidation::theGeometry
const CaloGeometry * theGeometry
Definition: EcalMixingModuleValidation.h:174
timingPdfMaker.histo
histo
Definition: timingPdfMaker.py:279
EcalMixingModuleValidation::theESShape
ESShape * theESShape
Definition: EcalMixingModuleValidation.h:144
EcalMixingModuleValidation::meEEBunchShape_
MonitorElement * meEEBunchShape_[nBunch]
Definition: EcalMixingModuleValidation.h:131
EcalADCToGeVConstant
Definition: EcalADCToGeVConstant.h:13
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
edm::StreamID::value
unsigned int value() const
Definition: StreamID.h:43
EcalSubdetector
EcalSubdetector
Definition: EcalSubdetector.h:10
ESDetId
Definition: ESDetId.h:15
EcalMixingModuleValidation.h
EcalCondObjectContainer::size
size_t size() const
Definition: EcalCondObjectContainer.h:80
ESDetId.h
EcalMixingModuleValidation::EcalMixingModuleValidation
EcalMixingModuleValidation(const edm::ParameterSet &ps)
Constructor.
Definition: EcalMixingModuleValidation.cc:19
EcalMixingModuleValidation::crossingFramePCaloHitESToken_
edm::EDGetTokenT< CrossingFrame< PCaloHit > > crossingFramePCaloHitESToken_
Definition: EcalMixingModuleValidation.h:110
ecalSimParameterMap_cff.photoelectronsToAnalogBarrel
photoelectronsToAnalogBarrel
Definition: ecalSimParameterMap_cff.py:12
ESMIPToGeVConstant::getESValueHigh
float getESValueHigh() const
Definition: ESMIPToGeVConstant.h:15
CaloSamples::MAXSAMPLES
static const int MAXSAMPLES
Definition: CaloSamples.h:86
EEDetId::ix
int ix() const
Definition: EEDetId.h:77
edm::Handle< edm::HepMCProduct >
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
EcalDataFrame.h
EcalBarrel
Definition: EcalSubdetector.h:10
EcalMixingModuleValidation::crossingFramePCaloHitEBToken_
edm::EDGetTokenT< CrossingFrame< PCaloHit > > crossingFramePCaloHitEBToken_
Definition: EcalMixingModuleValidation.h:110
EBDataFrame::id
key_type id() const
Definition: EBDataFrame.h:28
EcalMixingModuleValidation::m_ESmips
const ESIntercalibConstants * m_ESmips
Definition: EcalMixingModuleValidation.h:181
ESDataFrame
Definition: ESDataFrame.h:10
EcalMixingModuleValidation::bookHistograms
void bookHistograms(DQMStore::IBooker &i, edm::Run const &, edm::EventSetup const &) override
Definition: EcalMixingModuleValidation.cc:135
EcalTrivialConditionRetriever.h
EcalMixingModuleValidation::m_ESpeds
const ESPedestals * m_ESpeds
Definition: EcalMixingModuleValidation.h:180
EcalMixingModuleValidation::meESbunchCrossing_
MonitorElement * meESbunchCrossing_
Definition: EcalMixingModuleValidation.h:126
EcalMixingModuleValidation::EBdigiCollectionToken_
edm::EDGetTokenT< EBDigiCollection > EBdigiCollectionToken_
Definition: EcalMixingModuleValidation.h:106
DetId
Definition: DetId.h:17
CrossingFrame
Definition: CrossingFrame.h:37
CaloGeometry
Definition: CaloGeometry.h:21
EcalMixingModuleValidation::theMinBunch
int theMinBunch
Definition: EcalMixingModuleValidation.h:171
EcalMixingModuleValidation::EEdigiCollectionToken_
edm::EDGetTokenT< EEDigiCollection > EEdigiCollectionToken_
Definition: EcalMixingModuleValidation.h:107
EcalMixingModuleValidation::meEBShapeRatio_
MonitorElement * meEBShapeRatio_
Definition: EcalMixingModuleValidation.h:138
EcalSimParameterMap
Definition: EcalSimParameterMap.h:11
hcalSimParameters_cfi.readoutFrameSize
readoutFrameSize
Definition: hcalSimParameters_cfi.py:14
edm::EventSetup::get
T get() const
Definition: EventSetup.h:87
EcalMixingModuleValidation::m_ESeffwei
double m_ESeffwei
Definition: EcalMixingModuleValidation.h:182
MixCollection
Definition: MixCollection.h:10
Service.h
EcalMixingModuleValidation::esBaseline_
double esBaseline_
Definition: EcalMixingModuleValidation.h:167
edm::DataFrameContainer::empty
bool empty() const
Definition: DataFrameContainer.h:160
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
EcalMixingModuleValidation::meESShapeRatio_
MonitorElement * meESShapeRatio_
Definition: EcalMixingModuleValidation.h:140
ESDataFrame::MAXSAMPLES
static const int MAXSAMPLES
Definition: ESDataFrame.h:30
edm::ESHandle< EcalADCToGeVConstant >
EEDataFrame::id
key_type id() const
Definition: EEDataFrame.h:24
dqm::implementation::IBooker::bookProfile
MonitorElement * bookProfile(TString const &name, TString const &title, int nchX, double lowX, double highX, int, double lowY, double highY, char const *option="s", FUNC onbooking=NOOP())
Definition: DQMStore.h:322
EcalCondObjectContainer::find
const_iterator find(uint32_t rawId) const
Definition: EcalCondObjectContainer.h:53
DQMScaleToClient_cfi.factor
factor
Definition: DQMScaleToClient_cfi.py:8
EEDetId::zside
int zside() const
Definition: EEDetId.h:71
EcalMixingModuleValidation::gainConv_
std::map< int, double, std::less< int > > gainConv_
Definition: EcalMixingModuleValidation.h:113
ESIntercalibConstantsRcd
Definition: ESIntercalibConstantsRcd.h:5
ESGain::getESGain
float getESGain() const
Definition: ESGain.h:13
EEShape
Definition: EEShape.h:6
EcalMixingModuleValidation::verbose_
bool verbose_
Definition: EcalMixingModuleValidation.h:100
EcalMixingModuleValidation::theEBResponse
CaloHitResponse * theEBResponse
Definition: EcalMixingModuleValidation.h:150
EcalMixingModuleValidation::bunchSumTest
void bunchSumTest(std::vector< MonitorElement * > &theBunches, MonitorElement *&theTotal, MonitorElement *&theRatio, int nSample)
Definition: EcalMixingModuleValidation.cc:216
EcalMixingModuleValidation::meEEShape_
MonitorElement * meEEShape_
Definition: EcalMixingModuleValidation.h:135
EcalMGPAGainRatio::gain12Over6
float gain12Over6() const
Definition: EcalMGPAGainRatio.h:19
particleFlowDisplacedVertex_cfi.ratio
ratio
Definition: particleFlowDisplacedVertex_cfi.py:93
edm::DataFrameContainer::reserve
void reserve(size_t isize)
Definition: DataFrameContainer.h:86
EEDetId
Definition: EEDetId.h:14
CaloGeometryRecord.h
ESDigiCollection
Definition: EcalDigiCollections.h:82
EcalMixingModuleValidation::meESShape_
MonitorElement * meESShape_
Definition: EcalMixingModuleValidation.h:136
EcalMixingModuleValidation::dqmEndRun
void dqmEndRun(const edm::Run &r, const edm::EventSetup &c) override
Definition: EcalMixingModuleValidation.cc:191
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
EcalEndcap
Definition: EcalSubdetector.h:10
ESSample
Definition: ESSample.h:7
HLT_FULL_cff.barrelHits
barrelHits
Definition: HLT_FULL_cff.py:84487
PixelPluginsPhase0_cfi.isBarrel
isBarrel
Definition: PixelPluginsPhase0_cfi.py:17
EcalMixingModuleValidation::m_ESgain
int m_ESgain
Definition: EcalMixingModuleValidation.h:179
EcalMixingModuleValidation::checkCalibrations
void checkCalibrations(edm::EventSetup const &c)
Definition: EcalMixingModuleValidation.cc:606
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:233
edm::ParameterSet
Definition: ParameterSet.h:47
EcalADCToGeVConstant::getEEValue
float getEEValue() const
Definition: EcalADCToGeVConstant.h:21
EcalMixingModuleValidation::barrelADCtoGeV_
double barrelADCtoGeV_
Definition: EcalMixingModuleValidation.h:115
EcalCondObjectContainer::Item
T Item
Definition: EcalCondObjectContainer.h:15
EcalMixingModuleValidation::findPedestal
void findPedestal(const DetId &detId, int gainId, double &ped) const
Definition: EcalMixingModuleValidation.cc:665
EBDigiCollection
Definition: EcalDigiCollections.h:56
EEDigiCollection
Definition: EcalDigiCollections.h:69
CaloHitResponse::setBunchRange
void setBunchRange(int minBunch, int maxBunch)
tells it which pileup bunches to do
Definition: CaloHitResponse.cc:53
EcalMixingModuleValidation::checkPedestals
void checkPedestals(const edm::EventSetup &c)
Definition: EcalMixingModuleValidation.cc:657
EcalMixingModuleValidation::theMaxBunch
int theMaxBunch
Definition: EcalMixingModuleValidation.h:172
EcalMixingModuleValidation::theEEShape
EEShape * theEEShape
Definition: EcalMixingModuleValidation.h:146
EcalPedestalsMapIterator
EcalPedestalsMap::const_iterator EcalPedestalsMapIterator
Definition: EcalPedestals.h:49
CaloHitResponse
Creates electronics signals from hits.
Definition: CaloHitResponse.h:33
CaloSamples::id
DetId id() const
get the (generic) id
Definition: CaloSamples.h:21
edm::Service< edm::RandomNumberGenerator >
createfilelist.int
int
Definition: createfilelist.py:10
EcalMixingModuleValidation::meEEDigiMixRatioOriggt40pc_
MonitorElement * meEEDigiMixRatioOriggt40pc_
Definition: EcalMixingModuleValidation.h:122
EcalSimParameterMap::simParameters
const CaloSimParameters & simParameters(const DetId &id) const override
return the sim parameters relative to the right subdet
Definition: EcalSimParameterMap.cc:52
ecalSimParameterMap_cff.timePhase
timePhase
Definition: ecalSimParameterMap_cff.py:8
EcalMixingModuleValidation::meEEDigiMixRatiogt100ADC_
MonitorElement * meEEDigiMixRatiogt100ADC_
Definition: EcalMixingModuleValidation.h:119
ecalTB2006H4_GenSimDigiReco_cfg.mySample
mySample
Definition: ecalTB2006H4_GenSimDigiReco_cfg.py:5
B2GTnPMonitor_cfi.item
item
Definition: B2GTnPMonitor_cfi.py:147
ESMIPToGeVConstant
Definition: ESMIPToGeVConstant.h:7
edm::EventSetup
Definition: EventSetup.h:58
CaloSamples
Definition: CaloSamples.h:14
PCaloHit
Definition: PCaloHit.h:8
edm::HepMCProduct::GetEvent
const HepMC::GenEvent * GetEvent() const
Definition: HepMCProduct.h:37
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
DetId::Ecal
Definition: DetId.h:27
get
#define get
EcalMixingModuleValidation::randomEngine
CLHEP::HepRandomEngine * randomEngine(edm::StreamID const &streamID)
Definition: EcalMixingModuleValidation.cc:787
EEDetId::iy
int iy() const
Definition: EEDetId.h:83
EcalMixingModuleValidation::meEEShapeRatio_
MonitorElement * meEEShapeRatio_
Definition: EcalMixingModuleValidation.h:139
EcalMGPASample
Definition: EcalMGPASample.h:22
EcalMixingModuleValidation::ESdigiCollectionToken_
edm::EDGetTokenT< ESDigiCollection > ESdigiCollectionToken_
Definition: EcalMixingModuleValidation.h:108
ecalEBTriggerPrimitiveDigis_cfi.binOfMaximum
binOfMaximum
Definition: ecalEBTriggerPrimitiveDigis_cfi.py:9
EcalMixingModuleValidation::dqmBeginRun
void dqmBeginRun(edm::Run const &, edm::EventSetup const &) override
Definition: EcalMixingModuleValidation.cc:129
EcalMixingModuleValidation::esThreshold_
double esThreshold_
Definition: EcalMixingModuleValidation.h:169
EcalMixingModuleValidation::randomEngines_
std::vector< CLHEP::HepRandomEngine * > randomEngines_
Definition: EcalMixingModuleValidation.h:184
EcalMixingModuleValidation::endcapADCtoGeV_
double endcapADCtoGeV_
Definition: EcalMixingModuleValidation.h:116
ESDetId::plane
int plane() const
Definition: ESDetId.h:41
EcalPreshower
Definition: EcalSubdetector.h:10
ecalSimParameterMap_cff.simHitToPhotoelectronsBarrel
simHitToPhotoelectronsBarrel
Definition: ecalSimParameterMap_cff.py:9
ESDetId::six
int six() const
Definition: ESDetId.h:43
EcalMixingModuleValidation::analyze
void analyze(edm::Event const &e, edm::EventSetup const &c) override
Analyze.
Definition: EcalMixingModuleValidation.cc:270
ESMIPToGeVConstant::getESValueLow
float getESValueLow() const
Definition: ESMIPToGeVConstant.h:13
dqm::impl::MonitorElement::setBinContent
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
Definition: MonitorElement.cc:691
std
Definition: JetResolutionObject.h:76
DetId::rawId
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
writedatasetfile.run
run
Definition: writedatasetfile.py:27
ecalSimParameterMap_cff.doPhotostatistics
doPhotostatistics
Definition: ecalSimParameterMap_cff.py:11
CaloGeometry::getValidDetIds
std::vector< DetId > getValidDetIds() const
Get the list of all valid detector ids.
Definition: CaloGeometry.cc:75
ESCondObjectContainer::getMap
const self & getMap() const
Definition: ESCondObjectContainer.h:41
dataAnalyzerFineBiningParameters_cff.Pmax
Pmax
Definition: dataAnalyzerFineBiningParameters_cff.py:10
bscTrigger_cfi.theHits
theHits
Definition: bscTrigger_cfi.py:18
remoteMonitoring_LED_IterMethod_cfg.limit
limit
Definition: remoteMonitoring_LED_IterMethod_cfg.py:427
EcalMixingModuleValidation::meESBunchShape_
MonitorElement * meESBunchShape_[nBunch]
Definition: EcalMixingModuleValidation.h:132
EcalMixingModuleValidation::meEBShape_
MonitorElement * meEBShape_
Definition: EcalMixingModuleValidation.h:134
EcalMixingModuleValidation::meEBDigiMixRatioOriggt50pc_
MonitorElement * meEBDigiMixRatioOriggt50pc_
Definition: EcalMixingModuleValidation.h:121
EcalMixingModuleValidation::meEBBunchShape_
MonitorElement * meEBBunchShape_[nBunch]
Definition: EcalMixingModuleValidation.h:130
EcalMixingModuleValidation::theParameterMap
const EcalSimParameterMap * theParameterMap
Definition: EcalMixingModuleValidation.h:142
EcalMGPAGainRatio::gain6Over1
float gain6Over1() const
Definition: EcalMGPAGainRatio.h:20
hcalSimParameters_cfi.photoelectronsToAnalog
photoelectronsToAnalog
Definition: hcalSimParameters_cfi.py:18
dqm::impl::MonitorElement::setBinError
virtual void setBinError(int binx, double error)
set uncertainty on content of bin (1-D)
Definition: MonitorElement.cc:709
ESDetId::siy
int siy() const
Definition: ESDetId.h:45
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
EcalMixingModuleValidation::theESResponse
CaloHitResponse * theESResponse
Definition: EcalMixingModuleValidation.h:149
CaloHitResponse::findSignal
CaloSamples * findSignal(const DetId &detId)
users can look for the signal for a given cell
Definition: CaloHitResponse.cc:164
dqm::implementation::IBooker
Definition: DQMStore.h:43
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
EcalDataFrame::size
int size() const
Definition: EcalDataFrame.h:26
dqmMemoryStats.total
total
Definition: dqmMemoryStats.py:152
funct::pow
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29
EBDetId::iphi
int iphi() const
get the crystal iphi
Definition: EBDetId.h:51
HepMCProduct
EcalPedestalsRcd
Definition: EcalPedestalsRcd.h:5
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:46
dqm::impl::MonitorElement::getBinError
virtual double getBinError(int binx) const
get uncertainty on content of bin (1-D) - See TH1::GetBinError for details
Definition: MonitorElement.cc:610
EcalMixingModuleValidation::theEEResponse
CaloHitResponse * theEEResponse
Definition: EcalMixingModuleValidation.h:151
ESShape::setGain
void setGain(const int gain)
Definition: ESShape.h:23
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
EcalMixingModuleValidation::meEBbunchCrossing_
MonitorElement * meEBbunchCrossing_
Definition: EcalMixingModuleValidation.h:124
EEDataFrame
Definition: EEDataFrame.h:12
edm::Event
Definition: Event.h:73
CaloHitResponse::clear
void clear()
frees up memory
Definition: CaloHitResponse.h:79
gedPhotons_cfi.preshowerHits
preshowerHits
Definition: gedPhotons_cfi.py:47
ESShape
Definition: ESShape.h:16
StreamID.h
GeomDetEnumerators::isEndcap
bool isEndcap(GeomDetEnumerators::SubDetector m)
Definition: GeomDetEnumerators.cc:62
ecalSimParameterMap_cff.simHitToPhotoelectronsEndcap
simHitToPhotoelectronsEndcap
Definition: ecalSimParameterMap_cff.py:6
EcalADCToGeVConstant::getEBValue
float getEBValue() const
Definition: EcalADCToGeVConstant.h:20
EcalMixingModuleValidation::MapType
std::map< uint32_t, float, std::less< uint32_t > > MapType
Definition: EcalMixingModuleValidation.h:73
dqm::impl::MonitorElement::getBinContent
virtual double getBinContent(int binx) const
get content of bin (1-D)
Definition: MonitorElement.cc:592
EcalADCToGeVConstantRcd
Definition: EcalADCToGeVConstantRcd.h:5
EcalMixingModuleValidation::theEBShape
EBShape * theEBShape
Definition: EcalMixingModuleValidation.h:145
ESDetId::zside
int zside() const
Definition: ESDetId.h:39
ESDataFrame::id
const ESDetId & id() const
Definition: ESDataFrame.h:19
CaloHitResponse::setGeometry
void setGeometry(const CaloGeometry *geometry)
geometry needed for time-of-flight
Definition: CaloHitResponse.h:49
EcalMixingModuleValidation::nBunch
static const int nBunch
Definition: EcalMixingModuleValidation.h:128
dqm::implementation::IBooker::book1D
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
EcalMGPAGainRatio
Definition: EcalMGPAGainRatio.h:13
EcalMixingModuleValidation::esADCtokeV_
double esADCtokeV_
Definition: EcalMixingModuleValidation.h:168
edm::DataFrameContainer::size
size_type size() const
Definition: DataFrameContainer.h:162
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
CaloHitResponse::run
virtual void run(const MixCollection< PCaloHit > &hits, CLHEP::HepRandomEngine *)
Complete cell digitization.
Definition: CaloHitResponse.cc:58