CMS 3D CMS Logo

HcalSimHitsValidation.cc
Go to the documentation of this file.
3 
5  // DQM ROOT output
6  outputFile_ = conf.getUntrackedParameter<std::string>("outputFile", "myfile.root");
7  testNumber_ = conf.getUntrackedParameter<bool>("TestNumber", false);
8  auxPlots_ = conf.getUntrackedParameter<bool>("auxiliaryPlots", false);
9 
10  // register for data access
11  g4Label_ = conf.getUntrackedParameter<std::string>("ModuleLabel", "g4SimHits");
12  hcalHits_ = conf.getUntrackedParameter<std::string>("HcalHitCollection", "HcalHits");
13  ebHits_ = conf.getUntrackedParameter<std::string>("EBHitCollection", "EcalHitsEB");
14  eeHits_ = conf.getUntrackedParameter<std::string>("EEHitCollection", "EcalHitsEE");
15 
16  // import sampling factors
17  hf1_ = conf.getParameter<double>("hf1");
18  hf2_ = conf.getParameter<double>("hf2");
19 
20  tok_evt_ = consumes<edm::HepMCProduct>(edm::InputTag("generatorSmeared"));
21  tok_hcal_ = consumes<edm::PCaloHitContainer>(edm::InputTag(g4Label_, hcalHits_));
22  tok_ecalEB_ = consumes<edm::PCaloHitContainer>(edm::InputTag(g4Label_, ebHits_));
23  tok_ecalEE_ = consumes<edm::PCaloHitContainer>(edm::InputTag(g4Label_, eeHits_));
24  tok_HRNDC_ = esConsumes<HcalDDDRecConstants, HcalRecNumberingRecord, edm::Transition::BeginRun>();
25  tok_geom_ = esConsumes<CaloGeometry, CaloGeometryRecord>();
26 
27  if (!outputFile_.empty()) {
28  edm::LogVerbatim("OutputInfo") << " Hcal SimHit Task histograms will be saved to '" << outputFile_.c_str() << "'";
29  } else {
30  edm::LogVerbatim("OutputInfo") << " Hcal SimHit Task histograms will NOT be saved";
31  }
32 
33  nevtot = 0;
34 }
35 
37 
39  hcons_ = &es.getData(tok_HRNDC_);
44 
45  // Get Phi segmentation from geometry, use the max phi number so that all iphi
46  // values are included.
47 
48  int NphiMax = hcons_->getNPhi(0);
49 
50  NphiMax = (hcons_->getNPhi(1) > NphiMax ? hcons_->getNPhi(1) : NphiMax);
51  NphiMax = (hcons_->getNPhi(2) > NphiMax ? hcons_->getNPhi(2) : NphiMax);
52  NphiMax = (hcons_->getNPhi(3) > NphiMax ? hcons_->getNPhi(3) : NphiMax);
53 
54  // Center the iphi bins on the integers
55  // float iphi_min = 0.5;
56  // float iphi_max = NphiMax + 0.5;
57  // int iphi_bins = (int) (iphi_max - iphi_min);
58 
59  int iEtaHBMax = hcons_->getEtaRange(0).second;
60  int iEtaHEMax = std::max(hcons_->getEtaRange(1).second, 1);
61  int iEtaHFMax = hcons_->getEtaRange(2).second;
62  int iEtaHOMax = hcons_->getEtaRange(3).second;
63 
64  // Retain classic behavior, all plots have same ieta range.
65  // Comment out code to allow each subdetector to have its on range
66 
67  int iEtaMax = (iEtaHBMax > iEtaHEMax ? iEtaHBMax : iEtaHEMax);
68  iEtaMax = (iEtaMax > iEtaHFMax ? iEtaMax : iEtaHFMax);
69  iEtaMax = (iEtaMax > iEtaHOMax ? iEtaMax : iEtaHOMax);
70 
71  iEtaHBMax = iEtaMax;
72  iEtaHEMax = iEtaMax;
73  iEtaHFMax = iEtaMax;
74  iEtaHOMax = iEtaMax;
75 
76  // Give an empty bin around the subdet ieta range to make it clear that all
77  // ieta rings have been included
78  float ieta_min_HB = -iEtaHBMax - 1.5;
79  float ieta_max_HB = iEtaHBMax + 1.5;
80  int ieta_bins_HB = (int)(ieta_max_HB - ieta_min_HB);
81 
82  float ieta_min_HE = -iEtaHEMax - 1.5;
83  float ieta_max_HE = iEtaHEMax + 1.5;
84  int ieta_bins_HE = (int)(ieta_max_HE - ieta_min_HE);
85 
86  float ieta_min_HF = -iEtaHFMax - 1.5;
87  float ieta_max_HF = iEtaHFMax + 1.5;
88  int ieta_bins_HF = (int)(ieta_max_HF - ieta_min_HF);
89 
90  float ieta_min_HO = -iEtaHOMax - 1.5;
91  float ieta_max_HO = iEtaHOMax + 1.5;
92  int ieta_bins_HO = (int)(ieta_max_HO - ieta_min_HO);
93 
94  Char_t histo[200];
95 
96  ib.setCurrentFolder("HcalHitsV/HcalSimHitTask");
97 
98  if (auxPlots_) {
99  // General counters
100  for (int depth = 0; depth <= maxDepthHB_; depth++) {
101  if (depth == 0) {
102  sprintf(histo, "N_HB");
103  } else {
104  sprintf(histo, "N_HB%d", depth);
105  }
106 
107  Nhb.push_back(ib.book1D(histo, histo, 2600, 0., 2600.));
108  }
109  for (int depth = 0; depth <= maxDepthHE_; depth++) {
110  if (depth == 0) {
111  sprintf(histo, "N_HE");
112  } else {
113  sprintf(histo, "N_HE%d", depth);
114  }
115 
116  Nhe.push_back(ib.book1D(histo, histo, 2600, 0., 2600.));
117  }
118 
119  sprintf(histo, "N_HO");
120  Nho = ib.book1D(histo, histo, 2200, 0., 2200.);
121 
122  for (int depth = 0; depth <= maxDepthHF_; depth++) {
123  if (depth == 0) {
124  sprintf(histo, "N_HF");
125  } else {
126  sprintf(histo, "N_HF%d", depth);
127  }
128 
129  Nhf.push_back(ib.book1D(histo, histo, 1800, 0., 1800.));
130  }
131 
132  // Mean energy vs iEta TProfiles
133  for (int depth = 0; depth <= maxDepthHB_; depth++) {
134  if (depth == 0) {
135  sprintf(histo, "emean_vs_ieta_HB");
136  } else {
137  sprintf(histo, "emean_vs_ieta_HB%d", depth);
138  }
139 
140  emean_vs_ieta_HB.push_back(
141  ib.bookProfile(histo, histo, ieta_bins_HB, ieta_min_HB, ieta_max_HB, -10., 2000., " "));
142  }
143  for (int depth = 0; depth <= maxDepthHE_; depth++) {
144  if (depth == 0) {
145  sprintf(histo, "emean_vs_ieta_HE");
146  } else {
147  sprintf(histo, "emean_vs_ieta_HE%d", depth);
148  }
149 
150  emean_vs_ieta_HE.push_back(
151  ib.bookProfile(histo, histo, ieta_bins_HE, ieta_min_HE, ieta_max_HE, -10., 2000., " "));
152  }
153 
154  sprintf(histo, "emean_vs_ieta_HO");
155  emean_vs_ieta_HO = ib.bookProfile(histo, histo, ieta_bins_HO, ieta_min_HO, ieta_max_HO, -10., 2000., " ");
156 
157  for (int depth = 0; depth <= maxDepthHF_; depth++) {
158  if (depth == 0) {
159  sprintf(histo, "emean_vs_ieta_HF");
160  } else {
161  sprintf(histo, "emean_vs_ieta_HF%d", depth);
162  }
163 
164  emean_vs_ieta_HF.push_back(
165  ib.bookProfile(histo, histo, ieta_bins_HF, ieta_min_HF, ieta_max_HF, -10., 2000., " "));
166  }
167 
168  // Occupancy vs. iEta TH1Fs
169  for (int depth = 0; depth <= maxDepthHB_; depth++) {
170  if (depth == 0) {
171  sprintf(histo, "occupancy_vs_ieta_HB");
172  } else {
173  sprintf(histo, "occupancy_vs_ieta_HB%d", depth);
174  }
175 
176  occupancy_vs_ieta_HB.push_back(ib.book1D(histo, histo, ieta_bins_HB, ieta_min_HB, ieta_max_HB));
177  }
178  for (int depth = 0; depth <= maxDepthHE_; depth++) {
179  if (depth == 0) {
180  sprintf(histo, "occupancy_vs_ieta_HE");
181  } else {
182  sprintf(histo, "occupancy_vs_ieta_HE%d", depth);
183  }
184 
185  occupancy_vs_ieta_HE.push_back(ib.book1D(histo, histo, ieta_bins_HE, ieta_min_HE, ieta_max_HE));
186  }
187 
188  sprintf(histo, "occupancy_vs_ieta_HO");
189  occupancy_vs_ieta_HO = ib.book1D(histo, histo, ieta_bins_HO, ieta_min_HO, ieta_max_HO);
190 
191  for (int depth = 0; depth <= maxDepthHF_; depth++) {
192  if (depth == 0) {
193  sprintf(histo, "occupancy_vs_ieta_HF");
194  } else {
195  sprintf(histo, "occupancy_vs_ieta_HF%d", depth);
196  }
197 
198  occupancy_vs_ieta_HF.push_back(ib.book1D(histo, histo, ieta_bins_HF, ieta_min_HF, ieta_max_HF));
199  }
200 
201  // Energy spectra
202  for (int depth = 0; depth <= maxDepthHB_; depth++) {
203  if (depth == 0) {
204  sprintf(histo, "HcalSimHitTask_energy_of_simhits_HB");
205  } else {
206  sprintf(histo, "HcalSimHitTask_energy_of_simhits_HB%d", depth);
207  }
208 
209  meSimHitsEnergyHB.push_back(ib.book1D(histo, histo, 510, -0.1, 5.));
210  }
211  for (int depth = 0; depth <= maxDepthHE_; depth++) {
212  if (depth == 0) {
213  sprintf(histo, "HcalSimHitTask_energy_of_simhits_HE");
214  } else {
215  sprintf(histo, "HcalSimHitTask_energy_of_simhits_HE%d", depth);
216  }
217 
218  meSimHitsEnergyHE.push_back(ib.book1D(histo, histo, 510, -0.1, 5.));
219  }
220 
221  sprintf(histo, "HcalSimHitTask_energy_of_simhits_HO");
222  meSimHitsEnergyHO = ib.book1D(histo, histo, 510, -0.1, 5.);
223 
224  for (int depth = 0; depth <= maxDepthHF_; depth++) {
225  if (depth == 0) {
226  sprintf(histo, "HcalSimHitTask_energy_of_simhits_HF");
227  } else {
228  sprintf(histo, "HcalSimHitTask_energy_of_simhits_HF%d", depth);
229  }
230 
231  meSimHitsEnergyHF.push_back(ib.book1D(histo, histo, 1010, -5., 500.));
232  }
233 
234  } // auxPlots_
235 
236  // Energy in Cone
237  sprintf(histo, "HcalSimHitTask_En_simhits_cone_profile_vs_ieta_all_depths");
238  meEnConeEtaProfile = ib.bookProfile(histo, histo, ieta_bins_HF, ieta_min_HF, ieta_max_HF, -10., 200., " ");
239 
240  sprintf(histo, "HcalSimHitTask_En_simhits_cone_profile_vs_ieta_all_depths_E");
241  meEnConeEtaProfile_E = ib.bookProfile(histo, histo, ieta_bins_HF, ieta_min_HF, ieta_max_HF, -10., 200., " ");
242 
243  sprintf(histo, "HcalSimHitTask_En_simhits_cone_profile_vs_ieta_all_depths_EH");
244  meEnConeEtaProfile_EH = ib.bookProfile(histo, histo, ieta_bins_HF, ieta_min_HF, ieta_max_HF, -10., 200., " ");
245 }
246 
248  if (auxPlots_) {
249  for (int i = 1; i <= occupancy_vs_ieta_HB[0]->getNbinsX(); i++) {
250  int ieta = i - 43; // -41 -1, 1 41
251 
252  float phi_factor;
253 
254  if (std::abs(ieta) <= 20)
255  phi_factor = 72.;
256  else if (std::abs(ieta) < 40)
257  phi_factor = 36.;
258  else
259  phi_factor = 18.;
260 
261  float cnorm;
262 
263  // Occupancy vs. iEta TH1Fs
264  for (int depth = 0; depth <= maxDepthHB_; depth++) {
265  cnorm = occupancy_vs_ieta_HB[depth]->getBinContent(i) / (phi_factor * nevtot);
266  occupancy_vs_ieta_HB[depth]->setBinContent(i, cnorm);
267  }
268  for (int depth = 0; depth <= maxDepthHE_; depth++) {
269  cnorm = occupancy_vs_ieta_HE[depth]->getBinContent(i) / (phi_factor * nevtot);
270  occupancy_vs_ieta_HE[depth]->setBinContent(i, cnorm);
271  }
272 
273  cnorm = occupancy_vs_ieta_HO->getBinContent(i) / (phi_factor * nevtot);
275 
276  for (int depth = 0; depth <= maxDepthHF_; depth++) {
277  cnorm = occupancy_vs_ieta_HF[depth]->getBinContent(i) / (phi_factor * nevtot);
278  occupancy_vs_ieta_HF[depth]->setBinContent(i, cnorm);
279  }
280  }
281  }
282 
283  // let's see if this breaks anything
284  // if ( outputFile_.size() != 0 && dbe_ ) dbe_->save(outputFile_);
285 }
286 
288  //===========================================================================
289  // Getting SimHits
290  //===========================================================================
291 
292  double phi_MC = -999.; // phi of initial particle from HepMC
293  double eta_MC = -999.; // eta of initial particle from HepMC
294 
296  ev.getByToken(tok_evt_, evtMC); // generator in late 310_preX
297  if (!evtMC.isValid()) {
298  edm::LogVerbatim("OutputInfo") << "no HepMCProduct found";
299  }
300 
301  // MC particle with highest pt is taken as a direction reference
302  double maxPt = -99999.;
303  int npart = 0;
304 
305  const HepMC::GenEvent *myGenEvent = evtMC->GetEvent();
306  for (HepMC::GenEvent::particle_const_iterator p = myGenEvent->particles_begin(); p != myGenEvent->particles_end();
307  ++p) {
308  double phip = (*p)->momentum().phi();
309  double etap = (*p)->momentum().eta();
310  double pt = (*p)->momentum().perp();
311  if (pt > maxPt) {
312  npart++;
313  maxPt = pt;
314  phi_MC = phip;
315  eta_MC = etap;
316  }
317  }
318 
319  double partR = 0.3;
320 
321  // Hcal SimHits
322 
323  // Approximate calibration constants
324  const float calib_HB = 120.;
325  const float calib_HE = 190.;
326  const float calib_HF1 = hf1_; // 1.0/0.383;
327  const float calib_HF2 = hf2_; // 1.0/0.368;
328 
330  ev.getByToken(tok_hcal_, hcalHits);
331  const auto SimHitResult = hcalHits.product();
332 
333  float eta_diff;
334  float etaMax = 9999;
335  int ietaMax = 0;
336 
337  double HcalCone = 0;
338 
339  geometry_ = &c.getData(tok_geom_);
340 
341  for (std::vector<PCaloHit>::const_iterator SimHits = SimHitResult->begin(); SimHits != SimHitResult->end();
342  ++SimHits) {
343  HcalDetId cell;
344  if (testNumber_)
345  cell = HcalHitRelabeller::relabel(SimHits->id(), hcons_);
346  else
347  cell = HcalDetId(SimHits->id());
348 
349  auto cellGeometry = geometry_->getSubdetectorGeometry(cell)->getGeometry(cell);
350  double etaS = cellGeometry->getPosition().eta();
351  double phiS = cellGeometry->getPosition().phi();
352  double en = SimHits->energy();
353 
354  int sub = cell.subdet();
355  int depth = cell.depth();
356  double ieta = cell.ieta();
357 
358  // Energy in Cone
359  double r = dR(eta_MC, phi_MC, etaS, phiS);
360 
361  if (r < partR) {
362  eta_diff = std::abs(eta_MC - etaS);
363  if (eta_diff < etaMax) {
364  etaMax = eta_diff;
365  ietaMax = cell.ieta();
366  }
367  // Approximation of calibration
368  if (sub == 1)
369  HcalCone += en * calib_HB;
370  else if (sub == 2)
371  HcalCone += en * calib_HE;
372  else if (sub == 4 && (depth == 1 || depth == 3))
373  HcalCone += en * calib_HF1;
374  else if (sub == 4 && (depth == 2 || depth == 4))
375  HcalCone += en * calib_HF2;
376  }
377 
378  if (auxPlots_) {
379  // HB
380  if (sub == 1) {
381  meSimHitsEnergyHB[0]->Fill(en);
382  meSimHitsEnergyHB[depth]->Fill(en);
383 
384  emean_vs_ieta_HB[0]->Fill(double(ieta), en);
385  emean_vs_ieta_HB[depth]->Fill(double(ieta), en);
386 
387  occupancy_vs_ieta_HB[0]->Fill(double(ieta));
388  occupancy_vs_ieta_HB[depth]->Fill(double(ieta));
389  }
390  // HE
391  if (sub == 2 && maxDepthHE_ > 0) {
392  meSimHitsEnergyHE[0]->Fill(en);
393  meSimHitsEnergyHE[depth]->Fill(en);
394 
395  emean_vs_ieta_HE[0]->Fill(double(ieta), en);
396  emean_vs_ieta_HE[depth]->Fill(double(ieta), en);
397 
398  occupancy_vs_ieta_HE[0]->Fill(double(ieta));
399  occupancy_vs_ieta_HE[depth]->Fill(double(ieta));
400  }
401  // HO
402  if (sub == 3) {
403  meSimHitsEnergyHO->Fill(en);
404 
405  emean_vs_ieta_HO->Fill(double(ieta), en);
406 
407  occupancy_vs_ieta_HO->Fill(double(ieta));
408  }
409  // HF
410  if (sub == 4) {
411  meSimHitsEnergyHF[0]->Fill(en);
412  meSimHitsEnergyHF[depth]->Fill(en);
413 
414  emean_vs_ieta_HF[0]->Fill(double(ieta), en);
415  emean_vs_ieta_HF[depth]->Fill(double(ieta), en);
416 
417  occupancy_vs_ieta_HF[0]->Fill(double(ieta));
418  occupancy_vs_ieta_HF[depth]->Fill(double(ieta));
419  }
420 
421  } // auxPlots_
422 
423  } // Loop over SimHits
424 
425  // Ecal EB SimHits
426  double EcalCone = 0;
427 
428  if (!ebHits_.empty()) {
430  ev.getByToken(tok_ecalEB_, ecalEBHits);
431  const auto SimHitResultEB = ecalEBHits.product();
432 
433  for (std::vector<PCaloHit>::const_iterator SimHits = SimHitResultEB->begin(); SimHits != SimHitResultEB->end();
434  ++SimHits) {
435  EBDetId EBid = EBDetId(SimHits->id());
436 
437  auto cellGeometry = geometry_->getSubdetectorGeometry(EBid)->getGeometry(EBid);
438  double etaS = cellGeometry->getPosition().eta();
439  double phiS = cellGeometry->getPosition().phi();
440  double en = SimHits->energy();
441 
442  double r = dR(eta_MC, phi_MC, etaS, phiS);
443 
444  if (r < partR)
445  EcalCone += en;
446  }
447  } // ebHits_
448 
449  // Ecal EE SimHits
450  if (!eeHits_.empty()) {
452  ev.getByToken(tok_ecalEE_, ecalEEHits);
453  const auto SimHitResultEE = ecalEEHits.product();
454 
455  for (std::vector<PCaloHit>::const_iterator SimHits = SimHitResultEE->begin(); SimHits != SimHitResultEE->end();
456  ++SimHits) {
457  EEDetId EEid = EEDetId(SimHits->id());
458 
459  auto cellGeometry = geometry_->getSubdetectorGeometry(EEid)->getGeometry(EEid);
460  double etaS = cellGeometry->getPosition().eta();
461  double phiS = cellGeometry->getPosition().phi();
462  double en = SimHits->energy();
463 
464  double r = dR(eta_MC, phi_MC, etaS, phiS);
465 
466  if (r < partR)
467  EcalCone += en;
468  }
469  } // eeHits_
470 
471  if (ietaMax != 0) { // If ietaMax == 0, there were no good HCAL SimHits
472  meEnConeEtaProfile->Fill(double(ietaMax), HcalCone);
473  meEnConeEtaProfile_E->Fill(double(ietaMax), EcalCone);
474  meEnConeEtaProfile_EH->Fill(double(ietaMax), HcalCone + EcalCone);
475  }
476 
477  nevtot++;
478 }
479 
480 double HcalSimHitsValidation::dR(double eta1, double phi1, double eta2, double phi2) {
481  double PI = 3.1415926535898;
482  double deltaphi = phi1 - phi2;
483  if (phi2 > phi1) {
484  deltaphi = phi2 - phi1;
485  }
486  if (deltaphi > PI) {
487  deltaphi = 2. * PI - deltaphi;
488  }
489  double deltaeta = eta2 - eta1;
490  double tmp = sqrt(deltaeta * deltaeta + deltaphi * deltaphi);
491  return tmp;
492 }
493 
494 double HcalSimHitsValidation::phi12(double phi1, double en1, double phi2, double en2) {
495  // weighted mean value of phi1 and phi2
496 
497  double tmp;
498  double PI = 3.1415926535898;
499  double a1 = phi1;
500  double a2 = phi2;
501 
502  if (a1 > 0.5 * PI && a2 < 0.)
503  a2 += 2 * PI;
504  if (a2 > 0.5 * PI && a1 < 0.)
505  a1 += 2 * PI;
506  tmp = (a1 * en1 + a2 * en2) / (en1 + en2);
507  if (tmp > PI)
508  tmp -= 2. * PI;
509 
510  return tmp;
511 }
512 
513 double HcalSimHitsValidation::dPhiWsign(double phi1, double phi2) {
514  // clockwise phi2 w.r.t phi1 means "+" phi distance
515  // anti-clockwise phi2 w.r.t phi1 means "-" phi distance
516 
517  double PI = 3.1415926535898;
518  double a1 = phi1;
519  double a2 = phi2;
520  double tmp = a2 - a1;
521  if (a1 * a2 < 0.) {
522  if (a1 > 0.5 * PI)
523  tmp += 2. * PI;
524  if (a2 > 0.5 * PI)
525  tmp -= 2. * PI;
526  }
527  return tmp;
528 }
529 
PI
Definition: PayloadInspector.h:21
HcalSimHitsValidation.h
HcalSimHitsValidation::emean_vs_ieta_HE
std::vector< MonitorElement * > emean_vs_ieta_HE
Definition: HcalSimHitsValidation.h:87
HcalSimHitsValidation::tok_geom_
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > tok_geom_
Definition: HcalSimHitsValidation.h:65
mps_fire.i
i
Definition: mps_fire.py:428
HcalSimHitsValidation::tok_hcal_
edm::EDGetTokenT< edm::PCaloHitContainer > tok_hcal_
Definition: HcalSimHitsValidation.h:61
edm::Handle::product
T const * product() const
Definition: Handle.h:70
HcalSimHitsValidation::occupancy_vs_ieta_HE
std::vector< MonitorElement * > occupancy_vs_ieta_HE
Definition: HcalSimHitsValidation.h:92
HcalSimHitsValidation::occupancy_vs_ieta_HB
std::vector< MonitorElement * > occupancy_vs_ieta_HB
Definition: HcalSimHitsValidation.h:91
HcalSimHitsValidation::tok_evt_
edm::EDGetTokenT< edm::HepMCProduct > tok_evt_
Definition: HcalSimHitsValidation.h:60
HcalSimHitsValidation::tok_HRNDC_
edm::ESGetToken< HcalDDDRecConstants, HcalRecNumberingRecord > tok_HRNDC_
Definition: HcalSimHitsValidation.h:64
PI
#define PI
Definition: QcdUeDQM.h:37
DiDispStaMuonMonitor_cfi.pt
pt
Definition: DiDispStaMuonMonitor_cfi.py:39
HcalSimHitsValidation::outputFile_
std::string outputFile_
Definition: HcalSimHitsValidation.h:57
edm::Run
Definition: Run.h:45
HcalSimHitsValidation::nevtot
int nevtot
Definition: HcalSimHitsValidation.h:108
EBDetId
Definition: EBDetId.h:17
HcalSimHitsValidation::maxDepthHB_
int maxDepthHB_
Definition: HcalSimHitsValidation.h:69
CaloGeometry::getSubdetectorGeometry
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
Definition: CaloGeometry.cc:34
timingPdfMaker.histo
histo
Definition: timingPdfMaker.py:278
L1TrackerEtMissProducer_cfi.maxPt
maxPt
Definition: L1TrackerEtMissProducer_cfi.py:14
HcalSimHitsValidation::meEnConeEtaProfile
MonitorElement * meEnConeEtaProfile
Definition: HcalSimHitsValidation.h:97
HcalSimHitsValidation::meEnConeEtaProfile_EH
MonitorElement * meEnConeEtaProfile_EH
Definition: HcalSimHitsValidation.h:99
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
HcalDDDRecConstants::getNPhi
int getNPhi(const int &type) const
Definition: HcalDDDRecConstants.h:93
HcalSimHitsValidation::bookHistograms
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Definition: HcalSimHitsValidation.cc:38
createJobs.tmp
tmp
align.sh
Definition: createJobs.py:716
HcalSimHitsValidation::g4Label_
std::string g4Label_
Definition: HcalSimHitsValidation.h:58
edm::Handle< edm::HepMCProduct >
HcalSimHitsValidation::endJob
void endJob() override
Definition: HcalSimHitsValidation.cc:247
HcalSimHitsValidation::geometry_
const CaloGeometry * geometry_
Definition: HcalSimHitsValidation.h:68
npart
double npart
Definition: HydjetWrapper.h:46
HcalSimHitsValidation::ebHits_
std::string ebHits_
Definition: HcalSimHitsValidation.h:58
HepMC::GenEvent
Definition: hepmc_rootio.cc:9
HcalSimHitsValidation::hcons_
const HcalDDDRecConstants * hcons_
Definition: HcalSimHitsValidation.h:67
testProducerWithPsetDescEmpty_cfi.a2
a2
Definition: testProducerWithPsetDescEmpty_cfi.py:35
HcalSimHitsValidation
Definition: HcalSimHitsValidation.h:42
HcalSimHitsValidation::meSimHitsEnergyHO
MonitorElement * meSimHitsEnergyHO
Definition: HcalSimHitsValidation.h:104
HcalSimHitsValidation::occupancy_vs_ieta_HO
MonitorElement * occupancy_vs_ieta_HO
Definition: HcalSimHitsValidation.h:93
HcalSimHitsValidation::maxDepthHF_
int maxDepthHF_
Definition: HcalSimHitsValidation.h:70
HcalSimHitsValidation::dPhiWsign
double dPhiWsign(double phi1, double phi2)
Definition: HcalSimHitsValidation.cc:513
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
HcalSimHitsValidation::HcalSimHitsValidation
HcalSimHitsValidation(edm::ParameterSet const &conf)
Definition: HcalSimHitsValidation.cc:4
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
HLT_FULL_cff.eta2
eta2
Definition: HLT_FULL_cff.py:9551
HcalSimHitsValidation::Nhf
std::vector< MonitorElement * > Nhf
Definition: HcalSimHitsValidation.h:79
HcalSimHitsValidation::auxPlots_
bool auxPlots_
Definition: HcalSimHitsValidation.h:73
HcalSimHitsValidation::Nho
MonitorElement * Nho
Definition: HcalSimHitsValidation.h:78
HcalSimHitsValidation::Nhe
std::vector< MonitorElement * > Nhe
Definition: HcalSimHitsValidation.h:77
HcalSimHitsValidation::emean_vs_ieta_HB
std::vector< MonitorElement * > emean_vs_ieta_HB
Definition: HcalSimHitsValidation.h:86
LEDCalibrationChannels.depth
depth
Definition: LEDCalibrationChannels.py:65
EEDetId
Definition: EEDetId.h:14
HLT_FULL_cff.eta1
eta1
Definition: HLT_FULL_cff.py:9550
LEDCalibrationChannels.ieta
ieta
Definition: LEDCalibrationChannels.py:63
HcalSimHitsValidation::tok_ecalEB_
edm::EDGetTokenT< edm::PCaloHitContainer > tok_ecalEB_
Definition: HcalSimHitsValidation.h:62
edm::ParameterSet
Definition: ParameterSet.h:47
HcalSimHitsValidation::analyze
void analyze(edm::Event const &ev, edm::EventSetup const &c) override
Definition: HcalSimHitsValidation.cc:287
HcalSimHitsValidation::emean_vs_ieta_HO
MonitorElement * emean_vs_ieta_HO
Definition: HcalSimHitsValidation.h:88
AlCaHLTBitMon_ParallelJobs.p
def p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
HcalSimHitsValidation::Nhb
std::vector< MonitorElement * > Nhb
Definition: HcalSimHitsValidation.h:76
HcalSimHitsValidation::eeHits_
std::string eeHits_
Definition: HcalSimHitsValidation.h:58
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
HcalSimHitsValidation::dR
double dR(double eta1, double phi1, double eta2, double phi2)
Definition: HcalSimHitsValidation.cc:480
HcalHitRelabeller.h
HcalDetId::subdet
constexpr HcalSubdetector subdet() const
get the subdetector
Definition: HcalDetId.h:138
HcalDetId
Definition: HcalDetId.h:12
createfilelist.int
int
Definition: createfilelist.py:10
HcalSimHitsValidation::testNumber_
bool testNumber_
Definition: HcalSimHitsValidation.h:72
cuy.ib
ib
Definition: cuy.py:661
CaloSubdetectorGeometry::getGeometry
virtual std::shared_ptr< const CaloCellGeometry > getGeometry(const DetId &id) const
Get the cell geometry of a given detector id. Should return false if not found.
Definition: CaloSubdetectorGeometry.cc:36
edm::EventSetup
Definition: EventSetup.h:58
edm::HepMCProduct::GetEvent
const HepMC::GenEvent * GetEvent() const
Definition: HepMCProduct.h:37
HcalSimHitsValidation::occupancy_vs_ieta_HF
std::vector< MonitorElement * > occupancy_vs_ieta_HF
Definition: HcalSimHitsValidation.h:94
HcalSimHitsValidation::hcalHits_
std::string hcalHits_
Definition: HcalSimHitsValidation.h:58
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::EventSetup::getData
bool getData(T &iHolder) const
Definition: EventSetup.h:127
alignCSCRings.r
r
Definition: alignCSCRings.py:93
HcalHitRelabeller::relabel
DetId relabel(const uint32_t testId) const
Definition: HcalHitRelabeller.cc:49
dqm::impl::MonitorElement::setBinContent
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
Definition: MonitorElement.cc:682
HcalSimHitsValidation::hf2_
double hf2_
Definition: HcalSimHitsValidation.h:112
writedatasetfile.run
run
Definition: writedatasetfile.py:27
HcalSimHitsValidation::meSimHitsEnergyHB
std::vector< MonitorElement * > meSimHitsEnergyHB
Definition: HcalSimHitsValidation.h:102
HcalDDDRecConstants::getEtaRange
std::pair< int, int > getEtaRange(const int &i) const
Definition: HcalDDDRecConstants.h:74
HcalSimHitsValidation::tok_ecalEE_
edm::EDGetTokenT< edm::PCaloHitContainer > tok_ecalEE_
Definition: HcalSimHitsValidation.h:63
HcalSimHitsValidation::meSimHitsEnergyHF
std::vector< MonitorElement * > meSimHitsEnergyHF
Definition: HcalSimHitsValidation.h:105
hcalTTPDigis_cfi.iEtaMax
iEtaMax
Definition: hcalTTPDigis_cfi.py:16
edm::LogVerbatim
Log< level::Info, true > LogVerbatim
Definition: MessageLogger.h:128
HcalSimHitsValidation::phi12
double phi12(double phi1, double en1, double phi2, double en2)
Definition: HcalSimHitsValidation.cc:494
HcalSimHitsValidation::~HcalSimHitsValidation
~HcalSimHitsValidation() override
Definition: HcalSimHitsValidation.cc:36
ev
bool ev
Definition: Hydjet2Hadronizer.cc:97
ALCARECOTkAlBeamHalo_cff.etaMax
etaMax
Definition: ALCARECOTkAlBeamHalo_cff.py:33
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
dqm::implementation::IBooker
Definition: DQMStore.h:43
HcalDDDRecConstants::getMaxDepth
int getMaxDepth(const int &type) const
Definition: HcalDDDRecConstants.h:88
HcalSimHitsValidation::meEnConeEtaProfile_E
MonitorElement * meEnConeEtaProfile_E
Definition: HcalSimHitsValidation.h:98
HcalSimHitsValidation::emean_vs_ieta_HF
std::vector< MonitorElement * > emean_vs_ieta_HF
Definition: HcalSimHitsValidation.h:89
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
HcalSimHitsValidation::meSimHitsEnergyHE
std::vector< MonitorElement * > meSimHitsEnergyHE
Definition: HcalSimHitsValidation.h:103
HcalSimHitsValidation::maxDepthHO_
int maxDepthHO_
Definition: HcalSimHitsValidation.h:70
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:56
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
edm::Event
Definition: Event.h:73
HcalSimHitsValidation::maxDepthHE_
int maxDepthHE_
Definition: HcalSimHitsValidation.h:69
dqm::impl::MonitorElement::getBinContent
virtual double getBinContent(int binx) const
get content of bin (1-D)
Definition: MonitorElement.cc:583
edm::InputTag
Definition: InputTag.h:15
HcalSimHitsValidation::hf1_
double hf1_
Definition: HcalSimHitsValidation.h:111