CMS 3D CMS Logo

HcalDigisValidation.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: HcalDigisValidation
4 // Class: HcalDigisValidation
5 //
13 //
14 // Original Author: Ali Fahim,22 R-013,+41227672649,
15 // Created: Wed Mar 23 11:42:34 CET 2011
16 //
17 //
18 
25 
27  using namespace std;
28 
29  subdet_ = iConfig.getUntrackedParameter<std::string>("subdetector", "all");
30  outputFile_ = iConfig.getUntrackedParameter<std::string>("outputFile", "");
31  // inputLabel_ = iConfig.getParameter<std::string > ("digiLabel");
32  inputTag_ = iConfig.getParameter<edm::InputTag>("digiTag");
33  QIE10inputTag_ = iConfig.getParameter<edm::InputTag>("QIE10digiTag");
34  QIE11inputTag_ = iConfig.getParameter<edm::InputTag>("QIE11digiTag");
35  emulTPsTag_ = iConfig.getParameter<edm::InputTag>("emulTPs");
36  dataTPsTag_ = iConfig.getParameter<edm::InputTag>("dataTPs");
37  mc_ = iConfig.getUntrackedParameter<std::string>("mc", "no");
38  mode_ = iConfig.getUntrackedParameter<std::string>("mode", "multi");
39  dirName_ = iConfig.getUntrackedParameter<std::string>("dirName", "HcalDigisV/HcalDigiTask");
40  testNumber_ = iConfig.getParameter<bool>("TestNumber");
41  hep17_ = iConfig.getParameter<bool>("hep17");
42  HEPhase1_ = iConfig.getParameter<bool>("HEPhase1");
43  HBPhase1_ = iConfig.getParameter<bool>("HBPhase1");
44  Plot_TP_ver_ = iConfig.getParameter<bool>("Plot_TP_ver");
45 
46  // register for data access
47  if (iConfig.exists("simHits")) {
48  tok_mc_ = consumes<edm::PCaloHitContainer>(iConfig.getUntrackedParameter<edm::InputTag>("simHits"));
49  }
50  tok_hbhe_ = consumes<HBHEDigiCollection>(inputTag_);
51  tok_ho_ = consumes<HODigiCollection>(inputTag_);
52  tok_hf_ = consumes<HFDigiCollection>(inputTag_);
53  tok_emulTPs_ = consumes<HcalTrigPrimDigiCollection>(emulTPsTag_);
54  if (dataTPsTag_ == edm::InputTag(""))
55  skipDataTPs = true;
56  else {
57  skipDataTPs = false;
58  tok_dataTPs_ = consumes<HcalTrigPrimDigiCollection>(dataTPsTag_);
59  }
60 
61  tok_qie10_hf_ = consumes<QIE10DigiCollection>(QIE10inputTag_);
62  tok_qie11_hbhe_ = consumes<QIE11DigiCollection>(QIE11inputTag_);
63 
64  nevent1 = 0;
65  nevent2 = 0;
66  nevent3 = 0;
67  nevent4 = 0;
68  nevtot = 0;
69 
70  msm_ = new std::map<std::string, MonitorElement*>();
71 
72  if (!outputFile_.empty())
73  edm::LogInfo("OutputInfo") << " Hcal Digi Task histograms will be saved to '" << outputFile_.c_str() << "'";
74  else
75  edm::LogInfo("OutputInfo") << " Hcal Digi Task histograms will NOT be saved";
76 }
77 
79 
82  es.get<HcalRecNumberingRecord>().get(pHRNDC);
83  hcons = &(*pHRNDC);
84 
86 
87  maxDepth_[1] = hcons->getMaxDepth(0); // HB
88  maxDepth_[2] = hcons->getMaxDepth(1); // HE
89  maxDepth_[3] = hcons->getMaxDepth(3); // HO
90  maxDepth_[4] = hcons->getMaxDepth(2); // HF
91  maxDepth_[0] = (maxDepth_[1] > maxDepth_[2] ? maxDepth_[1] : maxDepth_[2]);
92  maxDepth_[0] = (maxDepth_[0] > maxDepth_[3] ? maxDepth_[0] : maxDepth_[3]);
93  maxDepth_[0] = (maxDepth_[0] > maxDepth_[4] ? maxDepth_[0] : maxDepth_[4]); // any of HB/HE/HO/HF
94 
96  const CaloGeometry* geo = geometry.product();
97  const HcalGeometry* gHB = static_cast<const HcalGeometry*>(geo->getSubdetectorGeometry(DetId::Hcal, HcalBarrel));
98  const HcalGeometry* gHE = static_cast<const HcalGeometry*>(geo->getSubdetectorGeometry(DetId::Hcal, HcalEndcap));
99  const HcalGeometry* gHO = static_cast<const HcalGeometry*>(geo->getSubdetectorGeometry(DetId::Hcal, HcalOuter));
100  const HcalGeometry* gHF = static_cast<const HcalGeometry*>(geo->getSubdetectorGeometry(DetId::Hcal, HcalForward));
101 
102  nChannels_[1] = gHB->getHxSize(1);
103  nChannels_[2] = gHE->getHxSize(2);
104  nChannels_[3] = gHO->getHxSize(3);
105  nChannels_[4] = gHF->getHxSize(4);
106 
107  nChannels_[0] = nChannels_[1] + nChannels_[2] + nChannels_[3] + nChannels_[4];
108 }
109 
111  ib.setCurrentFolder(dirName_);
112 
113  // book
114  book1D(ib, "nevtot", 1, 0, 1);
115  int bnoise = 0;
116  int bmc = 0;
117  if (subdet_ == "noise")
118  bnoise = 1;
119  if (mc_ == "yes")
120  bmc = 1;
121  if (subdet_ == "noise" || subdet_ == "all") {
122  booking(ib, "HB", bnoise, bmc);
123  booking(ib, "HO", bnoise, bmc);
124  booking(ib, "HF", bnoise, bmc);
125  booking(ib, "HE", bnoise, bmc);
126  } else {
127  booking(ib, subdet_, 0, bmc);
128  }
129 
130  if (skipDataTPs)
131  return;
132 
133  HistLim tp_hl_et(260, -10, 250);
134  HistLim tp_hl_ntp(640, -20, 3180);
135  HistLim tp_hl_ntp_sub(404, -20, 2000);
136  HistLim tp_hl_ieta(85, -42.5, 42.5);
137  HistLim tp_hl_iphi(74, -0.5, 73.5);
138 
139  book1D(ib, "HcalDigiTask_tp_et", tp_hl_et);
140  book1D(ib, "HcalDigiTask_tp_et_HB", tp_hl_et);
141  book1D(ib, "HcalDigiTask_tp_et_HE", tp_hl_et);
142  book1D(ib, "HcalDigiTask_tp_et_HF", tp_hl_et);
143  book1D(ib, "HcalDigiTask_tp_ntp", tp_hl_ntp);
144  book1D(ib, "HcalDigiTask_tp_ntp_HB", tp_hl_ntp_sub);
145  book1D(ib, "HcalDigiTask_tp_ntp_HE", tp_hl_ntp_sub);
146  book1D(ib, "HcalDigiTask_tp_ntp_HF", tp_hl_ntp_sub);
147  book1D(ib, "HcalDigiTask_tp_ntp_ieta", tp_hl_ieta);
148  book1D(ib, "HcalDigiTask_tp_ntp_iphi", tp_hl_iphi);
149  book1D(ib, "HcalDigiTask_tp_ntp_10_ieta", tp_hl_ieta);
150  book2D(ib, "HcalDigiTask_tp_et_ieta", tp_hl_ieta, tp_hl_et);
151  book2D(ib, "HcalDigiTask_tp_ieta_iphi", tp_hl_ieta, tp_hl_iphi);
152  bookPf(ib, "HcalDigiTask_tp_ave_et_ieta", tp_hl_ieta, tp_hl_et, " ");
153  if (Plot_TP_ver_) {
154  book1D(ib, "HcalDigiTask_tp_et_v0", tp_hl_et);
155  book1D(ib, "HcalDigiTask_tp_et_v1", tp_hl_et);
156  book1D(ib, "HcalDigiTask_tp_et_HF_v0", tp_hl_et);
157  book1D(ib, "HcalDigiTask_tp_et_HF_v1", tp_hl_et);
158  book1D(ib, "HcalDigiTask_tp_ntp_v0", tp_hl_ntp);
159  book1D(ib, "HcalDigiTask_tp_ntp_v1", tp_hl_ntp);
160  book1D(ib, "HcalDigiTask_tp_ntp_HF_v0", tp_hl_ntp_sub);
161  book1D(ib, "HcalDigiTask_tp_ntp_HF_v1", tp_hl_ntp_sub);
162  book1D(ib, "HcalDigiTask_tp_ntp_ieta_v0", tp_hl_ieta);
163  book1D(ib, "HcalDigiTask_tp_ntp_ieta_v1", tp_hl_ieta);
164  book1D(ib, "HcalDigiTask_tp_ntp_iphi_v0", tp_hl_iphi);
165  book1D(ib, "HcalDigiTask_tp_ntp_iphi_v1", tp_hl_iphi);
166  book1D(ib, "HcalDigiTask_tp_ntp_10_ieta_v0", tp_hl_ieta);
167  book1D(ib, "HcalDigiTask_tp_ntp_10_ieta_v1", tp_hl_ieta);
168  book2D(ib, "HcalDigiTask_tp_et_ieta_v0", tp_hl_ieta, tp_hl_et);
169  book2D(ib, "HcalDigiTask_tp_et_ieta_v1", tp_hl_ieta, tp_hl_et);
170  book2D(ib, "HcalDigiTask_tp_ieta_iphi_v0", tp_hl_ieta, tp_hl_iphi);
171  book2D(ib, "HcalDigiTask_tp_ieta_iphi_v1", tp_hl_ieta, tp_hl_iphi);
172  bookPf(ib, "HcalDigiTask_tp_ave_et_ieta_v0", tp_hl_ieta, tp_hl_et, " ");
173  bookPf(ib, "HcalDigiTask_tp_ave_et_ieta_v1", tp_hl_ieta, tp_hl_et, " ");
174  }
175 }
176 
177 void HcalDigisValidation::booking(DQMStore::IBooker& ib, const std::string bsubdet, int bnoise, int bmc) {
178  // Adjust/Optimize binning (JR Dittmann, 16-JUL-2015)
179 
180  HistLim Ndigis(2600, 0., 2600.);
181  HistLim sime(200, 0., 1.0);
182 
183  HistLim digiAmp(360, -100., 7100.);
184  HistLim digiAmpWide(2410, -3000., 720000.); //300 fC binning
185  HistLim ratio(2000, -100., 3900.);
186  HistLim sumAmp(100, -500., 1500.);
187 
188  HistLim nbin(11, -0.5, 10.5);
189 
190  HistLim pedestal(80, -1.0, 15.);
191  HistLim pedestalfC(400, -10., 30.);
192 
193  HistLim frac(80, -0.20, 1.40);
194 
195  HistLim pedLim(80, 0., 8.);
196  HistLim pedWidthLim(100, 0., 2.);
197 
198  HistLim gainLim(120, 0., 0.6);
199  HistLim gainWidthLim(160, 0., 0.32);
200 
201  HistLim ietaLim(85, -42.5, 42.5);
202  HistLim iphiLim(74, -0.5, 73.5);
203 
204  HistLim depthLim(15, -0.5, 14.5);
205 
206  if (bsubdet == "HB") {
207  Ndigis = HistLim(((int)(nChannels_[1] / 100) + 1) * 100, 0., (float)((int)(nChannels_[1] / 100) + 1) * 100);
208  } else if (bsubdet == "HE") {
209  sime = HistLim(200, 0., 1.0);
210  Ndigis = HistLim(((int)(nChannels_[2] / 100) + 1) * 100, 0., (float)((int)(nChannels_[2] / 100) + 1) * 100);
211  } else if (bsubdet == "HF") {
212  sime = HistLim(100, 0., 100.);
213  pedLim = HistLim(100, 0., 20.);
214  pedWidthLim = HistLim(100, 0., 5.);
215  frac = HistLim(400, -4.00, 4.00);
216  Ndigis = HistLim(((int)(nChannels_[4] / 100) + 1) * 100, 0., (float)((int)(nChannels_[4] / 100) + 1) * 100);
217  } else if (bsubdet == "HO") {
218  sime = HistLim(200, 0., 1.0);
219  gainLim = HistLim(160, 0., 1.6);
220  Ndigis = HistLim(((int)(nChannels_[3] / 100) + 1) * 100, 0., (float)((int)(nChannels_[3] / 100) + 1) * 100);
221  }
222 
223  int isubdet = 0;
224  if (bsubdet == "HB")
225  isubdet = 1;
226  else if (bsubdet == "HE")
227  isubdet = 2;
228  else if (bsubdet == "HO")
229  isubdet = 3;
230  else if (bsubdet == "HF")
231  isubdet = 4;
232  else
233  edm::LogWarning("HcalDigisValidation") << "HcalDigisValidation Warning: not HB/HE/HF/HO " << bsubdet << std::endl;
234 
235  Char_t histo[100];
236  const char* sub = bsubdet.c_str();
237  if (bnoise == 0) {
238  // number of digis in each subdetector
239  sprintf(histo, "HcalDigiTask_Ndigis_%s", sub);
240  book1D(ib, histo, Ndigis);
241 
242  // maps of occupancies
243  for (int depth = 1; depth <= maxDepth_[isubdet]; depth++) {
244  sprintf(histo, "HcalDigiTask_ieta_iphi_occupancy_map_depth%d_%s", depth, sub);
245  book2D(ib, histo, ietaLim, iphiLim);
246  }
247 
248  //Depths
249  sprintf(histo, "HcalDigiTask_depths_%s", sub);
250  book1D(ib, histo, depthLim);
251 
252  // occupancies vs ieta
253  for (int depth = 1; depth <= maxDepth_[isubdet]; depth++) {
254  sprintf(histo, "HcalDigiTask_occupancy_vs_ieta_depth%d_%s", depth, sub);
255  book1D(ib, histo, ietaLim);
256  }
257 
258  // just 1D of all cells' amplitudes
259  sprintf(histo, "HcalDigiTask_sum_all_amplitudes_%s", sub);
260  if ((HBPhase1_ && bsubdet == "HB") || (HEPhase1_ && bsubdet == "HE"))
261  book1D(ib, histo, digiAmpWide);
262  else
263  book1D(ib, histo, digiAmp);
264 
265  sprintf(histo, "HcalDigiTask_number_of_amplitudes_above_10fC_%s", sub);
266  book1D(ib, histo, Ndigis);
267 
268  for (int depth = 1; depth <= maxDepth_[isubdet]; depth++) {
269  sprintf(histo, "HcalDigiTask_ADC0_adc_depth%d_%s", depth, sub);
270  book1D(ib, histo, pedestal);
271  }
272 
273  for (int depth = 1; depth <= maxDepth_[isubdet]; depth++) {
274  sprintf(histo, "HcalDigiTask_ADC0_fC_depth%d_%s", depth, sub);
275  book1D(ib, histo, pedestalfC);
276  }
277 
278  sprintf(histo, "HcalDigiTask_signal_amplitude_%s", sub);
279  if ((HBPhase1_ && bsubdet == "HB") || (HEPhase1_ && bsubdet == "HE"))
280  book1D(ib, histo, digiAmpWide);
281  else
282  book1D(ib, histo, digiAmp);
283 
284  if (hep17_ && bsubdet == "HE") {
285  sprintf(histo, "HcalDigiTask_signal_amplitude_HEP17");
286  book1D(ib, histo, digiAmpWide);
287  }
288  //
289  for (int depth = 1; depth <= maxDepth_[isubdet]; depth++) {
290  sprintf(histo, "HcalDigiTask_signal_amplitude_depth%d_%s", depth, sub);
291  if ((HBPhase1_ && bsubdet == "HB") || (HEPhase1_ && bsubdet == "HE"))
292  book1D(ib, histo, digiAmpWide);
293  else
294  book1D(ib, histo, digiAmp);
295  if (hep17_ && bsubdet == "HE") {
296  sprintf(histo, "HcalDigiTask_signal_amplitude_depth%d_HEP17", depth);
297  book1D(ib, histo, digiAmpWide);
298  }
299  }
300 
301  sprintf(histo, "HcalDigiTask_signal_amplitude_vs_bin_all_depths_%s", sub);
302  if ((HBPhase1_ && bsubdet == "HB") || (HEPhase1_ && bsubdet == "HE"))
303  book2D(ib, histo, nbin, digiAmpWide);
304  else
305  book2D(ib, histo, nbin, digiAmp);
306  if (hep17_ && bsubdet == "HE") {
307  sprintf(histo, "HcalDigiTask_signal_amplitude_vs_bin_all_depths_HEP17");
308  book2D(ib, histo, nbin, digiAmpWide);
309  }
310 
311  for (int depth = 1; depth <= maxDepth_[isubdet]; depth++) {
312  sprintf(histo, "HcalDigiTask_all_amplitudes_vs_bin_1D_depth%d_%s", depth, sub);
313  book1D(ib, histo, nbin);
314  if (hep17_ && bsubdet == "HE") {
315  sprintf(histo, "HcalDigiTask_all_amplitudes_vs_bin_1D_depth%d_HEP17", depth);
316  book1D(ib, histo, nbin);
317  }
318  }
319 
320  sprintf(histo, "HcalDigiTask_SOI_frac_%s", sub);
321  book1D(ib, histo, frac);
322  sprintf(histo, "HcalDigiTask_postSOI_frac_%s", sub);
323  book1D(ib, histo, frac);
324 
325  if (bmc == 1) {
326  sprintf(histo, "HcalDigiTask_amplitude_vs_simhits_%s", sub);
327  book2D(ib, histo, sime, digiAmp);
328  for (int depth = 1; depth <= maxDepth_[isubdet]; depth++) {
329  sprintf(histo, "HcalDigiTask_amplitude_vs_simhits_depth%d_%s", depth, sub);
330  book2D(ib, histo, sime, digiAmp);
331  }
332 
333  sprintf(histo, "HcalDigiTask_amplitude_vs_simhits_profile_%s", sub);
334  bookPf(ib, histo, sime, digiAmp);
335  for (int depth = 1; depth <= maxDepth_[isubdet]; depth++) {
336  sprintf(histo, "HcalDigiTask_amplitude_vs_simhits_profile_depth%d_%s", depth, sub);
337  bookPf(ib, histo, sime, digiAmp);
338  }
339 
340  sprintf(histo, "HcalDigiTask_ratio_amplitude_vs_simhits_%s", sub);
341  book1D(ib, histo, ratio);
342  for (int depth = 1; depth <= maxDepth_[isubdet]; depth++) {
343  sprintf(histo, "HcalDigiTask_ratio_amplitude_vs_simhits_depth%d_%s", depth, sub);
344  book1D(ib, histo, ratio);
345  }
346  } //mc only
347 
348  } else { // noise only
349 
350  // EVENT "1" distributions of all cells properties
351 
352  //KH
353  for (int depth = 1; depth <= maxDepth_[isubdet]; depth++) {
354  sprintf(histo, "HcalDigiTask_gain_capId0_Depth%d_%s", depth, sub);
355  book1D(ib, histo, gainLim);
356  sprintf(histo, "HcalDigiTask_gain_capId1_Depth%d_%s", depth, sub);
357  book1D(ib, histo, gainLim);
358  sprintf(histo, "HcalDigiTask_gain_capId2_Depth%d_%s", depth, sub);
359  book1D(ib, histo, gainLim);
360  sprintf(histo, "HcalDigiTask_gain_capId3_Depth%d_%s", depth, sub);
361  book1D(ib, histo, gainLim);
362 
363  sprintf(histo, "HcalDigiTask_gainWidth_capId0_Depth%d_%s", depth, sub);
364  book1D(ib, histo, gainWidthLim);
365  sprintf(histo, "HcalDigiTask_gainWidth_capId1_Depth%d_%s", depth, sub);
366  book1D(ib, histo, gainWidthLim);
367  sprintf(histo, "HcalDigiTask_gainWidth_capId2_Depth%d_%s", depth, sub);
368  book1D(ib, histo, gainWidthLim);
369  sprintf(histo, "HcalDigiTask_gainWidth_capId3_Depth%d_%s", depth, sub);
370  book1D(ib, histo, gainWidthLim);
371 
372  sprintf(histo, "HcalDigiTask_pedestal_capId0_Depth%d_%s", depth, sub);
373  book1D(ib, histo, pedLim);
374  sprintf(histo, "HcalDigiTask_pedestal_capId1_Depth%d_%s", depth, sub);
375  book1D(ib, histo, pedLim);
376  sprintf(histo, "HcalDigiTask_pedestal_capId2_Depth%d_%s", depth, sub);
377  book1D(ib, histo, pedLim);
378  sprintf(histo, "HcalDigiTask_pedestal_capId3_Depth%d_%s", depth, sub);
379  book1D(ib, histo, pedLim);
380 
381  sprintf(histo, "HcalDigiTask_pedestal_width_capId0_Depth%d_%s", depth, sub);
382  book1D(ib, histo, pedWidthLim);
383  sprintf(histo, "HcalDigiTask_pedestal_width_capId1_Depth%d_%s", depth, sub);
384  book1D(ib, histo, pedWidthLim);
385  sprintf(histo, "HcalDigiTask_pedestal_width_capId2_Depth%d_%s", depth, sub);
386  book1D(ib, histo, pedWidthLim);
387  sprintf(histo, "HcalDigiTask_pedestal_width_capId3_Depth%d_%s", depth, sub);
388  book1D(ib, histo, pedWidthLim);
389  }
390 
391  //KH
392  for (int depth = 1; depth <= maxDepth_[isubdet]; depth++) {
393  sprintf(histo, "HcalDigiTask_gainMap_Depth%d_%s", depth, sub);
394  book2D(ib, histo, ietaLim, iphiLim);
395  sprintf(histo, "HcalDigiTask_pwidthMap_Depth%d_%s", depth, sub);
396  book2D(ib, histo, ietaLim, iphiLim);
397  }
398 
399  } //end of noise-only
400 } //book
401 
403  using namespace edm;
404  using namespace std;
405 
406  iSetup.get<HcalDbRecord>().get(conditions);
407 
408  //TP Code
410  iSetup.get<CaloTPGRecord>().get(decoder);
411 
413  iSetup.get<CaloGeometryRecord>().get(tp_geometry);
414 
415  iSetup.get<HcalRecNumberingRecord>().get(htopo);
416 
417  //Get all handles
419  iEvent.getByToken(tok_emulTPs_, emulTPs);
420 
422  if (!skipDataTPs)
423  iEvent.getByToken(tok_dataTPs_, dataTPs);
424  //iEvent.getByLabel("hcalDigis", dataTPs);
425 
426  //~TP Code
427 
428  if (subdet_ != "all") {
429  noise_ = 0;
430  if (subdet_ == "HB") {
431  reco<HBHEDataFrame>(iEvent, iSetup, tok_hbhe_);
432  reco<QIE11DataFrame>(iEvent, iSetup, tok_qie11_hbhe_);
433  }
434  if (subdet_ == "HE") {
435  reco<HBHEDataFrame>(iEvent, iSetup, tok_hbhe_);
436  reco<QIE11DataFrame>(iEvent, iSetup, tok_qie11_hbhe_);
437  }
438  if (subdet_ == "HO")
439  reco<HODataFrame>(iEvent, iSetup, tok_ho_);
440  if (subdet_ == "HF") {
441  reco<HFDataFrame>(iEvent, iSetup, tok_hf_);
442  reco<QIE10DataFrame>(iEvent, iSetup, tok_qie10_hf_);
443  }
444 
445  if (subdet_ == "noise") {
446  noise_ = 1;
447  subdet_ = "HB";
448  reco<HBHEDataFrame>(iEvent, iSetup, tok_hbhe_);
449  reco<QIE11DataFrame>(iEvent, iSetup, tok_qie11_hbhe_);
450  subdet_ = "HE";
451  reco<HBHEDataFrame>(iEvent, iSetup, tok_hbhe_);
452  reco<QIE11DataFrame>(iEvent, iSetup, tok_qie11_hbhe_);
453  subdet_ = "HO";
454  reco<HODataFrame>(iEvent, iSetup, tok_ho_);
455  subdet_ = "HF";
456  reco<HFDataFrame>(iEvent, iSetup, tok_hf_);
457  reco<QIE10DataFrame>(iEvent, iSetup, tok_qie10_hf_);
458  subdet_ = "noise";
459  }
460  } // all subdetectors
461  else {
462  noise_ = 0;
463 
464  subdet_ = "HB";
465  reco<HBHEDataFrame>(iEvent, iSetup, tok_hbhe_);
466  reco<QIE11DataFrame>(iEvent, iSetup, tok_qie11_hbhe_);
467  subdet_ = "HE";
468  reco<HBHEDataFrame>(iEvent, iSetup, tok_hbhe_);
469  reco<QIE11DataFrame>(iEvent, iSetup, tok_qie11_hbhe_);
470  subdet_ = "HO";
471  reco<HODataFrame>(iEvent, iSetup, tok_ho_);
472  subdet_ = "HF";
473  reco<HFDataFrame>(iEvent, iSetup, tok_hf_);
474  reco<QIE10DataFrame>(iEvent, iSetup, tok_qie10_hf_);
475  subdet_ = "all";
476  }
477 
478  fill1D("nevtot", 0);
479  nevtot++;
480 
481  //TP Code
482  //Counters
483  int c = 0, chb = 0, che = 0, chf = 0, cv0 = 0, cv1 = 0, chfv0 = 0, chfv1 = 0;
484 
485  if (skipDataTPs)
486  return;
487 
488  for (HcalTrigPrimDigiCollection::const_iterator itr = dataTPs->begin(); itr != dataTPs->end(); ++itr) {
489  int ieta = itr->id().ieta();
490  int iphi = itr->id().iphi();
491 
492  HcalSubdetector subdet = (HcalSubdetector)0;
493 
494  if (abs(ieta) <= 16)
496  else if (abs(ieta) < tp_geometry->firstHFTower(itr->id().version()))
498  else if (abs(ieta) <= 42)
500 
501  //Right now, the only case where version matters is in HF
502  //If the subdetector is not HF, set version to -1
503  int tpVersion = (subdet == HcalSubdetector::HcalForward ? itr->id().version() : -1);
504 
505  float en = decoder->hcaletValue(itr->id(), itr->t0());
506 
507  if (en < 0.00001)
508  continue;
509 
510  //Plot the variables
511  //Retain classic behavior (include all tps)
512  //Additional plots that only include HF 3x2 or HF 1x1
513 
514  //Classics
515  fill1D("HcalDigiTask_tp_et", en);
516  fill2D("HcalDigiTask_tp_et_ieta", ieta, en);
517  fill2D("HcalDigiTask_tp_ieta_iphi", ieta, iphi);
518  fillPf("HcalDigiTask_tp_ave_et_ieta", ieta, en);
519  fill1D("HcalDigiTask_tp_ntp_ieta", ieta);
520  fill1D("HcalDigiTask_tp_ntp_iphi", iphi);
521  if (en > 10.)
522  fill1D("HcalDigiTask_tp_ntp_10_ieta", ieta);
523 
524  //3x2 Trig Primitives (tpVersion == 0)
525  if ((subdet != HcalSubdetector::HcalForward || tpVersion == 0) && Plot_TP_ver_) {
526  fill1D("HcalDigiTask_tp_et_v0", en);
527  fill2D("HcalDigiTask_tp_et_ieta_v0", ieta, en);
528  fill2D("HcalDigiTask_tp_ieta_iphi_v0", ieta, iphi);
529  fillPf("HcalDigiTask_tp_ave_et_ieta_v0", ieta, en);
530  fill1D("HcalDigiTask_tp_ntp_ieta_v0", ieta);
531  fill1D("HcalDigiTask_tp_ntp_iphi_v0", iphi);
532  if (en > 10.)
533  fill1D("HcalDigiTask_tp_ntp_10_ieta_v0", ieta);
534  }
535 
536  //1x1 Trig Primitives (tpVersion == 1)
537  if ((subdet != HcalSubdetector::HcalForward || tpVersion == 1) && Plot_TP_ver_) {
538  fill1D("HcalDigiTask_tp_et_v1", en);
539  fill2D("HcalDigiTask_tp_et_ieta_v1", ieta, en);
540  fill2D("HcalDigiTask_tp_ieta_iphi_v1", ieta, iphi);
541  fillPf("HcalDigiTask_tp_ave_et_ieta_v1", ieta, en);
542  fill1D("HcalDigiTask_tp_ntp_ieta_v1", ieta);
543  fill1D("HcalDigiTask_tp_ntp_iphi_v1", iphi);
544  if (en > 10.)
545  fill1D("HcalDigiTask_tp_ntp_10_ieta_v1", ieta);
546  }
547 
548  ++c;
549  if (subdet == HcalSubdetector::HcalBarrel) {
550  fill1D("HcalDigiTask_tp_et_HB", en);
551  ++chb;
552  if (Plot_TP_ver_) {
553  ++cv0;
554  ++cv1;
555  }
556  }
557  if (subdet == HcalSubdetector::HcalEndcap) {
558  fill1D("HcalDigiTask_tp_et_HE", en);
559  ++che;
560  if (Plot_TP_ver_) {
561  ++cv0;
562  ++cv1;
563  }
564  }
565  if (subdet == HcalSubdetector::HcalForward) {
566  fill1D("HcalDigiTask_tp_et_HF", en);
567  ++chf;
568 
569  if (tpVersion == 0 && Plot_TP_ver_) {
570  fill1D("HcalDigiTask_tp_et_HF_v0", en);
571  ++chfv0;
572  ++cv0;
573  }
574 
575  if (tpVersion == 1 && Plot_TP_ver_) {
576  fill1D("HcalDigiTask_tp_et_HF_v1", en);
577  ++chfv1;
578  ++cv1;
579  }
580  }
581 
582  } //end data TP collection
583 
584  fill1D("HcalDigiTask_tp_ntp", c);
585  fill1D("HcalDigiTask_tp_ntp_HB", chb);
586  fill1D("HcalDigiTask_tp_ntp_HE", che);
587  fill1D("HcalDigiTask_tp_ntp_HF", chf);
588  if (Plot_TP_ver_) {
589  fill1D("HcalDigiTask_tp_ntp_v0", cv0);
590  fill1D("HcalDigiTask_tp_ntp_v1", cv1);
591  fill1D("HcalDigiTask_tp_ntp_HF_v0", chfv0);
592  fill1D("HcalDigiTask_tp_ntp_HF_v1", chfv1);
593  }
594 
595  //~TP Code
596 }
597 
598 template <class Digi>
600  const edm::EventSetup& iSetup,
602  // HistLim =============================================================
603 
604  std::string strtmp;
605 
606  // ======================================================================
607  using namespace edm;
610 
611  // ADC2fC
612  CaloSamples tool;
613  iEvent.getByToken(tok, digiCollection);
614  if (!digiCollection.isValid())
615  return;
616  int isubdet = 0;
617  if (subdet_ == "HB")
618  isubdet = 1;
619  if (subdet_ == "HE")
620  isubdet = 2;
621  if (subdet_ == "HO")
622  isubdet = 3;
623  if (subdet_ == "HF")
624  isubdet = 4;
625 
626  if (isubdet == 1)
627  nevent1++;
628  if (isubdet == 2)
629  nevent2++;
630  if (isubdet == 3)
631  nevent3++;
632  if (isubdet == 4)
633  nevent4++;
634 
635  int indigis = 0;
636  // amplitude for signal cell at diff. depths
637  std::vector<double> v_ampl_c(maxDepth_[isubdet] + 1, 0);
638 
639  // is set to 1 if "seed" SimHit is found
640  int seedSimHit = 0;
641 
642  int ieta_Sim = 9999;
643  int iphi_Sim = 9999;
644  double emax_Sim = -9999.;
645 
646  // SimHits MC only
647  if (mc_ == "yes") {
649  iEvent.getByToken(tok_mc_, hcalHits);
650  const edm::PCaloHitContainer* simhitResult = hcalHits.product();
651 
652  if (isubdet != 0 && noise_ == 0) { // signal only SimHits
653 
654  for (std::vector<PCaloHit>::const_iterator simhits = simhitResult->begin(); simhits != simhitResult->end();
655  ++simhits) {
656  unsigned int id_ = simhits->id();
657  int sub, ieta, iphi;
658  HcalDetId hid;
659  if (testNumber_)
660  hid = HcalHitRelabeller::relabel(id_, hcons);
661  else
662  hid = HcalDetId(id_);
663  sub = hid.subdet();
664  ieta = hid.ieta();
665  iphi = hid.iphi();
666 
667  double en = simhits->energy();
668 
669  if (en > emax_Sim && sub == isubdet) {
670  emax_Sim = en;
671  ieta_Sim = ieta;
672  iphi_Sim = iphi;
673  // to limit "seed" SimHit energy in case of "multi" event
674  if (mode_ == "multi" && ((sub == 4 && en < 100. && en > 1.) || ((sub != 4) && en < 1. && en > 0.02))) {
675  seedSimHit = 1;
676  break;
677  }
678  }
679 
680  } // end of SimHits cycle
681 
682  // found highest-energy SimHit for single-particle
683  if (mode_ != "multi" && emax_Sim > 0.)
684  seedSimHit = 1;
685  } // end of SimHits
686  } // end of mc_ == "yes"
687 
688  // CYCLE OVER CELLS ========================================================
689  int Ndig = 0;
690 
691  for (digiItr = digiCollection->begin(); digiItr != digiCollection->end(); digiItr++) {
692  HcalDetId cell(digiItr->id());
693  int depth = cell.depth();
694  int iphi = cell.iphi();
695  int ieta = cell.ieta();
696  int sub = cell.subdet();
697 
698  if (depth > maxDepth_[isubdet] && sub == isubdet) {
699  edm::LogWarning("HcalDetId") << "HcalDetID presents conflicting information. Depth: " << depth
700  << ", iphi: " << iphi << ", ieta: " << ieta
701  << ". Max depth from geometry is: " << maxDepth_[isubdet]
702  << ". TestNumber = " << testNumber_;
703  continue;
704  }
705 
706  // amplitude for signal cell at diff. depths
707  std::vector<double> v_ampl(maxDepth_[isubdet] + 1, 0);
708 
709  // Gains, pedestals (once !) and only for "noise" case
710  if (((nevent1 == 1 && isubdet == 1) || (nevent2 == 1 && isubdet == 2) || (nevent3 == 1 && isubdet == 3) ||
711  (nevent4 == 1 && isubdet == 4)) &&
712  noise_ == 1 && sub == isubdet) {
713  HcalGenericDetId hcalGenDetId(digiItr->id());
714  const HcalPedestal* pedestal = conditions->getPedestal(hcalGenDetId);
715  const HcalGain* gain = conditions->getGain(hcalGenDetId);
716  const HcalGainWidth* gainWidth = conditions->getGainWidth(hcalGenDetId);
717  const HcalPedestalWidth* pedWidth = conditions->getPedestalWidth(hcalGenDetId);
718 
719  for (int i = 0; i < 4; i++) {
720  fill1D("HcalDigiTask_gain_capId" + str(i) + "_Depth" + str(depth) + "_" + subdet_, gain->getValue(i));
721  fill1D("HcalDigiTask_gainWidth_capId" + str(i) + "_Depth" + str(depth) + "_" + subdet_, gainWidth->getValue(i));
722  fill1D("HcalDigiTask_pedestal_capId" + str(i) + "_Depth" + str(depth) + "_" + subdet_, pedestal->getValue(i));
723  fill1D("HcalDigiTask_pedestal_width_capId" + str(i) + "_Depth" + str(depth) + "_" + subdet_,
724  pedWidth->getWidth(i));
725  }
726 
727  fill2D("HcalDigiTask_gainMap_Depth" + str(depth) + "_" + subdet_, double(ieta), double(iphi), gain->getValue(0));
728  fill2D("HcalDigiTask_pwidthMap_Depth" + str(depth) + "_" + subdet_,
729  double(ieta),
730  double(iphi),
731  pedWidth->getWidth(0));
732 
733  } // end of event #1
734 
735  if (sub == isubdet)
736  Ndig++; // subdet number of digi
737 
738  // No-noise case, only single subdet selected ===========================
739 
740  if (sub == isubdet && noise_ == 0) {
742 
743  const HcalQIECoder* channelCoder = conditions->getHcalCoder(cell);
744  const HcalQIEShape* shape = conditions->getHcalShape(channelCoder);
745  HcalCoderDb coder(*channelCoder, *shape);
746  coder.adc2fC(*digiItr, tool);
747 
748  // for dynamic digi time sample analysis
749  int soi = tool.presamples();
750  int lastbin = tool.size() - 1;
751 
752  double noiseADC = (*digiItr)[0].adc();
753  double noisefC = tool[0];
754  // noise evaluations from "pre-samples"
755  fill1D("HcalDigiTask_ADC0_adc_depth" + str(depth) + "_" + subdet_, noiseADC);
756  fill1D("HcalDigiTask_ADC0_fC_depth" + str(depth) + "_" + subdet_, noisefC);
757 
758  // OCCUPANCY maps fill
759  fill2D("HcalDigiTask_ieta_iphi_occupancy_map_depth" + str(depth) + "_" + subdet_, double(ieta), double(iphi));
760 
761  fill1D("HcalDigiTask_depths_" + subdet_, double(depth));
762 
763  // Cycle on time slices
764  // - for each Digi
765  // - for one Digi with max SimHits E in subdet
766 
767  int closen = 0; // =1 if 1) seedSimHit = 1 and 2) the cell is the same
768  if (ieta == ieta_Sim && iphi == iphi_Sim)
769  closen = seedSimHit;
770 
771  for (int ii = 0; ii < tool.size(); ii++) {
772  int capid = (*digiItr)[ii].capid();
773  // single ts amplitude
774  double val = (tool[ii] - calibrations.pedestal(capid));
775 
776  if (val > 100.) {
777  fill1D("HcalDigiTask_ADC0_adc_depth" + str(depth) + "_" + subdet_, noiseADC);
778  strtmp = "HcalDigiTask_all_amplitudes_vs_bin_1D_depth" + str(depth) + "_" + subdet_;
779  fill1D(strtmp, double(ii), val);
780  }
781 
782  if (closen == 1) {
783  strtmp = "HcalDigiTask_signal_amplitude_vs_bin_all_depths_" + subdet_;
784  fill2D(strtmp, double(ii), val);
785  }
786 
787  // all detectors
788  if (ii >= soi && ii <= lastbin) {
789  v_ampl[0] += val;
790  v_ampl[depth] += val;
791 
792  if (closen == 1) {
793  v_ampl_c[0] += val;
794  v_ampl_c[depth] += val;
795  }
796  }
797  }
798  // end of time bucket sample
799 
800  // maps of sum of amplitudes (sum lin.digis(4,5,6,7) - ped) all depths
801  // just 1D of all cells' amplitudes
802  strtmp = "HcalDigiTask_sum_all_amplitudes_" + subdet_;
803  fill1D(strtmp, v_ampl[0]);
804 
805  std::vector<int> v_ampl_sub(v_ampl.begin() + 1, v_ampl.end()); // remove element 0, which is the sum of any depth
806  double ampl_max = *std::max_element(v_ampl_sub.begin(), v_ampl_sub.end());
807  if (ampl_max > 10.)
808  indigis++;
809  //KH if (ampl1 > 10. || ampl2 > 10. || ampl3 > 10. || ampl4 > 10.) indigis++;
810 
811  // fraction 5,6 bins if ampl. is big.
812  if (v_ampl[depth] > 30.) {
813  double fbinSOI = tool[soi] - calibrations.pedestal((*digiItr)[soi].capid());
814  double fbinPS = 0;
815 
816  for (int j = soi + 1; j <= lastbin; j++)
817  fbinPS += tool[j] - calibrations.pedestal((*digiItr)[j].capid());
818 
819  fbinSOI /= v_ampl[depth];
820  fbinPS /= v_ampl[depth];
821  strtmp = "HcalDigiTask_SOI_frac_" + subdet_;
822  fill1D(strtmp, fbinSOI);
823  strtmp = "HcalDigiTask_postSOI_frac_" + subdet_;
824  fill1D(strtmp, fbinPS);
825  }
826 
827  strtmp = "HcalDigiTask_signal_amplitude_" + subdet_;
828  fill1D(strtmp, v_ampl[0]);
829  strtmp = "HcalDigiTask_signal_amplitude_depth" + str(depth) + "_" + subdet_;
830  fill1D(strtmp, v_ampl[depth]);
831  }
832  } // End of CYCLE OVER CELLS =============================================
833 
834  if (isubdet != 0 && noise_ == 0) { // signal only, once per event
835  strtmp = "HcalDigiTask_number_of_amplitudes_above_10fC_" + subdet_;
836  fill1D(strtmp, indigis);
837 
838  // SimHits once again !!!
839  double eps = 1.e-3;
840  std::vector<double> v_ehits(maxDepth_[isubdet] + 1, 0);
841 
842  if (mc_ == "yes") {
844  iEvent.getByToken(tok_mc_, hcalHits);
845  const edm::PCaloHitContainer* simhitResult = hcalHits.product();
846  for (std::vector<PCaloHit>::const_iterator simhits = simhitResult->begin(); simhits != simhitResult->end();
847  ++simhits) {
848  unsigned int id_ = simhits->id();
849  int sub, depth, ieta, iphi;
850  HcalDetId hid;
851  if (testNumber_)
852  hid = HcalHitRelabeller::relabel(id_, hcons);
853  else
854  hid = HcalDetId(id_);
855  sub = hid.subdet();
856  depth = hid.depth();
857  ieta = hid.ieta();
858  iphi = hid.iphi();
859 
860  if (depth > maxDepth_[isubdet] && sub == isubdet) {
861  edm::LogWarning("HcalDetId") << "HcalDetID(SimHit) presents conflicting information. Depth: " << depth
862  << ", iphi: " << iphi << ", ieta: " << ieta
863  << ". Max depth from geometry is: " << maxDepth_[isubdet]
864  << ". TestNumber = " << testNumber_;
865  continue;
866  }
867 
868  // take cell already found to be max energy in a particular subdet
869  if (sub == isubdet && ieta == ieta_Sim && iphi == iphi_Sim) {
870  double en = simhits->energy();
871 
872  v_ehits[0] += en;
873  v_ehits[depth] += en;
874  }
875  } // simhit loop
876 
877  strtmp = "HcalDigiTask_amplitude_vs_simhits_" + subdet_;
878  if (v_ehits[0] > eps)
879  fill2D(strtmp, v_ehits[0], v_ampl_c[0]);
880  for (int depth = 1; depth <= maxDepth_[isubdet]; depth++) {
881  strtmp = "HcalDigiTask_amplitude_vs_simhits_depth" + str(depth) + "_" + subdet_;
882  if (v_ehits[depth] > eps)
883  fill2D(strtmp, v_ehits[depth], v_ampl_c[depth]);
884  }
885 
886  strtmp = "HcalDigiTask_amplitude_vs_simhits_profile_" + subdet_;
887  if (v_ehits[0] > eps)
888  fillPf(strtmp, v_ehits[0], v_ampl_c[0]);
889  for (int depth = 1; depth <= maxDepth_[isubdet]; depth++) {
890  strtmp = "HcalDigiTask_amplitude_vs_simhits_profile_depth" + str(depth) + "_" + subdet_;
891  if (v_ehits[depth] > eps)
892  fillPf(strtmp, v_ehits[depth], v_ampl_c[depth]);
893  }
894 
895  strtmp = "HcalDigiTask_ratio_amplitude_vs_simhits_" + subdet_;
896  if (v_ehits[0] > eps)
897  fill1D(strtmp, v_ampl_c[0] / v_ehits[0]);
898  for (int depth = 1; depth <= maxDepth_[isubdet]; depth++) {
899  strtmp = "HcalDigiTask_amplitude_vs_simhits_profile_depth" + str(depth) + "_" + subdet_;
900  if (v_ehits[depth] > eps)
901  fillPf(strtmp, v_ehits[depth], v_ampl_c[depth]);
902  strtmp = "HcalDigiTask_ratio_amplitude_vs_simhits_depth" + str(depth) + "_" + subdet_;
903  if (v_ehits[depth] > eps)
904  fill1D(strtmp, v_ampl_c[depth] / v_ehits[depth]);
905  }
906 
907  } // end of if(mc_ == "yes")
908 
909  strtmp = "HcalDigiTask_Ndigis_" + subdet_;
910  fill1D(strtmp, double(Ndig));
911 
912  } // end of if( subdet != 0 && noise_ == 0) { // signal only
913 }
914 template <class dataFrameType>
916  const edm::EventSetup& iSetup,
918  // HistLim =============================================================
919 
920  std::string strtmp;
921 
922  // ======================================================================
923  using namespace edm;
925  //typename HcalDataFrameContainer<dataFrameType>::const_iterator digiItr;
926 
927  // ADC2fC
928  CaloSamples tool;
929  iEvent.getByToken(tok, digiHandle);
930  if (!digiHandle.isValid())
931  return;
933  int isubdet = 0;
934  if (subdet_ == "HB")
935  isubdet = 1;
936  if (subdet_ == "HE")
937  isubdet = 2;
938  if (subdet_ == "HO")
939  isubdet = 3;
940  if (subdet_ == "HF")
941  isubdet = 4;
942 
943  if (isubdet == 1)
944  nevent1++;
945  if (isubdet == 2)
946  nevent2++;
947  if (isubdet == 3)
948  nevent3++;
949  if (isubdet == 4)
950  nevent4++;
951 
952  int indigis = 0;
953  // amplitude for signal cell at diff. depths
954  std::vector<double> v_ampl_c(maxDepth_[isubdet] + 1, 0);
955 
956  // is set to 1 if "seed" SimHit is found
957  int seedSimHit = 0;
958 
959  int ieta_Sim = 9999;
960  int iphi_Sim = 9999;
961  double emax_Sim = -9999.;
962 
963  // SimHits MC only
964  if (mc_ == "yes") {
966  iEvent.getByToken(tok_mc_, hcalHits);
967  const edm::PCaloHitContainer* simhitResult = hcalHits.product();
968 
969  if (isubdet != 0 && noise_ == 0) { // signal only SimHits
970 
971  for (std::vector<PCaloHit>::const_iterator simhits = simhitResult->begin(); simhits != simhitResult->end();
972  ++simhits) {
973  unsigned int id_ = simhits->id();
974  int sub, ieta, iphi;
975  HcalDetId hid;
976  if (testNumber_)
977  hid = HcalHitRelabeller::relabel(id_, hcons);
978  else
979  hid = HcalDetId(id_);
980  sub = hid.subdet();
981  ieta = hid.ieta();
982  iphi = hid.iphi();
983 
984  double en = simhits->energy();
985 
986  if (en > emax_Sim && sub == isubdet) {
987  emax_Sim = en;
988  ieta_Sim = ieta;
989  iphi_Sim = iphi;
990  // to limit "seed" SimHit energy in case of "multi" event
991  if (mode_ == "multi" && ((sub == 4 && en < 100. && en > 1.) || ((sub != 4) && en < 1. && en > 0.02))) {
992  seedSimHit = 1;
993  break;
994  }
995  }
996 
997  } // end of SimHits cycle
998 
999  // found highest-energy SimHit for single-particle
1000  if (mode_ != "multi" && emax_Sim > 0.)
1001  seedSimHit = 1;
1002  } // end of SimHits
1003  } // end of mc_ == "yes"
1004 
1005  // CYCLE OVER CELLS ========================================================
1006  int Ndig = 0;
1007 
1009  digiItr != digiCollection->end();
1010  digiItr++) {
1011  dataFrameType dataFrame = *digiItr;
1012 
1013  HcalDetId cell(digiItr->id());
1014  int depth = cell.depth();
1015  int iphi = cell.iphi();
1016  int ieta = cell.ieta();
1017  int sub = cell.subdet();
1018 
1019  //Is this in HEP17
1020  bool isHEP17 = (iphi >= 63) && (iphi <= 66) && (ieta > 0) && (sub == 2);
1021 
1022  if (depth > maxDepth_[isubdet] && sub == isubdet) {
1023  edm::LogWarning("HcalDetId") << "HcalDetID presents conflicting information. Depth: " << depth
1024  << ", iphi: " << iphi << ", ieta: " << ieta
1025  << ". Max depth from geometry is: " << maxDepth_[isubdet]
1026  << ". TestNumber = " << testNumber_;
1027  continue;
1028  }
1029 
1030  // amplitude for signal cell at diff. depths
1031  std::vector<double> v_ampl(maxDepth_[isubdet] + 1, 0);
1032 
1033  // Gains, pedestals (once !) and only for "noise" case
1034  if (((nevent1 == 1 && isubdet == 1) || (nevent2 == 1 && isubdet == 2) || (nevent3 == 1 && isubdet == 3) ||
1035  (nevent4 == 1 && isubdet == 4)) &&
1036  noise_ == 1 && sub == isubdet) {
1037  HcalGenericDetId hcalGenDetId(digiItr->id());
1038  const HcalPedestal* pedestal = conditions->getPedestal(hcalGenDetId);
1039  const HcalGain* gain = conditions->getGain(hcalGenDetId);
1040  const HcalGainWidth* gainWidth = conditions->getGainWidth(hcalGenDetId);
1041  const HcalPedestalWidth* pedWidth = conditions->getPedestalWidth(hcalGenDetId);
1042 
1043  for (int i = 0; i < 4; i++) {
1044  fill1D("HcalDigiTask_gain_capId" + str(i) + "_Depth" + str(depth) + "_" + subdet_, gain->getValue(i));
1045  fill1D("HcalDigiTask_gainWidth_capId" + str(i) + "_Depth" + str(depth) + "_" + subdet_, gainWidth->getValue(i));
1046  fill1D("HcalDigiTask_pedestal_capId" + str(i) + "_Depth" + str(depth) + "_" + subdet_, pedestal->getValue(i));
1047  fill1D("HcalDigiTask_pedestal_width_capId" + str(i) + "_Depth" + str(depth) + "_" + subdet_,
1048  pedWidth->getWidth(i));
1049  }
1050 
1051  fill2D("HcalDigiTask_gainMap_Depth" + str(depth) + "_" + subdet_, double(ieta), double(iphi), gain->getValue(0));
1052  fill2D("HcalDigiTask_pwidthMap_Depth" + str(depth) + "_" + subdet_,
1053  double(ieta),
1054  double(iphi),
1055  pedWidth->getWidth(0));
1056 
1057  } // end of event #1
1058  //std::cout << "==== End of event noise block in cell cycle" << std::endl;
1059 
1060  if (sub == isubdet)
1061  Ndig++; // subdet number of digi
1062 
1063  // No-noise case, only single subdet selected ===========================
1064 
1065  if (sub == isubdet && noise_ == 0) {
1067 
1068  const HcalQIECoder* channelCoder = conditions->getHcalCoder(cell);
1069  const HcalQIEShape* shape = conditions->getHcalShape(channelCoder);
1070  HcalCoderDb coder(*channelCoder, *shape);
1071  coder.adc2fC(dataFrame, tool);
1072 
1073  // for dynamic digi time sample analysis
1074  int soi = tool.presamples();
1075  int lastbin = tool.size() - 1;
1076 
1077  double noiseADC = (dataFrame)[0].adc();
1078  double noisefC = tool[0];
1079  // noise evaluations from "pre-samples"
1080  fill1D("HcalDigiTask_ADC0_adc_depth" + str(depth) + "_" + subdet_, noiseADC);
1081  fill1D("HcalDigiTask_ADC0_fC_depth" + str(depth) + "_" + subdet_, noisefC);
1082 
1083  // OCCUPANCY maps fill
1084  fill2D("HcalDigiTask_ieta_iphi_occupancy_map_depth" + str(depth) + "_" + subdet_, double(ieta), double(iphi));
1085 
1086  fill1D("HcalDigiTask_depths_" + subdet_, double(depth));
1087 
1088  // Cycle on time slices
1089  // - for each Digi
1090  // - for one Digi with max SimHits E in subdet
1091 
1092  int closen = 0; // =1 if 1) seedSimHit = 1 and 2) the cell is the same
1093  if (ieta == ieta_Sim && iphi == iphi_Sim)
1094  closen = seedSimHit;
1095 
1096  for (int ii = 0; ii < tool.size(); ii++) {
1097  int capid = (dataFrame)[ii].capid();
1098  // single ts amplitude
1099  double val = (tool[ii] - calibrations.pedestal(capid));
1100 
1101  if (val > 100.) {
1102  fill1D("HcalDigiTask_ADC0_adc_depth" + str(depth) + "_" + subdet_, noiseADC);
1103  if (hep17_) {
1104  if (!isHEP17) {
1105  strtmp = "HcalDigiTask_all_amplitudes_vs_bin_1D_depth" + str(depth) + "_" + subdet_;
1106  fill1D(strtmp, double(ii), val);
1107  } else {
1108  strtmp = "HcalDigiTask_all_amplitudes_vs_bin_1D_depth" + str(depth) + "_HEP17";
1109  fill1D(strtmp, double(ii), val);
1110  }
1111  } else {
1112  strtmp = "HcalDigiTask_all_amplitudes_vs_bin_1D_depth" + str(depth) + "_" + subdet_;
1113  fill1D(strtmp, double(ii), val);
1114  }
1115  }
1116 
1117  if (closen == 1) {
1118  if (hep17_) {
1119  if (!isHEP17) {
1120  strtmp = "HcalDigiTask_signal_amplitude_vs_bin_all_depths_" + subdet_;
1121  fill2D(strtmp, double(ii), val);
1122  } else {
1123  strtmp = "HcalDigiTask_signal_amplitude_vs_bin_all_depths_HEP17";
1124  fill2D(strtmp, double(ii), val);
1125  }
1126  } else {
1127  strtmp = "HcalDigiTask_signal_amplitude_vs_bin_all_depths_" + subdet_;
1128  fill2D(strtmp, double(ii), val);
1129  }
1130  }
1131 
1132  // all detectors
1133  if (ii >= soi && ii <= lastbin) {
1134  v_ampl[0] += val;
1135  v_ampl[depth] += val;
1136 
1137  if (closen == 1) {
1138  v_ampl_c[0] += val;
1139  v_ampl_c[depth] += val;
1140  }
1141  }
1142  }
1143  // end of time bucket sample
1144 
1145  // just 1D of all cells' amplitudes
1146  strtmp = "HcalDigiTask_sum_all_amplitudes_" + subdet_;
1147  fill1D(strtmp, v_ampl[0]);
1148 
1149  std::vector<int> v_ampl_sub(v_ampl.begin() + 1, v_ampl.end()); // remove element 0, which is the sum of any depth
1150  double ampl_max = *std::max_element(v_ampl_sub.begin(), v_ampl_sub.end());
1151  if (ampl_max > 10.)
1152  indigis++;
1153  //KH if (ampl1 > 10. || ampl2 > 10. || ampl3 > 10. || ampl4 > 10.) indigis++;
1154 
1155  // fraction 5,6 bins if ampl. is big.
1156  //histogram names have not been changed, but it should be understood that bin_5 is soi, and bin_6_7 is latter TS'
1157  if ((v_ampl[depth] > 30. && (subdet_ != "HE" || subdet_ != "HB")) ||
1158  (v_ampl[depth] > 300.)) { //300 fC cut for QIE-11 HB & HE
1159  double fbinSOI = tool[soi] - calibrations.pedestal((dataFrame)[soi].capid());
1160  double fbinPS = 0;
1161 
1162  for (int j = soi + 1; j <= lastbin; j++)
1163  fbinPS += tool[j] - calibrations.pedestal((dataFrame)[j].capid());
1164 
1165  fbinSOI /= v_ampl[depth];
1166  fbinPS /= v_ampl[depth];
1167  strtmp = "HcalDigiTask_SOI_frac_" + subdet_;
1168  fill1D(strtmp, fbinSOI);
1169  strtmp = "HcalDigiTask_postSOI_frac_" + subdet_;
1170  fill1D(strtmp, fbinPS);
1171  }
1172 
1173  if (hep17_) {
1174  if (!isHEP17) {
1175  strtmp = "HcalDigiTask_signal_amplitude_" + subdet_;
1176  fill1D(strtmp, v_ampl[0]);
1177  strtmp = "HcalDigiTask_signal_amplitude_depth" + str(depth) + "_" + subdet_;
1178  fill1D(strtmp, v_ampl[depth]);
1179  } else {
1180  strtmp = "HcalDigiTask_signal_amplitude_HEP17";
1181  fill1D(strtmp, v_ampl[0]);
1182  strtmp = "HcalDigiTask_signal_amplitude_depth" + str(depth) + "_HEP17";
1183  fill1D(strtmp, v_ampl[depth]);
1184  }
1185  } else {
1186  strtmp = "HcalDigiTask_signal_amplitude_" + subdet_;
1187  fill1D(strtmp, v_ampl[0]);
1188  strtmp = "HcalDigiTask_signal_amplitude_depth" + str(depth) + "_" + subdet_;
1189  fill1D(strtmp, v_ampl[depth]);
1190  }
1191  }
1192  } // End of CYCLE OVER CELLS =============================================
1193 
1194  if (isubdet != 0 && noise_ == 0) { // signal only, once per event
1195  strtmp = "HcalDigiTask_number_of_amplitudes_above_10fC_" + subdet_;
1196  fill1D(strtmp, indigis);
1197 
1198  // SimHits once again !!!
1199  double eps = 1.e-3;
1200  std::vector<double> v_ehits(maxDepth_[isubdet] + 1, 0);
1201 
1202  if (mc_ == "yes") {
1204  iEvent.getByToken(tok_mc_, hcalHits);
1205  const edm::PCaloHitContainer* simhitResult = hcalHits.product();
1206  for (std::vector<PCaloHit>::const_iterator simhits = simhitResult->begin(); simhits != simhitResult->end();
1207  ++simhits) {
1208  unsigned int id_ = simhits->id();
1209  int sub, depth, ieta, iphi;
1210  HcalDetId hid;
1211  if (testNumber_)
1212  hid = HcalHitRelabeller::relabel(id_, hcons);
1213  else
1214  hid = HcalDetId(id_);
1215  sub = hid.subdet();
1216  depth = hid.depth();
1217  ieta = hid.ieta();
1218  iphi = hid.iphi();
1219 
1220  if (depth > maxDepth_[isubdet] && sub == isubdet) {
1221  edm::LogWarning("HcalDetId") << "HcalDetID(SimHit) presents conflicting information. Depth: " << depth
1222  << ", iphi: " << iphi << ", ieta: " << ieta
1223  << ". Max depth from geometry is: " << maxDepth_[isubdet]
1224  << ". TestNumber = " << testNumber_;
1225  continue;
1226  }
1227 
1228  // take cell already found to be max energy in a particular subdet
1229  if (sub == isubdet && ieta == ieta_Sim && iphi == iphi_Sim) {
1230  double en = simhits->energy();
1231 
1232  v_ehits[0] += en;
1233  v_ehits[depth] += en;
1234  }
1235  } // simhit loop
1236 
1237  strtmp = "HcalDigiTask_amplitude_vs_simhits_" + subdet_;
1238  if (v_ehits[0] > eps)
1239  fill2D(strtmp, v_ehits[0], v_ampl_c[0]);
1240  for (int depth = 1; depth <= maxDepth_[isubdet]; depth++) {
1241  strtmp = "HcalDigiTask_amplitude_vs_simhits_depth" + str(depth) + "_" + subdet_;
1242  if (v_ehits[depth] > eps)
1243  fill2D(strtmp, v_ehits[depth], v_ampl_c[depth]);
1244  }
1245 
1246  strtmp = "HcalDigiTask_amplitude_vs_simhits_profile_" + subdet_;
1247  if (v_ehits[0] > eps)
1248  fillPf(strtmp, v_ehits[0], v_ampl_c[0]);
1249  for (int depth = 1; depth <= maxDepth_[isubdet]; depth++) {
1250  strtmp = "HcalDigiTask_amplitude_vs_simhits_profile_depth" + str(depth) + "_" + subdet_;
1251  if (v_ehits[depth] > eps)
1252  fillPf(strtmp, v_ehits[depth], v_ampl_c[depth]);
1253  }
1254 
1255  strtmp = "HcalDigiTask_ratio_amplitude_vs_simhits_" + subdet_;
1256  if (v_ehits[0] > eps)
1257  fill1D(strtmp, v_ampl_c[0] / v_ehits[0]);
1258  for (int depth = 1; depth <= maxDepth_[isubdet]; depth++) {
1259  strtmp = "HcalDigiTask_amplitude_vs_simhits_profile_depth" + str(depth) + "_" + subdet_;
1260  if (v_ehits[depth] > eps)
1261  fillPf(strtmp, v_ehits[depth], v_ampl_c[depth]);
1262  strtmp = "HcalDigiTask_ratio_amplitude_vs_simhits_depth" + str(depth) + "_" + subdet_;
1263  if (v_ehits[depth] > eps)
1264  fill1D(strtmp, v_ampl_c[depth] / v_ehits[depth]);
1265  }
1266 
1267  } // end of if(mc_ == "yes")
1268 
1269  strtmp = "HcalDigiTask_Ndigis_" + subdet_;
1270  fill1D(strtmp, double(Ndig));
1271 
1272  } // end of if( subdet != 0 && noise_ == 0) { // signal only
1273 
1274 } //HcalDataFrameContainer
1275 
1277  if (!msm_->count(name))
1278  (*msm_)[name] = ib.book1D(name.c_str(), name.c_str(), n, min, max);
1279 }
1280 
1282  if (!msm_->count(name))
1283  (*msm_)[name] = ib.book1D(name.c_str(), name.c_str(), limX.n, limX.min, limX.max);
1284 }
1285 
1287  msm_->find(name)->second->Fill(X, weight);
1288 }
1289 
1291  if (!msm_->count(name))
1292  (*msm_)[name] = ib.book2D(name.c_str(), name.c_str(), limX.n, limX.min, limX.max, limY.n, limY.min, limY.max);
1293 }
1294 
1295 void HcalDigisValidation::fill2D(std::string name, double X, double Y, double weight) {
1296  msm_->find(name)->second->Fill(X, Y, weight);
1297 }
1298 
1300  if (!msm_->count(name))
1301  (*msm_)[name] = ib.bookProfile(name.c_str(), name.c_str(), limX.n, limX.min, limX.max, limY.n, limY.min, limY.max);
1302 }
1303 
1305  DQMStore::IBooker& ib, std::string name, const HistLim& limX, const HistLim& limY, const char* option) {
1306  if (!msm_->count(name))
1307  (*msm_)[name] =
1308  ib.bookProfile(name.c_str(), name.c_str(), limX.n, limX.min, limX.max, limY.n, limY.min, limY.max, option);
1309 }
1310 
1311 void HcalDigisValidation::fillPf(std::string name, double X, double Y) { msm_->find(name)->second->Fill(X, Y); }
1312 
1314  if (!msm_->count(name))
1315  return nullptr;
1316  else
1317  return msm_->find(name)->second;
1318 }
1319 
1321  std::stringstream out;
1322  out << x;
1323  return out.str();
1324 }
1325 
1326 //define this as a plug-in
HcalDigisValidation::~HcalDigisValidation
~HcalDigisValidation() override
Definition: HcalDigisValidation.cc:78
ecalMGPA::adc
constexpr int adc(sample_type sample)
get the ADC sample (12 bits)
Definition: EcalMGPASample.h:11
dqm::impl::MonitorElement
Definition: MonitorElement.h:98
mps_fire.i
i
Definition: mps_fire.py:355
edm::SortedCollection::const_iterator
std::vector< T >::const_iterator const_iterator
Definition: SortedCollection.h:80
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
HcalDbService::getGainWidth
const HcalGainWidth * getGainWidth(const HcalGenericDetId &fId) const
Definition: HcalDbService.cc:312
HcalDataFrameContainer
Definition: HcalDigiCollections.h:35
edm::Handle::product
T const * product() const
Definition: Handle.h:70
edm::DataFrameContainer::const_iterator
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
Definition: DataFrameContainer.h:61
HcalGenericDetId
Definition: HcalGenericDetId.h:15
HcalDigisValidation::htopology
const HcalTopology * htopology
Definition: HcalDigisValidation.h:151
HcalDigisValidation::hcons
const HcalDDDRecConstants * hcons
Definition: HcalDigisValidation.h:150
HcalDigisParam_cfi.emulTPs
emulTPs
Definition: HcalDigisParam_cfi.py:14
HcalDetId::iphi
constexpr int iphi() const
get the cell iphi
Definition: HcalDetId.h:157
X
#define X(str)
Definition: MuonsGrabber.cc:38
edm::Run
Definition: Run.h:45
CaloSamples::size
int size() const
get the size
Definition: CaloSamples.h:24
min
T min(T a, T b)
Definition: MathUtil.h:58
edm::EDGetTokenT
Definition: EDGetToken.h:33
CaloGeometryRecord
Definition: CaloGeometryRecord.h:30
edm
HLT enums.
Definition: AlignableModifier.h:19
cropTnPTrees.frac
frac
Definition: cropTnPTrees.py:18
HcalDigisValidation::HcalDigisValidation
HcalDigisValidation(const edm::ParameterSet &)
Definition: HcalDigisValidation.cc:26
HcalDigisValidation::tok_emulTPs_
edm::EDGetTokenT< HcalTrigPrimDigiCollection > tok_emulTPs_
Definition: HcalDigisValidation.h:130
geometry
Definition: geometry.py:1
HcalTopology
Definition: HcalTopology.h:26
DetId::Hcal
Definition: DetId.h:28
HcalDigisValidation::nevtot
int nevtot
Definition: HcalDigisValidation.h:148
edm::LogInfo
Definition: MessageLogger.h:254
HcalDigisValidation::hep17_
bool hep17_
Definition: HcalDigisValidation.h:121
HcalDbService::getPedestal
const HcalPedestal * getPedestal(const HcalGenericDetId &fId) const
Definition: HcalDbService.cc:277
HcalDigisValidation::msm_
std::map< std::string, MonitorElement * > * msm_
Definition: HcalDigisValidation.h:74
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:279
HcalDbService::getGain
const HcalGain * getGain(const HcalGenericDetId &fId) const
Definition: HcalDbService.cc:305
edm::SortedCollection
Definition: SortedCollection.h:49
HcalRecNumberingRecord.h
AlignmentProducer_cff.calibrations
calibrations
Definition: AlignmentProducer_cff.py:59
HcalDetId::depth
constexpr int depth() const
get the tower depth
Definition: HcalDetId.h:164
HcalDigisValidation::nevent3
int nevent3
Definition: HcalDigisValidation.h:146
HcalCoderDb::adc2fC
void adc2fC(const HBHEDataFrame &df, CaloSamples &lf) const override
Definition: HcalCoderDb.cc:73
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
DDAxes::x
HcalDigisValidation::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition: HcalDigisValidation.cc:402
HcalDigisValidation::book2D
void book2D(DQMStore::IBooker &ib, std::string name, const HistLim &limX, const HistLim &limY)
Definition: HcalDigisValidation.cc:1290
HcalBarrel
Definition: HcalAssistant.h:33
HcalDigisValidation::HEPhase1_
bool HEPhase1_
Definition: HcalDigisValidation.h:122
HcalDigisValidation::book1D
void book1D(DQMStore::IBooker &ib, std::string name, int n, double min, double max)
Definition: HcalDigisValidation.cc:1276
edm::Handle
Definition: AssociativeIterator.h:50
HcalDigisValidation::dirName_
std::string dirName_
Definition: HcalDigisValidation.h:110
fileinputsource_cfi.option
option
Definition: fileinputsource_cfi.py:87
HcalDigisValidation::fill2D
void fill2D(std::string name, double X, double Y, double weight=1)
Definition: HcalDigisValidation.cc:1295
HcalDbService::getHcalShape
const HcalQIEShape * getHcalShape(const HcalGenericDetId &fId) const
Definition: HcalDbService.cc:326
HcalDbService::getHcalCalibrations
const HcalCalibrations & getHcalCalibrations(const HcalGenericDetId &fId) const
Definition: HcalDbService.cc:65
LEDCalibrationChannels.iphi
iphi
Definition: LEDCalibrationChannels.py:64
HcalDbService::getHcalCoder
const HcalQIECoder * getHcalCoder(const HcalGenericDetId &fId) const
Definition: HcalDbService.cc:319
HcalDigisValidation::nevent4
int nevent4
Definition: HcalDigisValidation.h:147
MakerMacros.h
CaloGeometry
Definition: CaloGeometry.h:21
HcalDigisValidation::booking
void booking(DQMStore::IBooker &ib, std::string subdetopt, int bnoise, int bmc)
Definition: HcalDigisValidation.cc:177
HcalDbService::getPedestalWidth
const HcalPedestalWidth * getPedestalWidth(const HcalGenericDetId &fId) const
Definition: HcalDbService.cc:284
edm::EventSetup::get
T get() const
Definition: EventSetup.h:73
HcalDigisValidation::noise_
int noise_
Definition: HcalDigisValidation.h:119
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
HcalDigisValidation::subdet_
std::string subdet_
Definition: HcalDigisValidation.h:108
edm::ESHandle
Definition: DTSurvey.h:22
HcalDigisValidation::HistLim::max
double max
Definition: HcalDigisValidation.h:69
HcalOuter
Definition: HcalAssistant.h:35
HcalDigisValidation::mode_
std::string mode_
Definition: HcalDigisValidation.h:117
HcalPedestal
Definition: HcalPedestal.h:15
HcalDigisValidation::HistLim::n
int n
Definition: HcalDigisValidation.h:67
HcalCalibrations
Definition: HcalCalibrations.h:9
HcalDigisValidation::monitor
MonitorElement * monitor(std::string name)
Definition: HcalDigisValidation.cc:1313
LEDCalibrationChannels.depth
depth
Definition: LEDCalibrationChannels.py:65
HcalRecNumberingRecord
Definition: HcalRecNumberingRecord.h:23
HcalDigisValidation::tok_qie11_hbhe_
edm::EDGetTokenT< QIE11DigiCollection > tok_qie11_hbhe_
Definition: HcalDigisValidation.h:134
HcalDigisValidation::QIE10inputTag_
edm::InputTag QIE10inputTag_
Definition: HcalDigisValidation.h:113
HcalDigisValidation::inputTag_
edm::InputTag inputTag_
Definition: HcalDigisValidation.h:112
particleFlowDisplacedVertex_cfi.ratio
ratio
Definition: particleFlowDisplacedVertex_cfi.py:93
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
HcalDigisValidation::emulTPsTag_
edm::InputTag emulTPsTag_
Definition: HcalDigisValidation.h:115
HcalGain
Definition: HcalGain.h:16
edm::LogWarning
Definition: MessageLogger.h:141
HcalDigisValidation::tok_mc_
edm::EDGetTokenT< edm::PCaloHitContainer > tok_mc_
Definition: HcalDigisValidation.h:126
edm::ParameterSet::exists
bool exists(std::string const &parameterName) const
checks if a parameter exists
Definition: ParameterSet.cc:674
HcalDigisValidation::tok_qie10_hf_
edm::EDGetTokenT< QIE10DigiCollection > tok_qie10_hf_
Definition: HcalDigisValidation.h:133
LEDCalibrationChannels.ieta
ieta
Definition: LEDCalibrationChannels.py:63
HcalDigisValidation::tok_hf_
edm::EDGetTokenT< HFDigiCollection > tok_hf_
Definition: HcalDigisValidation.h:129
HcalDetId::ieta
constexpr int ieta() const
get the cell ieta
Definition: HcalDetId.h:155
HLTBitAnalyser_cfi.simhits
simhits
SIM objects.
Definition: HLTBitAnalyser_cfi.py:21
edm::ParameterSet
Definition: ParameterSet.h:36
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
CaloTPGRecord
Definition: CaloTPGRecord.h:26
HcalDigisValidation::dataTPsTag_
edm::InputTag dataTPsTag_
Definition: HcalDigisValidation.h:116
es_hardcode_cfi.gainWidth
gainWidth
Definition: es_hardcode_cfi.py:89
HcalHitRelabeller.h
HcalDetId::subdet
constexpr HcalSubdetector subdet() const
get the subdetector
Definition: HcalDetId.h:138
HcalDetId
Definition: HcalDetId.h:12
HcalTrigTowerGeometry::firstHFTower
int firstHFTower(int version) const
Definition: HcalTrigTowerGeometry.h:18
iEvent
int iEvent
Definition: GenABIO.cc:224
cuy.ib
ib
Definition: cuy.py:662
apvshotsanalyzer_cfi.digiCollection
digiCollection
Definition: apvshotsanalyzer_cfi.py:4
EcalCondDBWriter_cfi.pedestal
pedestal
Definition: EcalCondDBWriter_cfi.py:49
edm::EventSetup
Definition: EventSetup.h:57
CaloSamples
Definition: CaloSamples.h:14
HcalTrigTowerGeometry.h
HcalDigisValidation::Plot_TP_ver_
bool Plot_TP_ver_
Definition: HcalDigisValidation.h:124
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
itr
std::vector< std::pair< float, float > >::iterator itr
Definition: HGCDigitizer.cc:28
get
#define get
HcalQIECoder
Definition: HcalQIECoder.h:20
HcalDigisValidation::nChannels_
int nChannels_[5]
Definition: HcalDigisValidation.h:154
HcalDigisValidation::tok_dataTPs_
edm::EDGetTokenT< HcalTrigPrimDigiCollection > tok_dataTPs_
Definition: HcalDigisValidation.h:131
HcalDigisValidation::HistLim::min
double min
Definition: HcalDigisValidation.h:68
HcalDigisValidation::nevent2
int nevent2
Definition: HcalDigisValidation.h:145
HcalDigisValidation::QIE11inputTag_
edm::InputTag QIE11inputTag_
Definition: HcalDigisValidation.h:114
PedestalClient_cfi.gain
gain
Definition: PedestalClient_cfi.py:37
HcalSubdetector
HcalSubdetector
Definition: HcalAssistant.h:31
HcalForward
Definition: HcalAssistant.h:36
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
HcalHitRelabeller::relabel
DetId relabel(const uint32_t testId) const
Definition: HcalHitRelabeller.cc:49
HcalDigisValidation::maxDepth_
int maxDepth_[5]
Definition: HcalDigisValidation.h:153
HcalDigisValidation
Definition: HcalDigisValidation.h:55
heppy_batch.val
val
Definition: heppy_batch.py:351
HcalDigisValidation::HBPhase1_
bool HBPhase1_
Definition: HcalDigisValidation.h:123
std
Definition: JetResolutionObject.h:76
writedatasetfile.run
run
Definition: writedatasetfile.py:27
HcalDigisValidation::testNumber_
bool testNumber_
Definition: HcalDigisValidation.h:120
DOFs::Y
Definition: AlignPCLThresholdsWriter.cc:37
HcalDigisValidation.h
HcalEndcap
Definition: HcalAssistant.h:34
CaloSamples::presamples
int presamples() const
access presample information
Definition: CaloSamples.h:36
HcalDigisValidation::outputFile_
std::string outputFile_
Definition: HcalDigisValidation.h:107
HcalDigisValidation::dqmBeginRun
void dqmBeginRun(const edm::Run &run, const edm::EventSetup &c) override
Definition: HcalDigisValidation.cc:80
ZMuMuCategoriesSequences_cff.nbin
nbin
Definition: ZMuMuCategoriesSequences_cff.py:25
HcalDDDRecConstants.h
HcalGeometry::getHxSize
unsigned int getHxSize(const int type) const
Definition: HcalGeometry.cc:278
edm::PCaloHitContainer
std::vector< PCaloHit > PCaloHitContainer
Definition: PCaloHitContainer.h:8
HcalPedestalWidth::getWidth
float getWidth(int fCapId) const
get width (sqrt(sigma_i_i)) for capId = 0..3
Definition: HcalPedestalWidth.cc:31
HcalDigisValidation::mc_
std::string mc_
Definition: HcalDigisValidation.h:118
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
HcalDigisValidation::bookHistograms
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Definition: HcalDigisValidation.cc:110
HcalQIEShape
Definition: HcalQIEShape.h:17
HcalDigisValidation::reco
void reco(const edm::Event &iEvent, const edm::EventSetup &iSetup, const edm::EDGetTokenT< edm::SortedCollection< Digi > > &tok)
Definition: HcalDigisValidation.cc:599
dqm::implementation::IBooker
Definition: DQMStore.h:43
HcalCoderDb
Definition: HcalCoderDb.h:15
HcalDDDRecConstants::getMaxDepth
int getMaxDepth(const int &type) const
Definition: HcalDDDRecConstants.h:88
CaloTPGTranscoder::hcaletValue
virtual double hcaletValue(const int &ieta, const int &iphi, const int &version, const int &compressedValue) const =0
MillePedeFileConverter_cfg.out
out
Definition: MillePedeFileConverter_cfg.py:31
HcalDigisValidation::nevent1
int nevent1
Definition: HcalDigisValidation.h:144
HcalDigisValidation::fill1D
void fill1D(std::string name, double X, double weight=1)
Definition: HcalDigisValidation.cc:1286
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
HcalDigisValidation::HistLim
Definition: HcalDigisValidation.h:65
HcalPedestalWidth
Definition: HcalPedestalWidth.h:15
HcalDigisValidation::tok_ho_
edm::EDGetTokenT< HODigiCollection > tok_ho_
Definition: HcalDigisValidation.h:128
HcalDbRecord
Definition: HcalDbRecord.h:30
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
HcalDigisValidation::conditions
edm::ESHandle< HcalDbService > conditions
Definition: HcalDigisValidation.h:138
HcalDigisValidation::htopo
edm::ESHandle< HcalTopology > htopo
Definition: HcalDigisValidation.h:141
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
HcalDigisValidation::fillPf
void fillPf(std::string name, double X, double Y)
Definition: HcalDigisValidation.cc:1311
edm::Event
Definition: Event.h:73
HcalDigisValidation::str
std::string str(int x)
Definition: HcalDigisValidation.cc:1320
HcalGeometry
Definition: HcalGeometry.h:17
cuy.ii
ii
Definition: cuy.py:590
HcalDigisValidation::bookPf
void bookPf(DQMStore::IBooker &ib, std::string name, const HistLim &limX, const HistLim &limY)
Definition: HcalDigisValidation.cc:1299
edm::InputTag
Definition: InputTag.h:15
HcalDigisValidation::skipDataTPs
bool skipDataTPs
Definition: HcalDigisValidation.h:156
weight
Definition: weight.py:1
HcalGainWidth
Definition: HcalGainWidth.h:15
HcalDigisValidation::tok_hbhe_
edm::EDGetTokenT< HBHEDigiCollection > tok_hbhe_
Definition: HcalDigisValidation.h:127
HcalDigisParam_cfi.dataTPs
dataTPs
Definition: HcalDigisParam_cfi.py:15