47 msm_ =
new std::map<std::string, MonitorElement*>();
50 else edm::LogInfo(
"OutputInfo") <<
" Hcal Digi Task histograms will NOT be saved";
66 book1D(ib,
"nevtot", 1, 0, 1);
69 if (
subdet_ ==
"noise") bnoise = 1;
70 if (
mc_ ==
"yes") bmc = 1;
81 HistLim tp_hl_et(260, -10, 250);
82 HistLim tp_hl_ntp(640, -20, 3180);
83 HistLim tp_hl_ntp_sub(404, -20, 2000);
84 HistLim tp_hl_ieta(85, -42.5, 42.5);
87 book1D(ib,
"HcalDigiTask_tp_et", tp_hl_et);
88 book1D(ib,
"HcalDigiTask_tp_et_HB", tp_hl_et);
89 book1D(ib,
"HcalDigiTask_tp_et_HE", tp_hl_et);
90 book1D(ib,
"HcalDigiTask_tp_et_HF", tp_hl_et);
91 book1D(ib,
"HcalDigiTask_tp_ntp", tp_hl_ntp);
92 book1D(ib,
"HcalDigiTask_tp_ntp_HB", tp_hl_ntp_sub);
93 book1D(ib,
"HcalDigiTask_tp_ntp_HE", tp_hl_ntp_sub);
94 book1D(ib,
"HcalDigiTask_tp_ntp_HF", tp_hl_ntp_sub);
95 book1D(ib,
"HcalDigiTask_tp_ntp_ieta", tp_hl_ieta);
96 book1D(ib,
"HcalDigiTask_tp_ntp_10_ieta", tp_hl_ieta);
97 book2D(ib,
"HcalDigiTask_tp_et_ieta", tp_hl_ieta, tp_hl_et);
98 bookPf(ib,
"HcalDigiTask_tp_ave_et_ieta", tp_hl_ieta, tp_hl_et,
" ");
106 HistLim Ndigis(2600, 0., 2600.);
107 HistLim ndigis(520, -20., 1020.);
110 HistLim digiAmp(360, -100., 7100.);
111 HistLim ratio(2000, -100., 3900.);
112 HistLim sumAmp(100, -500., 1500.);
117 HistLim pedestalfC(400, -10., 30.);
122 HistLim pedWidthLim(100, 0., 2.);
125 HistLim gainWidthLim(160, 0., 0.32);
127 HistLim ietaLim(85, -42.5, 42.5);
128 HistLim iphiLim(74, -0.5, 73.5);
130 if (bsubdet ==
"HE") {
132 }
else if (bsubdet ==
"HF") {
134 pedLim =
HistLim(100, 0., 20.);
135 pedWidthLim =
HistLim(100, 0., 5.);
136 frac =
HistLim(400, -4.00, 4.00);
137 }
else if (bsubdet ==
"HO") {
139 gainLim =
HistLim(160, 0., 1.6);
143 const char * sub = bsubdet.c_str();
146 sprintf(histo,
"HcalDigiTask_Ndigis_%s", sub);
147 book1D(ib, histo, Ndigis);
150 sprintf(histo,
"HcalDigiTask_ieta_iphi_occupancy_map_depth1_%s", sub);
151 book2D(ib, histo, ietaLim, iphiLim);
153 sprintf(histo,
"HcalDigiTask_ieta_iphi_occupancy_map_depth2_%s", sub);
154 book2D(ib, histo, ietaLim, iphiLim);
156 sprintf(histo,
"HcalDigiTask_ieta_iphi_occupancy_map_depth3_%s", sub);
157 book2D(ib, histo, ietaLim, iphiLim);
159 sprintf(histo,
"HcalDigiTask_ieta_iphi_occupancy_map_depth4_%s", sub);
160 book2D(ib, histo, ietaLim, iphiLim);
163 sprintf(histo,
"HcalDigiTask_occupancy_vs_ieta_depth1_%s", sub);
164 book1D(ib, histo, ietaLim);
166 sprintf(histo,
"HcalDigiTask_occupancy_vs_ieta_depth2_%s", sub);
167 book1D(ib, histo, ietaLim);
169 sprintf(histo,
"HcalDigiTask_occupancy_vs_ieta_depth3_%s", sub);
170 book1D(ib, histo, ietaLim);
172 sprintf(histo,
"HcalDigiTask_occupancy_vs_ieta_depth4_%s", sub);
173 book1D(ib, histo, ietaLim);
188 sprintf(histo,
"HcalDigiTask_sum_all_amplitudes_%s", sub);
189 book1D(ib, histo, sumAmp);
191 sprintf(histo,
"HcalDigiTask_number_of_amplitudes_above_10fC_%s", sub);
192 book1D(ib, histo, ndigis);
194 sprintf(histo,
"HcalDigiTask_ADC0_adc_depth1_%s", sub);
195 book1D(ib, histo, pedestal);
196 sprintf(histo,
"HcalDigiTask_ADC0_adc_depth2_%s", sub);
197 book1D(ib, histo, pedestal);
198 sprintf(histo,
"HcalDigiTask_ADC0_adc_depth3_%s", sub);
199 book1D(ib, histo, pedestal);
200 sprintf(histo,
"HcalDigiTask_ADC0_adc_depth4_%s", sub);
201 book1D(ib, histo, pedestal);
203 sprintf(histo,
"HcalDigiTask_ADC0_fC_depth1_%s", sub);
204 book1D(ib, histo, pedestalfC);
205 sprintf(histo,
"HcalDigiTask_ADC0_fC_depth2_%s", sub);
206 book1D(ib, histo, pedestalfC);
207 sprintf(histo,
"HcalDigiTask_ADC0_fC_depth3_%s", sub);
208 book1D(ib, histo, pedestalfC);
209 sprintf(histo,
"HcalDigiTask_ADC0_fC_depth4_%s", sub);
210 book1D(ib, histo, pedestalfC);
212 sprintf(histo,
"HcalDigiTask_signal_amplitude_%s", sub);
213 book1D(ib, histo, digiAmp);
214 sprintf(histo,
"HcalDigiTask_signal_amplitude_depth1_%s", sub);
215 book1D(ib, histo, digiAmp);
216 sprintf(histo,
"HcalDigiTask_signal_amplitude_depth2_%s", sub);
217 book1D(ib, histo, digiAmp);
218 sprintf(histo,
"HcalDigiTask_signal_amplitude_depth3_%s", sub);
219 book1D(ib, histo, digiAmp);
220 sprintf(histo,
"HcalDigiTask_signal_amplitude_depth4_%s", sub);
221 book1D(ib, histo, digiAmp);
223 sprintf(histo,
"HcalDigiTask_signal_amplitude_vs_bin_all_depths_%s", sub);
224 book2D(ib, histo, nbin, digiAmp);
232 sprintf(histo,
"HcalDigiTask_all_amplitudes_vs_bin_1D_depth1_%s", sub);
234 sprintf(histo,
"HcalDigiTask_all_amplitudes_vs_bin_1D_depth2_%s", sub);
237 sprintf(histo,
"HcalDigiTask_bin_5_frac_%s", sub);
239 sprintf(histo,
"HcalDigiTask_bin_6_7_frac_%s", sub);
243 sprintf(histo,
"HcalDigiTask_amplitude_vs_simhits_%s", sub);
244 book2D(ib, histo, sime, digiAmp);
245 sprintf(histo,
"HcalDigiTask_amplitude_vs_simhits_depth1_%s", sub);
246 book2D(ib, histo, sime, digiAmp);
247 sprintf(histo,
"HcalDigiTask_amplitude_vs_simhits_depth2_%s", sub);
248 book2D(ib, histo, sime, digiAmp);
249 sprintf(histo,
"HcalDigiTask_amplitude_vs_simhits_depth3_%s", sub);
250 book2D(ib, histo, sime, digiAmp);
251 sprintf(histo,
"HcalDigiTask_amplitude_vs_simhits_depth4_%s", sub);
252 book2D(ib, histo, sime, digiAmp);
254 sprintf(histo,
"HcalDigiTask_amplitude_vs_simhits_profile_%s", sub);
255 bookPf(ib, histo, sime, digiAmp);
256 sprintf(histo,
"HcalDigiTask_amplitude_vs_simhits_profile_depth1_%s", sub);
257 bookPf(ib, histo, sime, digiAmp);
258 sprintf(histo,
"HcalDigiTask_amplitude_vs_simhits_profile_depth2_%s", sub);
259 bookPf(ib, histo, sime, digiAmp);
260 sprintf(histo,
"HcalDigiTask_amplitude_vs_simhits_profile_depth3_%s", sub);
261 bookPf(ib, histo, sime, digiAmp);
262 sprintf(histo,
"HcalDigiTask_amplitude_vs_simhits_profile_depth4_%s", sub);
263 bookPf(ib, histo, sime, digiAmp);
265 sprintf(histo,
"HcalDigiTask_ratio_amplitude_vs_simhits_%s", sub);
267 sprintf(histo,
"HcalDigiTask_ratio_amplitude_vs_simhits_depth1_%s", sub);
269 sprintf(histo,
"HcalDigiTask_ratio_amplitude_vs_simhits_depth2_%s", sub);
271 sprintf(histo,
"HcalDigiTask_ratio_amplitude_vs_simhits_depth3_%s", sub);
273 sprintf(histo,
"HcalDigiTask_ratio_amplitude_vs_simhits_depth4_%s", sub);
283 sprintf(histo,
"HcalDigiTask_gain_capId0_Depth1_%s", sub);
284 book1D(ib, histo, gainLim);
285 sprintf(histo,
"HcalDigiTask_gain_capId1_Depth1_%s", sub);
286 book1D(ib, histo, gainLim);
287 sprintf(histo,
"HcalDigiTask_gain_capId2_Depth1_%s", sub);
288 book1D(ib, histo, gainLim);
289 sprintf(histo,
"HcalDigiTask_gain_capId3_Depth1_%s", sub);
290 book1D(ib, histo, gainLim);
292 sprintf(histo,
"HcalDigiTask_gain_capId0_Depth2_%s", sub);
293 book1D(ib, histo, gainLim);
294 sprintf(histo,
"HcalDigiTask_gain_capId1_Depth2_%s", sub);
295 book1D(ib, histo, gainLim);
296 sprintf(histo,
"HcalDigiTask_gain_capId2_Depth2_%s", sub);
297 book1D(ib, histo, gainLim);
298 sprintf(histo,
"HcalDigiTask_gain_capId3_Depth2_%s", sub);
299 book1D(ib, histo, gainLim);
301 sprintf(histo,
"HcalDigiTask_gainWidth_capId0_Depth1_%s", sub);
302 book1D(ib, histo, gainWidthLim);
303 sprintf(histo,
"HcalDigiTask_gainWidth_capId1_Depth1_%s", sub);
304 book1D(ib, histo, gainWidthLim);
305 sprintf(histo,
"HcalDigiTask_gainWidth_capId2_Depth1_%s", sub);
306 book1D(ib, histo, gainWidthLim);
307 sprintf(histo,
"HcalDigiTask_gainWidth_capId3_Depth1_%s", sub);
308 book1D(ib, histo, gainWidthLim);
310 sprintf(histo,
"HcalDigiTask_gainWidth_capId0_Depth2_%s", sub);
311 book1D(ib, histo, gainWidthLim);
312 sprintf(histo,
"HcalDigiTask_gainWidth_capId1_Depth2_%s", sub);
313 book1D(ib, histo, gainWidthLim);
314 sprintf(histo,
"HcalDigiTask_gainWidth_capId2_Depth2_%s", sub);
315 book1D(ib, histo, gainWidthLim);
316 sprintf(histo,
"HcalDigiTask_gainWidth_capId3_Depth2_%s", sub);
317 book1D(ib, histo, gainWidthLim);
319 sprintf(histo,
"HcalDigiTask_pedestal_capId0_Depth1_%s", sub);
320 book1D(ib, histo, pedLim);
321 sprintf(histo,
"HcalDigiTask_pedestal_capId1_Depth1_%s", sub);
322 book1D(ib, histo, pedLim);
323 sprintf(histo,
"HcalDigiTask_pedestal_capId2_Depth1_%s", sub);
324 book1D(ib, histo, pedLim);
325 sprintf(histo,
"HcalDigiTask_pedestal_capId3_Depth1_%s", sub);
326 book1D(ib, histo, pedLim);
328 sprintf(histo,
"HcalDigiTask_pedestal_capId0_Depth2_%s", sub);
329 book1D(ib, histo, pedLim);
330 sprintf(histo,
"HcalDigiTask_pedestal_capId1_Depth2_%s", sub);
331 book1D(ib, histo, pedLim);
332 sprintf(histo,
"HcalDigiTask_pedestal_capId2_Depth2_%s", sub);
333 book1D(ib, histo, pedLim);
334 sprintf(histo,
"HcalDigiTask_pedestal_capId3_Depth2_%s", sub);
335 book1D(ib, histo, pedLim);
337 sprintf(histo,
"HcalDigiTask_pedestal_width_capId0_Depth1_%s", sub);
338 book1D(ib, histo, pedWidthLim);
339 sprintf(histo,
"HcalDigiTask_pedestal_width_capId1_Depth1_%s", sub);
340 book1D(ib, histo, pedWidthLim);
341 sprintf(histo,
"HcalDigiTask_pedestal_width_capId2_Depth1_%s", sub);
342 book1D(ib, histo, pedWidthLim);
343 sprintf(histo,
"HcalDigiTask_pedestal_width_capId3_Depth1_%s", sub);
344 book1D(ib, histo, pedWidthLim);
346 sprintf(histo,
"HcalDigiTask_pedestal_width_capId0_Depth2_%s", sub);
347 book1D(ib, histo, pedWidthLim);
348 sprintf(histo,
"HcalDigiTask_pedestal_width_capId1_Depth2_%s", sub);
349 book1D(ib, histo, pedWidthLim);
350 sprintf(histo,
"HcalDigiTask_pedestal_width_capId2_Depth2_%s", sub);
351 book1D(ib, histo, pedWidthLim);
352 sprintf(histo,
"HcalDigiTask_pedestal_width_capId3_Depth2_%s", sub);
353 book1D(ib, histo, pedWidthLim);
358 sprintf(histo,
"HcalDigiTask_gain_capId0_Depth3_%s", sub);
359 book1D(ib, histo, gainLim);
360 sprintf(histo,
"HcalDigiTask_gain_capId1_Depth3_%s", sub);
361 book1D(ib, histo, gainLim);
362 sprintf(histo,
"HcalDigiTask_gain_capId2_Depth3_%s", sub);
363 book1D(ib, histo, gainLim);
364 sprintf(histo,
"HcalDigiTask_gain_capId3_Depth3_%s", sub);
365 book1D(ib, histo, gainLim);
367 sprintf(histo,
"HcalDigiTask_gainWidth_capId0_Depth3_%s", sub);
368 book1D(ib, histo, gainWidthLim);
369 sprintf(histo,
"HcalDigiTask_gainWidth_capId1_Depth3_%s", sub);
370 book1D(ib, histo, gainWidthLim);
371 sprintf(histo,
"HcalDigiTask_gainWidth_capId2_Depth3_%s", sub);
372 book1D(ib, histo, gainWidthLim);
373 sprintf(histo,
"HcalDigiTask_gainWidth_capId3_Depth3_%s", sub);
374 book1D(ib, histo, gainWidthLim);
376 sprintf(histo,
"HcalDigiTask_pedestal_capId0_Depth3_%s", sub);
377 book1D(ib, histo, pedLim);
378 sprintf(histo,
"HcalDigiTask_pedestal_capId1_Depth3_%s", sub);
379 book1D(ib, histo, pedLim);
380 sprintf(histo,
"HcalDigiTask_pedestal_capId2_Depth3_%s", sub);
381 book1D(ib, histo, pedLim);
382 sprintf(histo,
"HcalDigiTask_pedestal_capId3_Depth3_%s", sub);
383 book1D(ib, histo, pedLim);
385 sprintf(histo,
"HcalDigiTask_pedestal_width_capId0_Depth3_%s", sub);
386 book1D(ib, histo, pedWidthLim);
387 sprintf(histo,
"HcalDigiTask_pedestal_width_capId1_Depth3_%s", sub);
388 book1D(ib, histo, pedWidthLim);
389 sprintf(histo,
"HcalDigiTask_pedestal_width_capId2_Depth3_%s", sub);
390 book1D(ib, histo, pedWidthLim);
391 sprintf(histo,
"HcalDigiTask_pedestal_width_capId3_Depth3_%s", sub);
392 book1D(ib, histo, pedWidthLim);
397 sprintf(histo,
"HcalDigiTask_gain_capId0_Depth4_%s", sub);
398 book1D(ib, histo, gainLim);
399 sprintf(histo,
"HcalDigiTask_gain_capId1_Depth4_%s", sub);
400 book1D(ib, histo, gainLim);
401 sprintf(histo,
"HcalDigiTask_gain_capId2_Depth4_%s", sub);
402 book1D(ib, histo, gainLim);
403 sprintf(histo,
"HcalDigiTask_gain_capId3_Depth4_%s", sub);
404 book1D(ib, histo, gainLim);
406 sprintf(histo,
"HcalDigiTask_gainWidth_capId0_Depth4_%s", sub);
407 book1D(ib, histo, gainWidthLim);
408 sprintf(histo,
"HcalDigiTask_gainWidth_capId1_Depth4_%s", sub);
409 book1D(ib, histo, gainWidthLim);
410 sprintf(histo,
"HcalDigiTask_gainWidth_capId2_Depth4_%s", sub);
411 book1D(ib, histo, gainWidthLim);
412 sprintf(histo,
"HcalDigiTask_gainWidth_capId3_Depth4_%s", sub);
413 book1D(ib, histo, gainWidthLim);
416 sprintf(histo,
"HcalDigiTask_pedestal_capId0_Depth4_%s", sub);
417 book1D(ib, histo, pedLim);
418 sprintf(histo,
"HcalDigiTask_pedestal_capId1_Depth4_%s", sub);
419 book1D(ib, histo, pedLim);
420 sprintf(histo,
"HcalDigiTask_pedestal_capId2_Depth4_%s", sub);
421 book1D(ib, histo, pedLim);
422 sprintf(histo,
"HcalDigiTask_pedestal_capId3_Depth4_%s", sub);
423 book1D(ib, histo, pedLim);
425 sprintf(histo,
"HcalDigiTask_pedestal_width_capId0_Depth4_%s", sub);
426 book1D(ib, histo, pedWidthLim);
427 sprintf(histo,
"HcalDigiTask_pedestal_width_capId1_Depth4_%s", sub);
428 book1D(ib, histo, pedWidthLim);
429 sprintf(histo,
"HcalDigiTask_pedestal_width_capId2_Depth4_%s", sub);
430 book1D(ib, histo, pedWidthLim);
431 sprintf(histo,
"HcalDigiTask_pedestal_width_capId3_Depth4_%s", sub);
432 book1D(ib, histo, pedWidthLim);
436 sprintf(histo,
"HcalDigiTask_gainMap_Depth1_%s", sub);
437 book2D(ib, histo, ietaLim, iphiLim);
438 sprintf(histo,
"HcalDigiTask_gainMap_Depth2_%s", sub);
439 book2D(ib, histo, ietaLim, iphiLim);
440 sprintf(histo,
"HcalDigiTask_gainMap_Depth3_%s", sub);
441 book2D(ib, histo, ietaLim, iphiLim);
442 sprintf(histo,
"HcalDigiTask_gainMap_Depth4_%s", sub);
443 book2D(ib, histo, ietaLim, iphiLim);
445 sprintf(histo,
"HcalDigiTask_pwidthMap_Depth1_%s", sub);
446 book2D(ib, histo, ietaLim, iphiLim);
447 sprintf(histo,
"HcalDigiTask_pwidthMap_Depth2_%s", sub);
448 book2D(ib, histo, ietaLim, iphiLim);
449 sprintf(histo,
"HcalDigiTask_pwidthMap_Depth3_%s", sub);
450 book2D(ib, histo, ietaLim, iphiLim);
451 sprintf(histo,
"HcalDigiTask_pwidthMap_Depth4_%s", sub);
452 book2D(ib, histo, ietaLim, iphiLim);
524 int c = 0, chb = 0, che = 0, chf = 0;
527 int ieta = itr->id().ieta();
528 int iphi = itr->id().iphi();
537 float cen = itr->SOI_compressedEt();
538 float en = decoder->hcaletValue(ieta,iphi,cen);
540 if (en < 0.00001)
continue;
544 fill1D(
"HcalDigiTask_tp_et",en);
545 fill2D(
"HcalDigiTask_tp_et_ieta",ieta,en);
546 fillPf(
"HcalDigiTask_tp_ave_et_ieta",ieta,en);
550 fill1D(
"HcalDigiTask_tp_et_HB",en);
554 fill1D(
"HcalDigiTask_tp_et_HE",en);
558 fill1D(
"HcalDigiTask_tp_et_HF",en);
562 fill1D(
"HcalDigiTask_tp_ntp_ieta",ieta);
563 if ( en > 10. )
fill1D(
"HcalDigiTask_tp_ntp_10_ieta",ieta);
567 fill1D(
"HcalDigiTask_tp_ntp",
c);
568 fill1D(
"HcalDigiTask_tp_ntp_HB",chb);
569 fill1D(
"HcalDigiTask_tp_ntp_HE",che);
570 fill1D(
"HcalDigiTask_tp_ntp_HF",chf);
593 if (
subdet_ ==
"HB") isubdet = 1;
594 if (
subdet_ ==
"HE") isubdet = 2;
595 if (
subdet_ ==
"HO") isubdet = 3;
596 if (
subdet_ ==
"HF") isubdet = 4;
619 double emax_Sim = -9999.;
628 if (isubdet != 0 &&
noise_ == 0) {
630 for (std::vector<PCaloHit>::const_iterator simhits = simhitResult->begin(); simhits != simhitResult->end(); ++simhits) {
633 double en = simhits->energy();
635 int ieta = cell.ieta();
638 int iphi = cell.iphi();
640 if (en > emax_Sim && sub == isubdet) {
645 if (
mode_ ==
"multi" &&
646 ((sub == 4 && en < 100. && en > 1.)
647 || ((sub != 4) && en < 1. && en > 0.02))) {
657 if (
mode_ !=
"multi" && emax_Sim > 0.) seedSimHit = 1;
673 int depth = cell.depth();
675 int iphi = cell.iphi();
676 int ieta = cell.ieta();
678 int sub = cell.subdet();
690 if (((
nevent1 == 1 && isubdet == 1) ||
691 (
nevent2 == 1 && isubdet == 2) ||
692 (
nevent3 == 1 && isubdet == 3) ||
693 (
nevent4 == 1 && isubdet == 4)) &&
noise_ == 1 && sub == isubdet) {
701 for (
int i = 0;
i < 4;
i++) {
704 fill1D(
"HcalDigiTask_pedestal_capId" +
str(
i) +
"_Depth" +
str(depth) +
"_" +
subdet_, pedestal->getValue(
i));
709 fill2D(
"HcalDigiTask_pwidthMap_Depth" +
str(depth) +
"_" +
subdet_,
double(ieta),
double(iphi), pedWidth->
getWidth(0));
714 if (sub == isubdet) Ndig++;
718 if (sub == isubdet &&
noise_ == 0) {
726 coder.
adc2fC(*digiItr, tool);
728 double noiseADC = (*digiItr)[0].adc();
729 double noisefC = tool[0];
731 fill1D(
"HcalDigiTask_ADC0_adc_depth" +
str(depth) +
"_" +
subdet_, noiseADC);
736 fill2D(
"HcalDigiTask_ieta_iphi_occupancy_map_depth" +
str(depth) +
"_" +
subdet_,
double(ieta),
double(iphi));
744 if (ieta == ieta_Sim && iphi == iphi_Sim) closen = seedSimHit;
746 for (
int ii = 0;
ii < tool.size();
ii++) {
747 int capid = (*digiItr)[
ii].capid();
749 double val = (tool[
ii] - calibrations.
pedestal(capid));
758 if (depth == 1) strtmp =
"HcalDigiTask_all_amplitudes_vs_bin_1D_depth1_" +
subdet_;
759 else strtmp =
"HcalDigiTask_all_amplitudes_vs_bin_1D_depth2_" +
subdet_;
764 strtmp =
"HcalDigiTask_signal_amplitude_vs_bin_all_depths_" +
subdet_;
770 if (isubdet != 4 &&
ii >= 4 &&
ii <= 7) {
772 if (depth == 1) ampl1 += val;
773 if (depth == 2) ampl2 += val;
774 if (depth == 3) ampl3 += val;
775 if (depth == 4) ampl4 += val;
779 if (depth == 1) ampl1_c += val;
780 if (depth == 2) ampl2_c += val;
781 if (depth == 3) ampl3_c += val;
782 if (depth == 4) ampl4_c += val;
787 if (isubdet == 4 &&
ii >= 2 &&
ii <= 4) {
789 if (depth == 1) ampl1 += val;
790 if (depth == 2) ampl2 += val;
791 if (depth == 3) ampl3 += val;
792 if (depth == 4) ampl4 += val;
795 if (depth == 1) ampl1_c += val;
796 if (depth == 2) ampl2_c += val;
797 if (depth == 3) ampl3_c += val;
798 if (depth == 4) ampl4_c += val;
818 strtmp =
"HcalDigiTask_sum_all_amplitudes_" +
subdet_;
822 if (ampl1 > 10. || ampl2 > 10. || ampl3 > 10. || ampl4 > 10.) indigis++;
825 if (ampl1 > 30. && depth == 1 && closen == 1 && isubdet != 4) {
826 double fBin5 = tool[4] - calibrations.
pedestal((*digiItr)[4].capid());
827 double fBin67 = tool[5] + tool[6]
828 - calibrations.
pedestal((*digiItr)[5].capid())
829 - calibrations.
pedestal((*digiItr)[6].capid());
834 strtmp =
"HcalDigiTask_bin_5_frac_" +
subdet_;
836 strtmp =
"HcalDigiTask_bin_6_7_frac_" +
subdet_;
842 if (isubdet == 4 && ampl1 > 30. && depth == 1) {
843 double fBin5 = tool[2] - calibrations.
pedestal((*digiItr)[2].capid());
844 double fBin67 = tool[3] + tool[4]
845 - calibrations.
pedestal((*digiItr)[3].capid())
846 - calibrations.
pedestal((*digiItr)[4].capid());
849 strtmp =
"HcalDigiTask_bin_5_frac_" +
subdet_;
851 strtmp =
"HcalDigiTask_bin_6_7_frac_" +
subdet_;
856 strtmp =
"HcalDigiTask_signal_amplitude_" +
subdet_;
858 strtmp =
"HcalDigiTask_signal_amplitude_depth1_" +
subdet_;
860 strtmp =
"HcalDigiTask_signal_amplitude_depth2_" +
subdet_;
862 strtmp =
"HcalDigiTask_signal_amplitude_depth3_" +
subdet_;
864 strtmp =
"HcalDigiTask_signal_amplitude_depth4_" +
subdet_;
869 if (isubdet != 0 &&
noise_ == 0) {
870 strtmp =
"HcalDigiTask_number_of_amplitudes_above_10fC_" +
subdet_;
885 for (std::vector<PCaloHit>::const_iterator simhits = simhitResult->begin(); simhits != simhitResult->end(); ++simhits) {
888 int ieta = cell.
ieta();
891 int iphi = cell.iphi();
892 int sub = cell.subdet();
895 if (sub == isubdet && ieta == ieta_Sim && iphi == iphi_Sim) {
896 int depth = cell.depth();
897 double en = simhits->energy();
900 if (depth == 1) ehits1 += en;
901 if (depth == 2) ehits2 += en;
902 if (depth == 3) ehits3 += en;
903 if (depth == 4) ehits4 += en;
907 strtmp =
"HcalDigiTask_amplitude_vs_simhits_" +
subdet_;
908 if (ehits > eps)
fill2D(strtmp, ehits, ampl_c);
909 strtmp =
"HcalDigiTask_amplitude_vs_simhits_depth1_" +
subdet_;
910 if (ehits1 > eps)
fill2D(strtmp, ehits1, ampl1_c);
911 strtmp =
"HcalDigiTask_amplitude_vs_simhits_depth2_" +
subdet_;
912 if (ehits2 > eps)
fill2D(strtmp, ehits2, ampl2_c);
913 strtmp =
"HcalDigiTask_amplitude_vs_simhits_depth3_" +
subdet_;
914 if (ehits3 > eps)
fill2D(strtmp, ehits3, ampl3_c);
915 strtmp =
"HcalDigiTask_amplitude_vs_simhits_depth4_" +
subdet_;
916 if (ehits4 > eps)
fill2D(strtmp, ehits4, ampl4_c);
918 strtmp =
"HcalDigiTask_amplitude_vs_simhits_profile_" +
subdet_;
919 if (ehits > eps)
fillPf(strtmp, ehits, ampl_c);
920 strtmp =
"HcalDigiTask_amplitude_vs_simhits_profile_depth1_" +
subdet_;
921 if (ehits1 > eps)
fillPf(strtmp, ehits1, ampl1_c);
922 strtmp =
"HcalDigiTask_amplitude_vs_simhits_profile_depth2_" +
subdet_;
923 if (ehits2 > eps)
fillPf(strtmp, ehits2, ampl2_c);
924 strtmp =
"HcalDigiTask_amplitude_vs_simhits_profile_depth3_" +
subdet_;
925 if (ehits3 > eps)
fillPf(strtmp, ehits3, ampl3_c);
926 strtmp =
"HcalDigiTask_amplitude_vs_simhits_profile_depth4_" +
subdet_;
927 if (ehits4 > eps)
fillPf(strtmp, ehits4, ampl4_c);
929 strtmp =
"HcalDigiTask_ratio_amplitude_vs_simhits_" +
subdet_;
930 if (ehits > eps)
fill1D(strtmp, ampl_c / ehits);
931 strtmp =
"HcalDigiTask_ratio_amplitude_vs_simhits_depth1_" +
subdet_;
932 if (ehits1 > eps)
fill1D(strtmp, ampl1_c / ehits1);
933 strtmp =
"HcalDigiTask_ratio_amplitude_vs_simhits_depth2_" +
subdet_;
934 if (ehits2 > eps)
fill1D(strtmp, ampl2_c / ehits2);
935 strtmp =
"HcalDigiTask_ratio_amplitude_vs_simhits_depth3_" +
subdet_;
936 if (ehits3 > eps)
fill1D(strtmp, ampl3_c / ehits3);
937 strtmp =
"HcalDigiTask_ratio_amplitude_vs_simhits_depth4_" +
subdet_;
938 if (ehits4 > eps)
fill1D(strtmp, ampl4_c / ehits4);
942 strtmp =
"HcalDigiTask_Ndigis_" +
subdet_;
943 fill1D(strtmp,
double(Ndig));
952 float fev = float (
nevtot);
955 float sumphi_1, sumphi_2, sumphi_3, sumphi_4;
959 strtmp =
"HcalDigiTask_ieta_iphi_occupancy_map_depth1_" +
subdet_;
963 for (
int i = 1;
i <= nx;
i++) {
964 for (
int j = 1;
j <= ny;
j++) {
968 strtmp =
"HcalDigiTask_ieta_iphi_occupancy_map_depth1_" +
subdet_;
972 strtmp =
"HcalDigiTask_ieta_iphi_occupancy_map_depth2_" +
subdet_;
976 strtmp =
"HcalDigiTask_ieta_iphi_occupancy_map_depth3_" +
subdet_;
980 strtmp =
"HcalDigiTask_ieta_iphi_occupancy_map_depth4_" +
subdet_;
987 for (
int i = 1;
i <= 82;
i++) {
990 if (ieta >= 0) ieta += 1;
992 if (ieta >= -20 && ieta <= 20) {
995 if (ieta >= 40 || ieta <= -40) {
1006 for (
int iphi = 1; iphi <= 72; iphi++) {
1007 strtmp =
"HcalDigiTask_ieta_iphi_occupancy_map_depth1_" +
subdet_;
1008 sumphi_1 +=
monitor(strtmp)->
getTH1()->GetBinContent(
monitor(strtmp)->getTH1()->FindFixBin(
double(ieta),
double(iphi)));
1009 strtmp =
"HcalDigiTask_ieta_iphi_occupancy_map_depth2_" +
subdet_;
1010 sumphi_2 +=
monitor(strtmp)->
getTH1()->GetBinContent(
monitor(strtmp)->getTH1()->FindFixBin(
double(ieta),
double(iphi)));
1011 strtmp =
"HcalDigiTask_ieta_iphi_occupancy_map_depth3_" +
subdet_;
1012 sumphi_3 +=
monitor(strtmp)->
getTH1()->GetBinContent(
monitor(strtmp)->getTH1()->FindFixBin(
double(ieta),
double(iphi)));
1013 strtmp =
"HcalDigiTask_ieta_iphi_occupancy_map_depth4_" +
subdet_;
1014 sumphi_4 +=
monitor(strtmp)->
getTH1()->GetBinContent(
monitor(strtmp)->getTH1()->FindFixBin(
double(ieta),
double(iphi)));
1018 double deta = double(ieta);
1021 cnorm = sumphi_1 / phi_factor;
1022 strtmp =
"HcalDigiTask_occupancy_vs_ieta_depth1_" +
subdet_;
1023 fill1D(strtmp, deta, cnorm);
1025 cnorm = sumphi_2 / phi_factor;
1026 strtmp =
"HcalDigiTask_occupancy_vs_ieta_depth2_" +
subdet_;
1027 fill1D(strtmp, deta, cnorm);
1029 cnorm = sumphi_3 / phi_factor;
1030 strtmp =
"HcalDigiTask_occupancy_vs_ieta_depth3_" +
subdet_;
1031 fill1D(strtmp, deta, cnorm);
1033 cnorm = sumphi_4 / phi_factor;
1034 strtmp =
"HcalDigiTask_occupancy_vs_ieta_depth4_" +
subdet_;
1035 fill1D(strtmp, deta, cnorm);
1050 msm_->find(name)->second->Fill(X, weight);
1058 msm_->find(name)->second->Fill(X, Y, weight);
1070 msm_->find(name)->second->Fill(X, Y);
1074 if (!
msm_->count(name))
return NULL;
1075 else return msm_->find(name)->second;
1079 std::stringstream
out;
virtual void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &)
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
edm::ESHandle< CaloGeometry > geometry
void setBinContent(int binx, double content)
set content of bin (1-D)
std::vector< PCaloHit > PCaloHitContainer
HcalSubdetector subdet() const
get the subdetector
edm::EDGetTokenT< edm::SortedCollection< HBHEDataFrame > > tok_hbhe_
MonitorElement * bookProfile(Args &&...args)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
edm::EDGetTokenT< edm::SortedCollection< HODataFrame > > tok_ho_
std::vector< HcalTriggerPrimitiveDigi >::const_iterator const_iterator
void reco(const edm::Event &iEvent, const edm::EventSetup &iSetup, const edm::EDGetTokenT< edm::SortedCollection< Digi > > &tok)
double pedestal(int fCapId) const
get pedestal for capid=0..3
float getValue(int fCapId) const
get value for capId = 0..3
virtual void analyze(const edm::Event &, const edm::EventSetup &)
float getValue(int fCapId) const
get value for capId = 0..3
int getNbinsY(void) const
get # of bins in Y-axis
std::map< std::string, MonitorElement * > * msm_
MonitorElement * monitor(std::string name)
virtual void adc2fC(const HBHEDataFrame &df, CaloSamples &lf) const
void fillPf(std::string name, double X, double Y)
void fill2D(std::string name, double X, double Y, double weight=1)
edm::ESHandle< HcalTopology > htopo
int ieta() const
get the cell ieta
MonitorElement * book1D(Args &&...args)
Abs< T >::type abs(const T &t)
HcalDigisValidation(const edm::ParameterSet &)
void bookPf(DQMStore::IBooker &ib, std::string name, const HistLim &limX, const HistLim &limY)
void book2D(DQMStore::IBooker &ib, std::string name, const HistLim &limX, const HistLim &limY)
edm::EDGetTokenT< edm::SortedCollection< HFDataFrame > > tok_hf_
void setCurrentFolder(const std::string &fullpath)
T const * product() const
void fill1D(std::string name, double X, double weight=1)
MonitorElement * book2D(Args &&...args)
edm::EDGetTokenT< edm::PCaloHitContainer > tok_mc_
void booking(DQMStore::IBooker &ib, std::string subdetopt, int bnoise, int bmc)
float getWidth(int fCapId) const
get width (sqrt(sigma_i_i)) for capId = 0..3
edm::EDGetTokenT< HcalTrigPrimDigiCollection > tok_emulTPs_
double getBinContent(int binx) const
get content of bin (1-D)
edm::EDGetTokenT< HcalTrigPrimDigiCollection > tok_dataTPs_
edm::ESHandle< HcalDbService > conditions
int getNbinsX(void) const
get # of bins in X-axis
void book1D(DQMStore::IBooker &ib, std::string name, int n, double min, double max)