45 msm_ =
new std::map<std::string, MonitorElement*>();
48 else edm::LogInfo(
"OutputInfo") <<
" Hcal Digi Task histograms will NOT be saved";
58 book1D(ib,
"nevtot", 1, 0, 1);
61 if (
subdet_ ==
"noise") bnoise = 1;
62 if (
mc_ ==
"yes") bmc = 1;
78 HistLim Ndigis(2600, 0., 2600.);
79 HistLim ndigis(505, -10., 1000.);
82 HistLim digiAmp(205, -100., 4000.);
83 HistLim ratio(2000, -100., 3900.);
84 HistLim sumAmp(100, -500., 1500.);
89 HistLim pedestalfC(400, -10., 30.);
94 HistLim pedWidthLim(100, 0., 2.);
97 HistLim gainWidthLim(100, 0., 0.3);
102 if (bsubdet ==
"HE") {
105 }
else if (bsubdet ==
"HF") {
110 pedLim =
HistLim(100, 0., 20.);
111 pedWidthLim =
HistLim(100, 0., 5.);
112 frac =
HistLim(400, -4.00, 4.00);
114 }
else if (bsubdet ==
"HO") {
117 gainLim =
HistLim(150, 0., 1.5);
121 const char * sub = bsubdet.c_str();
124 sprintf(histo,
"HcalDigiTask_Ndigis_%s", sub);
125 book1D(ib, histo, Ndigis);
128 sprintf(histo,
"HcalDigiTask_ieta_iphi_occupancy_map_depth1_%s", sub);
129 book2D(ib, histo, ietaLim, iphiLim);
131 sprintf(histo,
"HcalDigiTask_ieta_iphi_occupancy_map_depth2_%s", sub);
132 book2D(ib, histo, ietaLim, iphiLim);
134 sprintf(histo,
"HcalDigiTask_ieta_iphi_occupancy_map_depth3_%s", sub);
135 book2D(ib, histo, ietaLim, iphiLim);
137 sprintf(histo,
"HcalDigiTask_ieta_iphi_occupancy_map_depth4_%s", sub);
138 book2D(ib, histo, ietaLim, iphiLim);
141 sprintf(histo,
"HcalDigiTask_occupancy_vs_ieta_depth1_%s", sub);
142 book1D(ib, histo, ietaLim);
144 sprintf(histo,
"HcalDigiTask_occupancy_vs_ieta_depth2_%s", sub);
145 book1D(ib, histo, ietaLim);
147 sprintf(histo,
"HcalDigiTask_occupancy_vs_ieta_depth3_%s", sub);
148 book1D(ib, histo, ietaLim);
150 sprintf(histo,
"HcalDigiTask_occupancy_vs_ieta_depth4_%s", sub);
151 book1D(ib, histo, ietaLim);
166 sprintf(histo,
"HcalDigiTask_sum_all_amplitudes_%s", sub);
167 book1D(ib, histo, sumAmp);
169 sprintf(histo,
"HcalDigiTask_number_of_amplitudes_above_10fC_%s", sub);
170 book1D(ib, histo, ndigis);
172 sprintf(histo,
"HcalDigiTask_ADC0_adc_depth1_%s", sub);
173 book1D(ib, histo, pedestal);
174 sprintf(histo,
"HcalDigiTask_ADC0_adc_depth2_%s", sub);
175 book1D(ib, histo, pedestal);
176 sprintf(histo,
"HcalDigiTask_ADC0_adc_depth3_%s", sub);
177 book1D(ib, histo, pedestal);
178 sprintf(histo,
"HcalDigiTask_ADC0_adc_depth4_%s", sub);
179 book1D(ib, histo, pedestal);
181 sprintf(histo,
"HcalDigiTask_ADC0_fC_depth1_%s", sub);
182 book1D(ib, histo, pedestalfC);
183 sprintf(histo,
"HcalDigiTask_ADC0_fC_depth2_%s", sub);
184 book1D(ib, histo, pedestalfC);
185 sprintf(histo,
"HcalDigiTask_ADC0_fC_depth3_%s", sub);
186 book1D(ib, histo, pedestalfC);
187 sprintf(histo,
"HcalDigiTask_ADC0_fC_depth4_%s", sub);
188 book1D(ib, histo, pedestalfC);
190 sprintf(histo,
"HcalDigiTask_signal_amplitude_%s", sub);
191 book1D(ib, histo, digiAmp);
192 sprintf(histo,
"HcalDigiTask_signal_amplitude_depth1_%s", sub);
193 book1D(ib, histo, digiAmp);
194 sprintf(histo,
"HcalDigiTask_signal_amplitude_depth2_%s", sub);
195 book1D(ib, histo, digiAmp);
196 sprintf(histo,
"HcalDigiTask_signal_amplitude_depth3_%s", sub);
197 book1D(ib, histo, digiAmp);
198 sprintf(histo,
"HcalDigiTask_signal_amplitude_depth4_%s", sub);
199 book1D(ib, histo, digiAmp);
201 sprintf(histo,
"HcalDigiTask_signal_amplitude_vs_bin_all_depths_%s", sub);
202 book2D(ib, histo, nbin, digiAmp);
210 sprintf(histo,
"HcalDigiTask_all_amplitudes_vs_bin_1D_depth1_%s", sub);
212 sprintf(histo,
"HcalDigiTask_all_amplitudes_vs_bin_1D_depth2_%s", sub);
215 sprintf(histo,
"HcalDigiTask_bin_5_frac_%s", sub);
217 sprintf(histo,
"HcalDigiTask_bin_6_7_frac_%s", sub);
221 sprintf(histo,
"HcalDigiTask_amplitude_vs_simhits_%s", sub);
222 book2D(ib, histo, sime, digiAmp);
223 sprintf(histo,
"HcalDigiTask_amplitude_vs_simhits_depth1_%s", sub);
224 book2D(ib, histo, sime, digiAmp);
225 sprintf(histo,
"HcalDigiTask_amplitude_vs_simhits_depth2_%s", sub);
226 book2D(ib, histo, sime, digiAmp);
227 sprintf(histo,
"HcalDigiTask_amplitude_vs_simhits_depth3_%s", sub);
228 book2D(ib, histo, sime, digiAmp);
229 sprintf(histo,
"HcalDigiTask_amplitude_vs_simhits_depth4_%s", sub);
230 book2D(ib, histo, sime, digiAmp);
232 sprintf(histo,
"HcalDigiTask_amplitude_vs_simhits_profile_%s", sub);
233 bookPf(ib, histo, sime, digiAmp);
234 sprintf(histo,
"HcalDigiTask_amplitude_vs_simhits_profile_depth1_%s", sub);
235 bookPf(ib, histo, sime, digiAmp);
236 sprintf(histo,
"HcalDigiTask_amplitude_vs_simhits_profile_depth2_%s", sub);
237 bookPf(ib, histo, sime, digiAmp);
238 sprintf(histo,
"HcalDigiTask_amplitude_vs_simhits_profile_depth3_%s", sub);
239 bookPf(ib, histo, sime, digiAmp);
240 sprintf(histo,
"HcalDigiTask_amplitude_vs_simhits_profile_depth4_%s", sub);
241 bookPf(ib, histo, sime, digiAmp);
243 sprintf(histo,
"HcalDigiTask_ratio_amplitude_vs_simhits_%s", sub);
245 sprintf(histo,
"HcalDigiTask_ratio_amplitude_vs_simhits_depth1_%s", sub);
247 sprintf(histo,
"HcalDigiTask_ratio_amplitude_vs_simhits_depth2_%s", sub);
249 sprintf(histo,
"HcalDigiTask_ratio_amplitude_vs_simhits_depth3_%s", sub);
251 sprintf(histo,
"HcalDigiTask_ratio_amplitude_vs_simhits_depth4_%s", sub);
261 sprintf(histo,
"HcalDigiTask_gain_capId0_Depth1_%s", sub);
262 book1D(ib, histo, gainLim);
263 sprintf(histo,
"HcalDigiTask_gain_capId1_Depth1_%s", sub);
264 book1D(ib, histo, gainLim);
265 sprintf(histo,
"HcalDigiTask_gain_capId2_Depth1_%s", sub);
266 book1D(ib, histo, gainLim);
267 sprintf(histo,
"HcalDigiTask_gain_capId3_Depth1_%s", sub);
268 book1D(ib, histo, gainLim);
270 sprintf(histo,
"HcalDigiTask_gain_capId0_Depth2_%s", sub);
271 book1D(ib, histo, gainLim);
272 sprintf(histo,
"HcalDigiTask_gain_capId1_Depth2_%s", sub);
273 book1D(ib, histo, gainLim);
274 sprintf(histo,
"HcalDigiTask_gain_capId2_Depth2_%s", sub);
275 book1D(ib, histo, gainLim);
276 sprintf(histo,
"HcalDigiTask_gain_capId3_Depth2_%s", sub);
277 book1D(ib, histo, gainLim);
279 sprintf(histo,
"HcalDigiTask_gainWidth_capId0_Depth1_%s", sub);
280 book1D(ib, histo, gainWidthLim);
281 sprintf(histo,
"HcalDigiTask_gainWidth_capId1_Depth1_%s", sub);
282 book1D(ib, histo, gainWidthLim);
283 sprintf(histo,
"HcalDigiTask_gainWidth_capId2_Depth1_%s", sub);
284 book1D(ib, histo, gainWidthLim);
285 sprintf(histo,
"HcalDigiTask_gainWidth_capId3_Depth1_%s", sub);
286 book1D(ib, histo, gainWidthLim);
288 sprintf(histo,
"HcalDigiTask_gainWidth_capId0_Depth2_%s", sub);
289 book1D(ib, histo, gainWidthLim);
290 sprintf(histo,
"HcalDigiTask_gainWidth_capId1_Depth2_%s", sub);
291 book1D(ib, histo, gainWidthLim);
292 sprintf(histo,
"HcalDigiTask_gainWidth_capId2_Depth2_%s", sub);
293 book1D(ib, histo, gainWidthLim);
294 sprintf(histo,
"HcalDigiTask_gainWidth_capId3_Depth2_%s", sub);
295 book1D(ib, histo, gainWidthLim);
297 sprintf(histo,
"HcalDigiTask_pedestal_capId0_Depth1_%s", sub);
298 book1D(ib, histo, pedLim);
299 sprintf(histo,
"HcalDigiTask_pedestal_capId1_Depth1_%s", sub);
300 book1D(ib, histo, pedLim);
301 sprintf(histo,
"HcalDigiTask_pedestal_capId2_Depth1_%s", sub);
302 book1D(ib, histo, pedLim);
303 sprintf(histo,
"HcalDigiTask_pedestal_capId3_Depth1_%s", sub);
304 book1D(ib, histo, pedLim);
306 sprintf(histo,
"HcalDigiTask_pedestal_capId0_Depth2_%s", sub);
307 book1D(ib, histo, pedLim);
308 sprintf(histo,
"HcalDigiTask_pedestal_capId1_Depth2_%s", sub);
309 book1D(ib, histo, pedLim);
310 sprintf(histo,
"HcalDigiTask_pedestal_capId2_Depth2_%s", sub);
311 book1D(ib, histo, pedLim);
312 sprintf(histo,
"HcalDigiTask_pedestal_capId3_Depth2_%s", sub);
313 book1D(ib, histo, pedLim);
315 sprintf(histo,
"HcalDigiTask_pedestal_width_capId0_Depth1_%s", sub);
316 book1D(ib, histo, pedWidthLim);
317 sprintf(histo,
"HcalDigiTask_pedestal_width_capId1_Depth1_%s", sub);
318 book1D(ib, histo, pedWidthLim);
319 sprintf(histo,
"HcalDigiTask_pedestal_width_capId2_Depth1_%s", sub);
320 book1D(ib, histo, pedWidthLim);
321 sprintf(histo,
"HcalDigiTask_pedestal_width_capId3_Depth1_%s", sub);
322 book1D(ib, histo, pedWidthLim);
324 sprintf(histo,
"HcalDigiTask_pedestal_width_capId0_Depth2_%s", sub);
325 book1D(ib, histo, pedWidthLim);
326 sprintf(histo,
"HcalDigiTask_pedestal_width_capId1_Depth2_%s", sub);
327 book1D(ib, histo, pedWidthLim);
328 sprintf(histo,
"HcalDigiTask_pedestal_width_capId2_Depth2_%s", sub);
329 book1D(ib, histo, pedWidthLim);
330 sprintf(histo,
"HcalDigiTask_pedestal_width_capId3_Depth2_%s", sub);
331 book1D(ib, histo, pedWidthLim);
336 sprintf(histo,
"HcalDigiTask_gain_capId0_Depth3_%s", sub);
337 book1D(ib, histo, gainLim);
338 sprintf(histo,
"HcalDigiTask_gain_capId1_Depth3_%s", sub);
339 book1D(ib, histo, gainLim);
340 sprintf(histo,
"HcalDigiTask_gain_capId2_Depth3_%s", sub);
341 book1D(ib, histo, gainLim);
342 sprintf(histo,
"HcalDigiTask_gain_capId3_Depth3_%s", sub);
343 book1D(ib, histo, gainLim);
345 sprintf(histo,
"HcalDigiTask_gainWidth_capId0_Depth3_%s", sub);
346 book1D(ib, histo, gainWidthLim);
347 sprintf(histo,
"HcalDigiTask_gainWidth_capId1_Depth3_%s", sub);
348 book1D(ib, histo, gainWidthLim);
349 sprintf(histo,
"HcalDigiTask_gainWidth_capId2_Depth3_%s", sub);
350 book1D(ib, histo, gainWidthLim);
351 sprintf(histo,
"HcalDigiTask_gainWidth_capId3_Depth3_%s", sub);
352 book1D(ib, histo, gainWidthLim);
354 sprintf(histo,
"HcalDigiTask_pedestal_capId0_Depth3_%s", sub);
355 book1D(ib, histo, pedLim);
356 sprintf(histo,
"HcalDigiTask_pedestal_capId1_Depth3_%s", sub);
357 book1D(ib, histo, pedLim);
358 sprintf(histo,
"HcalDigiTask_pedestal_capId2_Depth3_%s", sub);
359 book1D(ib, histo, pedLim);
360 sprintf(histo,
"HcalDigiTask_pedestal_capId3_Depth3_%s", sub);
361 book1D(ib, histo, pedLim);
363 sprintf(histo,
"HcalDigiTask_pedestal_width_capId0_Depth3_%s", sub);
364 book1D(ib, histo, pedWidthLim);
365 sprintf(histo,
"HcalDigiTask_pedestal_width_capId1_Depth3_%s", sub);
366 book1D(ib, histo, pedWidthLim);
367 sprintf(histo,
"HcalDigiTask_pedestal_width_capId2_Depth3_%s", sub);
368 book1D(ib, histo, pedWidthLim);
369 sprintf(histo,
"HcalDigiTask_pedestal_width_capId3_Depth3_%s", sub);
370 book1D(ib, histo, pedWidthLim);
375 sprintf(histo,
"HcalDigiTask_gain_capId0_Depth4_%s", sub);
376 book1D(ib, histo, gainLim);
377 sprintf(histo,
"HcalDigiTask_gain_capId1_Depth4_%s", sub);
378 book1D(ib, histo, gainLim);
379 sprintf(histo,
"HcalDigiTask_gain_capId2_Depth4_%s", sub);
380 book1D(ib, histo, gainLim);
381 sprintf(histo,
"HcalDigiTask_gain_capId3_Depth4_%s", sub);
382 book1D(ib, histo, gainLim);
384 sprintf(histo,
"HcalDigiTask_gainWidth_capId0_Depth4_%s", sub);
385 book1D(ib, histo, gainWidthLim);
386 sprintf(histo,
"HcalDigiTask_gainWidth_capId1_Depth4_%s", sub);
387 book1D(ib, histo, gainWidthLim);
388 sprintf(histo,
"HcalDigiTask_gainWidth_capId2_Depth4_%s", sub);
389 book1D(ib, histo, gainWidthLim);
390 sprintf(histo,
"HcalDigiTask_gainWidth_capId3_Depth4_%s", sub);
391 book1D(ib, histo, gainWidthLim);
394 sprintf(histo,
"HcalDigiTask_pedestal_capId0_Depth4_%s", sub);
395 book1D(ib, histo, pedLim);
396 sprintf(histo,
"HcalDigiTask_pedestal_capId1_Depth4_%s", sub);
397 book1D(ib, histo, pedLim);
398 sprintf(histo,
"HcalDigiTask_pedestal_capId2_Depth4_%s", sub);
399 book1D(ib, histo, pedLim);
400 sprintf(histo,
"HcalDigiTask_pedestal_capId3_Depth4_%s", sub);
401 book1D(ib, histo, pedLim);
403 sprintf(histo,
"HcalDigiTask_pedestal_width_capId0_Depth4_%s", sub);
404 book1D(ib, histo, pedWidthLim);
405 sprintf(histo,
"HcalDigiTask_pedestal_width_capId1_Depth4_%s", sub);
406 book1D(ib, histo, pedWidthLim);
407 sprintf(histo,
"HcalDigiTask_pedestal_width_capId2_Depth4_%s", sub);
408 book1D(ib, histo, pedWidthLim);
409 sprintf(histo,
"HcalDigiTask_pedestal_width_capId3_Depth4_%s", sub);
410 book1D(ib, histo, pedWidthLim);
414 sprintf(histo,
"HcalDigiTask_gainMap_Depth1_%s", sub);
415 book2D(ib, histo, ietaLim, iphiLim);
416 sprintf(histo,
"HcalDigiTask_gainMap_Depth2_%s", sub);
417 book2D(ib, histo, ietaLim, iphiLim);
418 sprintf(histo,
"HcalDigiTask_gainMap_Depth3_%s", sub);
419 book2D(ib, histo, ietaLim, iphiLim);
420 sprintf(histo,
"HcalDigiTask_gainMap_Depth4_%s", sub);
421 book2D(ib, histo, ietaLim, iphiLim);
423 sprintf(histo,
"HcalDigiTask_pwidthMap_Depth1_%s", sub);
424 book2D(ib, histo, ietaLim, iphiLim);
425 sprintf(histo,
"HcalDigiTask_pwidthMap_Depth2_%s", sub);
426 book2D(ib, histo, ietaLim, iphiLim);
427 sprintf(histo,
"HcalDigiTask_pwidthMap_Depth3_%s", sub);
428 book2D(ib, histo, ietaLim, iphiLim);
429 sprintf(histo,
"HcalDigiTask_pwidthMap_Depth4_%s", sub);
430 book2D(ib, histo, ietaLim, iphiLim);
502 if (
subdet_ ==
"HB") isubdet = 1;
503 if (
subdet_ ==
"HE") isubdet = 2;
504 if (
subdet_ ==
"HO") isubdet = 3;
505 if (
subdet_ ==
"HF") isubdet = 4;
528 double emax_Sim = -9999.;
537 if (isubdet != 0 &&
noise_ == 0) {
539 for (std::vector<PCaloHit>::const_iterator simhits = simhitResult->begin(); simhits != simhitResult->end(); ++simhits) {
542 double en = simhits->energy();
544 int ieta = cell.ieta();
545 if (ieta > 0) ieta--;
546 int iphi = cell.iphi() - 1;
549 if (en > emax_Sim && sub == isubdet) {
554 if (
mode_ ==
"multi" &&
555 ((sub == 4 && en < 100. && en > 1.)
556 || ((sub != 4) && en < 1. && en > 0.02))) {
566 if (
mode_ !=
"multi" && emax_Sim > 0.) seedSimHit = 1;
582 int depth = cell.
depth();
583 int iphi = cell.iphi() - 1;
584 int ieta = cell.ieta();
585 if (ieta > 0) ieta--;
586 int sub = cell.subdet();
598 if (((
nevent1 == 1 && isubdet == 1) ||
599 (
nevent2 == 1 && isubdet == 2) ||
600 (
nevent3 == 1 && isubdet == 3) ||
601 (
nevent4 == 1 && isubdet == 4)) &&
noise_ == 1 && sub == isubdet) {
609 for (
int i = 0;
i < 4;
i++) {
612 fill1D(
"HcalDigiTask_pedestal_capId" +
str(
i) +
"_Depth" +
str(depth) +
"_" +
subdet_, pedestal->getValue(
i));
617 fill2D(
"HcalDigiTask_pwidthMap_Depth" +
str(depth) +
"_" +
subdet_,
double(ieta),
double(iphi), pedWidth->
getWidth(0));
622 if (sub == isubdet) Ndig++;
626 if (sub == isubdet &&
noise_ == 0) {
634 coder.
adc2fC(*digiItr, tool);
636 double noiseADC = (*digiItr)[0].adc();
637 double noisefC = tool[0];
639 fill1D(
"HcalDigiTask_ADC0_adc_depth" +
str(depth) +
"_" +
subdet_, noiseADC);
644 fill2D(
"HcalDigiTask_ieta_iphi_occupancy_map_depth" +
str(depth) +
"_" +
subdet_,
double(ieta),
double(iphi));
652 if (ieta == ieta_Sim && iphi == iphi_Sim) closen = seedSimHit;
654 for (
int ii = 0;
ii < tool.size();
ii++) {
655 int capid = (*digiItr)[
ii].capid();
657 double val = (tool[
ii] - calibrations.
pedestal(capid));
666 if (depth == 1) strtmp =
"HcalDigiTask_all_amplitudes_vs_bin_1D_depth1_" +
subdet_;
667 else strtmp =
"HcalDigiTask_all_amplitudes_vs_bin_1D_depth2_" +
subdet_;
672 strtmp =
"HcalDigiTask_signal_amplitude_vs_bin_all_depths_" +
subdet_;
678 if (isubdet != 4 &&
ii >= 4 &&
ii <= 7) {
680 if (depth == 1) ampl1 += val;
681 if (depth == 2) ampl2 += val;
682 if (depth == 3) ampl3 += val;
683 if (depth == 4) ampl4 += val;
687 if (depth == 1) ampl1_c += val;
688 if (depth == 2) ampl2_c += val;
689 if (depth == 3) ampl3_c += val;
690 if (depth == 4) ampl4_c += val;
695 if (isubdet == 4 &&
ii >= 2 &&
ii <= 4) {
697 if (depth == 1) ampl1 += val;
698 if (depth == 2) ampl2 += val;
699 if (depth == 3) ampl3 += val;
700 if (depth == 4) ampl4 += val;
703 if (depth == 1) ampl1_c += val;
704 if (depth == 2) ampl2_c += val;
705 if (depth == 3) ampl3_c += val;
706 if (depth == 4) ampl4_c += val;
726 strtmp =
"HcalDigiTask_sum_all_amplitudes_" +
subdet_;
730 if (ampl1 > 10. || ampl2 > 10. || ampl3 > 10. || ampl4 > 10.) indigis++;
733 if (ampl1 > 30. && depth == 1 && closen == 1 && isubdet != 4) {
734 double fBin5 = tool[4] - calibrations.
pedestal((*digiItr)[4].capid());
735 double fBin67 = tool[5] + tool[6]
736 - calibrations.
pedestal((*digiItr)[5].capid())
737 - calibrations.
pedestal((*digiItr)[6].capid());
742 strtmp =
"HcalDigiTask_bin_5_frac_" +
subdet_;
744 strtmp =
"HcalDigiTask_bin_6_7_frac_" +
subdet_;
750 if (isubdet == 4 && ampl1 > 30. && depth == 1) {
751 double fBin5 = tool[2] - calibrations.
pedestal((*digiItr)[2].capid());
752 double fBin67 = tool[3] + tool[4]
753 - calibrations.
pedestal((*digiItr)[3].capid())
754 - calibrations.
pedestal((*digiItr)[4].capid());
757 strtmp =
"HcalDigiTask_bin_5_frac_" +
subdet_;
759 strtmp =
"HcalDigiTask_bin_6_7_frac_" +
subdet_;
764 strtmp =
"HcalDigiTask_signal_amplitude_" +
subdet_;
766 strtmp =
"HcalDigiTask_signal_amplitude_depth1_" +
subdet_;
768 strtmp =
"HcalDigiTask_signal_amplitude_depth2_" +
subdet_;
770 strtmp =
"HcalDigiTask_signal_amplitude_depth3_" +
subdet_;
772 strtmp =
"HcalDigiTask_signal_amplitude_depth4_" +
subdet_;
777 if (isubdet != 0 &&
noise_ == 0) {
778 strtmp =
"HcalDigiTask_number_of_amplitudes_above_10fC_" +
subdet_;
793 for (std::vector<PCaloHit>::const_iterator simhits = simhitResult->begin(); simhits != simhitResult->end(); ++simhits) {
796 int ieta = cell.
ieta();
797 if (ieta > 0) ieta--;
798 int iphi = cell.iphi() - 1;
799 int sub = cell.subdet();
802 if (sub == isubdet && ieta == ieta_Sim && iphi == iphi_Sim) {
803 int depth = cell.depth();
804 double en = simhits->energy();
807 if (depth == 1) ehits1 += en;
808 if (depth == 2) ehits2 += en;
809 if (depth == 3) ehits3 += en;
810 if (depth == 4) ehits4 += en;
814 strtmp =
"HcalDigiTask_amplitude_vs_simhits_" +
subdet_;
815 if (ehits > eps)
fill2D(strtmp, ehits, ampl_c);
816 strtmp =
"HcalDigiTask_amplitude_vs_simhits_depth1_" +
subdet_;
817 if (ehits1 > eps)
fill2D(strtmp, ehits1, ampl1_c);
818 strtmp =
"HcalDigiTask_amplitude_vs_simhits_depth2_" +
subdet_;
819 if (ehits2 > eps)
fill2D(strtmp, ehits2, ampl2_c);
820 strtmp =
"HcalDigiTask_amplitude_vs_simhits_depth3_" +
subdet_;
821 if (ehits3 > eps)
fill2D(strtmp, ehits3, ampl3_c);
822 strtmp =
"HcalDigiTask_amplitude_vs_simhits_depth4_" +
subdet_;
823 if (ehits4 > eps)
fill2D(strtmp, ehits4, ampl4_c);
825 strtmp =
"HcalDigiTask_amplitude_vs_simhits_profile_" +
subdet_;
826 if (ehits > eps)
fillPf(strtmp, ehits, ampl_c);
827 strtmp =
"HcalDigiTask_amplitude_vs_simhits_profile_depth1_" +
subdet_;
828 if (ehits1 > eps)
fillPf(strtmp, ehits1, ampl1_c);
829 strtmp =
"HcalDigiTask_amplitude_vs_simhits_profile_depth2_" +
subdet_;
830 if (ehits2 > eps)
fillPf(strtmp, ehits2, ampl2_c);
831 strtmp =
"HcalDigiTask_amplitude_vs_simhits_profile_depth3_" +
subdet_;
832 if (ehits3 > eps)
fillPf(strtmp, ehits3, ampl3_c);
833 strtmp =
"HcalDigiTask_amplitude_vs_simhits_profile_depth4_" +
subdet_;
834 if (ehits4 > eps)
fillPf(strtmp, ehits4, ampl4_c);
836 strtmp =
"HcalDigiTask_ratio_amplitude_vs_simhits_" +
subdet_;
837 if (ehits > eps)
fill1D(strtmp, ampl_c / ehits);
838 strtmp =
"HcalDigiTask_ratio_amplitude_vs_simhits_depth1_" +
subdet_;
839 if (ehits1 > eps)
fill1D(strtmp, ampl1_c / ehits1);
840 strtmp =
"HcalDigiTask_ratio_amplitude_vs_simhits_depth2_" +
subdet_;
841 if (ehits2 > eps)
fill1D(strtmp, ampl2_c / ehits2);
842 strtmp =
"HcalDigiTask_ratio_amplitude_vs_simhits_depth3_" +
subdet_;
843 if (ehits3 > eps)
fill1D(strtmp, ampl3_c / ehits3);
844 strtmp =
"HcalDigiTask_ratio_amplitude_vs_simhits_depth4_" +
subdet_;
845 if (ehits4 > eps)
fill1D(strtmp, ampl4_c / ehits4);
849 strtmp =
"HcalDigiTask_Ndigis_" +
subdet_;
850 fill1D(strtmp,
double(Ndig));
858 HistLim ietaLim(82, -41., 41.);
863 float fev = float (
nevtot);
866 float sumphi_1, sumphi_2, sumphi_3, sumphi_4;
869 for (
int i = 1;
i <= nx;
i++) {
875 for (
int j = 1;
j <= ny;
j++) {
879 strtmp =
"HcalDigiTask_ieta_iphi_occupancy_map_depth1_" +
subdet_;
884 strtmp =
"HcalDigiTask_ieta_iphi_occupancy_map_depth2_" +
subdet_;
889 strtmp =
"HcalDigiTask_ieta_iphi_occupancy_map_depth3_" +
subdet_;
894 strtmp =
"HcalDigiTask_ieta_iphi_occupancy_map_depth4_" +
subdet_;
902 if (ieta >= 0) ieta += 1;
904 if (ieta >= -20 && ieta <= 20) {
907 if (ieta >= 40 || ieta <= -40) {
914 if (ieta >= 0) ieta -= 1;
915 double deta = double(ieta);
918 cnorm = sumphi_1 / phi_factor;
919 strtmp =
"HcalDigiTask_occupancy_vs_ieta_depth1_" +
subdet_;
920 fill1D(strtmp, deta, cnorm);
922 cnorm = sumphi_2 / phi_factor;
923 strtmp =
"HcalDigiTask_occupancy_vs_ieta_depth2_" +
subdet_;
924 fill1D(strtmp, deta, cnorm);
926 cnorm = sumphi_3 / phi_factor;
927 strtmp =
"HcalDigiTask_occupancy_vs_ieta_depth3_" +
subdet_;
928 fill1D(strtmp, deta, cnorm);
930 cnorm = sumphi_4 / phi_factor;
931 strtmp =
"HcalDigiTask_occupancy_vs_ieta_depth4_" +
subdet_;
932 fill1D(strtmp, deta, cnorm);
955 msm_->find(name)->second->Fill(X, weight);
963 msm_->find(name)->second->Fill(X, Y, weight);
971 msm_->find(name)->second->Fill(X, Y);
975 if (!
msm_->count(name))
return NULL;
976 else return msm_->find(name)->second;
980 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< T >::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
std::map< std::string, MonitorElement * > * msm_
int depth() const
get the tower depth
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)
int ieta() const
get the cell ieta
MonitorElement * book1D(Args &&...args)
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
double getBinContent(int binx) const
get content of bin (1-D)
edm::ESHandle< HcalDbService > conditions
void book1D(DQMStore::IBooker &ib, std::string name, int n, double min, double max)