CMS 3D CMS Logo

EcalRecHitsValidation.cc
Go to the documentation of this file.
1 /*
2  * \file EcalRecHitsValidation.cc
3  *
4  * \author C. Rovelli
5  *
6  */
7 
17 #include <string>
18 
19 using namespace cms;
20 using namespace edm;
21 using namespace std;
22 
24  : pAgc(esConsumes()), pEcsToken(esConsumes()), pttMapToken(esConsumes()) {
25  // ----------------------
26  HepMCLabel = ps.getParameter<std::string>("moduleLabelMC");
27  hitsProducer_ = ps.getParameter<std::string>("hitsProducer");
28  EBrechitCollection_ = ps.getParameter<edm::InputTag>("EBrechitCollection");
29  EErechitCollection_ = ps.getParameter<edm::InputTag>("EErechitCollection");
30  ESrechitCollection_ = ps.getParameter<edm::InputTag>("ESrechitCollection");
31  EBuncalibrechitCollection_ = ps.getParameter<edm::InputTag>("EBuncalibrechitCollection");
32  EEuncalibrechitCollection_ = ps.getParameter<edm::InputTag>("EEuncalibrechitCollection");
33  // switch to allow disabling endcaps for phase 2
34  enableEndcaps_ = ps.getUntrackedParameter<bool>("enableEndcaps", true);
35 
36  // fix for consumes
37  HepMCLabel_Token_ = consumes<HepMCProduct>(ps.getParameter<std::string>("moduleLabelMC"));
38  EBrechitCollection_Token_ = consumes<EBRecHitCollection>(ps.getParameter<edm::InputTag>("EBrechitCollection"));
40  consumes<EBUncalibratedRecHitCollection>(ps.getParameter<edm::InputTag>("EBuncalibrechitCollection"));
41 
42  EBHits_Token_ = consumes<CrossingFrame<PCaloHit>>(
43  edm::InputTag(std::string("mix"), ps.getParameter<std::string>("hitsProducer") + std::string("EcalHitsEB")));
44  if (enableEndcaps_) {
45  EErechitCollection_Token_ = consumes<EERecHitCollection>(ps.getParameter<edm::InputTag>("EErechitCollection"));
46  ESrechitCollection_Token_ = consumes<ESRecHitCollection>(ps.getParameter<edm::InputTag>("ESrechitCollection"));
48  consumes<EEUncalibratedRecHitCollection>(ps.getParameter<edm::InputTag>("EEuncalibrechitCollection"));
49  EEHits_Token_ = consumes<CrossingFrame<PCaloHit>>(
50  edm::InputTag(std::string("mix"), ps.getParameter<std::string>("hitsProducer") + std::string("EcalHitsEE")));
51  ESHits_Token_ = consumes<CrossingFrame<PCaloHit>>(
52  edm::InputTag(std::string("mix"), ps.getParameter<std::string>("hitsProducer") + std::string("EcalHitsES")));
53  }
54 
55  // ----------------------
56  // DQM ROOT output
57  outputFile_ = ps.getUntrackedParameter<string>("outputFile", "");
58 
59  if (!outputFile_.empty()) {
60  LogInfo("OutputInfo") << " Ecal RecHits Task histograms will be saved to '" << outputFile_.c_str() << "'";
61  } else {
62  LogInfo("OutputInfo") << " Ecal RecHits Task histograms will NOT be saved";
63  }
64 
65  // ----------------------
66  // verbosity switch
67  verbose_ = ps.getUntrackedParameter<bool>("verbose", false);
68 
69  // ----------------------
70  meGunEnergy_ = nullptr;
71  meGunEta_ = nullptr;
72  meGunPhi_ = nullptr;
73  meEBRecHitSimHitRatio_ = nullptr;
74  meEERecHitSimHitRatio_ = nullptr;
75  meESRecHitSimHitRatio_ = nullptr;
78  meEBRecHitSimHitRatio12_ = nullptr;
79  meEERecHitSimHitRatio12_ = nullptr;
80  meEBRecHitSimHitRatio13_ = nullptr;
81  meEERecHitSimHitRatio13_ = nullptr;
84  meEBUnRecHitSimHitRatio_ = nullptr;
85  meEEUnRecHitSimHitRatio_ = nullptr;
88  meEBe5x5_ = nullptr;
89  meEBe5x5OverSimHits_ = nullptr;
90  meEBe5x5OverGun_ = nullptr;
91  meEEe5x5_ = nullptr;
92  meEEe5x5OverSimHits_ = nullptr;
93  meEEe5x5OverGun_ = nullptr;
94 
95  meEBRecHitLog10Energy_ = nullptr;
96  meEERecHitLog10Energy_ = nullptr;
97  meESRecHitLog10Energy_ = nullptr;
100  meESRecHitLog10EnergyContr_ = nullptr;
103 
110 
111  meEBRecHitFlags_ = nullptr;
113  meEBRecHitSimHitFlag6_ = nullptr;
114  meEBRecHitSimHitFlag7_ = nullptr;
116 
117  meEERecHitFlags_ = nullptr;
119  meEERecHitSimHitFlag6_ = nullptr;
120  meEERecHitSimHitFlag7_ = nullptr;
121 }
122 
124 
127 
128  ibooker.setCurrentFolder("EcalRecHitsV/EcalRecHitsTask");
129 
130  histo = "EcalRecHitsTask Gun Momentum";
131  meGunEnergy_ = ibooker.book1D(histo.c_str(), histo.c_str(), 100, 0., 1000.);
132 
133  histo = "EcalRecHitsTask Gun Eta";
134  meGunEta_ = ibooker.book1D(histo.c_str(), histo.c_str(), 700, -3.5, 3.5);
135 
136  histo = "EcalRecHitsTask Gun Phi";
137  meGunPhi_ = ibooker.book1D(histo.c_str(), histo.c_str(), 360, 0., 360.);
138 
139  histo = "EcalRecHitsTask Barrel RecSimHit Ratio";
140  meEBRecHitSimHitRatio_ = ibooker.book1D(histo.c_str(), histo.c_str(), 80, 0., 2.);
141 
142  histo = "EcalRecHitsTask Barrel RecSimHit Ratio gt 3p5 GeV";
143  meEBRecHitSimHitRatioGt35_ = ibooker.book1D(histo.c_str(), histo.c_str(), 80, 0.9, 1.1);
144 
145  histo = "EcalRecHitsTask Barrel Unc RecSimHit Ratio";
146  meEBUnRecHitSimHitRatio_ = ibooker.book1D(histo.c_str(), histo.c_str(), 80, 0., 2.);
147 
148  histo = "EcalRecHitsTask Barrel RecSimHit Ratio Channel Status=10 11";
149  meEBRecHitSimHitRatio1011_ = ibooker.book1D(histo.c_str(), histo.c_str(), 80, 0., 2.);
150 
151  histo = "EcalRecHitsTask Barrel RecSimHit Ratio Channel Status=12";
152  meEBRecHitSimHitRatio12_ = ibooker.book1D(histo.c_str(), histo.c_str(), 80, 0., 2.);
153 
154  histo = "EcalRecHitsTask Barrel RecSimHit Ratio Channel Status=13";
155  meEBRecHitSimHitRatio13_ = ibooker.book1D(histo.c_str(), histo.c_str(), 80, 0., 2.);
156 
157  histo = "EcalRecHitsTask Barrel Unc RecSimHit Ratio gt 3p5 GeV";
158  meEBUnRecHitSimHitRatioGt35_ = ibooker.book1D(histo.c_str(), histo.c_str(), 80, 0.9, 1.1);
159 
160  histo = "EcalRecHitsTask Barrel Rec E5x5";
161  meEBe5x5_ = ibooker.book1D(histo.c_str(), histo.c_str(), 4000, 0., 400.);
162 
163  histo = "EcalRecHitsTask Barrel Rec E5x5 over Sim E5x5";
164  meEBe5x5OverSimHits_ = ibooker.book1D(histo.c_str(), histo.c_str(), 80, 0.9, 1.1);
165 
166  histo = "EcalRecHitsTask Barrel Rec E5x5 over gun energy";
167  meEBe5x5OverGun_ = ibooker.book1D(histo.c_str(), histo.c_str(), 80, 0.9, 1.1);
168 
170  ibooker.book1D("EcalRecHitsTask Barrel Log10 Energy", "EcalRecHitsTask Barrel Log10 Energy", 90, -5., 4.);
171  meEBRecHitLog10EnergyContr_ = ibooker.bookProfile("EcalRecHits Barrel Log10En vs Hit Contribution",
172  "EcalRecHits Barrel Log10En vs Hit Contribution",
173  90,
174  -5.,
175  4.,
176  100,
177  0.,
178  1.);
179  meEBRecHitLog10Energy5x5Contr_ = ibooker.bookProfile("EcalRecHits Barrel Log10En5x5 vs Hit Contribution",
180  "EcalRecHits Barrel Log10En5x5 vs Hit Contribution",
181  90,
182  -5.,
183  4.,
184  100,
185  0.,
186  1.);
187 
188  histo = "EB Occupancy Flag=5 6";
189  meEBRecHitsOccupancyFlag5_6_ = ibooker.book2D(histo, histo, 170, -85., 85., 360, 0., 360.);
190  histo = "EB Occupancy Flag=8 9";
191  meEBRecHitsOccupancyFlag8_9_ = ibooker.book2D(histo, histo, 170, -85., 85., 360, 0., 360.);
192 
193  histo = "EcalRecHitsTask Barrel Reco Flags";
194  meEBRecHitFlags_ = ibooker.book1D(histo.c_str(), histo.c_str(), 10, 0., 10.);
195  histo = "EcalRecHitsTask Barrel RecSimHit Ratio vs SimHit Flag=5 6";
196  meEBRecHitSimHitvsSimHitFlag5_6_ = ibooker.book2D(histo.c_str(), histo.c_str(), 80, 0., 2., 4000, 0., 400.);
197  histo = "EcalRecHitsTask Barrel RecSimHit Ratio Flag=6";
198  meEBRecHitSimHitFlag6_ = ibooker.book1D(histo.c_str(), histo.c_str(), 80, 0., 2.);
199  histo = "EcalRecHitsTask Barrel RecSimHit Ratio Flag=7";
200  meEBRecHitSimHitFlag7_ = ibooker.book1D(histo.c_str(), histo.c_str(), 80, 0., 2.);
201  histo = "EcalRecHitsTask Barrel 5x5 RecSimHit Ratio vs SimHit Flag=8";
202  meEB5x5RecHitSimHitvsSimHitFlag8_ = ibooker.book2D(histo.c_str(), histo.c_str(), 80, 0., 2., 4000, 0., 400.);
203 
204  if (enableEndcaps_) {
205  histo = "EcalRecHitsTask Preshower RecSimHit Ratio";
206  meESRecHitSimHitRatio_ = ibooker.book1D(histo.c_str(), histo.c_str(), 80, 0., 2.);
207 
208  histo = "EcalRecHitsTask Endcap RecSimHit Ratio";
209  meEERecHitSimHitRatio_ = ibooker.book1D(histo.c_str(), histo.c_str(), 80, 0., 2.);
210 
211  histo = "EcalRecHitsTask Endcap RecSimHit Ratio gt 3p5 GeV";
212  meEERecHitSimHitRatioGt35_ = ibooker.book1D(histo.c_str(), histo.c_str(), 80, 0.9, 1.1);
213 
214  histo = "EcalRecHitsTask Endcap Unc RecSimHit Ratio";
215  meEEUnRecHitSimHitRatio_ = ibooker.book1D(histo.c_str(), histo.c_str(), 80, 0., 2.);
216 
217  histo = "EcalRecHitsTask Endcap RecSimHit Ratio Channel Status=10 11";
218  meEERecHitSimHitRatio1011_ = ibooker.book1D(histo.c_str(), histo.c_str(), 80, 0., 2.);
219 
220  histo = "EcalRecHitsTask Endcap RecSimHit Ratio Channel Status=12";
221  meEERecHitSimHitRatio12_ = ibooker.book1D(histo.c_str(), histo.c_str(), 80, 0., 2.);
222 
223  histo = "EcalRecHitsTask Endcap RecSimHit Ratio Channel Status=13";
224  meEERecHitSimHitRatio13_ = ibooker.book1D(histo.c_str(), histo.c_str(), 80, 0., 2.);
225 
226  histo = "EcalRecHitsTask Endcap Unc RecSimHit Ratio gt 3p5 GeV";
227  meEEUnRecHitSimHitRatioGt35_ = ibooker.book1D(histo.c_str(), histo.c_str(), 80, 0.9, 1.1);
228 
229  histo = "EcalRecHitsTask Endcap Rec E5x5";
230  meEEe5x5_ = ibooker.book1D(histo.c_str(), histo.c_str(), 4000, 0., 400.);
231 
232  histo = "EcalRecHitsTask Endcap Rec E5x5 over Sim E5x5";
233  meEEe5x5OverSimHits_ = ibooker.book1D(histo.c_str(), histo.c_str(), 80, 0.9, 1.1);
234 
235  histo = "EcalRecHitsTask Endcap Rec E5x5 over gun energy";
236  meEEe5x5OverGun_ = ibooker.book1D(histo.c_str(), histo.c_str(), 80, 0.9, 1.1);
237 
239  ibooker.book1D("EcalRecHitsTask Endcap Log10 Energy", "EcalRecHitsTask Endcap Log10 Energy", 90, -5., 4.);
241  ibooker.book1D("EcalRecHitsTask Preshower Log10 Energy", "EcalRecHitsTask Preshower Log10 Energy", 90, -5., 4.);
242 
243  meEERecHitLog10EnergyContr_ = ibooker.bookProfile("EcalRecHits Endcap Log10En vs Hit Contribution",
244  "EcalRecHits Endcap Log10En vs Hit Contribution",
245  90,
246  -5.,
247  4.,
248  100,
249  0.,
250  1.);
251  meESRecHitLog10EnergyContr_ = ibooker.bookProfile("EcalRecHits Preshower Log10En vs Hit Contribution",
252  "EcalRecHits Preshower Log10En vs Hit Contribution",
253  90,
254  -5.,
255  4.,
256  100,
257  0.,
258  1.);
259 
260  meEERecHitLog10Energy5x5Contr_ = ibooker.bookProfile("EcalRecHits Endcap Log10En5x5 vs Hit Contribution",
261  "EcalRecHits Endcap Log10En5x5 vs Hit Contribution",
262  90,
263  -5.,
264  4.,
265  100,
266  0.,
267  1.);
268 
269  histo = "EE+ Occupancy Flag=5 6";
270  meEERecHitsOccupancyPlusFlag5_6_ = ibooker.book2D(histo, histo, 100, 0., 100., 100, 0., 100.);
271  histo = "EE- Occupancy Flag=5 6";
272  meEERecHitsOccupancyMinusFlag5_6_ = ibooker.book2D(histo, histo, 100, 0., 100., 100, 0., 100.);
273  histo = "EE+ Occupancy Flag=8 9";
274  meEERecHitsOccupancyPlusFlag8_9_ = ibooker.book2D(histo, histo, 100, 0., 100., 100, 0., 100.);
275  histo = "EE- Occupancy Flag=8 9";
276  meEERecHitsOccupancyMinusFlag8_9_ = ibooker.book2D(histo, histo, 100, 0., 100., 100, 0., 100.);
277 
278  histo = "EcalRecHitsTask Endcap Reco Flags";
279  meEERecHitFlags_ = ibooker.book1D(histo.c_str(), histo.c_str(), 10, 0., 10.);
280 
281  histo = "EcalRecHitsTask Endcap RecSimHit Ratio vs SimHit Flag=5 6";
282  meEERecHitSimHitvsSimHitFlag5_6_ = ibooker.book2D(histo.c_str(), histo.c_str(), 80, 0., 2., 4000, 0., 400.);
283 
284  histo = "EcalRecHitsTask Endcap RecSimHit Ratio Flag=6";
285  meEERecHitSimHitFlag6_ = ibooker.book1D(histo.c_str(), histo.c_str(), 80, 0., 2.);
286 
287  histo = "EcalRecHitsTask Endcap RecSimHit Ratio Flag=7";
288  meEERecHitSimHitFlag7_ = ibooker.book1D(histo.c_str(), histo.c_str(), 80, 0., 2.);
289  }
290 }
291 
293  // Temporary stuff
294 
295  LogInfo("EcalRecHitsTask, EventInfo: ") << " Run = " << e.id().run() << " Event = " << e.id().event();
296 
297  // ADC -> GeV Scale
298  const EcalADCToGeVConstant *agc = &c.getData(pAgc);
299  const double barrelADCtoGeV_ = agc->getEBValue();
300  const double endcapADCtoGeV_ = agc->getEEValue();
301 
302  Handle<HepMCProduct> MCEvt;
303  bool skipMC = false;
304  e.getByToken(HepMCLabel_Token_, MCEvt);
305  if (!MCEvt.isValid()) {
306  skipMC = true;
307  }
308 
310 
311  bool skipBarrel = false;
313  Handle<EBUncalibratedRecHitCollection> EcalUncalibRecHitEB;
314  e.getByToken(EBuncalibrechitCollection_Token_, EcalUncalibRecHitEB);
315  if (EcalUncalibRecHitEB.isValid()) {
316  EBUncalibRecHit = EcalUncalibRecHitEB.product();
317  } else {
318  skipBarrel = true;
319  }
320 
321  bool skipEndcap = false;
323  Handle<EEUncalibratedRecHitCollection> EcalUncalibRecHitEE;
324  if (enableEndcaps_) {
325  e.getByToken(EEuncalibrechitCollection_Token_, EcalUncalibRecHitEE);
326  if (EcalUncalibRecHitEE.isValid()) {
327  EEUncalibRecHit = EcalUncalibRecHitEE.product();
328  } else {
329  skipEndcap = true;
330  }
331  } else
332  skipEndcap = true;
333 
334  const EBRecHitCollection *EBRecHit = nullptr;
335  Handle<EBRecHitCollection> EcalRecHitEB;
336  e.getByToken(EBrechitCollection_Token_, EcalRecHitEB);
337  if (EcalRecHitEB.isValid()) {
338  EBRecHit = EcalRecHitEB.product();
339  } else {
340  skipBarrel = true;
341  }
342 
343  const EERecHitCollection *EERecHit = nullptr;
344  Handle<EERecHitCollection> EcalRecHitEE;
345  if (enableEndcaps_) {
346  e.getByToken(EErechitCollection_Token_, EcalRecHitEE);
347  if (EcalRecHitEE.isValid()) {
348  EERecHit = EcalRecHitEE.product();
349  } else {
350  skipEndcap = true;
351  }
352  }
353 
354  bool skipPreshower = false;
355  const ESRecHitCollection *ESRecHit = nullptr;
356  Handle<ESRecHitCollection> EcalRecHitES;
357  if (enableEndcaps_) {
358  e.getByToken(ESrechitCollection_Token_, EcalRecHitES);
359  if (EcalRecHitES.isValid()) {
360  ESRecHit = EcalRecHitES.product();
361  } else {
362  skipPreshower = true;
363  }
364  } else
365  skipPreshower = true;
366 
367  // ----------------------
368  // gun
369  double eGun = 0.;
370  if (!skipMC) {
371  for (HepMC::GenEvent::particle_const_iterator p = MCEvt->GetEvent()->particles_begin();
372  p != MCEvt->GetEvent()->particles_end();
373  ++p) {
374  double htheta = (*p)->momentum().theta();
375  double heta = -99999.;
376  if (tan(htheta * 0.5) > 0) {
377  heta = -log(tan(htheta * 0.5));
378  }
379  double hphi = (*p)->momentum().phi();
380  hphi = (hphi >= 0) ? hphi : hphi + 2 * M_PI;
381  hphi = hphi / M_PI * 180.;
382 
383  LogDebug("EventInfo") << "EcalRecHitsTask: Particle gun type form MC = " << abs((*p)->pdg_id()) << "\n"
384  << "Energy = " << (*p)->momentum().e() << "\n"
385  << "Eta = " << heta << "\n"
386  << "Phi = " << hphi;
387 
388  if ((*p)->momentum().e() > eGun)
389  eGun = (*p)->momentum().e();
390 
391  if (meGunEnergy_)
392  meGunEnergy_->Fill((*p)->momentum().e());
393  if (meGunEta_)
394  meGunEta_->Fill(heta);
395  if (meGunPhi_)
396  meGunPhi_->Fill(hphi);
397  }
398  }
399 
400  // -------------------------------------------------------------------
401  // BARREL
402 
403  if (!skipBarrel) {
404  // 1) loop over simHits
405  e.getByToken(EBHits_Token_, crossingFrame);
406  const MixCollection<PCaloHit> barrelHits(crossingFrame.product());
407 
408  MapType ebSimMap;
409  MapType ebRecMap;
410  const int ebcSize = 90;
411  double ebcontr[ebcSize];
412  double ebcontr25[ebcSize];
413  for (int i = 0; i < ebcSize; i++) {
414  ebcontr[i] = 0.0;
415  ebcontr25[i] = 0.0;
416  }
417  double ebtotal = 0.;
418 
419  for (auto const &iHit : barrelHits) {
420  EBDetId ebid = EBDetId(iHit.id());
421 
422  LogDebug("SimHitInfo, barrel") << "CaloHit " << iHit.getName() << " DetID = " << iHit.id() << "\n"
423  << "Energy = " << iHit.energy() << " Time = " << iHit.time() << "\n"
424  << "EBDetId = " << ebid.ieta() << " " << ebid.iphi();
425 
426  uint32_t crystid = ebid.rawId();
427  ebSimMap[crystid] += iHit.energy();
428  }
429 
430  // 2) loop over RecHits
432  uncalibRecHit != EBUncalibRecHit->end();
433  ++uncalibRecHit) {
434  EBDetId EBid = EBDetId(uncalibRecHit->id());
435 
436  // Find corresponding recHit
437  EcalRecHitCollection::const_iterator myRecHit = EBRecHit->find(EBid);
438  if (myRecHit == EBRecHit->end())
439  continue;
440  ebRecMap[EBid.rawId()] += myRecHit->energy();
441 
442  // Fill log10(Energy) stuff...
443  ebtotal += myRecHit->energy();
444  if (myRecHit->energy() > 0) {
446  meEBRecHitLog10Energy_->Fill(log10(myRecHit->energy()));
447  int log10i = int((log10(myRecHit->energy()) + 5.) * 10.);
448  if (log10i >= 0 and log10i < ebcSize)
449  ebcontr[log10i] += myRecHit->energy();
450  }
451 
452  // comparison Rec/Sim hit
453  if (ebSimMap[EBid.rawId()] != 0.) {
454  double uncEnergy = uncalibRecHit->amplitude() * barrelADCtoGeV_;
456  meEBUnRecHitSimHitRatio_->Fill(uncEnergy / ebSimMap[EBid.rawId()]);
457  }
458  if (meEBUnRecHitSimHitRatioGt35_ && (myRecHit->energy() > 3.5)) {
459  meEBUnRecHitSimHitRatioGt35_->Fill(uncEnergy / ebSimMap[EBid.rawId()]);
460  }
461  }
462 
463  if (myRecHit != EBRecHit->end()) {
464  if (ebSimMap[EBid.rawId()] != 0.) {
466  meEBRecHitSimHitRatio_->Fill(myRecHit->energy() / ebSimMap[EBid.rawId()]);
467  }
468  if (meEBRecHitSimHitRatioGt35_ && (myRecHit->energy() > 3.5)) {
469  meEBRecHitSimHitRatioGt35_->Fill(myRecHit->energy() / ebSimMap[EBid.rawId()]);
470  }
471  uint16_t sc = 0;
472 
473  c.getData(pEcsToken);
474  auto pEcs = c.getHandle(pEcsToken);
475  const EcalChannelStatus *ecs = nullptr;
476  if (pEcs.isValid())
477  ecs = &c.getData(pEcsToken);
478  ;
479  if (ecs != nullptr) {
480  EcalChannelStatusMap::const_iterator csmi = ecs->find(EBid.rawId());
482  if (csmi != ecs->end())
483  csc = *csmi;
484  sc = csc.getStatusCode();
485  }
486 
487  if (meEBRecHitSimHitRatio1011_ != nullptr && (sc == 10 || sc == 11)) {
488  meEBRecHitSimHitRatio1011_->Fill(myRecHit->energy() / ebSimMap[EBid.rawId()]);
489  }
490  if (meEBRecHitSimHitRatio12_ != nullptr && sc == 12) {
491  meEBRecHitSimHitRatio12_->Fill(myRecHit->energy() / ebSimMap[EBid.rawId()]);
492  }
493 
494  auto pttMap = c.getHandle(pttMapToken);
495  const EcalTrigTowerConstituentsMap *ttMap = nullptr;
496  if (pttMap.isValid())
497  ttMap = &c.getData(pttMapToken);
498  double ttSimEnergy = 0;
499  if (ttMap != nullptr) {
500  EcalTrigTowerDetId ttDetId = EBid.tower();
501  std::vector<DetId> vid = ttMap->constituentsOf(ttDetId);
502  for (std::vector<DetId>::const_iterator dit = vid.begin(); dit != vid.end(); dit++) {
503  EBDetId ttEBid = EBDetId(*dit);
504  ttSimEnergy += ebSimMap[ttEBid.rawId()];
505  }
506  if (!vid.empty())
507  ttSimEnergy = ttSimEnergy / vid.size();
508  }
509  if (meEBRecHitSimHitRatio13_ != nullptr && sc == 13 && ttSimEnergy != 0)
510  meEBRecHitSimHitRatio13_->Fill(myRecHit->energy() / ttSimEnergy);
511 
512  int flag = myRecHit->recoFlag();
513  if (meEBRecHitFlags_ != nullptr)
517  meEBRecHitSimHitvsSimHitFlag5_6_->Fill(myRecHit->energy() / ebSimMap[EBid.rawId()], ebSimMap[EBid.rawId()]);
519  meEBRecHitSimHitFlag6_->Fill(myRecHit->energy() / ebSimMap[EBid.rawId()]);
521  meEBRecHitSimHitFlag6_->Fill(myRecHit->energy() / ebSimMap[EBid.rawId()]);
523  meEB5x5RecHitSimHitvsSimHitFlag8_->Fill(myRecHit->energy() / ttSimEnergy, ttSimEnergy);
524 
527  meEBRecHitsOccupancyFlag5_6_->Fill(EBid.ieta(), EBid.iphi());
529  meEBRecHitsOccupancyFlag8_9_->Fill(EBid.ieta(), EBid.iphi());
530  }
531  } else
532  continue;
533  } // loop over the UncalibratedRecHitCollection
534 
535  // RecHits matrix
536  uint32_t ebcenterid = getUnitWithMaxEnergy(ebRecMap);
537  EBDetId myEBid(ebcenterid);
538  int bx = myEBid.ietaAbs();
539  int by = myEBid.iphi();
540  int bz = myEBid.zside();
541  findBarrelMatrix(5, 5, bx, by, bz, ebRecMap);
542  double e5x5rec = 0.;
543  double e5x5sim = 0.;
544  for (unsigned int i = 0; i < crystalMatrix.size(); i++) {
545  e5x5rec += ebRecMap[crystalMatrix[i]];
546  e5x5sim += ebSimMap[crystalMatrix[i]];
547  if (ebRecMap[crystalMatrix[i]] > 0) {
548  int log10i25 = int((log10(ebRecMap[crystalMatrix[i]]) + 5.) * 10.);
549  if (log10i25 >= 0 && log10i25 < ebcSize)
550  ebcontr25[log10i25] += ebRecMap[crystalMatrix[i]];
551  }
552  }
553 
554  if (meEBe5x5_)
555  meEBe5x5_->Fill(e5x5rec);
556  if (e5x5sim > 0. && meEBe5x5OverSimHits_)
557  meEBe5x5OverSimHits_->Fill(e5x5rec / e5x5sim);
558  if (eGun > 0. && meEBe5x5OverGun_)
559  meEBe5x5OverGun_->Fill(e5x5rec / eGun);
560 
561  if (meEBRecHitLog10EnergyContr_ && ebtotal != 0) {
562  for (int i = 0; i < ebcSize; i++) {
563  meEBRecHitLog10EnergyContr_->Fill(-5. + (float(i) + 0.5) / 10., ebcontr[i] / ebtotal);
564  }
565  }
566 
567  if (meEBRecHitLog10Energy5x5Contr_ && e5x5rec != 0) {
568  for (int i = 0; i < ebcSize; i++) {
569  meEBRecHitLog10Energy5x5Contr_->Fill(-5. + (float(i) + 0.5) / 10., ebcontr25[i] / e5x5rec);
570  }
571  }
572  }
573 
574  // -------------------------------------------------------------------
575  // ENDCAP
576 
577  if (!skipEndcap) {
578  // 1) loop over simHits
579  e.getByToken(EEHits_Token_, crossingFrame);
580  const MixCollection<PCaloHit> endcapHits(crossingFrame.product());
581 
582  MapType eeSimMap;
583  MapType eeRecMap;
584  const int eecSize = 90;
585  double eecontr[eecSize];
586  double eecontr25[eecSize];
587  for (int i = 0; i < eecSize; i++) {
588  eecontr[i] = 0.0;
589  eecontr25[i] = 0.0;
590  }
591  double eetotal = 0.;
592 
593  for (auto const &iHit : endcapHits) {
594  EEDetId eeid(iHit.id());
595 
596  LogDebug("Endcap, HitInfo") << " CaloHit " << iHit.getName() << " DetID = " << iHit.id() << "\n"
597  << "Energy = " << iHit.energy() << " Time = " << iHit.time() << "\n"
598  << "EEDetId side " << eeid.zside() << " = " << eeid.ix() << " " << eeid.iy();
599 
600  uint32_t crystid = eeid.rawId();
601  eeSimMap[crystid] += iHit.energy();
602  }
603 
604  // 2) loop over RecHits
606  uncalibRecHit != EEUncalibRecHit->end();
607  ++uncalibRecHit) {
608  EEDetId EEid = EEDetId(uncalibRecHit->id());
609 
610  // Find corresponding recHit
611  EcalRecHitCollection::const_iterator myRecHit = EERecHit->find(EEid);
612  if (myRecHit == EERecHit->end())
613  continue;
614  eeRecMap[EEid.rawId()] += myRecHit->energy();
615 
616  // Fill log10(Energy) stuff...
617  eetotal += myRecHit->energy();
618  if (myRecHit->energy() > 0) {
620  meEERecHitLog10Energy_->Fill(log10(myRecHit->energy()));
621  int log10i = int((log10(myRecHit->energy()) + 5.) * 10.);
622  if (log10i >= 0 and log10i < eecSize)
623  eecontr[log10i] += myRecHit->energy();
624  }
625 
626  // comparison Rec/Sim hit
627  if (eeSimMap[EEid.rawId()] != 0.) {
628  double uncEnergy = uncalibRecHit->amplitude() * endcapADCtoGeV_;
630  meEEUnRecHitSimHitRatio_->Fill(uncEnergy / eeSimMap[EEid.rawId()]);
631  }
632  if (meEEUnRecHitSimHitRatioGt35_ && (myRecHit->energy() > 3.5)) {
633  meEEUnRecHitSimHitRatioGt35_->Fill(uncEnergy / eeSimMap[EEid.rawId()]);
634  }
635  }
636 
637  if (myRecHit != EERecHit->end()) {
638  if (eeSimMap[EEid.rawId()] != 0.) {
640  meEERecHitSimHitRatio_->Fill(myRecHit->energy() / eeSimMap[EEid.rawId()]);
641  }
642  if (meEERecHitSimHitRatioGt35_ && (myRecHit->energy() > 3.5)) {
643  meEERecHitSimHitRatioGt35_->Fill(myRecHit->energy() / eeSimMap[EEid.rawId()]);
644  }
645 
646  auto pEcs = c.getHandle(pEcsToken);
647  const EcalChannelStatus *ecs = nullptr;
648  if (pEcs.isValid())
649  ecs = &c.getData(pEcsToken);
650  if (ecs != nullptr) {
651  EcalChannelStatusMap::const_iterator csmi = ecs->find(EEid.rawId());
653  if (csmi != ecs->end())
654  csc = *csmi;
655  uint16_t sc = csc.getStatusCode();
656  if (meEERecHitSimHitRatio1011_ != nullptr && (sc == 10 || sc == 11)) {
657  meEERecHitSimHitRatio1011_->Fill(myRecHit->energy() / eeSimMap[EEid.rawId()]);
658  }
659  if (meEERecHitSimHitRatio12_ != nullptr && sc == 12) {
660  meEERecHitSimHitRatio12_->Fill(myRecHit->energy() / eeSimMap[EEid.rawId()]);
661  }
662  if (meEERecHitSimHitRatio13_ != nullptr && sc == 13) {
663  meEERecHitSimHitRatio13_->Fill(myRecHit->energy() / eeSimMap[EEid.rawId()]);
664  }
665  }
666 
667  int flag = myRecHit->recoFlag();
668  if (meEERecHitFlags_ != nullptr)
672  meEERecHitSimHitvsSimHitFlag5_6_->Fill(myRecHit->energy() / eeSimMap[EEid.rawId()], eeSimMap[EEid.rawId()]);
674  meEERecHitSimHitFlag6_->Fill(myRecHit->energy() / eeSimMap[EEid.rawId()]);
676  meEERecHitSimHitFlag6_->Fill(myRecHit->energy() / eeSimMap[EEid.rawId()]);
677 
678  if (EEid.zside() > 0) {
681  meEERecHitsOccupancyPlusFlag5_6_->Fill(EEid.ix(), EEid.iy());
684  meEERecHitsOccupancyPlusFlag8_9_->Fill(EEid.ix(), EEid.iy());
685  }
686  if (EEid.zside() < 0) {
689  meEERecHitsOccupancyMinusFlag5_6_->Fill(EEid.ix(), EEid.iy());
692  meEERecHitsOccupancyMinusFlag8_9_->Fill(EEid.ix(), EEid.iy());
693  }
694  }
695  } else
696  continue;
697  } // loop over the UncalibratedechitCollection
698 
699  // RecHits matrix
700  uint32_t eecenterid = getUnitWithMaxEnergy(eeRecMap);
701  EEDetId myEEid(eecenterid);
702  int bx = myEEid.ix();
703  int by = myEEid.iy();
704  int bz = myEEid.zside();
705  findEndcapMatrix(5, 5, bx, by, bz, eeRecMap);
706  double e5x5rec = 0.;
707  double e5x5sim = 0.;
708  for (unsigned int i = 0; i < crystalMatrix.size(); i++) {
709  e5x5rec += eeRecMap[crystalMatrix[i]];
710  e5x5sim += eeSimMap[crystalMatrix[i]];
711  if (eeRecMap[crystalMatrix[i]] > 0) {
712  int log10i25 = int((log10(eeRecMap[crystalMatrix[i]]) + 5.) * 10.);
713  if (log10i25 >= 0 && log10i25 < eecSize)
714  eecontr25[log10i25] += eeRecMap[crystalMatrix[i]];
715  }
716  }
717 
718  if (meEEe5x5_)
719  meEEe5x5_->Fill(e5x5rec);
720  if (e5x5sim > 0. && meEEe5x5OverSimHits_)
721  meEEe5x5OverSimHits_->Fill(e5x5rec / e5x5sim);
722  if (eGun > 0. && meEEe5x5OverGun_)
723  meEEe5x5OverGun_->Fill(e5x5rec / eGun);
724 
725  if (meEERecHitLog10EnergyContr_ && eetotal != 0) {
726  for (int i = 0; i < eecSize; i++) {
727  meEERecHitLog10EnergyContr_->Fill(-5. + (float(i) + 0.5) / 10., eecontr[i] / eetotal);
728  }
729  }
730 
731  if (meEERecHitLog10Energy5x5Contr_ && e5x5rec != 0) {
732  for (int i = 0; i < eecSize; i++) {
733  meEERecHitLog10Energy5x5Contr_->Fill(-5. + (float(i) + 0.5) / 10., eecontr25[i] / e5x5rec);
734  }
735  }
736  }
737 
738  // -------------------------------------------------------------------
739  // PRESHOWER
740 
741  if (!skipPreshower) {
742  // 1) loop over simHits
743  e.getByToken(ESHits_Token_, crossingFrame);
744  const MixCollection<PCaloHit> preshowerHits(crossingFrame.product());
745 
746  MapType esSimMap;
747  const int escSize = 90;
748  double escontr[escSize];
749  for (int i = 0; i < escSize; i++) {
750  escontr[i] = 0.0;
751  }
752  double estotal = 0.;
753 
754  for (auto const &iHit : preshowerHits) {
755  ESDetId esid(iHit.id());
756  LogDebug("Preshower, HitInfo") << " CaloHit " << iHit.getName() << " DetID = " << iHit.id() << "\n"
757  << "Energy = " << iHit.energy() << " Time = " << iHit.time() << "\n"
758  << "ESDetId strip " << esid.strip() << " = " << esid.six() << " " << esid.siy();
759 
760  uint32_t crystid = esid.rawId();
761  esSimMap[crystid] += iHit.energy();
762  }
763 
764  // 2) loop over RecHits
765  for (EcalRecHitCollection::const_iterator recHit = ESRecHit->begin(); recHit != ESRecHit->end(); ++recHit) {
766  ESDetId ESid = ESDetId(recHit->id());
767  if (esSimMap[ESid.rawId()] != 0.) {
768  // Fill log10(Energy) stuff...
769  estotal += recHit->energy();
770  if (recHit->energy() > 0) {
772  meESRecHitLog10Energy_->Fill(log10(recHit->energy()));
773  int log10i = int((log10(recHit->energy()) + 5.) * 10.);
774  if (log10i >= 0 and log10i < escSize)
775  escontr[log10i] += recHit->energy();
776  }
777 
779  meESRecHitSimHitRatio_->Fill(recHit->energy() / esSimMap[ESid.rawId()]);
780  }
781  } else
782  continue;
783  } // loop over the RechitCollection
784 
785  if (meESRecHitLog10EnergyContr_ && estotal != 0) {
786  for (int i = 0; i < escSize; i++) {
787  meESRecHitLog10EnergyContr_->Fill(-5. + (float(i) + 0.5) / 10., escontr[i] / estotal);
788  }
789  }
790  }
791 }
792 
794  // look for max
795  uint32_t unitWithMaxEnergy = 0;
796  float maxEnergy = 0.;
797 
798  MapType::iterator iter;
799  for (iter = themap.begin(); iter != themap.end(); iter++) {
800  if (maxEnergy < (*iter).second) {
801  maxEnergy = (*iter).second;
802  unitWithMaxEnergy = (*iter).first;
803  }
804  }
805 
806  return unitWithMaxEnergy;
807 }
808 
810  int nCellInEta, int nCellInPhi, int CentralEta, int CentralPhi, int CentralZ, MapType &themap) {
811  int goBackInEta = nCellInEta / 2;
812  int goBackInPhi = nCellInPhi / 2;
813  int matrixSize = nCellInEta * nCellInPhi;
814  crystalMatrix.clear();
815  crystalMatrix.resize(matrixSize);
816 
817  int startEta = CentralZ * CentralEta - goBackInEta;
818  int startPhi = CentralPhi - goBackInPhi;
819 
820  int i = 0;
821  for (int ieta = startEta; ieta < startEta + nCellInEta; ieta++) {
822  for (int iphi = startPhi; iphi < startPhi + nCellInPhi; iphi++) {
823  uint32_t index;
824  if (abs(ieta) > 85 || abs(ieta) < 1) {
825  continue;
826  }
827  if (iphi < 1) {
828  index = EBDetId(ieta, iphi + 360).rawId();
829  } else if (iphi > 360) {
830  index = EBDetId(ieta, iphi - 360).rawId();
831  } else {
832  index = EBDetId(ieta, iphi).rawId();
833  }
834  crystalMatrix[i++] = index;
835  }
836  }
837 }
838 
840  int nCellInX, int nCellInY, int CentralX, int CentralY, int CentralZ, MapType &themap) {
841  int goBackInX = nCellInX / 2;
842  int goBackInY = nCellInY / 2;
843  crystalMatrix.clear();
844 
845  int startX = CentralX - goBackInX;
846  int startY = CentralY - goBackInY;
847 
848  for (int ix = startX; ix < startX + nCellInX; ix++) {
849  for (int iy = startY; iy < startY + nCellInY; iy++) {
850  uint32_t index;
851 
852  if (EEDetId::validDetId(ix, iy, CentralZ)) {
853  index = EEDetId(ix, iy, CentralZ).rawId();
854  } else {
855  continue;
856  }
857  crystalMatrix.push_back(index);
858  }
859  }
860 }
EcalRecHitsValidation::meEBRecHitSimHitFlag6_
MonitorElement * meEBRecHitSimHitFlag6_
Definition: EcalRecHitsValidation.h:140
EcalRecHit::kNeighboursRecovered
Definition: EcalRecHit.h:29
EcalCondObjectContainer::end
const_iterator end() const
Definition: EcalCondObjectContainer.h:74
EBDetId::ieta
int ieta() const
get the crystal ieta
Definition: EBDetId.h:49
EcalRecHitsValidation::meEERecHitLog10Energy_
MonitorElement * meEERecHitLog10Energy_
Definition: EcalRecHitsValidation.h:122
mps_fire.i
i
Definition: mps_fire.py:428
EcalChannelStatusCode
Definition: EcalChannelStatusCode.h:18
edm::SortedCollection::const_iterator
std::vector< T >::const_iterator const_iterator
Definition: SortedCollection.h:80
EcalRecHitsValidation::EEuncalibrechitCollection_
edm::InputTag EEuncalibrechitCollection_
Definition: EcalRecHitsValidation.h:80
HLT_FULL_cff.endcapHits
endcapHits
Definition: HLT_FULL_cff.py:84485
edm::Handle::product
T const * product() const
Definition: Handle.h:70
EcalRecHitsValidation::meEBRecHitSimHitRatio13_
MonitorElement * meEBRecHitSimHitRatio13_
Definition: EcalRecHitsValidation.h:106
EcalRecHitsValidation::meEEUnRecHitSimHitRatio_
MonitorElement * meEEUnRecHitSimHitRatio_
Definition: EcalRecHitsValidation.h:111
EcalRecHitsValidation::~EcalRecHitsValidation
~EcalRecHitsValidation() override
Destructor.
Definition: EcalRecHitsValidation.cc:123
EcalRecHitsValidation::EEHits_Token_
edm::EDGetTokenT< CrossingFrame< PCaloHit > > EEHits_Token_
Definition: EcalRecHitsValidation.h:90
vid
Definition: VIDCutFlowResult.h:25
EcalRecHitsValidation::enableEndcaps_
bool enableEndcaps_
Definition: EcalRecHitsValidation.h:81
EcalRecHitsValidation::meEBRecHitsOccupancyFlag8_9_
MonitorElement * meEBRecHitsOccupancyFlag8_9_
Definition: EcalRecHitsValidation.h:131
EcalRecHitsValidation::crystalMatrix
std::vector< uint32_t > crystalMatrix
Definition: EcalRecHitsValidation.h:149
CollectionTags_cfi.EBRecHit
EBRecHit
Definition: CollectionTags_cfi.py:40
edm::Run
Definition: Run.h:45
EBDetId
Definition: EBDetId.h:17
edm
HLT enums.
Definition: AlignableModifier.h:19
EcalRecHitsValidation::meEBRecHitSimHitRatio1011_
MonitorElement * meEBRecHitSimHitRatio1011_
Definition: EcalRecHitsValidation.h:102
EcalRecHitsValidation::outputFile_
std::string outputFile_
Definition: EcalRecHitsValidation.h:74
EcalRecHitsValidation::ESrechitCollection_
edm::InputTag ESrechitCollection_
Definition: EcalRecHitsValidation.h:78
EcalRecHitsValidation::pEcsToken
edm::ESGetToken< EcalChannelStatus, EcalChannelStatusRcd > pEcsToken
Definition: EcalRecHitsValidation.h:93
EcalRecHitsValidation::meEBRecHitSimHitFlag7_
MonitorElement * meEBRecHitSimHitFlag7_
Definition: EcalRecHitsValidation.h:141
EBDetId.h
EcalRecHitsValidation::verbose_
bool verbose_
Definition: EcalRecHitsValidation.h:72
EEDetId.h
CollectionTags_cfi.EERecHit
EERecHit
Definition: CollectionTags_cfi.py:41
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89301
EcalRecHitsValidation::meEEe5x5OverGun_
MonitorElement * meEEe5x5OverGun_
Definition: EcalRecHitsValidation.h:119
l1GtPatternGenerator_cfi.bx
bx
Definition: l1GtPatternGenerator_cfi.py:18
dqm::implementation::NavigatorBase::setCurrentFolder
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
EcalRecHit::kSaturated
Definition: EcalRecHit.h:27
timingPdfMaker.histo
histo
Definition: timingPdfMaker.py:278
edm::SortedCollection
Definition: SortedCollection.h:49
DQMStore.h
EcalRecHitsValidation::analyze
void analyze(const edm::Event &e, const edm::EventSetup &c) override
Analyze.
Definition: EcalRecHitsValidation.cc:292
EcalADCToGeVConstant
Definition: EcalADCToGeVConstant.h:13
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
ESDetId
Definition: ESDetId.h:15
EcalRecHitsValidation::meEBRecHitFlags_
MonitorElement * meEBRecHitFlags_
Definition: EcalRecHitsValidation.h:138
EcalRecHitsValidation::meEEe5x5_
MonitorElement * meEEe5x5_
Definition: EcalRecHitsValidation.h:117
ESDetId.h
EcalTrigTowerDetId
Definition: EcalTrigTowerDetId.h:14
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
EcalRecHitsValidation::meEBe5x5_
MonitorElement * meEBe5x5_
Definition: EcalRecHitsValidation.h:114
EcalRecHitsValidation::meEERecHitSimHitRatio12_
MonitorElement * meEERecHitSimHitRatio12_
Definition: EcalRecHitsValidation.h:105
EcalRecHitsValidation.h
EcalRecHit::kTowerRecovered
Definition: EcalRecHit.h:30
EcalCondObjectContainer
Definition: EcalCondObjectContainer.h:13
EEDetId::ix
int ix() const
Definition: EEDetId.h:77
edm::Handle
Definition: AssociativeIterator.h:50
EcalRecHitsValidation::meEBRecHitSimHitRatioGt35_
MonitorElement * meEBRecHitSimHitRatioGt35_
Definition: EcalRecHitsValidation.h:108
EcalRecHitsValidation::meEBRecHitLog10Energy_
MonitorElement * meEBRecHitLog10Energy_
Definition: EcalRecHitsValidation.h:121
EcalRecHitsValidation::meEERecHitFlags_
MonitorElement * meEERecHitFlags_
Definition: EcalRecHitsValidation.h:144
EcalRecHitsValidation::meEBUnRecHitSimHitRatio_
MonitorElement * meEBUnRecHitSimHitRatio_
Definition: EcalRecHitsValidation.h:110
rpcPointValidation_cfi.recHit
recHit
Definition: rpcPointValidation_cfi.py:7
EcalRecHitsValidation::meEBUnRecHitSimHitRatioGt35_
MonitorElement * meEBUnRecHitSimHitRatioGt35_
Definition: EcalRecHitsValidation.h:112
EcalRecHitsValidation::findBarrelMatrix
void findBarrelMatrix(int nCellInEta, int nCellInPhi, int CentralEta, int CentralPhi, int CentralZ, MapType &themap)
Definition: EcalRecHitsValidation.cc:809
EcalTrivialConditionRetriever.h
LEDCalibrationChannels.iphi
iphi
Definition: LEDCalibrationChannels.py:64
EcalRecHitsValidation::EBuncalibrechitCollection_
edm::InputTag EBuncalibrechitCollection_
Definition: EcalRecHitsValidation.h:79
EcalRecHitsValidation::EBrechitCollection_Token_
edm::EDGetTokenT< EBRecHitCollection > EBrechitCollection_Token_
Definition: EcalRecHitsValidation.h:84
csc
Definition: L1Track.h:19
EBDetId::zside
int zside() const
get the z-side of the crystal (1/-1)
Definition: EBDetId.h:45
CollectionTags_cfi.EBUncalibRecHit
EBUncalibRecHit
Definition: CollectionTags_cfi.py:32
EBDetId::tower
EcalTrigTowerDetId tower() const
get the HCAL/trigger iphi of this crystal
Definition: EBDetId.h:57
EcalRecHitsValidation::meEERecHitSimHitRatio13_
MonitorElement * meEERecHitSimHitRatio13_
Definition: EcalRecHitsValidation.h:107
EcalRecHitsValidation::meGunEnergy_
MonitorElement * meGunEnergy_
Definition: EcalRecHitsValidation.h:96
MixCollection
Definition: MixCollection.h:10
edm::SortedCollection::begin
const_iterator begin() const
Definition: SortedCollection.h:262
EcalRecHitsValidation::meESRecHitLog10Energy_
MonitorElement * meESRecHitLog10Energy_
Definition: EcalRecHitsValidation.h:123
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
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
EcalRecHitsValidation::meEERecHitsOccupancyMinusFlag8_9_
MonitorElement * meEERecHitsOccupancyMinusFlag8_9_
Definition: EcalRecHitsValidation.h:136
EcalCondObjectContainer::find
const_iterator find(uint32_t rawId) const
Definition: EcalCondObjectContainer.h:53
EcalRecHitsValidation::meEBRecHitsOccupancyFlag5_6_
MonitorElement * meEBRecHitsOccupancyFlag5_6_
Definition: EcalRecHitsValidation.h:130
EcalRecHitsValidation::meEEUnRecHitSimHitRatioGt35_
MonitorElement * meEEUnRecHitSimHitRatioGt35_
Definition: EcalRecHitsValidation.h:113
EEDetId::zside
int zside() const
Definition: EEDetId.h:71
EEDetId
Definition: EEDetId.h:14
EcalRecHitsValidation::meEERecHitSimHitFlag7_
MonitorElement * meEERecHitSimHitFlag7_
Definition: EcalRecHitsValidation.h:147
EcalTrigTowerConstituentsMap
Definition: EcalTrigTowerConstituentsMap.h:19
HLT_FULL_cff.barrelHits
barrelHits
Definition: HLT_FULL_cff.py:84484
EcalRecHitsValidation::MapType
std::map< uint32_t, float, std::less< uint32_t > > MapType
Definition: EcalRecHitsValidation.h:50
EcalRecHit::kLeadingEdgeRecovered
Definition: EcalRecHit.h:28
LEDCalibrationChannels.ieta
ieta
Definition: LEDCalibrationChannels.py:63
EcalRecHitsValidation::meEBRecHitLog10EnergyContr_
MonitorElement * meEBRecHitLog10EnergyContr_
Definition: EcalRecHitsValidation.h:124
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:233
EcalRecHitsValidation::bookHistograms
void bookHistograms(DQMStore::IBooker &i, edm::Run const &, edm::EventSetup const &) override
Definition: EcalRecHitsValidation.cc:125
edm::ParameterSet
Definition: ParameterSet.h:47
EcalADCToGeVConstant::getEEValue
float getEEValue() const
Definition: EcalADCToGeVConstant.h:21
AlCaHLTBitMon_ParallelJobs.p
def p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
EcalRecHitsValidation::ESrechitCollection_Token_
edm::EDGetTokenT< ESRecHitCollection > ESrechitCollection_Token_
Definition: EcalRecHitsValidation.h:86
EcalRecHitsValidation::EEuncalibrechitCollection_Token_
edm::EDGetTokenT< EEUncalibratedRecHitCollection > EEuncalibrechitCollection_Token_
Definition: EcalRecHitsValidation.h:88
CollectionTags_cfi.EEUncalibRecHit
EEUncalibRecHit
Definition: CollectionTags_cfi.py:33
edm::SortedCollection::end
const_iterator end() const
Definition: SortedCollection.h:267
EcalRecHitsValidation::meEBRecHitSimHitRatio_
MonitorElement * meEBRecHitSimHitRatio_
Definition: EcalRecHitsValidation.h:99
EcalRecHitsValidation::EErechitCollection_
edm::InputTag EErechitCollection_
Definition: EcalRecHitsValidation.h:77
EcalRecHitsValidation::meEERecHitLog10EnergyContr_
MonitorElement * meEERecHitLog10EnergyContr_
Definition: EcalRecHitsValidation.h:125
funct::tan
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
EcalRecHitsValidation::ESHits_Token_
edm::EDGetTokenT< CrossingFrame< PCaloHit > > ESHits_Token_
Definition: EcalRecHitsValidation.h:91
EcalRecHitsValidation::meEERecHitSimHitvsSimHitFlag5_6_
MonitorElement * meEERecHitSimHitvsSimHitFlag5_6_
Definition: EcalRecHitsValidation.h:145
createfilelist.int
int
Definition: createfilelist.py:10
EcalRecHitsValidation::pttMapToken
edm::ESGetToken< EcalTrigTowerConstituentsMap, IdealGeometryRecord > pttMapToken
Definition: EcalRecHitsValidation.h:94
EcalRecHitsValidation::meEERecHitSimHitRatio_
MonitorElement * meEERecHitSimHitRatio_
Definition: EcalRecHitsValidation.h:100
M_PI
#define M_PI
Definition: BXVectorInputProducer.cc:49
EcalRecHitsValidation::EcalRecHitsValidation
EcalRecHitsValidation(const edm::ParameterSet &ps)
Constructor.
Definition: EcalRecHitsValidation.cc:23
EcalRecHitsValidation::meEERecHitSimHitFlag6_
MonitorElement * meEERecHitSimHitFlag6_
Definition: EcalRecHitsValidation.h:146
EcalRecHitsValidation::EBHits_Token_
edm::EDGetTokenT< CrossingFrame< PCaloHit > > EBHits_Token_
Definition: EcalRecHitsValidation.h:89
EcalRecHitsValidation::meEB5x5RecHitSimHitvsSimHitFlag8_
MonitorElement * meEB5x5RecHitSimHitvsSimHitFlag8_
Definition: EcalRecHitsValidation.h:142
IdealGeometryRecord.h
EcalRecHitsValidation::EBuncalibrechitCollection_Token_
edm::EDGetTokenT< EBUncalibratedRecHitCollection > EBuncalibrechitCollection_Token_
Definition: EcalRecHitsValidation.h:87
edm::EventSetup
Definition: EventSetup.h:58
EcalRecHitsValidation::EErechitCollection_Token_
edm::EDGetTokenT< EERecHitCollection > EErechitCollection_Token_
Definition: EcalRecHitsValidation.h:85
particleFlowClusterECALTimeSelected_cfi.maxEnergy
maxEnergy
Definition: particleFlowClusterECALTimeSelected_cfi.py:10
edm::HepMCProduct::GetEvent
const HepMC::GenEvent * GetEvent() const
Definition: HepMCProduct.h:37
EcalRecHitsValidation::meEERecHitSimHitRatioGt35_
MonitorElement * meEERecHitSimHitRatioGt35_
Definition: EcalRecHitsValidation.h:109
EcalRecHit::kDead
Definition: EcalRecHit.h:31
EEDetId::iy
int iy() const
Definition: EEDetId.h:83
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
EcalRecHitsValidation::meEERecHitsOccupancyPlusFlag5_6_
MonitorElement * meEERecHitsOccupancyPlusFlag5_6_
Definition: EcalRecHitsValidation.h:133
EcalRecHitsValidation::meEBe5x5OverGun_
MonitorElement * meEBe5x5OverGun_
Definition: EcalRecHitsValidation.h:116
EcalRecHitsValidation::findEndcapMatrix
void findEndcapMatrix(int nCellInX, int nCellInY, int CentralX, int CentralY, int CentralZ, MapType &themap)
Definition: EcalRecHitsValidation.cc:839
EcalTrigTowerConstituentsMap.h
EcalRecHitsValidation::meGunEta_
MonitorElement * meGunEta_
Definition: EcalRecHitsValidation.h:97
std
Definition: JetResolutionObject.h:76
DetId::rawId
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
EcalRecHitsValidation::meEBRecHitSimHitvsSimHitFlag5_6_
MonitorElement * meEBRecHitSimHitvsSimHitFlag5_6_
Definition: EcalRecHitsValidation.h:139
EcalTrigTowerConstituentsMap::constituentsOf
std::vector< DetId > constituentsOf(const EcalTrigTowerDetId &id) const
Get the constituent detids for this tower id.
Definition: EcalTrigTowerConstituentsMap.cc:162
EcalRecHitsValidation::hitsProducer_
std::string hitsProducer_
Definition: EcalRecHitsValidation.h:70
dqm::implementation::IBooker::book2D
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:177
EBDetId::ietaAbs
int ietaAbs() const
get the absolute value of the crystal ieta
Definition: EBDetId.h:47
EcalRecHitsValidation::meESRecHitSimHitRatio_
MonitorElement * meESRecHitSimHitRatio_
Definition: EcalRecHitsValidation.h:101
EcalRecHitsValidation::meEERecHitSimHitRatio1011_
MonitorElement * meEERecHitSimHitRatio1011_
Definition: EcalRecHitsValidation.h:103
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
EcalRecHitsValidation::meEEe5x5OverSimHits_
MonitorElement * meEEe5x5OverSimHits_
Definition: EcalRecHitsValidation.h:118
EcalRecHitsValidation::HepMCLabel
std::string HepMCLabel
Definition: EcalRecHitsValidation.h:69
dqm-mbProfile.log
log
Definition: dqm-mbProfile.py:17
dqm::implementation::IBooker
Definition: DQMStore.h:43
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
EEDetId::validDetId
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.h:248
EcalCondObjectContainer::const_iterator
std::vector< Item >::const_iterator const_iterator
Definition: EcalCondObjectContainer.h:19
EBDetId::iphi
int iphi() const
get the crystal iphi
Definition: EBDetId.h:51
EcalRecHitsValidation::pAgc
edm::ESGetToken< EcalADCToGeVConstant, EcalADCToGeVConstantRcd > pAgc
Definition: EcalRecHitsValidation.h:92
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
EcalRecHitsValidation::HepMCLabel_Token_
edm::EDGetTokenT< edm::HepMCProduct > HepMCLabel_Token_
Definition: EcalRecHitsValidation.h:83
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:56
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
DeDxTools::esConsumes
ESGetTokenH3DDVariant esConsumes(std::string const &Reccord, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
edm::Event
Definition: Event.h:73
EcalRecHitsValidation::EBrechitCollection_
edm::InputTag EBrechitCollection_
Definition: EcalRecHitsValidation.h:76
gedPhotons_cfi.preshowerHits
preshowerHits
Definition: gedPhotons_cfi.py:48
EcalRecHitsValidation::meEERecHitLog10Energy5x5Contr_
MonitorElement * meEERecHitLog10Energy5x5Contr_
Definition: EcalRecHitsValidation.h:128
EcalRecHitsValidation::meEBe5x5OverSimHits_
MonitorElement * meEBe5x5OverSimHits_
Definition: EcalRecHitsValidation.h:115
EcalRecHitsValidation::meESRecHitLog10EnergyContr_
MonitorElement * meESRecHitLog10EnergyContr_
Definition: EcalRecHitsValidation.h:126
EcalADCToGeVConstant::getEBValue
float getEBValue() const
Definition: EcalADCToGeVConstant.h:20
EcalRecHitsValidation::meEERecHitsOccupancyMinusFlag5_6_
MonitorElement * meEERecHitsOccupancyMinusFlag5_6_
Definition: EcalRecHitsValidation.h:134
edm::InputTag
Definition: InputTag.h:15
EcalChannelStatusRcd.h
EcalRecHitsValidation::meGunPhi_
MonitorElement * meGunPhi_
Definition: EcalRecHitsValidation.h:98
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
RemoveAddSevLevel.flag
flag
Definition: RemoveAddSevLevel.py:117
EcalRecHitsValidation::getUnitWithMaxEnergy
uint32_t getUnitWithMaxEnergy(MapType &themap)
Definition: EcalRecHitsValidation.cc:793
cms
Namespace of DDCMS conversion namespace.
Definition: ProducerAnalyzer.cc:21
EcalRecHitsValidation::meEBRecHitLog10Energy5x5Contr_
MonitorElement * meEBRecHitLog10Energy5x5Contr_
Definition: EcalRecHitsValidation.h:127
EcalRecHitsValidation::meEBRecHitSimHitRatio12_
MonitorElement * meEBRecHitSimHitRatio12_
Definition: EcalRecHitsValidation.h:104
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
EcalRecHitsValidation::meEERecHitsOccupancyPlusFlag8_9_
MonitorElement * meEERecHitsOccupancyPlusFlag8_9_
Definition: EcalRecHitsValidation.h:135