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  for (int i = 0; i < nBunch; i++) {
196  theBunches.push_back(meEBBunchShape_[i]);
197  }
199 
200  theBunches.clear();
201 
202  for (int i = 0; i < nBunch; i++) {
203  theBunches.push_back(meEEBunchShape_[i]);
204  }
206 
207  theBunches.clear();
208 
209  for (int i = 0; i < nBunch; i++) {
210  theBunches.push_back(meESBunchShape_[i]);
211  }
213 }
214 
215 void EcalMixingModuleValidation::bunchSumTest(std::vector<MonitorElement*>& theBunches,
216  MonitorElement*& theTotal,
217  MonitorElement*& theRatio,
218  int nSample) {
219  std::vector<double> bunchSum;
220  bunchSum.reserve(nSample);
221  std::vector<double> bunchSumErro;
222  bunchSumErro.reserve(nSample);
223  std::vector<double> total;
224  total.reserve(nSample);
225  std::vector<double> totalErro;
226  totalErro.reserve(nSample);
227  std::vector<double> ratio;
228  ratio.reserve(nSample);
229  std::vector<double> ratioErro;
230  ratioErro.reserve(nSample);
231 
232  for (int iEl = 0; iEl < nSample; iEl++) {
233  bunchSum[iEl] = 0.;
234  bunchSumErro[iEl] = 0.;
235  total[iEl] = 0.;
236  totalErro[iEl] = 0.;
237  ratio[iEl] = 0.;
238  ratioErro[iEl] = 0.;
239  }
240 
241  for (int iSample = 0; iSample < nSample; iSample++) {
242  total[iSample] += theTotal->getBinContent(iSample + 1);
243  totalErro[iSample] += theTotal->getBinError(iSample + 1);
244 
245  for (int iBunch = theMinBunch; iBunch <= theMaxBunch; iBunch++) {
246  int iHisto = iBunch - theMinBunch;
247 
248  bunchSum[iSample] += theBunches[iHisto]->getBinContent(iSample + 1);
249  bunchSumErro[iSample] += pow(theBunches[iHisto]->getBinError(iSample + 1), 2);
250  }
251  bunchSumErro[iSample] = sqrt(bunchSumErro[iSample]);
252 
253  if (bunchSum[iSample] > 0.) {
254  ratio[iSample] = total[iSample] / bunchSum[iSample];
255  ratioErro[iSample] =
256  sqrt(pow(totalErro[iSample] / bunchSum[iSample], 2) +
257  pow((total[iSample] * bunchSumErro[iSample]) / (bunchSum[iSample] * bunchSum[iSample]), 2));
258  }
259 
260  std::cout << " Sample = " << iSample << " Total = " << total[iSample] << " +- " << totalErro[iSample] << "\n"
261  << " Sum = " << bunchSum[iSample] << " +- " << bunchSumErro[iSample] << "\n"
262  << " Ratio = " << ratio[iSample] << " +- " << ratioErro[iSample] << std::endl;
263 
264  theRatio->setBinContent(iSample + 1, (float)ratio[iSample]);
265  theRatio->setBinError(iSample + 1, (float)ratioErro[iSample]);
266  }
267 }
268 
270  //LogInfo("EventInfo") << " Run = " << e.id().run() << " Event = " << e.id().event();
271 
272  checkPedestals(c);
273 
274  std::vector<SimTrack> theSimTracks;
275  std::vector<SimVertex> theSimVertexes;
276 
278  edm::Handle<CrossingFrame<PCaloHit> > crossingFrame;
282 
283  bool skipMC = false;
284  e.getByToken(HepMCToken_, MCEvt);
285  if (!MCEvt.isValid()) {
286  skipMC = true;
287  }
288 
289  const EBDigiCollection* EBdigis = nullptr;
290  const EEDigiCollection* EEdigis = nullptr;
291  const ESDigiCollection* ESdigis = nullptr;
292 
293  bool isBarrel = true;
294  e.getByToken(EBdigiCollectionToken_, EcalDigiEB);
295  if (EcalDigiEB.isValid()) {
296  EBdigis = EcalDigiEB.product();
297  LogDebug("DigiInfo") << "total # EBdigis: " << EBdigis->size();
298  if (EBdigis->empty())
299  isBarrel = false;
300  } else {
301  isBarrel = false;
302  }
303 
304  bool isEndcap = true;
305  e.getByToken(EEdigiCollectionToken_, EcalDigiEE);
306  if (EcalDigiEE.isValid()) {
307  EEdigis = EcalDigiEE.product();
308  LogDebug("DigiInfo") << "total # EEdigis: " << EEdigis->size();
309  if (EEdigis->empty())
310  isEndcap = false;
311  } else {
312  isEndcap = false;
313  }
314 
315  bool isPreshower = true;
316  e.getByToken(ESdigiCollectionToken_, EcalDigiES);
317  if (EcalDigiES.isValid()) {
318  ESdigis = EcalDigiES.product();
319  LogDebug("DigiInfo") << "total # ESdigis: " << ESdigis->size();
320  if (ESdigis->empty())
321  isPreshower = false;
322  } else {
323  isPreshower = false;
324  }
325 
326  double theGunEnergy = 0.;
327  if (!skipMC) {
328  for (HepMC::GenEvent::particle_const_iterator p = MCEvt->GetEvent()->particles_begin();
329  p != MCEvt->GetEvent()->particles_end();
330  ++p) {
331  theGunEnergy = (*p)->momentum().e();
332  }
333  }
334  // in case no HepMC available, assume an arbitrary average energy for an interesting "gun"
335  else {
336  edm::LogWarning("DigiInfo") << "No HepMC available, using 30 GeV as giun energy";
337  theGunEnergy = 30.;
338  }
339 
340  // BARREL
341 
342  // loop over simHits
343 
344  if (isBarrel) {
345  e.getByToken(crossingFramePCaloHitEBToken_, crossingFrame);
346  const MixCollection<PCaloHit> barrelHits(crossingFrame.product());
347 
348  MapType ebSignalSimMap;
349 
350  double ebSimThreshold = 0.5 * theGunEnergy;
351 
352  for (auto const& iHit : barrelHits) {
353  EBDetId ebid = EBDetId(iHit.id());
354 
355  LogDebug("HitInfo") << " CaloHit " << iHit.getName() << "\n"
356  << " DetID = " << iHit.id() << " EBDetId = " << ebid.ieta() << " " << ebid.iphi() << "\n"
357  << " Time = " << iHit.time() << " Event id. = " << iHit.eventId().rawId() << "\n"
358  << " Track Id = " << iHit.geantTrackId() << "\n"
359  << " Energy = " << iHit.energy();
360 
361  uint32_t crystid = ebid.rawId();
362 
363  if (iHit.eventId().rawId() == 0)
364  ebSignalSimMap[crystid] += iHit.energy();
365 
366  if (meEBbunchCrossing_)
367  meEBbunchCrossing_->Fill(iHit.eventId().bunchCrossing());
368  }
369 
370  // loop over Digis
371 
372  const EBDigiCollection* barrelDigi = EcalDigiEB.product();
373 
374  std::vector<double> ebAnalogSignal;
375  std::vector<double> ebADCCounts;
376  std::vector<double> ebADCGains;
377  ebAnalogSignal.reserve(EBDataFrame::MAXSAMPLES);
378  ebADCCounts.reserve(EBDataFrame::MAXSAMPLES);
379  ebADCGains.reserve(EBDataFrame::MAXSAMPLES);
380 
381  for (unsigned int digis = 0; digis < EcalDigiEB->size(); ++digis) {
382  EBDataFrame ebdf = (*barrelDigi)[digis];
383  int nrSamples = ebdf.size();
384 
385  EBDetId ebid = ebdf.id();
386 
387  double Emax = 0.;
388  int Pmax = 0;
389 
390  for (int sample = 0; sample < nrSamples; ++sample) {
391  ebAnalogSignal[sample] = 0.;
392  ebADCCounts[sample] = 0.;
393  ebADCGains[sample] = -1.;
394  }
395 
396  for (int sample = 0; sample < nrSamples; ++sample) {
398 
399  ebADCCounts[sample] = (mySample.adc());
400  ebADCGains[sample] = (mySample.gainId());
401  ebAnalogSignal[sample] = (ebADCCounts[sample] * gainConv_[(int)ebADCGains[sample]] * barrelADCtoGeV_);
402  if (Emax < ebAnalogSignal[sample]) {
403  Emax = ebAnalogSignal[sample];
404  Pmax = sample;
405  }
406  LogDebug("DigiInfo") << "EB sample " << sample << " ADC counts = " << ebADCCounts[sample]
407  << " Gain Id = " << ebADCGains[sample] << " Analog eq = " << ebAnalogSignal[sample];
408  }
409  double pedestalPreSampleAnalog = 0.;
410  findPedestal(ebid, (int)ebADCGains[Pmax], pedestalPreSampleAnalog);
411  pedestalPreSampleAnalog *= gainConv_[(int)ebADCGains[Pmax]] * barrelADCtoGeV_;
412  double Erec = Emax - pedestalPreSampleAnalog;
413 
414  if (ebSignalSimMap[ebid.rawId()] != 0.) {
415  LogDebug("DigiInfo") << " Digi / Signal Hit = " << Erec << " / " << ebSignalSimMap[ebid.rawId()] << " gainConv "
416  << gainConv_[(int)ebADCGains[Pmax]];
417  if (Erec > 100. * barrelADCtoGeV_ && meEBDigiMixRatiogt100ADC_)
418  meEBDigiMixRatiogt100ADC_->Fill(Erec / ebSignalSimMap[ebid.rawId()]);
419  if (ebSignalSimMap[ebid.rawId()] > ebSimThreshold && meEBDigiMixRatioOriggt50pc_)
420  meEBDigiMixRatioOriggt50pc_->Fill(Erec / ebSignalSimMap[ebid.rawId()]);
421  if (ebSignalSimMap[ebid.rawId()] > ebSimThreshold && meEBShape_) {
422  for (int i = 0; i < 10; i++) {
423  pedestalPreSampleAnalog = 0.;
424  findPedestal(ebid, (int)ebADCGains[i], pedestalPreSampleAnalog);
425  pedestalPreSampleAnalog *= gainConv_[(int)ebADCGains[i]] * barrelADCtoGeV_;
426  meEBShape_->Fill(i, ebAnalogSignal[i] - pedestalPreSampleAnalog);
427  }
428  }
429  }
430  }
431 
432  EcalSubdetector thisDet = EcalBarrel;
433  computeSDBunchDigi(c, barrelHits, ebSignalSimMap, thisDet, ebSimThreshold, randomEngine(e.streamID()));
434  }
435 
436  // ENDCAP
437 
438  // loop over simHits
439 
440  if (isEndcap) {
441  e.getByToken(crossingFramePCaloHitEEToken_, crossingFrame);
442  const MixCollection<PCaloHit> endcapHits(crossingFrame.product());
443  MapType eeSignalSimMap;
444 
445  double eeSimThreshold = 0.4 * theGunEnergy;
446 
447  for (auto const& iHit : endcapHits) {
448  EEDetId eeid = EEDetId(iHit.id());
449 
450  LogDebug("HitInfo") << " CaloHit " << iHit.getName() << "\n"
451  << " DetID = " << iHit.id() << " EEDetId side = " << eeid.zside() << " = " << eeid.ix() << " "
452  << eeid.iy() << "\n"
453  << " Time = " << iHit.time() << " Event id. = " << iHit.eventId().rawId() << "\n"
454  << " Track Id = " << iHit.geantTrackId() << "\n"
455  << " Energy = " << iHit.energy();
456 
457  uint32_t crystid = eeid.rawId();
458 
459  if (iHit.eventId().rawId() == 0)
460  eeSignalSimMap[crystid] += iHit.energy();
461 
462  if (meEEbunchCrossing_)
463  meEEbunchCrossing_->Fill(iHit.eventId().bunchCrossing());
464  }
465 
466  // loop over Digis
467 
468  const EEDigiCollection* endcapDigi = EcalDigiEE.product();
469 
470  std::vector<double> eeAnalogSignal;
471  std::vector<double> eeADCCounts;
472  std::vector<double> eeADCGains;
473  eeAnalogSignal.reserve(EEDataFrame::MAXSAMPLES);
474  eeADCCounts.reserve(EEDataFrame::MAXSAMPLES);
475  eeADCGains.reserve(EEDataFrame::MAXSAMPLES);
476 
477  for (unsigned int digis = 0; digis < EcalDigiEE->size(); ++digis) {
478  EEDataFrame eedf = (*endcapDigi)[digis];
479  int nrSamples = eedf.size();
480 
481  EEDetId eeid = eedf.id();
482 
483  double Emax = 0.;
484  int Pmax = 0;
485 
486  for (int sample = 0; sample < nrSamples; ++sample) {
487  eeAnalogSignal[sample] = 0.;
488  eeADCCounts[sample] = 0.;
489  eeADCGains[sample] = -1.;
490  }
491 
492  for (int sample = 0; sample < nrSamples; ++sample) {
494 
495  eeADCCounts[sample] = (mySample.adc());
496  eeADCGains[sample] = (mySample.gainId());
497  eeAnalogSignal[sample] = (eeADCCounts[sample] * gainConv_[(int)eeADCGains[sample]] * endcapADCtoGeV_);
498  if (Emax < eeAnalogSignal[sample]) {
499  Emax = eeAnalogSignal[sample];
500  Pmax = sample;
501  }
502  LogDebug("DigiInfo") << "EE sample " << sample << " ADC counts = " << eeADCCounts[sample]
503  << " Gain Id = " << eeADCGains[sample] << " Analog eq = " << eeAnalogSignal[sample];
504  }
505  double pedestalPreSampleAnalog = 0.;
506  findPedestal(eeid, (int)eeADCGains[Pmax], pedestalPreSampleAnalog);
507  pedestalPreSampleAnalog *= gainConv_[(int)eeADCGains[Pmax]] * endcapADCtoGeV_;
508  double Erec = Emax - pedestalPreSampleAnalog;
509 
510  if (eeSignalSimMap[eeid.rawId()] != 0.) {
511  LogDebug("DigiInfo") << " Digi / Signal Hit = " << Erec << " / " << eeSignalSimMap[eeid.rawId()] << " gainConv "
512  << gainConv_[(int)eeADCGains[Pmax]];
513  if (Erec > 100. * endcapADCtoGeV_ && meEEDigiMixRatiogt100ADC_)
514  meEEDigiMixRatiogt100ADC_->Fill(Erec / eeSignalSimMap[eeid.rawId()]);
515  if (eeSignalSimMap[eeid.rawId()] > eeSimThreshold && meEEDigiMixRatioOriggt40pc_)
516  meEEDigiMixRatioOriggt40pc_->Fill(Erec / eeSignalSimMap[eeid.rawId()]);
517  if (eeSignalSimMap[eeid.rawId()] > eeSimThreshold && meEBShape_) {
518  for (int i = 0; i < 10; i++) {
519  pedestalPreSampleAnalog = 0.;
520  findPedestal(eeid, (int)eeADCGains[i], pedestalPreSampleAnalog);
521  pedestalPreSampleAnalog *= gainConv_[(int)eeADCGains[i]] * endcapADCtoGeV_;
522  meEEShape_->Fill(i, eeAnalogSignal[i] - pedestalPreSampleAnalog);
523  }
524  }
525  }
526  }
527 
528  EcalSubdetector thisDet = EcalEndcap;
529  computeSDBunchDigi(c, endcapHits, eeSignalSimMap, thisDet, eeSimThreshold, randomEngine(e.streamID()));
530  }
531 
532  if (isPreshower) {
533  e.getByToken(crossingFramePCaloHitESToken_, crossingFrame);
534  const MixCollection<PCaloHit> preshowerHits(crossingFrame.product());
535 
536  MapType esSignalSimMap;
537 
538  for (auto const& iHit : preshowerHits) {
539  ESDetId esid = ESDetId(iHit.id());
540 
541  LogDebug("HitInfo") << " CaloHit " << iHit.getName() << "\n"
542  << " DetID = " << iHit.id() << "ESDetId: z side " << esid.zside() << " plane "
543  << esid.plane() << esid.six() << ',' << esid.siy() << ':' << esid.strip() << "\n"
544  << " Time = " << iHit.time() << " Event id. = " << iHit.eventId().rawId() << "\n"
545  << " Track Id = " << iHit.geantTrackId() << "\n"
546  << " Energy = " << iHit.energy();
547 
548  uint32_t stripid = esid.rawId();
549 
550  if (iHit.eventId().rawId() == 0)
551  esSignalSimMap[stripid] += iHit.energy();
552 
553  if (meESbunchCrossing_)
554  meESbunchCrossing_->Fill(iHit.eventId().bunchCrossing());
555 
556  // loop over Digis
557 
558  const ESDigiCollection* preshowerDigi = EcalDigiES.product();
559 
560  std::vector<double> esADCCounts;
561  std::vector<double> esADCAnalogSignal;
562  esADCCounts.reserve(ESDataFrame::MAXSAMPLES);
563  esADCAnalogSignal.reserve(ESDataFrame::MAXSAMPLES);
564 
565  for (unsigned int digis = 0; digis < EcalDigiES->size(); ++digis) {
566  ESDataFrame esdf = (*preshowerDigi)[digis];
567  int nrSamples = esdf.size();
568 
569  ESDetId esid = esdf.id();
570 
571  for (int sample = 0; sample < nrSamples; ++sample) {
572  esADCCounts[sample] = 0.;
573  esADCAnalogSignal[sample] = 0.;
574  }
575 
576  for (int sample = 0; sample < nrSamples; ++sample) {
577  ESSample mySample = esdf[sample];
578 
579  esADCCounts[sample] = (mySample.adc());
580  esBaseline_ = m_ESpeds->find(esid)->getMean();
581  const double factor(esADCtokeV_ / (*(m_ESmips->getMap().find(esid))));
582  esThreshold_ = 3. * m_ESeffwei * ((*m_ESpeds->find(esid)).getRms()) / factor;
583  esADCAnalogSignal[sample] = (esADCCounts[sample] - esBaseline_) / factor;
584  }
585  LogDebug("DigiInfo") << "Preshower Digi for ESDetId: z side " << esid.zside() << " plane " << esid.plane()
586  << esid.six() << ',' << esid.siy() << ':' << esid.strip();
587  for (int i = 0; i < 3; i++) {
588  LogDebug("DigiInfo") << "sample " << i << " ADC = " << esADCCounts[i]
589  << " Analog eq = " << esADCAnalogSignal[i];
590  }
591 
592  if (esSignalSimMap[esid.rawId()] > esThreshold_ && meESShape_) {
593  for (int i = 0; i < 3; i++) {
594  meESShape_->Fill(i, esADCAnalogSignal[i]);
595  }
596  }
597  }
598  }
599 
600  EcalSubdetector thisDet = EcalPreshower;
601  computeSDBunchDigi(c, preshowerHits, esSignalSimMap, thisDet, esThreshold_, randomEngine(e.streamID()));
602  }
603 }
604 
606  // ADC -> GeV Scale
608  eventSetup.get<EcalADCToGeVConstantRcd>().get(pAgc);
609  const EcalADCToGeVConstant* agc = pAgc.product();
610 
611  EcalMGPAGainRatio* defaultRatios = new EcalMGPAGainRatio();
612 
613  gainConv_[1] = 1.;
614  gainConv_[2] = defaultRatios->gain12Over6();
615  gainConv_[3] = gainConv_[2] * (defaultRatios->gain6Over1());
616  gainConv_[0] = gainConv_[2] * (defaultRatios->gain6Over1());
617 
618  LogDebug("EcalDigi") << " Gains conversions: "
619  << "\n"
620  << " g1 = " << gainConv_[1] << "\n"
621  << " g2 = " << gainConv_[2] << "\n"
622  << " g3 = " << gainConv_[3];
623 
624  delete defaultRatios;
625 
626  const double barrelADCtoGeV_ = agc->getEBValue();
627  LogDebug("EcalDigi") << " Barrel GeV/ADC = " << barrelADCtoGeV_;
628  const double endcapADCtoGeV_ = agc->getEEValue();
629  LogDebug("EcalDigi") << " Endcap GeV/ADC = " << endcapADCtoGeV_;
630 
631  // ES condition objects
632  edm::ESHandle<ESGain> esgain_;
634  edm::ESHandle<ESPedestals> esPedestals_;
636 
637  eventSetup.get<ESGainRcd>().get(esgain_);
638  eventSetup.get<ESMIPToGeVConstantRcd>().get(esMIPToGeV_);
639  eventSetup.get<ESPedestalsRcd>().get(esPedestals_);
640  eventSetup.get<ESIntercalibConstantsRcd>().get(esMIPs_);
641 
642  const ESGain* esgain = esgain_.product();
643  m_ESpeds = esPedestals_.product();
644  m_ESmips = esMIPs_.product();
645  const ESMIPToGeVConstant* esMipToGeV = esMIPToGeV_.product();
646  m_ESgain = (int)esgain->getESGain();
647  const double valESMIPToGeV = (m_ESgain == 1) ? esMipToGeV->getESValueLow() : esMipToGeV->getESValueHigh();
648 
650 
651  esADCtokeV_ = 1000000. * valESMIPToGeV;
652 
653  m_ESeffwei = (0 == m_ESgain ? 1.45 : (1 == m_ESgain ? 0.9066 : (2 == m_ESgain ? 0.8815 : 1.0)));
654 }
655 
657  // Pedestals from event setup
658 
660  eventSetup.get<EcalPedestalsRcd>().get(dbPed);
661  thePedestals = dbPed.product();
662 }
663 
664 void EcalMixingModuleValidation::findPedestal(const DetId& detId, int gainId, double& ped) const {
666  // should I care if it doesn't get found?
667  if (mapItr == thePedestals->getMap().end()) {
668  edm::LogError("EcalMMValid") << "Could not find pedestal for " << detId.rawId() << " among the "
669  << thePedestals->getMap().size();
670  } else {
671  EcalPedestals::Item item = (*mapItr);
672 
673  switch (gainId) {
674  case 0:
675  ped = item.mean_x1;
676  break;
677  case 1:
678  ped = item.mean_x12;
679  break;
680  case 2:
681  ped = item.mean_x6;
682  break;
683  case 3:
684  ped = item.mean_x1;
685  break;
686  default:
687  edm::LogError("EcalMMValid") << "Bad Pedestal " << gainId;
688  break;
689  }
690  LogDebug("EcalMMValid") << "Pedestals for " << detId.rawId() << " gain range " << gainId << " : \n"
691  << "Mean = " << ped;
692  }
693 }
694 
697  MapType& SignalSimMap,
698  const EcalSubdetector& thisDet,
699  const double& theSimThreshold,
700  CLHEP::HepRandomEngine* engine) {
701  if (thisDet != EcalBarrel && thisDet != EcalEndcap && thisDet != EcalPreshower) {
702  edm::LogError("EcalMMValid") << "Invalid subdetector type";
703  return;
704  }
705  //bool isCrystal = true;
706  //if ( thisDet == EcalPreshower ) isCrystal = false;
707 
708  // load the geometry
709 
710  edm::ESHandle<CaloGeometry> hGeometry;
711  eventSetup.get<CaloGeometryRecord>().get(hGeometry);
712 
713  const CaloGeometry* pGeometry = &*hGeometry;
714 
715  // see if we need to update
716  if (pGeometry != theGeometry) {
717  theGeometry = pGeometry;
718  //theEcalResponse->setGeometry(theGeometry);
722  }
723 
724  // vector of DetId with energy above a fraction of the gun's energy
725 
726  const std::vector<DetId>& theSDId = theGeometry->getValidDetIds(DetId::Ecal, thisDet);
727 
728  std::vector<DetId> theOverThresholdId;
729  for (unsigned int i = 0; i < theSDId.size(); i++) {
730  int sdId = theSDId[i].rawId();
731  if (SignalSimMap[sdId] > theSimThreshold)
732  theOverThresholdId.push_back(theSDId[i]);
733  }
734 
736  if (thisDet == EcalPreshower)
738 
739  for (int iBunch = theMinBunch; iBunch <= theMaxBunch; iBunch++) {
740  //if ( isCrystal ) {
741  if (thisDet == EcalBarrel) {
742  theEBResponse->setBunchRange(iBunch, iBunch);
743  theEBResponse->clear();
744  theEBResponse->run(theHits, engine);
745  } else if (thisDet == EcalEndcap) {
746  theEEResponse->setBunchRange(iBunch, iBunch);
747  theEEResponse->clear();
748  theEEResponse->run(theHits, engine);
749  } else {
750  theESResponse->setBunchRange(iBunch, iBunch);
751  theESResponse->clear();
752  theESResponse->run(theHits, engine);
753  }
754 
755  int iHisto = iBunch - theMinBunch;
756 
757  for (std::vector<DetId>::const_iterator idItr = theOverThresholdId.begin(); idItr != theOverThresholdId.end();
758  ++idItr) {
759  CaloSamples* analogSignal;
760  //if ( isCrystal )
761  if (thisDet == EcalBarrel) {
762  analogSignal = theEBResponse->findSignal(*idItr);
763  } else if (thisDet == EcalEndcap) {
764  analogSignal = theEEResponse->findSignal(*idItr);
765  } else {
766  analogSignal = theESResponse->findSignal(*idItr);
767  }
768 
769  if (analogSignal) {
770  (*analogSignal) *= theParameterMap->simParameters(analogSignal->id()).photoelectronsToAnalog();
771 
772  for (int i = 0; i < limit; i++) {
773  if (thisDet == EcalBarrel) {
774  meEBBunchShape_[iHisto]->Fill(i, (float)(*analogSignal)[i]);
775  } else if (thisDet == EcalEndcap) {
776  meEEBunchShape_[iHisto]->Fill(i, (float)(*analogSignal)[i]);
777  } else if (thisDet == EcalPreshower) {
778  meESBunchShape_[iHisto]->Fill(i, (float)(*analogSignal)[i]);
779  }
780  }
781  }
782  }
783  }
784 }
785 
786 CLHEP::HepRandomEngine* EcalMixingModuleValidation::randomEngine(edm::StreamID const& streamID) {
787  unsigned int index = streamID.value();
788  if (index >= randomEngines_.size()) {
789  randomEngines_.resize(index + 1, nullptr);
790  }
791  CLHEP::HepRandomEngine* ptr = randomEngines_[index];
792  if (!ptr) {
794  ptr = &rng->getEngine(streamID);
795  randomEngines_[index] = ptr;
796  }
797  return ptr;
798 }
EcalDataFrame::MAXSAMPLES
static constexpr int MAXSAMPLES
Definition: EcalDataFrame.h:48
EcalCondObjectContainer::getMap
const self & getMap() const
Definition: EcalCondObjectContainer.h:80
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:76
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
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:355
EcalMixingModuleValidation::thePedestals
const EcalPedestals * thePedestals
Definition: EcalMixingModuleValidation.h:177
ecalSimParameterMap_cff.syncPhase
syncPhase
Definition: ecalSimParameterMap_cff.py:11
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:695
gather_cfg.cout
cout
Definition: gather_cfg.py:144
EBDetId.h
EEDetId.h
ecalSimParameterMap_cff.samplingFactor
samplingFactor
Definition: ecalSimParameterMap_cff.py:8
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:42
EcalSubdetector
EcalSubdetector
Definition: EcalSubdetector.h:10
ESDetId
Definition: ESDetId.h:15
EcalMixingModuleValidation.h
EcalCondObjectContainer::size
size_t size() const
Definition: EcalCondObjectContainer.h:82
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:13
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 >
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
HLT_2018_cff.barrelHits
barrelHits
Definition: HLT_2018_cff.py:78774
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:38
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
edm::EventSetup::get
T get() const
Definition: EventSetup.h:73
EcalMixingModuleValidation::m_ESeffwei
double m_ESeffwei
Definition: EcalMixingModuleValidation.h:182
MixCollection
Definition: MixCollection.h:11
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:215
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:58
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
edm::LogWarning
Definition: MessageLogger.h:141
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:605
HLT_2018_cff.InputTag
InputTag
Definition: HLT_2018_cff.py:79016
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:670
edm::ParameterSet
Definition: ParameterSet.h:36
EcalADCToGeVConstant::getEEValue
float getEEValue() const
Definition: EcalADCToGeVConstant.h:21
edm::LogError
Definition: MessageLogger.h:183
EcalMixingModuleValidation::barrelADCtoGeV_
double barrelADCtoGeV_
Definition: EcalMixingModuleValidation.h:115
EcalMixingModuleValidation::findPedestal
void findPedestal(const DetId &detId, int gainId, double &ped) const
Definition: EcalMixingModuleValidation.cc:664
EBDigiCollection
Definition: EcalDigiCollections.h:32
EEDigiCollection
Definition: EcalDigiCollections.h:45
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:656
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:9
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:57
CaloSamples
Definition: CaloSamples.h:14
PCaloHit
Definition: PCaloHit.h:8
edm::HepMCProduct::GetEvent
const HepMC::GenEvent * GetEvent() const
Definition: HepMCProduct.h:34
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
DetId::Ecal
Definition: DetId.h:27
get
#define get
EcalMixingModuleValidation::randomEngine
CLHEP::HepRandomEngine * randomEngine(edm::StreamID const &streamID)
Definition: EcalMixingModuleValidation.cc:786
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
ecalSimParameterMap_cff.readoutFrameSize
readoutFrameSize
Definition: ecalSimParameterMap_cff.py:5
ESDetId::plane
int plane() const
Definition: ESDetId.h:41
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
EcalPreshower
Definition: EcalSubdetector.h:10
ecalSimParameterMap_cff.simHitToPhotoelectronsBarrel
simHitToPhotoelectronsBarrel
Definition: ecalSimParameterMap_cff.py:10
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:269
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:12
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
HLT_2018_cff.endcapHits
endcapHits
Definition: HLT_2018_cff.py:78759
EcalPedestal
Definition: EcalPedestals.h:8
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
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:30
EBDetId::iphi
int iphi() const
get the crystal iphi
Definition: EBDetId.h:51
HepMCProduct
ecalMGPA::gainId
constexpr int gainId(sample_type sample)
get the gainId (2 bits)
Definition: EcalMGPASample.h:13
EcalPedestalsRcd
Definition: EcalPedestalsRcd.h:5
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:7
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