34 if (iConfig.
exists(
"simHits"))
50 msm_ =
new std::map<std::string, MonitorElement*>();
53 else edm::LogInfo(
"OutputInfo") <<
" Hcal Digi Task histograms will NOT be saved";
69 book1D(ib,
"nevtot", 1, 0, 1);
72 if (
subdet_ ==
"noise") bnoise = 1;
73 if (
mc_ ==
"yes") bmc = 1;
84 HistLim tp_hl_et(260, -10, 250);
85 HistLim tp_hl_ntp(640, -20, 3180);
86 HistLim tp_hl_ntp_sub(404, -20, 2000);
87 HistLim tp_hl_ieta(85, -42.5, 42.5);
90 book1D(ib,
"HcalDigiTask_tp_et", tp_hl_et);
91 book1D(ib,
"HcalDigiTask_tp_et_HB", tp_hl_et);
92 book1D(ib,
"HcalDigiTask_tp_et_HE", tp_hl_et);
93 book1D(ib,
"HcalDigiTask_tp_et_HF", tp_hl_et);
94 book1D(ib,
"HcalDigiTask_tp_ntp", tp_hl_ntp);
95 book1D(ib,
"HcalDigiTask_tp_ntp_HB", tp_hl_ntp_sub);
96 book1D(ib,
"HcalDigiTask_tp_ntp_HE", tp_hl_ntp_sub);
97 book1D(ib,
"HcalDigiTask_tp_ntp_HF", tp_hl_ntp_sub);
98 book1D(ib,
"HcalDigiTask_tp_ntp_ieta", tp_hl_ieta);
99 book1D(ib,
"HcalDigiTask_tp_ntp_10_ieta", tp_hl_ieta);
100 book2D(ib,
"HcalDigiTask_tp_et_ieta", tp_hl_ieta, tp_hl_et);
101 bookPf(ib,
"HcalDigiTask_tp_ave_et_ieta", tp_hl_ieta, tp_hl_et,
" ");
109 HistLim Ndigis(2600, 0., 2600.);
110 HistLim ndigis(520, -20., 1020.);
113 HistLim digiAmp(360, -100., 7100.);
114 HistLim ratio(2000, -100., 3900.);
115 HistLim sumAmp(100, -500., 1500.);
120 HistLim pedestalfC(400, -10., 30.);
125 HistLim pedWidthLim(100, 0., 2.);
128 HistLim gainWidthLim(160, 0., 0.32);
130 HistLim ietaLim(85, -42.5, 42.5);
131 HistLim iphiLim(74, -0.5, 73.5);
133 if (bsubdet ==
"HE") {
135 }
else if (bsubdet ==
"HF") {
137 pedLim =
HistLim(100, 0., 20.);
138 pedWidthLim =
HistLim(100, 0., 5.);
139 frac =
HistLim(400, -4.00, 4.00);
140 }
else if (bsubdet ==
"HO") {
142 gainLim =
HistLim(160, 0., 1.6);
146 const char * sub = bsubdet.c_str();
149 sprintf(histo,
"HcalDigiTask_Ndigis_%s", sub);
150 book1D(ib, histo, Ndigis);
153 sprintf(histo,
"HcalDigiTask_ieta_iphi_occupancy_map_depth1_%s", sub);
154 book2D(ib, histo, ietaLim, iphiLim);
156 sprintf(histo,
"HcalDigiTask_ieta_iphi_occupancy_map_depth2_%s", sub);
157 book2D(ib, histo, ietaLim, iphiLim);
159 sprintf(histo,
"HcalDigiTask_ieta_iphi_occupancy_map_depth3_%s", sub);
160 book2D(ib, histo, ietaLim, iphiLim);
162 sprintf(histo,
"HcalDigiTask_ieta_iphi_occupancy_map_depth4_%s", sub);
163 book2D(ib, histo, ietaLim, iphiLim);
166 sprintf(histo,
"HcalDigiTask_occupancy_vs_ieta_depth1_%s", sub);
167 book1D(ib, histo, ietaLim);
169 sprintf(histo,
"HcalDigiTask_occupancy_vs_ieta_depth2_%s", sub);
170 book1D(ib, histo, ietaLim);
172 sprintf(histo,
"HcalDigiTask_occupancy_vs_ieta_depth3_%s", sub);
173 book1D(ib, histo, ietaLim);
175 sprintf(histo,
"HcalDigiTask_occupancy_vs_ieta_depth4_%s", sub);
176 book1D(ib, histo, ietaLim);
191 sprintf(histo,
"HcalDigiTask_sum_all_amplitudes_%s", sub);
192 book1D(ib, histo, sumAmp);
194 sprintf(histo,
"HcalDigiTask_number_of_amplitudes_above_10fC_%s", sub);
195 book1D(ib, histo, ndigis);
197 sprintf(histo,
"HcalDigiTask_ADC0_adc_depth1_%s", sub);
198 book1D(ib, histo, pedestal);
199 sprintf(histo,
"HcalDigiTask_ADC0_adc_depth2_%s", sub);
200 book1D(ib, histo, pedestal);
201 sprintf(histo,
"HcalDigiTask_ADC0_adc_depth3_%s", sub);
202 book1D(ib, histo, pedestal);
203 sprintf(histo,
"HcalDigiTask_ADC0_adc_depth4_%s", sub);
204 book1D(ib, histo, pedestal);
206 sprintf(histo,
"HcalDigiTask_ADC0_fC_depth1_%s", sub);
207 book1D(ib, histo, pedestalfC);
208 sprintf(histo,
"HcalDigiTask_ADC0_fC_depth2_%s", sub);
209 book1D(ib, histo, pedestalfC);
210 sprintf(histo,
"HcalDigiTask_ADC0_fC_depth3_%s", sub);
211 book1D(ib, histo, pedestalfC);
212 sprintf(histo,
"HcalDigiTask_ADC0_fC_depth4_%s", sub);
213 book1D(ib, histo, pedestalfC);
215 sprintf(histo,
"HcalDigiTask_signal_amplitude_%s", sub);
216 book1D(ib, histo, digiAmp);
217 sprintf(histo,
"HcalDigiTask_signal_amplitude_depth1_%s", sub);
218 book1D(ib, histo, digiAmp);
219 sprintf(histo,
"HcalDigiTask_signal_amplitude_depth2_%s", sub);
220 book1D(ib, histo, digiAmp);
221 sprintf(histo,
"HcalDigiTask_signal_amplitude_depth3_%s", sub);
222 book1D(ib, histo, digiAmp);
223 sprintf(histo,
"HcalDigiTask_signal_amplitude_depth4_%s", sub);
224 book1D(ib, histo, digiAmp);
226 sprintf(histo,
"HcalDigiTask_signal_amplitude_vs_bin_all_depths_%s", sub);
227 book2D(ib, histo, nbin, digiAmp);
235 sprintf(histo,
"HcalDigiTask_all_amplitudes_vs_bin_1D_depth1_%s", sub);
237 sprintf(histo,
"HcalDigiTask_all_amplitudes_vs_bin_1D_depth2_%s", sub);
240 sprintf(histo,
"HcalDigiTask_bin_5_frac_%s", sub);
242 sprintf(histo,
"HcalDigiTask_bin_6_7_frac_%s", sub);
246 sprintf(histo,
"HcalDigiTask_amplitude_vs_simhits_%s", sub);
247 book2D(ib, histo, sime, digiAmp);
248 sprintf(histo,
"HcalDigiTask_amplitude_vs_simhits_depth1_%s", sub);
249 book2D(ib, histo, sime, digiAmp);
250 sprintf(histo,
"HcalDigiTask_amplitude_vs_simhits_depth2_%s", sub);
251 book2D(ib, histo, sime, digiAmp);
252 sprintf(histo,
"HcalDigiTask_amplitude_vs_simhits_depth3_%s", sub);
253 book2D(ib, histo, sime, digiAmp);
254 sprintf(histo,
"HcalDigiTask_amplitude_vs_simhits_depth4_%s", sub);
255 book2D(ib, histo, sime, digiAmp);
257 sprintf(histo,
"HcalDigiTask_amplitude_vs_simhits_profile_%s", sub);
258 bookPf(ib, histo, sime, digiAmp);
259 sprintf(histo,
"HcalDigiTask_amplitude_vs_simhits_profile_depth1_%s", sub);
260 bookPf(ib, histo, sime, digiAmp);
261 sprintf(histo,
"HcalDigiTask_amplitude_vs_simhits_profile_depth2_%s", sub);
262 bookPf(ib, histo, sime, digiAmp);
263 sprintf(histo,
"HcalDigiTask_amplitude_vs_simhits_profile_depth3_%s", sub);
264 bookPf(ib, histo, sime, digiAmp);
265 sprintf(histo,
"HcalDigiTask_amplitude_vs_simhits_profile_depth4_%s", sub);
266 bookPf(ib, histo, sime, digiAmp);
268 sprintf(histo,
"HcalDigiTask_ratio_amplitude_vs_simhits_%s", sub);
270 sprintf(histo,
"HcalDigiTask_ratio_amplitude_vs_simhits_depth1_%s", sub);
272 sprintf(histo,
"HcalDigiTask_ratio_amplitude_vs_simhits_depth2_%s", sub);
274 sprintf(histo,
"HcalDigiTask_ratio_amplitude_vs_simhits_depth3_%s", sub);
276 sprintf(histo,
"HcalDigiTask_ratio_amplitude_vs_simhits_depth4_%s", sub);
286 sprintf(histo,
"HcalDigiTask_gain_capId0_Depth1_%s", sub);
287 book1D(ib, histo, gainLim);
288 sprintf(histo,
"HcalDigiTask_gain_capId1_Depth1_%s", sub);
289 book1D(ib, histo, gainLim);
290 sprintf(histo,
"HcalDigiTask_gain_capId2_Depth1_%s", sub);
291 book1D(ib, histo, gainLim);
292 sprintf(histo,
"HcalDigiTask_gain_capId3_Depth1_%s", sub);
293 book1D(ib, histo, gainLim);
295 sprintf(histo,
"HcalDigiTask_gain_capId0_Depth2_%s", sub);
296 book1D(ib, histo, gainLim);
297 sprintf(histo,
"HcalDigiTask_gain_capId1_Depth2_%s", sub);
298 book1D(ib, histo, gainLim);
299 sprintf(histo,
"HcalDigiTask_gain_capId2_Depth2_%s", sub);
300 book1D(ib, histo, gainLim);
301 sprintf(histo,
"HcalDigiTask_gain_capId3_Depth2_%s", sub);
302 book1D(ib, histo, gainLim);
304 sprintf(histo,
"HcalDigiTask_gainWidth_capId0_Depth1_%s", sub);
305 book1D(ib, histo, gainWidthLim);
306 sprintf(histo,
"HcalDigiTask_gainWidth_capId1_Depth1_%s", sub);
307 book1D(ib, histo, gainWidthLim);
308 sprintf(histo,
"HcalDigiTask_gainWidth_capId2_Depth1_%s", sub);
309 book1D(ib, histo, gainWidthLim);
310 sprintf(histo,
"HcalDigiTask_gainWidth_capId3_Depth1_%s", sub);
311 book1D(ib, histo, gainWidthLim);
313 sprintf(histo,
"HcalDigiTask_gainWidth_capId0_Depth2_%s", sub);
314 book1D(ib, histo, gainWidthLim);
315 sprintf(histo,
"HcalDigiTask_gainWidth_capId1_Depth2_%s", sub);
316 book1D(ib, histo, gainWidthLim);
317 sprintf(histo,
"HcalDigiTask_gainWidth_capId2_Depth2_%s", sub);
318 book1D(ib, histo, gainWidthLim);
319 sprintf(histo,
"HcalDigiTask_gainWidth_capId3_Depth2_%s", sub);
320 book1D(ib, histo, gainWidthLim);
322 sprintf(histo,
"HcalDigiTask_pedestal_capId0_Depth1_%s", sub);
323 book1D(ib, histo, pedLim);
324 sprintf(histo,
"HcalDigiTask_pedestal_capId1_Depth1_%s", sub);
325 book1D(ib, histo, pedLim);
326 sprintf(histo,
"HcalDigiTask_pedestal_capId2_Depth1_%s", sub);
327 book1D(ib, histo, pedLim);
328 sprintf(histo,
"HcalDigiTask_pedestal_capId3_Depth1_%s", sub);
329 book1D(ib, histo, pedLim);
331 sprintf(histo,
"HcalDigiTask_pedestal_capId0_Depth2_%s", sub);
332 book1D(ib, histo, pedLim);
333 sprintf(histo,
"HcalDigiTask_pedestal_capId1_Depth2_%s", sub);
334 book1D(ib, histo, pedLim);
335 sprintf(histo,
"HcalDigiTask_pedestal_capId2_Depth2_%s", sub);
336 book1D(ib, histo, pedLim);
337 sprintf(histo,
"HcalDigiTask_pedestal_capId3_Depth2_%s", sub);
338 book1D(ib, histo, pedLim);
340 sprintf(histo,
"HcalDigiTask_pedestal_width_capId0_Depth1_%s", sub);
341 book1D(ib, histo, pedWidthLim);
342 sprintf(histo,
"HcalDigiTask_pedestal_width_capId1_Depth1_%s", sub);
343 book1D(ib, histo, pedWidthLim);
344 sprintf(histo,
"HcalDigiTask_pedestal_width_capId2_Depth1_%s", sub);
345 book1D(ib, histo, pedWidthLim);
346 sprintf(histo,
"HcalDigiTask_pedestal_width_capId3_Depth1_%s", sub);
347 book1D(ib, histo, pedWidthLim);
349 sprintf(histo,
"HcalDigiTask_pedestal_width_capId0_Depth2_%s", sub);
350 book1D(ib, histo, pedWidthLim);
351 sprintf(histo,
"HcalDigiTask_pedestal_width_capId1_Depth2_%s", sub);
352 book1D(ib, histo, pedWidthLim);
353 sprintf(histo,
"HcalDigiTask_pedestal_width_capId2_Depth2_%s", sub);
354 book1D(ib, histo, pedWidthLim);
355 sprintf(histo,
"HcalDigiTask_pedestal_width_capId3_Depth2_%s", sub);
356 book1D(ib, histo, pedWidthLim);
361 sprintf(histo,
"HcalDigiTask_gain_capId0_Depth3_%s", sub);
362 book1D(ib, histo, gainLim);
363 sprintf(histo,
"HcalDigiTask_gain_capId1_Depth3_%s", sub);
364 book1D(ib, histo, gainLim);
365 sprintf(histo,
"HcalDigiTask_gain_capId2_Depth3_%s", sub);
366 book1D(ib, histo, gainLim);
367 sprintf(histo,
"HcalDigiTask_gain_capId3_Depth3_%s", sub);
368 book1D(ib, histo, gainLim);
370 sprintf(histo,
"HcalDigiTask_gainWidth_capId0_Depth3_%s", sub);
371 book1D(ib, histo, gainWidthLim);
372 sprintf(histo,
"HcalDigiTask_gainWidth_capId1_Depth3_%s", sub);
373 book1D(ib, histo, gainWidthLim);
374 sprintf(histo,
"HcalDigiTask_gainWidth_capId2_Depth3_%s", sub);
375 book1D(ib, histo, gainWidthLim);
376 sprintf(histo,
"HcalDigiTask_gainWidth_capId3_Depth3_%s", sub);
377 book1D(ib, histo, gainWidthLim);
379 sprintf(histo,
"HcalDigiTask_pedestal_capId0_Depth3_%s", sub);
380 book1D(ib, histo, pedLim);
381 sprintf(histo,
"HcalDigiTask_pedestal_capId1_Depth3_%s", sub);
382 book1D(ib, histo, pedLim);
383 sprintf(histo,
"HcalDigiTask_pedestal_capId2_Depth3_%s", sub);
384 book1D(ib, histo, pedLim);
385 sprintf(histo,
"HcalDigiTask_pedestal_capId3_Depth3_%s", sub);
386 book1D(ib, histo, pedLim);
388 sprintf(histo,
"HcalDigiTask_pedestal_width_capId0_Depth3_%s", sub);
389 book1D(ib, histo, pedWidthLim);
390 sprintf(histo,
"HcalDigiTask_pedestal_width_capId1_Depth3_%s", sub);
391 book1D(ib, histo, pedWidthLim);
392 sprintf(histo,
"HcalDigiTask_pedestal_width_capId2_Depth3_%s", sub);
393 book1D(ib, histo, pedWidthLim);
394 sprintf(histo,
"HcalDigiTask_pedestal_width_capId3_Depth3_%s", sub);
395 book1D(ib, histo, pedWidthLim);
400 sprintf(histo,
"HcalDigiTask_gain_capId0_Depth4_%s", sub);
401 book1D(ib, histo, gainLim);
402 sprintf(histo,
"HcalDigiTask_gain_capId1_Depth4_%s", sub);
403 book1D(ib, histo, gainLim);
404 sprintf(histo,
"HcalDigiTask_gain_capId2_Depth4_%s", sub);
405 book1D(ib, histo, gainLim);
406 sprintf(histo,
"HcalDigiTask_gain_capId3_Depth4_%s", sub);
407 book1D(ib, histo, gainLim);
409 sprintf(histo,
"HcalDigiTask_gainWidth_capId0_Depth4_%s", sub);
410 book1D(ib, histo, gainWidthLim);
411 sprintf(histo,
"HcalDigiTask_gainWidth_capId1_Depth4_%s", sub);
412 book1D(ib, histo, gainWidthLim);
413 sprintf(histo,
"HcalDigiTask_gainWidth_capId2_Depth4_%s", sub);
414 book1D(ib, histo, gainWidthLim);
415 sprintf(histo,
"HcalDigiTask_gainWidth_capId3_Depth4_%s", sub);
416 book1D(ib, histo, gainWidthLim);
419 sprintf(histo,
"HcalDigiTask_pedestal_capId0_Depth4_%s", sub);
420 book1D(ib, histo, pedLim);
421 sprintf(histo,
"HcalDigiTask_pedestal_capId1_Depth4_%s", sub);
422 book1D(ib, histo, pedLim);
423 sprintf(histo,
"HcalDigiTask_pedestal_capId2_Depth4_%s", sub);
424 book1D(ib, histo, pedLim);
425 sprintf(histo,
"HcalDigiTask_pedestal_capId3_Depth4_%s", sub);
426 book1D(ib, histo, pedLim);
428 sprintf(histo,
"HcalDigiTask_pedestal_width_capId0_Depth4_%s", sub);
429 book1D(ib, histo, pedWidthLim);
430 sprintf(histo,
"HcalDigiTask_pedestal_width_capId1_Depth4_%s", sub);
431 book1D(ib, histo, pedWidthLim);
432 sprintf(histo,
"HcalDigiTask_pedestal_width_capId2_Depth4_%s", sub);
433 book1D(ib, histo, pedWidthLim);
434 sprintf(histo,
"HcalDigiTask_pedestal_width_capId3_Depth4_%s", sub);
435 book1D(ib, histo, pedWidthLim);
439 sprintf(histo,
"HcalDigiTask_gainMap_Depth1_%s", sub);
440 book2D(ib, histo, ietaLim, iphiLim);
441 sprintf(histo,
"HcalDigiTask_gainMap_Depth2_%s", sub);
442 book2D(ib, histo, ietaLim, iphiLim);
443 sprintf(histo,
"HcalDigiTask_gainMap_Depth3_%s", sub);
444 book2D(ib, histo, ietaLim, iphiLim);
445 sprintf(histo,
"HcalDigiTask_gainMap_Depth4_%s", sub);
446 book2D(ib, histo, ietaLim, iphiLim);
448 sprintf(histo,
"HcalDigiTask_pwidthMap_Depth1_%s", sub);
449 book2D(ib, histo, ietaLim, iphiLim);
450 sprintf(histo,
"HcalDigiTask_pwidthMap_Depth2_%s", sub);
451 book2D(ib, histo, ietaLim, iphiLim);
452 sprintf(histo,
"HcalDigiTask_pwidthMap_Depth3_%s", sub);
453 book2D(ib, histo, ietaLim, iphiLim);
454 sprintf(histo,
"HcalDigiTask_pwidthMap_Depth4_%s", sub);
455 book2D(ib, histo, ietaLim, iphiLim);
527 int c = 0, chb = 0, che = 0, chf = 0;
530 int ieta = itr->id().ieta();
531 int iphi = itr->id().iphi();
540 float cen = itr->SOI_compressedEt();
541 float en = decoder->hcaletValue(ieta,iphi,cen);
543 if (en < 0.00001)
continue;
547 fill1D(
"HcalDigiTask_tp_et",en);
548 fill2D(
"HcalDigiTask_tp_et_ieta",ieta,en);
549 fillPf(
"HcalDigiTask_tp_ave_et_ieta",ieta,en);
553 fill1D(
"HcalDigiTask_tp_et_HB",en);
557 fill1D(
"HcalDigiTask_tp_et_HE",en);
561 fill1D(
"HcalDigiTask_tp_et_HF",en);
565 fill1D(
"HcalDigiTask_tp_ntp_ieta",ieta);
566 if ( en > 10. )
fill1D(
"HcalDigiTask_tp_ntp_10_ieta",ieta);
570 fill1D(
"HcalDigiTask_tp_ntp",
c);
571 fill1D(
"HcalDigiTask_tp_ntp_HB",chb);
572 fill1D(
"HcalDigiTask_tp_ntp_HE",che);
573 fill1D(
"HcalDigiTask_tp_ntp_HF",chf);
596 if (
subdet_ ==
"HB") isubdet = 1;
597 if (
subdet_ ==
"HE") isubdet = 2;
598 if (
subdet_ ==
"HO") isubdet = 3;
599 if (
subdet_ ==
"HF") isubdet = 4;
622 double emax_Sim = -9999.;
631 if (isubdet != 0 &&
noise_ == 0) {
633 for (std::vector<PCaloHit>::const_iterator simhits = simhitResult->begin(); simhits != simhitResult->end(); ++simhits) {
636 double en = simhits->energy();
638 int ieta = cell.ieta();
641 int iphi = cell.iphi();
643 if (en > emax_Sim && sub == isubdet) {
648 if (
mode_ ==
"multi" &&
649 ((sub == 4 && en < 100. && en > 1.)
650 || ((sub != 4) && en < 1. && en > 0.02))) {
660 if (
mode_ !=
"multi" && emax_Sim > 0.) seedSimHit = 1;
676 int depth = cell.depth();
678 int iphi = cell.iphi();
679 int ieta = cell.ieta();
681 int sub = cell.subdet();
693 if (((
nevent1 == 1 && isubdet == 1) ||
694 (
nevent2 == 1 && isubdet == 2) ||
695 (
nevent3 == 1 && isubdet == 3) ||
696 (
nevent4 == 1 && isubdet == 4)) &&
noise_ == 1 && sub == isubdet) {
704 for (
int i = 0;
i < 4;
i++) {
707 fill1D(
"HcalDigiTask_pedestal_capId" +
str(
i) +
"_Depth" +
str(depth) +
"_" +
subdet_, pedestal->getValue(
i));
712 fill2D(
"HcalDigiTask_pwidthMap_Depth" +
str(depth) +
"_" +
subdet_,
double(ieta),
double(iphi), pedWidth->
getWidth(0));
717 if (sub == isubdet) Ndig++;
721 if (sub == isubdet &&
noise_ == 0) {
729 coder.
adc2fC(*digiItr, tool);
731 double noiseADC = (*digiItr)[0].adc();
732 double noisefC = tool[0];
734 fill1D(
"HcalDigiTask_ADC0_adc_depth" +
str(depth) +
"_" +
subdet_, noiseADC);
739 fill2D(
"HcalDigiTask_ieta_iphi_occupancy_map_depth" +
str(depth) +
"_" +
subdet_,
double(ieta),
double(iphi));
747 if (ieta == ieta_Sim && iphi == iphi_Sim) closen = seedSimHit;
749 for (
int ii = 0;
ii < tool.size();
ii++) {
750 int capid = (*digiItr)[
ii].capid();
752 double val = (tool[
ii] - calibrations.
pedestal(capid));
761 if (depth == 1) strtmp =
"HcalDigiTask_all_amplitudes_vs_bin_1D_depth1_" +
subdet_;
762 else strtmp =
"HcalDigiTask_all_amplitudes_vs_bin_1D_depth2_" +
subdet_;
767 strtmp =
"HcalDigiTask_signal_amplitude_vs_bin_all_depths_" +
subdet_;
773 if (isubdet != 4 &&
ii >= 4 &&
ii <= 7) {
775 if (depth == 1) ampl1 += val;
776 if (depth == 2) ampl2 += val;
777 if (depth == 3) ampl3 += val;
778 if (depth == 4) ampl4 += val;
782 if (depth == 1) ampl1_c += val;
783 if (depth == 2) ampl2_c += val;
784 if (depth == 3) ampl3_c += val;
785 if (depth == 4) ampl4_c += val;
790 if (isubdet == 4 &&
ii >= 2 &&
ii <= 4) {
792 if (depth == 1) ampl1 += val;
793 if (depth == 2) ampl2 += val;
794 if (depth == 3) ampl3 += val;
795 if (depth == 4) ampl4 += val;
798 if (depth == 1) ampl1_c += val;
799 if (depth == 2) ampl2_c += val;
800 if (depth == 3) ampl3_c += val;
801 if (depth == 4) ampl4_c += val;
821 strtmp =
"HcalDigiTask_sum_all_amplitudes_" +
subdet_;
825 if (ampl1 > 10. || ampl2 > 10. || ampl3 > 10. || ampl4 > 10.) indigis++;
828 if (ampl1 > 30. && depth == 1 && closen == 1 && isubdet != 4) {
829 double fBin5 = tool[4] - calibrations.
pedestal((*digiItr)[4].capid());
830 double fBin67 = tool[5] + tool[6]
831 - calibrations.
pedestal((*digiItr)[5].capid())
832 - calibrations.
pedestal((*digiItr)[6].capid());
837 strtmp =
"HcalDigiTask_bin_5_frac_" +
subdet_;
839 strtmp =
"HcalDigiTask_bin_6_7_frac_" +
subdet_;
845 if (isubdet == 4 && ampl1 > 30. && depth == 1) {
846 double fBin5 = tool[2] - calibrations.
pedestal((*digiItr)[2].capid());
847 double fBin67 = tool[3] + tool[4]
848 - calibrations.
pedestal((*digiItr)[3].capid())
849 - calibrations.
pedestal((*digiItr)[4].capid());
852 strtmp =
"HcalDigiTask_bin_5_frac_" +
subdet_;
854 strtmp =
"HcalDigiTask_bin_6_7_frac_" +
subdet_;
859 strtmp =
"HcalDigiTask_signal_amplitude_" +
subdet_;
861 strtmp =
"HcalDigiTask_signal_amplitude_depth1_" +
subdet_;
863 strtmp =
"HcalDigiTask_signal_amplitude_depth2_" +
subdet_;
865 strtmp =
"HcalDigiTask_signal_amplitude_depth3_" +
subdet_;
867 strtmp =
"HcalDigiTask_signal_amplitude_depth4_" +
subdet_;
872 if (isubdet != 0 &&
noise_ == 0) {
873 strtmp =
"HcalDigiTask_number_of_amplitudes_above_10fC_" +
subdet_;
888 for (std::vector<PCaloHit>::const_iterator simhits = simhitResult->begin(); simhits != simhitResult->end(); ++simhits) {
891 int ieta = cell.
ieta();
894 int iphi = cell.iphi();
895 int sub = cell.subdet();
898 if (sub == isubdet && ieta == ieta_Sim && iphi == iphi_Sim) {
899 int depth = cell.depth();
900 double en = simhits->energy();
903 if (depth == 1) ehits1 += en;
904 if (depth == 2) ehits2 += en;
905 if (depth == 3) ehits3 += en;
906 if (depth == 4) ehits4 += en;
910 strtmp =
"HcalDigiTask_amplitude_vs_simhits_" +
subdet_;
911 if (ehits > eps)
fill2D(strtmp, ehits, ampl_c);
912 strtmp =
"HcalDigiTask_amplitude_vs_simhits_depth1_" +
subdet_;
913 if (ehits1 > eps)
fill2D(strtmp, ehits1, ampl1_c);
914 strtmp =
"HcalDigiTask_amplitude_vs_simhits_depth2_" +
subdet_;
915 if (ehits2 > eps)
fill2D(strtmp, ehits2, ampl2_c);
916 strtmp =
"HcalDigiTask_amplitude_vs_simhits_depth3_" +
subdet_;
917 if (ehits3 > eps)
fill2D(strtmp, ehits3, ampl3_c);
918 strtmp =
"HcalDigiTask_amplitude_vs_simhits_depth4_" +
subdet_;
919 if (ehits4 > eps)
fill2D(strtmp, ehits4, ampl4_c);
921 strtmp =
"HcalDigiTask_amplitude_vs_simhits_profile_" +
subdet_;
922 if (ehits > eps)
fillPf(strtmp, ehits, ampl_c);
923 strtmp =
"HcalDigiTask_amplitude_vs_simhits_profile_depth1_" +
subdet_;
924 if (ehits1 > eps)
fillPf(strtmp, ehits1, ampl1_c);
925 strtmp =
"HcalDigiTask_amplitude_vs_simhits_profile_depth2_" +
subdet_;
926 if (ehits2 > eps)
fillPf(strtmp, ehits2, ampl2_c);
927 strtmp =
"HcalDigiTask_amplitude_vs_simhits_profile_depth3_" +
subdet_;
928 if (ehits3 > eps)
fillPf(strtmp, ehits3, ampl3_c);
929 strtmp =
"HcalDigiTask_amplitude_vs_simhits_profile_depth4_" +
subdet_;
930 if (ehits4 > eps)
fillPf(strtmp, ehits4, ampl4_c);
932 strtmp =
"HcalDigiTask_ratio_amplitude_vs_simhits_" +
subdet_;
933 if (ehits > eps)
fill1D(strtmp, ampl_c / ehits);
934 strtmp =
"HcalDigiTask_ratio_amplitude_vs_simhits_depth1_" +
subdet_;
935 if (ehits1 > eps)
fill1D(strtmp, ampl1_c / ehits1);
936 strtmp =
"HcalDigiTask_ratio_amplitude_vs_simhits_depth2_" +
subdet_;
937 if (ehits2 > eps)
fill1D(strtmp, ampl2_c / ehits2);
938 strtmp =
"HcalDigiTask_ratio_amplitude_vs_simhits_depth3_" +
subdet_;
939 if (ehits3 > eps)
fill1D(strtmp, ampl3_c / ehits3);
940 strtmp =
"HcalDigiTask_ratio_amplitude_vs_simhits_depth4_" +
subdet_;
941 if (ehits4 > eps)
fill1D(strtmp, ampl4_c / ehits4);
945 strtmp =
"HcalDigiTask_Ndigis_" +
subdet_;
946 fill1D(strtmp,
double(Ndig));
955 float fev = float (
nevtot);
958 float sumphi_1, sumphi_2, sumphi_3, sumphi_4;
962 strtmp =
"HcalDigiTask_ieta_iphi_occupancy_map_depth1_" +
subdet_;
966 for (
int i = 1;
i <= nx;
i++) {
967 for (
int j = 1;
j <= ny;
j++) {
971 strtmp =
"HcalDigiTask_ieta_iphi_occupancy_map_depth1_" +
subdet_;
975 strtmp =
"HcalDigiTask_ieta_iphi_occupancy_map_depth2_" +
subdet_;
979 strtmp =
"HcalDigiTask_ieta_iphi_occupancy_map_depth3_" +
subdet_;
983 strtmp =
"HcalDigiTask_ieta_iphi_occupancy_map_depth4_" +
subdet_;
990 for (
int i = 1;
i <= 82;
i++) {
993 if (ieta >= 0) ieta += 1;
995 if (ieta >= -20 && ieta <= 20) {
998 if (ieta >= 40 || ieta <= -40) {
1009 for (
int iphi = 1; iphi <= 72; iphi++) {
1010 strtmp =
"HcalDigiTask_ieta_iphi_occupancy_map_depth1_" +
subdet_;
1011 sumphi_1 +=
monitor(strtmp)->
getTH1()->GetBinContent(
monitor(strtmp)->getTH1()->FindFixBin(
double(ieta),
double(iphi)));
1012 strtmp =
"HcalDigiTask_ieta_iphi_occupancy_map_depth2_" +
subdet_;
1013 sumphi_2 +=
monitor(strtmp)->
getTH1()->GetBinContent(
monitor(strtmp)->getTH1()->FindFixBin(
double(ieta),
double(iphi)));
1014 strtmp =
"HcalDigiTask_ieta_iphi_occupancy_map_depth3_" +
subdet_;
1015 sumphi_3 +=
monitor(strtmp)->
getTH1()->GetBinContent(
monitor(strtmp)->getTH1()->FindFixBin(
double(ieta),
double(iphi)));
1016 strtmp =
"HcalDigiTask_ieta_iphi_occupancy_map_depth4_" +
subdet_;
1017 sumphi_4 +=
monitor(strtmp)->
getTH1()->GetBinContent(
monitor(strtmp)->getTH1()->FindFixBin(
double(ieta),
double(iphi)));
1021 double deta = double(ieta);
1024 cnorm = sumphi_1 / phi_factor;
1025 strtmp =
"HcalDigiTask_occupancy_vs_ieta_depth1_" +
subdet_;
1026 fill1D(strtmp, deta, cnorm);
1028 cnorm = sumphi_2 / phi_factor;
1029 strtmp =
"HcalDigiTask_occupancy_vs_ieta_depth2_" +
subdet_;
1030 fill1D(strtmp, deta, cnorm);
1032 cnorm = sumphi_3 / phi_factor;
1033 strtmp =
"HcalDigiTask_occupancy_vs_ieta_depth3_" +
subdet_;
1034 fill1D(strtmp, deta, cnorm);
1036 cnorm = sumphi_4 / phi_factor;
1037 strtmp =
"HcalDigiTask_occupancy_vs_ieta_depth4_" +
subdet_;
1038 fill1D(strtmp, deta, cnorm);
1053 msm_->find(name)->second->Fill(X, weight);
1061 msm_->find(name)->second->Fill(X, Y, weight);
1073 msm_->find(name)->second->Fill(X, Y);
1077 if (!
msm_->count(name))
return NULL;
1078 else return msm_->find(name)->second;
1082 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)