35 if (iConfig.
exists(
"simHits"))
51 msm_ =
new std::map<std::string, MonitorElement*>();
54 else edm::LogInfo(
"OutputInfo") <<
" Hcal Digi Task histograms will NOT be saved";
70 book1D(ib,
"nevtot", 1, 0, 1);
73 if (
subdet_ ==
"noise") bnoise = 1;
74 if (
mc_ ==
"yes") bmc = 1;
85 HistLim tp_hl_et(260, -10, 250);
86 HistLim tp_hl_ntp(640, -20, 3180);
87 HistLim tp_hl_ntp_sub(404, -20, 2000);
88 HistLim tp_hl_ieta(85, -42.5, 42.5);
91 book1D(ib,
"HcalDigiTask_tp_et", tp_hl_et);
92 book1D(ib,
"HcalDigiTask_tp_et_HB", tp_hl_et);
93 book1D(ib,
"HcalDigiTask_tp_et_HE", tp_hl_et);
94 book1D(ib,
"HcalDigiTask_tp_et_HF", tp_hl_et);
95 book1D(ib,
"HcalDigiTask_tp_ntp", tp_hl_ntp);
96 book1D(ib,
"HcalDigiTask_tp_ntp_HB", tp_hl_ntp_sub);
97 book1D(ib,
"HcalDigiTask_tp_ntp_HE", tp_hl_ntp_sub);
98 book1D(ib,
"HcalDigiTask_tp_ntp_HF", tp_hl_ntp_sub);
99 book1D(ib,
"HcalDigiTask_tp_ntp_ieta", tp_hl_ieta);
100 book1D(ib,
"HcalDigiTask_tp_ntp_10_ieta", tp_hl_ieta);
101 book2D(ib,
"HcalDigiTask_tp_et_ieta", tp_hl_ieta, tp_hl_et);
102 bookPf(ib,
"HcalDigiTask_tp_ave_et_ieta", tp_hl_ieta, tp_hl_et,
" ");
110 HistLim Ndigis(2600, 0., 2600.);
111 HistLim ndigis(520, -20., 1020.);
114 HistLim digiAmp(360, -100., 7100.);
115 HistLim ratio(2000, -100., 3900.);
116 HistLim sumAmp(100, -500., 1500.);
121 HistLim pedestalfC(400, -10., 30.);
126 HistLim pedWidthLim(100, 0., 2.);
129 HistLim gainWidthLim(160, 0., 0.32);
131 HistLim ietaLim(85, -42.5, 42.5);
132 HistLim iphiLim(74, -0.5, 73.5);
134 if (bsubdet ==
"HE") {
136 }
else if (bsubdet ==
"HF") {
138 pedLim =
HistLim(100, 0., 20.);
139 pedWidthLim =
HistLim(100, 0., 5.);
140 frac =
HistLim(400, -4.00, 4.00);
141 }
else if (bsubdet ==
"HO") {
143 gainLim =
HistLim(160, 0., 1.6);
147 const char * sub = bsubdet.c_str();
150 sprintf(histo,
"HcalDigiTask_Ndigis_%s", sub);
151 book1D(ib, histo, Ndigis);
154 sprintf(histo,
"HcalDigiTask_ieta_iphi_occupancy_map_depth1_%s", sub);
155 book2D(ib, histo, ietaLim, iphiLim);
157 sprintf(histo,
"HcalDigiTask_ieta_iphi_occupancy_map_depth2_%s", sub);
158 book2D(ib, histo, ietaLim, iphiLim);
160 sprintf(histo,
"HcalDigiTask_ieta_iphi_occupancy_map_depth3_%s", sub);
161 book2D(ib, histo, ietaLim, iphiLim);
163 sprintf(histo,
"HcalDigiTask_ieta_iphi_occupancy_map_depth4_%s", sub);
164 book2D(ib, histo, ietaLim, iphiLim);
167 sprintf(histo,
"HcalDigiTask_occupancy_vs_ieta_depth1_%s", sub);
168 book1D(ib, histo, ietaLim);
170 sprintf(histo,
"HcalDigiTask_occupancy_vs_ieta_depth2_%s", sub);
171 book1D(ib, histo, ietaLim);
173 sprintf(histo,
"HcalDigiTask_occupancy_vs_ieta_depth3_%s", sub);
174 book1D(ib, histo, ietaLim);
176 sprintf(histo,
"HcalDigiTask_occupancy_vs_ieta_depth4_%s", sub);
177 book1D(ib, histo, ietaLim);
192 sprintf(histo,
"HcalDigiTask_sum_all_amplitudes_%s", sub);
193 book1D(ib, histo, sumAmp);
195 sprintf(histo,
"HcalDigiTask_number_of_amplitudes_above_10fC_%s", sub);
196 book1D(ib, histo, ndigis);
198 sprintf(histo,
"HcalDigiTask_ADC0_adc_depth1_%s", sub);
199 book1D(ib, histo, pedestal);
200 sprintf(histo,
"HcalDigiTask_ADC0_adc_depth2_%s", sub);
201 book1D(ib, histo, pedestal);
202 sprintf(histo,
"HcalDigiTask_ADC0_adc_depth3_%s", sub);
203 book1D(ib, histo, pedestal);
204 sprintf(histo,
"HcalDigiTask_ADC0_adc_depth4_%s", sub);
205 book1D(ib, histo, pedestal);
207 sprintf(histo,
"HcalDigiTask_ADC0_fC_depth1_%s", sub);
208 book1D(ib, histo, pedestalfC);
209 sprintf(histo,
"HcalDigiTask_ADC0_fC_depth2_%s", sub);
210 book1D(ib, histo, pedestalfC);
211 sprintf(histo,
"HcalDigiTask_ADC0_fC_depth3_%s", sub);
212 book1D(ib, histo, pedestalfC);
213 sprintf(histo,
"HcalDigiTask_ADC0_fC_depth4_%s", sub);
214 book1D(ib, histo, pedestalfC);
216 sprintf(histo,
"HcalDigiTask_signal_amplitude_%s", sub);
217 book1D(ib, histo, digiAmp);
218 sprintf(histo,
"HcalDigiTask_signal_amplitude_depth1_%s", sub);
219 book1D(ib, histo, digiAmp);
220 sprintf(histo,
"HcalDigiTask_signal_amplitude_depth2_%s", sub);
221 book1D(ib, histo, digiAmp);
222 sprintf(histo,
"HcalDigiTask_signal_amplitude_depth3_%s", sub);
223 book1D(ib, histo, digiAmp);
224 sprintf(histo,
"HcalDigiTask_signal_amplitude_depth4_%s", sub);
225 book1D(ib, histo, digiAmp);
227 sprintf(histo,
"HcalDigiTask_signal_amplitude_vs_bin_all_depths_%s", sub);
228 book2D(ib, histo, nbin, digiAmp);
236 sprintf(histo,
"HcalDigiTask_all_amplitudes_vs_bin_1D_depth1_%s", sub);
238 sprintf(histo,
"HcalDigiTask_all_amplitudes_vs_bin_1D_depth2_%s", sub);
241 sprintf(histo,
"HcalDigiTask_bin_5_frac_%s", sub);
243 sprintf(histo,
"HcalDigiTask_bin_6_7_frac_%s", sub);
247 sprintf(histo,
"HcalDigiTask_amplitude_vs_simhits_%s", sub);
248 book2D(ib, histo, sime, digiAmp);
249 sprintf(histo,
"HcalDigiTask_amplitude_vs_simhits_depth1_%s", sub);
250 book2D(ib, histo, sime, digiAmp);
251 sprintf(histo,
"HcalDigiTask_amplitude_vs_simhits_depth2_%s", sub);
252 book2D(ib, histo, sime, digiAmp);
253 sprintf(histo,
"HcalDigiTask_amplitude_vs_simhits_depth3_%s", sub);
254 book2D(ib, histo, sime, digiAmp);
255 sprintf(histo,
"HcalDigiTask_amplitude_vs_simhits_depth4_%s", sub);
256 book2D(ib, histo, sime, digiAmp);
258 sprintf(histo,
"HcalDigiTask_amplitude_vs_simhits_profile_%s", sub);
259 bookPf(ib, histo, sime, digiAmp);
260 sprintf(histo,
"HcalDigiTask_amplitude_vs_simhits_profile_depth1_%s", sub);
261 bookPf(ib, histo, sime, digiAmp);
262 sprintf(histo,
"HcalDigiTask_amplitude_vs_simhits_profile_depth2_%s", sub);
263 bookPf(ib, histo, sime, digiAmp);
264 sprintf(histo,
"HcalDigiTask_amplitude_vs_simhits_profile_depth3_%s", sub);
265 bookPf(ib, histo, sime, digiAmp);
266 sprintf(histo,
"HcalDigiTask_amplitude_vs_simhits_profile_depth4_%s", sub);
267 bookPf(ib, histo, sime, digiAmp);
269 sprintf(histo,
"HcalDigiTask_ratio_amplitude_vs_simhits_%s", sub);
271 sprintf(histo,
"HcalDigiTask_ratio_amplitude_vs_simhits_depth1_%s", sub);
273 sprintf(histo,
"HcalDigiTask_ratio_amplitude_vs_simhits_depth2_%s", sub);
275 sprintf(histo,
"HcalDigiTask_ratio_amplitude_vs_simhits_depth3_%s", sub);
277 sprintf(histo,
"HcalDigiTask_ratio_amplitude_vs_simhits_depth4_%s", sub);
287 sprintf(histo,
"HcalDigiTask_gain_capId0_Depth1_%s", sub);
288 book1D(ib, histo, gainLim);
289 sprintf(histo,
"HcalDigiTask_gain_capId1_Depth1_%s", sub);
290 book1D(ib, histo, gainLim);
291 sprintf(histo,
"HcalDigiTask_gain_capId2_Depth1_%s", sub);
292 book1D(ib, histo, gainLim);
293 sprintf(histo,
"HcalDigiTask_gain_capId3_Depth1_%s", sub);
294 book1D(ib, histo, gainLim);
296 sprintf(histo,
"HcalDigiTask_gain_capId0_Depth2_%s", sub);
297 book1D(ib, histo, gainLim);
298 sprintf(histo,
"HcalDigiTask_gain_capId1_Depth2_%s", sub);
299 book1D(ib, histo, gainLim);
300 sprintf(histo,
"HcalDigiTask_gain_capId2_Depth2_%s", sub);
301 book1D(ib, histo, gainLim);
302 sprintf(histo,
"HcalDigiTask_gain_capId3_Depth2_%s", sub);
303 book1D(ib, histo, gainLim);
305 sprintf(histo,
"HcalDigiTask_gainWidth_capId0_Depth1_%s", sub);
306 book1D(ib, histo, gainWidthLim);
307 sprintf(histo,
"HcalDigiTask_gainWidth_capId1_Depth1_%s", sub);
308 book1D(ib, histo, gainWidthLim);
309 sprintf(histo,
"HcalDigiTask_gainWidth_capId2_Depth1_%s", sub);
310 book1D(ib, histo, gainWidthLim);
311 sprintf(histo,
"HcalDigiTask_gainWidth_capId3_Depth1_%s", sub);
312 book1D(ib, histo, gainWidthLim);
314 sprintf(histo,
"HcalDigiTask_gainWidth_capId0_Depth2_%s", sub);
315 book1D(ib, histo, gainWidthLim);
316 sprintf(histo,
"HcalDigiTask_gainWidth_capId1_Depth2_%s", sub);
317 book1D(ib, histo, gainWidthLim);
318 sprintf(histo,
"HcalDigiTask_gainWidth_capId2_Depth2_%s", sub);
319 book1D(ib, histo, gainWidthLim);
320 sprintf(histo,
"HcalDigiTask_gainWidth_capId3_Depth2_%s", sub);
321 book1D(ib, histo, gainWidthLim);
323 sprintf(histo,
"HcalDigiTask_pedestal_capId0_Depth1_%s", sub);
324 book1D(ib, histo, pedLim);
325 sprintf(histo,
"HcalDigiTask_pedestal_capId1_Depth1_%s", sub);
326 book1D(ib, histo, pedLim);
327 sprintf(histo,
"HcalDigiTask_pedestal_capId2_Depth1_%s", sub);
328 book1D(ib, histo, pedLim);
329 sprintf(histo,
"HcalDigiTask_pedestal_capId3_Depth1_%s", sub);
330 book1D(ib, histo, pedLim);
332 sprintf(histo,
"HcalDigiTask_pedestal_capId0_Depth2_%s", sub);
333 book1D(ib, histo, pedLim);
334 sprintf(histo,
"HcalDigiTask_pedestal_capId1_Depth2_%s", sub);
335 book1D(ib, histo, pedLim);
336 sprintf(histo,
"HcalDigiTask_pedestal_capId2_Depth2_%s", sub);
337 book1D(ib, histo, pedLim);
338 sprintf(histo,
"HcalDigiTask_pedestal_capId3_Depth2_%s", sub);
339 book1D(ib, histo, pedLim);
341 sprintf(histo,
"HcalDigiTask_pedestal_width_capId0_Depth1_%s", sub);
342 book1D(ib, histo, pedWidthLim);
343 sprintf(histo,
"HcalDigiTask_pedestal_width_capId1_Depth1_%s", sub);
344 book1D(ib, histo, pedWidthLim);
345 sprintf(histo,
"HcalDigiTask_pedestal_width_capId2_Depth1_%s", sub);
346 book1D(ib, histo, pedWidthLim);
347 sprintf(histo,
"HcalDigiTask_pedestal_width_capId3_Depth1_%s", sub);
348 book1D(ib, histo, pedWidthLim);
350 sprintf(histo,
"HcalDigiTask_pedestal_width_capId0_Depth2_%s", sub);
351 book1D(ib, histo, pedWidthLim);
352 sprintf(histo,
"HcalDigiTask_pedestal_width_capId1_Depth2_%s", sub);
353 book1D(ib, histo, pedWidthLim);
354 sprintf(histo,
"HcalDigiTask_pedestal_width_capId2_Depth2_%s", sub);
355 book1D(ib, histo, pedWidthLim);
356 sprintf(histo,
"HcalDigiTask_pedestal_width_capId3_Depth2_%s", sub);
357 book1D(ib, histo, pedWidthLim);
362 sprintf(histo,
"HcalDigiTask_gain_capId0_Depth3_%s", sub);
363 book1D(ib, histo, gainLim);
364 sprintf(histo,
"HcalDigiTask_gain_capId1_Depth3_%s", sub);
365 book1D(ib, histo, gainLim);
366 sprintf(histo,
"HcalDigiTask_gain_capId2_Depth3_%s", sub);
367 book1D(ib, histo, gainLim);
368 sprintf(histo,
"HcalDigiTask_gain_capId3_Depth3_%s", sub);
369 book1D(ib, histo, gainLim);
371 sprintf(histo,
"HcalDigiTask_gainWidth_capId0_Depth3_%s", sub);
372 book1D(ib, histo, gainWidthLim);
373 sprintf(histo,
"HcalDigiTask_gainWidth_capId1_Depth3_%s", sub);
374 book1D(ib, histo, gainWidthLim);
375 sprintf(histo,
"HcalDigiTask_gainWidth_capId2_Depth3_%s", sub);
376 book1D(ib, histo, gainWidthLim);
377 sprintf(histo,
"HcalDigiTask_gainWidth_capId3_Depth3_%s", sub);
378 book1D(ib, histo, gainWidthLim);
380 sprintf(histo,
"HcalDigiTask_pedestal_capId0_Depth3_%s", sub);
381 book1D(ib, histo, pedLim);
382 sprintf(histo,
"HcalDigiTask_pedestal_capId1_Depth3_%s", sub);
383 book1D(ib, histo, pedLim);
384 sprintf(histo,
"HcalDigiTask_pedestal_capId2_Depth3_%s", sub);
385 book1D(ib, histo, pedLim);
386 sprintf(histo,
"HcalDigiTask_pedestal_capId3_Depth3_%s", sub);
387 book1D(ib, histo, pedLim);
389 sprintf(histo,
"HcalDigiTask_pedestal_width_capId0_Depth3_%s", sub);
390 book1D(ib, histo, pedWidthLim);
391 sprintf(histo,
"HcalDigiTask_pedestal_width_capId1_Depth3_%s", sub);
392 book1D(ib, histo, pedWidthLim);
393 sprintf(histo,
"HcalDigiTask_pedestal_width_capId2_Depth3_%s", sub);
394 book1D(ib, histo, pedWidthLim);
395 sprintf(histo,
"HcalDigiTask_pedestal_width_capId3_Depth3_%s", sub);
396 book1D(ib, histo, pedWidthLim);
401 sprintf(histo,
"HcalDigiTask_gain_capId0_Depth4_%s", sub);
402 book1D(ib, histo, gainLim);
403 sprintf(histo,
"HcalDigiTask_gain_capId1_Depth4_%s", sub);
404 book1D(ib, histo, gainLim);
405 sprintf(histo,
"HcalDigiTask_gain_capId2_Depth4_%s", sub);
406 book1D(ib, histo, gainLim);
407 sprintf(histo,
"HcalDigiTask_gain_capId3_Depth4_%s", sub);
408 book1D(ib, histo, gainLim);
410 sprintf(histo,
"HcalDigiTask_gainWidth_capId0_Depth4_%s", sub);
411 book1D(ib, histo, gainWidthLim);
412 sprintf(histo,
"HcalDigiTask_gainWidth_capId1_Depth4_%s", sub);
413 book1D(ib, histo, gainWidthLim);
414 sprintf(histo,
"HcalDigiTask_gainWidth_capId2_Depth4_%s", sub);
415 book1D(ib, histo, gainWidthLim);
416 sprintf(histo,
"HcalDigiTask_gainWidth_capId3_Depth4_%s", sub);
417 book1D(ib, histo, gainWidthLim);
420 sprintf(histo,
"HcalDigiTask_pedestal_capId0_Depth4_%s", sub);
421 book1D(ib, histo, pedLim);
422 sprintf(histo,
"HcalDigiTask_pedestal_capId1_Depth4_%s", sub);
423 book1D(ib, histo, pedLim);
424 sprintf(histo,
"HcalDigiTask_pedestal_capId2_Depth4_%s", sub);
425 book1D(ib, histo, pedLim);
426 sprintf(histo,
"HcalDigiTask_pedestal_capId3_Depth4_%s", sub);
427 book1D(ib, histo, pedLim);
429 sprintf(histo,
"HcalDigiTask_pedestal_width_capId0_Depth4_%s", sub);
430 book1D(ib, histo, pedWidthLim);
431 sprintf(histo,
"HcalDigiTask_pedestal_width_capId1_Depth4_%s", sub);
432 book1D(ib, histo, pedWidthLim);
433 sprintf(histo,
"HcalDigiTask_pedestal_width_capId2_Depth4_%s", sub);
434 book1D(ib, histo, pedWidthLim);
435 sprintf(histo,
"HcalDigiTask_pedestal_width_capId3_Depth4_%s", sub);
436 book1D(ib, histo, pedWidthLim);
440 sprintf(histo,
"HcalDigiTask_gainMap_Depth1_%s", sub);
441 book2D(ib, histo, ietaLim, iphiLim);
442 sprintf(histo,
"HcalDigiTask_gainMap_Depth2_%s", sub);
443 book2D(ib, histo, ietaLim, iphiLim);
444 sprintf(histo,
"HcalDigiTask_gainMap_Depth3_%s", sub);
445 book2D(ib, histo, ietaLim, iphiLim);
446 sprintf(histo,
"HcalDigiTask_gainMap_Depth4_%s", sub);
447 book2D(ib, histo, ietaLim, iphiLim);
449 sprintf(histo,
"HcalDigiTask_pwidthMap_Depth1_%s", sub);
450 book2D(ib, histo, ietaLim, iphiLim);
451 sprintf(histo,
"HcalDigiTask_pwidthMap_Depth2_%s", sub);
452 book2D(ib, histo, ietaLim, iphiLim);
453 sprintf(histo,
"HcalDigiTask_pwidthMap_Depth3_%s", sub);
454 book2D(ib, histo, ietaLim, iphiLim);
455 sprintf(histo,
"HcalDigiTask_pwidthMap_Depth4_%s", sub);
456 book2D(ib, histo, ietaLim, iphiLim);
531 int c = 0, chb = 0, che = 0, chf = 0;
534 int ieta = itr->id().ieta();
537 if (
abs(ieta) <= 16 )
539 else if (
abs(ieta) < tp_geometry->firstHFTower(itr->id().version()) )
541 else if (
abs(ieta) <= 42 )
546 float en = decoder->hcaletValue(itr->id(), itr->t0());
548 if (en < 0.00001)
continue;
552 fill1D(
"HcalDigiTask_tp_et",en);
553 fill2D(
"HcalDigiTask_tp_et_ieta",ieta,en);
554 fillPf(
"HcalDigiTask_tp_ave_et_ieta",ieta,en);
558 fill1D(
"HcalDigiTask_tp_et_HB",en);
562 fill1D(
"HcalDigiTask_tp_et_HE",en);
566 fill1D(
"HcalDigiTask_tp_et_HF",en);
570 fill1D(
"HcalDigiTask_tp_ntp_ieta",ieta);
571 if ( en > 10. )
fill1D(
"HcalDigiTask_tp_ntp_10_ieta",ieta);
575 fill1D(
"HcalDigiTask_tp_ntp",
c);
576 fill1D(
"HcalDigiTask_tp_ntp_HB",chb);
577 fill1D(
"HcalDigiTask_tp_ntp_HE",che);
578 fill1D(
"HcalDigiTask_tp_ntp_HF",chf);
601 if (
subdet_ ==
"HB") isubdet = 1;
602 if (
subdet_ ==
"HE") isubdet = 2;
603 if (
subdet_ ==
"HO") isubdet = 3;
604 if (
subdet_ ==
"HF") isubdet = 4;
627 double emax_Sim = -9999.;
636 if (isubdet != 0 &&
noise_ == 0) {
638 for (std::vector<PCaloHit>::const_iterator simhits = simhitResult->begin(); simhits != simhitResult->end(); ++simhits) {
641 double en = simhits->energy();
643 int ieta = cell.ieta();
646 int iphi = cell.iphi();
648 if (en > emax_Sim && sub == isubdet) {
653 if (
mode_ ==
"multi" &&
654 ((sub == 4 && en < 100. && en > 1.)
655 || ((sub != 4) && en < 1. && en > 0.02))) {
665 if (
mode_ !=
"multi" && emax_Sim > 0.) seedSimHit = 1;
681 int depth = cell.depth();
683 int iphi = cell.iphi();
684 int ieta = cell.ieta();
686 int sub = cell.subdet();
698 if (((
nevent1 == 1 && isubdet == 1) ||
699 (
nevent2 == 1 && isubdet == 2) ||
700 (
nevent3 == 1 && isubdet == 3) ||
701 (
nevent4 == 1 && isubdet == 4)) &&
noise_ == 1 && sub == isubdet) {
709 for (
int i = 0;
i < 4;
i++) {
712 fill1D(
"HcalDigiTask_pedestal_capId" +
str(
i) +
"_Depth" +
str(depth) +
"_" +
subdet_, pedestal->getValue(
i));
717 fill2D(
"HcalDigiTask_pwidthMap_Depth" +
str(depth) +
"_" +
subdet_,
double(ieta),
double(iphi), pedWidth->
getWidth(0));
722 if (sub == isubdet) Ndig++;
726 if (sub == isubdet &&
noise_ == 0) {
734 coder.
adc2fC(*digiItr, tool);
736 double noiseADC = (*digiItr)[0].adc();
737 double noisefC = tool[0];
739 fill1D(
"HcalDigiTask_ADC0_adc_depth" +
str(depth) +
"_" +
subdet_, noiseADC);
744 fill2D(
"HcalDigiTask_ieta_iphi_occupancy_map_depth" +
str(depth) +
"_" +
subdet_,
double(ieta),
double(iphi));
752 if (ieta == ieta_Sim && iphi == iphi_Sim) closen = seedSimHit;
754 for (
int ii = 0;
ii < tool.size();
ii++) {
755 int capid = (*digiItr)[
ii].capid();
757 double val = (tool[
ii] - calibrations.
pedestal(capid));
766 if (depth == 1) strtmp =
"HcalDigiTask_all_amplitudes_vs_bin_1D_depth1_" +
subdet_;
767 else strtmp =
"HcalDigiTask_all_amplitudes_vs_bin_1D_depth2_" +
subdet_;
772 strtmp =
"HcalDigiTask_signal_amplitude_vs_bin_all_depths_" +
subdet_;
778 if (isubdet != 4 &&
ii >= 4 &&
ii <= 7) {
780 if (depth == 1) ampl1 += val;
781 if (depth == 2) ampl2 += val;
782 if (depth == 3) ampl3 += val;
783 if (depth == 4) ampl4 += val;
787 if (depth == 1) ampl1_c += val;
788 if (depth == 2) ampl2_c += val;
789 if (depth == 3) ampl3_c += val;
790 if (depth == 4) ampl4_c += val;
795 if (isubdet == 4 &&
ii >= 2 &&
ii <= 4) {
797 if (depth == 1) ampl1 += val;
798 if (depth == 2) ampl2 += val;
799 if (depth == 3) ampl3 += val;
800 if (depth == 4) ampl4 += val;
803 if (depth == 1) ampl1_c += val;
804 if (depth == 2) ampl2_c += val;
805 if (depth == 3) ampl3_c += val;
806 if (depth == 4) ampl4_c += val;
826 strtmp =
"HcalDigiTask_sum_all_amplitudes_" +
subdet_;
830 if (ampl1 > 10. || ampl2 > 10. || ampl3 > 10. || ampl4 > 10.) indigis++;
833 if (ampl1 > 30. && depth == 1 && closen == 1 && isubdet != 4) {
834 double fBin5 = tool[4] - calibrations.
pedestal((*digiItr)[4].capid());
835 double fBin67 = tool[5] + tool[6]
836 - calibrations.
pedestal((*digiItr)[5].capid())
837 - calibrations.
pedestal((*digiItr)[6].capid());
842 strtmp =
"HcalDigiTask_bin_5_frac_" +
subdet_;
844 strtmp =
"HcalDigiTask_bin_6_7_frac_" +
subdet_;
850 if (isubdet == 4 && ampl1 > 30. && depth == 1) {
851 double fBin5 = tool[2] - calibrations.
pedestal((*digiItr)[2].capid());
852 double fBin67 = tool[3] + tool[4]
853 - calibrations.
pedestal((*digiItr)[3].capid())
854 - calibrations.
pedestal((*digiItr)[4].capid());
857 strtmp =
"HcalDigiTask_bin_5_frac_" +
subdet_;
859 strtmp =
"HcalDigiTask_bin_6_7_frac_" +
subdet_;
864 strtmp =
"HcalDigiTask_signal_amplitude_" +
subdet_;
866 strtmp =
"HcalDigiTask_signal_amplitude_depth1_" +
subdet_;
868 strtmp =
"HcalDigiTask_signal_amplitude_depth2_" +
subdet_;
870 strtmp =
"HcalDigiTask_signal_amplitude_depth3_" +
subdet_;
872 strtmp =
"HcalDigiTask_signal_amplitude_depth4_" +
subdet_;
877 if (isubdet != 0 &&
noise_ == 0) {
878 strtmp =
"HcalDigiTask_number_of_amplitudes_above_10fC_" +
subdet_;
893 for (std::vector<PCaloHit>::const_iterator simhits = simhitResult->begin(); simhits != simhitResult->end(); ++simhits) {
896 int ieta = cell.
ieta();
899 int iphi = cell.iphi();
900 int sub = cell.subdet();
903 if (sub == isubdet && ieta == ieta_Sim && iphi == iphi_Sim) {
904 int depth = cell.depth();
905 double en = simhits->energy();
908 if (depth == 1) ehits1 += en;
909 if (depth == 2) ehits2 += en;
910 if (depth == 3) ehits3 += en;
911 if (depth == 4) ehits4 += en;
915 strtmp =
"HcalDigiTask_amplitude_vs_simhits_" +
subdet_;
916 if (ehits > eps)
fill2D(strtmp, ehits, ampl_c);
917 strtmp =
"HcalDigiTask_amplitude_vs_simhits_depth1_" +
subdet_;
918 if (ehits1 > eps)
fill2D(strtmp, ehits1, ampl1_c);
919 strtmp =
"HcalDigiTask_amplitude_vs_simhits_depth2_" +
subdet_;
920 if (ehits2 > eps)
fill2D(strtmp, ehits2, ampl2_c);
921 strtmp =
"HcalDigiTask_amplitude_vs_simhits_depth3_" +
subdet_;
922 if (ehits3 > eps)
fill2D(strtmp, ehits3, ampl3_c);
923 strtmp =
"HcalDigiTask_amplitude_vs_simhits_depth4_" +
subdet_;
924 if (ehits4 > eps)
fill2D(strtmp, ehits4, ampl4_c);
926 strtmp =
"HcalDigiTask_amplitude_vs_simhits_profile_" +
subdet_;
927 if (ehits > eps)
fillPf(strtmp, ehits, ampl_c);
928 strtmp =
"HcalDigiTask_amplitude_vs_simhits_profile_depth1_" +
subdet_;
929 if (ehits1 > eps)
fillPf(strtmp, ehits1, ampl1_c);
930 strtmp =
"HcalDigiTask_amplitude_vs_simhits_profile_depth2_" +
subdet_;
931 if (ehits2 > eps)
fillPf(strtmp, ehits2, ampl2_c);
932 strtmp =
"HcalDigiTask_amplitude_vs_simhits_profile_depth3_" +
subdet_;
933 if (ehits3 > eps)
fillPf(strtmp, ehits3, ampl3_c);
934 strtmp =
"HcalDigiTask_amplitude_vs_simhits_profile_depth4_" +
subdet_;
935 if (ehits4 > eps)
fillPf(strtmp, ehits4, ampl4_c);
937 strtmp =
"HcalDigiTask_ratio_amplitude_vs_simhits_" +
subdet_;
938 if (ehits > eps)
fill1D(strtmp, ampl_c / ehits);
939 strtmp =
"HcalDigiTask_ratio_amplitude_vs_simhits_depth1_" +
subdet_;
940 if (ehits1 > eps)
fill1D(strtmp, ampl1_c / ehits1);
941 strtmp =
"HcalDigiTask_ratio_amplitude_vs_simhits_depth2_" +
subdet_;
942 if (ehits2 > eps)
fill1D(strtmp, ampl2_c / ehits2);
943 strtmp =
"HcalDigiTask_ratio_amplitude_vs_simhits_depth3_" +
subdet_;
944 if (ehits3 > eps)
fill1D(strtmp, ampl3_c / ehits3);
945 strtmp =
"HcalDigiTask_ratio_amplitude_vs_simhits_depth4_" +
subdet_;
946 if (ehits4 > eps)
fill1D(strtmp, ampl4_c / ehits4);
950 strtmp =
"HcalDigiTask_Ndigis_" +
subdet_;
951 fill1D(strtmp,
double(Ndig));
960 float fev = float (
nevtot);
963 float sumphi_1, sumphi_2, sumphi_3, sumphi_4;
967 strtmp =
"HcalDigiTask_ieta_iphi_occupancy_map_depth1_" +
subdet_;
971 for (
int i = 1;
i <= nx;
i++) {
972 for (
int j = 1;
j <= ny;
j++) {
976 strtmp =
"HcalDigiTask_ieta_iphi_occupancy_map_depth1_" +
subdet_;
980 strtmp =
"HcalDigiTask_ieta_iphi_occupancy_map_depth2_" +
subdet_;
984 strtmp =
"HcalDigiTask_ieta_iphi_occupancy_map_depth3_" +
subdet_;
988 strtmp =
"HcalDigiTask_ieta_iphi_occupancy_map_depth4_" +
subdet_;
995 for (
int i = 1;
i <= 82;
i++) {
998 if (ieta >= 0) ieta += 1;
1000 if (ieta >= -20 && ieta <= 20) {
1003 if (ieta >= 40 || ieta <= -40) {
1014 for (
int iphi = 1; iphi <= 72; iphi++) {
1015 strtmp =
"HcalDigiTask_ieta_iphi_occupancy_map_depth1_" +
subdet_;
1016 sumphi_1 +=
monitor(strtmp)->
getTH1()->GetBinContent(
monitor(strtmp)->getTH1()->FindFixBin(
double(ieta),
double(iphi)));
1017 strtmp =
"HcalDigiTask_ieta_iphi_occupancy_map_depth2_" +
subdet_;
1018 sumphi_2 +=
monitor(strtmp)->
getTH1()->GetBinContent(
monitor(strtmp)->getTH1()->FindFixBin(
double(ieta),
double(iphi)));
1019 strtmp =
"HcalDigiTask_ieta_iphi_occupancy_map_depth3_" +
subdet_;
1020 sumphi_3 +=
monitor(strtmp)->
getTH1()->GetBinContent(
monitor(strtmp)->getTH1()->FindFixBin(
double(ieta),
double(iphi)));
1021 strtmp =
"HcalDigiTask_ieta_iphi_occupancy_map_depth4_" +
subdet_;
1022 sumphi_4 +=
monitor(strtmp)->
getTH1()->GetBinContent(
monitor(strtmp)->getTH1()->FindFixBin(
double(ieta),
double(iphi)));
1026 double deta = double(ieta);
1029 cnorm = sumphi_1 / phi_factor;
1030 strtmp =
"HcalDigiTask_occupancy_vs_ieta_depth1_" +
subdet_;
1031 fill1D(strtmp, deta, cnorm);
1033 cnorm = sumphi_2 / phi_factor;
1034 strtmp =
"HcalDigiTask_occupancy_vs_ieta_depth2_" +
subdet_;
1035 fill1D(strtmp, deta, cnorm);
1037 cnorm = sumphi_3 / phi_factor;
1038 strtmp =
"HcalDigiTask_occupancy_vs_ieta_depth3_" +
subdet_;
1039 fill1D(strtmp, deta, cnorm);
1041 cnorm = sumphi_4 / phi_factor;
1042 strtmp =
"HcalDigiTask_occupancy_vs_ieta_depth4_" +
subdet_;
1043 fill1D(strtmp, deta, cnorm);
1058 msm_->find(name)->second->Fill(X, weight);
1066 msm_->find(name)->second->Fill(X, Y, weight);
1078 msm_->find(name)->second->Fill(X, Y);
1082 if (!
msm_->count(name))
return NULL;
1083 else return msm_->find(name)->second;
1087 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
bool exists(std::string const ¶meterName) const
checks if a parameter exists
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)