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