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