40 msm_ =
new std::map<std::string, MonitorElement*>();
43 else edm::LogInfo(
"OutputInfo") <<
" Hcal Digi Task histograms will NOT be saved";
51 if (
subdet_ ==
"noise") bnoise = 1;
52 if (
mc_ ==
"yes") bmc = 1;
67 HistLim Ndigis(2600, 0., 2600.);
68 HistLim ndigis(505, -10., 1000.);
71 HistLim digiAmp(205, -100., 4000.);
72 HistLim ratio(2000, -100., 3900.);
73 HistLim sumAmp(100, -500., 1500.);
78 HistLim pedestalfC(400, -10., 30.);
83 HistLim pedWidthLim(100, 0., 2.);
86 HistLim gainWidthLim(100, 0., 0.3);
91 if (bsubdet ==
"HE") {
94 }
else if (bsubdet ==
"HF") {
100 pedWidthLim =
HistLim(100, 0., 5.);
101 frac =
HistLim(400, -4.00, 4.00);
103 }
else if (bsubdet ==
"HO") {
106 gainLim =
HistLim(150, 0., 1.5);
110 const char * sub = bsubdet.c_str();
113 sprintf(histo,
"HcalDigiTask_Ndigis_%s", sub);
117 sprintf(histo,
"HcalDigiTask_ieta_iphi_occupancy_map_depth1_%s", sub);
118 book2D(histo, ietaLim, iphiLim);
120 sprintf(histo,
"HcalDigiTask_ieta_iphi_occupancy_map_depth2_%s", sub);
121 book2D(histo, ietaLim, iphiLim);
123 sprintf(histo,
"HcalDigiTask_ieta_iphi_occupancy_map_depth3_%s", sub);
124 book2D(histo, ietaLim, iphiLim);
126 sprintf(histo,
"HcalDigiTask_ieta_iphi_occupancy_map_depth4_%s", sub);
127 book2D(histo, ietaLim, iphiLim);
130 sprintf(histo,
"HcalDigiTask_occupancy_vs_ieta_depth1_%s", sub);
133 sprintf(histo,
"HcalDigiTask_occupancy_vs_ieta_depth2_%s", sub);
136 sprintf(histo,
"HcalDigiTask_occupancy_vs_ieta_depth3_%s", sub);
139 sprintf(histo,
"HcalDigiTask_occupancy_vs_ieta_depth4_%s", sub);
155 sprintf(histo,
"HcalDigiTask_sum_all_amplitudes_%s", sub);
158 sprintf(histo,
"HcalDigiTask_number_of_amplitudes_above_10fC_%s", sub);
161 sprintf(histo,
"HcalDigiTask_ADC0_adc_depth1_%s", sub);
163 sprintf(histo,
"HcalDigiTask_ADC0_adc_depth2_%s", sub);
165 sprintf(histo,
"HcalDigiTask_ADC0_adc_depth3_%s", sub);
167 sprintf(histo,
"HcalDigiTask_ADC0_adc_depth4_%s", sub);
170 sprintf(histo,
"HcalDigiTask_ADC0_fC_depth1_%s", sub);
171 book1D(histo, pedestalfC);
172 sprintf(histo,
"HcalDigiTask_ADC0_fC_depth2_%s", sub);
173 book1D(histo, pedestalfC);
174 sprintf(histo,
"HcalDigiTask_ADC0_fC_depth3_%s", sub);
175 book1D(histo, pedestalfC);
176 sprintf(histo,
"HcalDigiTask_ADC0_fC_depth4_%s", sub);
177 book1D(histo, pedestalfC);
179 sprintf(histo,
"HcalDigiTask_signal_amplitude_%s", sub);
181 sprintf(histo,
"HcalDigiTask_signal_amplitude_depth1_%s", sub);
183 sprintf(histo,
"HcalDigiTask_signal_amplitude_depth2_%s", sub);
185 sprintf(histo,
"HcalDigiTask_signal_amplitude_depth3_%s", sub);
187 sprintf(histo,
"HcalDigiTask_signal_amplitude_depth4_%s", sub);
190 sprintf(histo,
"HcalDigiTask_signal_amplitude_vs_bin_all_depths_%s", sub);
191 book2D(histo, nbin, digiAmp);
199 sprintf(histo,
"HcalDigiTask_all_amplitudes_vs_bin_1D_depth1_%s", sub);
201 sprintf(histo,
"HcalDigiTask_all_amplitudes_vs_bin_1D_depth2_%s", sub);
204 sprintf(histo,
"HcalDigiTask_bin_5_frac_%s", sub);
206 sprintf(histo,
"HcalDigiTask_bin_6_7_frac_%s", sub);
210 sprintf(histo,
"HcalDigiTask_amplitude_vs_simhits_%s", sub);
211 book2D(histo, sime, digiAmp);
212 sprintf(histo,
"HcalDigiTask_amplitude_vs_simhits_depth1_%s", sub);
213 book2D(histo, sime, digiAmp);
214 sprintf(histo,
"HcalDigiTask_amplitude_vs_simhits_depth2_%s", sub);
215 book2D(histo, sime, digiAmp);
216 sprintf(histo,
"HcalDigiTask_amplitude_vs_simhits_depth3_%s", sub);
217 book2D(histo, sime, digiAmp);
218 sprintf(histo,
"HcalDigiTask_amplitude_vs_simhits_depth4_%s", sub);
219 book2D(histo, sime, digiAmp);
221 sprintf(histo,
"HcalDigiTask_amplitude_vs_simhits_profile_%s", sub);
222 bookPf(histo, sime, digiAmp);
223 sprintf(histo,
"HcalDigiTask_amplitude_vs_simhits_profile_depth1_%s", sub);
224 bookPf(histo, sime, digiAmp);
225 sprintf(histo,
"HcalDigiTask_amplitude_vs_simhits_profile_depth2_%s", sub);
226 bookPf(histo, sime, digiAmp);
227 sprintf(histo,
"HcalDigiTask_amplitude_vs_simhits_profile_depth3_%s", sub);
228 bookPf(histo, sime, digiAmp);
229 sprintf(histo,
"HcalDigiTask_amplitude_vs_simhits_profile_depth4_%s", sub);
230 bookPf(histo, sime, digiAmp);
232 sprintf(histo,
"HcalDigiTask_ratio_amplitude_vs_simhits_%s", sub);
234 sprintf(histo,
"HcalDigiTask_ratio_amplitude_vs_simhits_depth1_%s", sub);
236 sprintf(histo,
"HcalDigiTask_ratio_amplitude_vs_simhits_depth2_%s", sub);
238 sprintf(histo,
"HcalDigiTask_ratio_amplitude_vs_simhits_depth3_%s", sub);
240 sprintf(histo,
"HcalDigiTask_ratio_amplitude_vs_simhits_depth4_%s", sub);
250 sprintf(histo,
"HcalDigiTask_gain_capId0_Depth1_%s", sub);
252 sprintf(histo,
"HcalDigiTask_gain_capId1_Depth1_%s", sub);
254 sprintf(histo,
"HcalDigiTask_gain_capId2_Depth1_%s", sub);
256 sprintf(histo,
"HcalDigiTask_gain_capId3_Depth1_%s", sub);
259 sprintf(histo,
"HcalDigiTask_gain_capId0_Depth2_%s", sub);
261 sprintf(histo,
"HcalDigiTask_gain_capId1_Depth2_%s", sub);
263 sprintf(histo,
"HcalDigiTask_gain_capId2_Depth2_%s", sub);
265 sprintf(histo,
"HcalDigiTask_gain_capId3_Depth2_%s", sub);
268 sprintf(histo,
"HcalDigiTask_gainWidth_capId0_Depth1_%s", sub);
269 book1D(histo, gainWidthLim);
270 sprintf(histo,
"HcalDigiTask_gainWidth_capId1_Depth1_%s", sub);
271 book1D(histo, gainWidthLim);
272 sprintf(histo,
"HcalDigiTask_gainWidth_capId2_Depth1_%s", sub);
273 book1D(histo, gainWidthLim);
274 sprintf(histo,
"HcalDigiTask_gainWidth_capId3_Depth1_%s", sub);
275 book1D(histo, gainWidthLim);
277 sprintf(histo,
"HcalDigiTask_gainWidth_capId0_Depth2_%s", sub);
278 book1D(histo, gainWidthLim);
279 sprintf(histo,
"HcalDigiTask_gainWidth_capId1_Depth2_%s", sub);
280 book1D(histo, gainWidthLim);
281 sprintf(histo,
"HcalDigiTask_gainWidth_capId2_Depth2_%s", sub);
282 book1D(histo, gainWidthLim);
283 sprintf(histo,
"HcalDigiTask_gainWidth_capId3_Depth2_%s", sub);
284 book1D(histo, gainWidthLim);
286 sprintf(histo,
"HcalDigiTask_pedestal_capId0_Depth1_%s", sub);
288 sprintf(histo,
"HcalDigiTask_pedestal_capId1_Depth1_%s", sub);
290 sprintf(histo,
"HcalDigiTask_pedestal_capId2_Depth1_%s", sub);
292 sprintf(histo,
"HcalDigiTask_pedestal_capId3_Depth1_%s", sub);
295 sprintf(histo,
"HcalDigiTask_pedestal_capId0_Depth2_%s", sub);
297 sprintf(histo,
"HcalDigiTask_pedestal_capId1_Depth2_%s", sub);
299 sprintf(histo,
"HcalDigiTask_pedestal_capId2_Depth2_%s", sub);
301 sprintf(histo,
"HcalDigiTask_pedestal_capId3_Depth2_%s", sub);
304 sprintf(histo,
"HcalDigiTask_pedestal_width_capId0_Depth1_%s", sub);
305 book1D(histo, pedWidthLim);
306 sprintf(histo,
"HcalDigiTask_pedestal_width_capId1_Depth1_%s", sub);
307 book1D(histo, pedWidthLim);
308 sprintf(histo,
"HcalDigiTask_pedestal_width_capId2_Depth1_%s", sub);
309 book1D(histo, pedWidthLim);
310 sprintf(histo,
"HcalDigiTask_pedestal_width_capId3_Depth1_%s", sub);
311 book1D(histo, pedWidthLim);
313 sprintf(histo,
"HcalDigiTask_pedestal_width_capId0_Depth2_%s", sub);
314 book1D(histo, pedWidthLim);
315 sprintf(histo,
"HcalDigiTask_pedestal_width_capId1_Depth2_%s", sub);
316 book1D(histo, pedWidthLim);
317 sprintf(histo,
"HcalDigiTask_pedestal_width_capId2_Depth2_%s", sub);
318 book1D(histo, pedWidthLim);
319 sprintf(histo,
"HcalDigiTask_pedestal_width_capId3_Depth2_%s", sub);
320 book1D(histo, pedWidthLim);
325 sprintf(histo,
"HcalDigiTask_gain_capId0_Depth3_%s", sub);
327 sprintf(histo,
"HcalDigiTask_gain_capId1_Depth3_%s", sub);
329 sprintf(histo,
"HcalDigiTask_gain_capId2_Depth3_%s", sub);
331 sprintf(histo,
"HcalDigiTask_gain_capId3_Depth3_%s", sub);
334 sprintf(histo,
"HcalDigiTask_gainWidth_capId0_Depth3_%s", sub);
335 book1D(histo, gainWidthLim);
336 sprintf(histo,
"HcalDigiTask_gainWidth_capId1_Depth3_%s", sub);
337 book1D(histo, gainWidthLim);
338 sprintf(histo,
"HcalDigiTask_gainWidth_capId2_Depth3_%s", sub);
339 book1D(histo, gainWidthLim);
340 sprintf(histo,
"HcalDigiTask_gainWidth_capId3_Depth3_%s", sub);
341 book1D(histo, gainWidthLim);
343 sprintf(histo,
"HcalDigiTask_pedestal_capId0_Depth3_%s", sub);
345 sprintf(histo,
"HcalDigiTask_pedestal_capId1_Depth3_%s", sub);
347 sprintf(histo,
"HcalDigiTask_pedestal_capId2_Depth3_%s", sub);
349 sprintf(histo,
"HcalDigiTask_pedestal_capId3_Depth3_%s", sub);
352 sprintf(histo,
"HcalDigiTask_pedestal_width_capId0_Depth3_%s", sub);
353 book1D(histo, pedWidthLim);
354 sprintf(histo,
"HcalDigiTask_pedestal_width_capId1_Depth3_%s", sub);
355 book1D(histo, pedWidthLim);
356 sprintf(histo,
"HcalDigiTask_pedestal_width_capId2_Depth3_%s", sub);
357 book1D(histo, pedWidthLim);
358 sprintf(histo,
"HcalDigiTask_pedestal_width_capId3_Depth3_%s", sub);
359 book1D(histo, pedWidthLim);
364 sprintf(histo,
"HcalDigiTask_gain_capId0_Depth4_%s", sub);
366 sprintf(histo,
"HcalDigiTask_gain_capId1_Depth4_%s", sub);
368 sprintf(histo,
"HcalDigiTask_gain_capId2_Depth4_%s", sub);
370 sprintf(histo,
"HcalDigiTask_gain_capId3_Depth4_%s", sub);
373 sprintf(histo,
"HcalDigiTask_gainWidth_capId0_Depth4_%s", sub);
374 book1D(histo, gainWidthLim);
375 sprintf(histo,
"HcalDigiTask_gainWidth_capId1_Depth4_%s", sub);
376 book1D(histo, gainWidthLim);
377 sprintf(histo,
"HcalDigiTask_gainWidth_capId2_Depth4_%s", sub);
378 book1D(histo, gainWidthLim);
379 sprintf(histo,
"HcalDigiTask_gainWidth_capId3_Depth4_%s", sub);
380 book1D(histo, gainWidthLim);
383 sprintf(histo,
"HcalDigiTask_pedestal_capId0_Depth4_%s", sub);
385 sprintf(histo,
"HcalDigiTask_pedestal_capId1_Depth4_%s", sub);
387 sprintf(histo,
"HcalDigiTask_pedestal_capId2_Depth4_%s", sub);
389 sprintf(histo,
"HcalDigiTask_pedestal_capId3_Depth4_%s", sub);
392 sprintf(histo,
"HcalDigiTask_pedestal_width_capId0_Depth4_%s", sub);
393 book1D(histo, pedWidthLim);
394 sprintf(histo,
"HcalDigiTask_pedestal_width_capId1_Depth4_%s", sub);
395 book1D(histo, pedWidthLim);
396 sprintf(histo,
"HcalDigiTask_pedestal_width_capId2_Depth4_%s", sub);
397 book1D(histo, pedWidthLim);
398 sprintf(histo,
"HcalDigiTask_pedestal_width_capId3_Depth4_%s", sub);
399 book1D(histo, pedWidthLim);
403 sprintf(histo,
"HcalDigiTask_gainMap_Depth1_%s", sub);
404 book2D(histo, ietaLim, iphiLim);
405 sprintf(histo,
"HcalDigiTask_gainMap_Depth2_%s", sub);
406 book2D(histo, ietaLim, iphiLim);
407 sprintf(histo,
"HcalDigiTask_gainMap_Depth3_%s", sub);
408 book2D(histo, ietaLim, iphiLim);
409 sprintf(histo,
"HcalDigiTask_gainMap_Depth4_%s", sub);
410 book2D(histo, ietaLim, iphiLim);
412 sprintf(histo,
"HcalDigiTask_pwidthMap_Depth1_%s", sub);
413 book2D(histo, ietaLim, iphiLim);
414 sprintf(histo,
"HcalDigiTask_pwidthMap_Depth2_%s", sub);
415 book2D(histo, ietaLim, iphiLim);
416 sprintf(histo,
"HcalDigiTask_pwidthMap_Depth3_%s", sub);
417 book2D(histo, ietaLim, iphiLim);
418 sprintf(histo,
"HcalDigiTask_pwidthMap_Depth4_%s", sub);
419 book2D(histo, ietaLim, iphiLim);
491 if (
subdet_ ==
"HB") isubdet = 1;
492 if (
subdet_ ==
"HE") isubdet = 2;
493 if (
subdet_ ==
"HO") isubdet = 3;
494 if (
subdet_ ==
"HF") isubdet = 4;
517 double emax_Sim = -9999.;
526 if (isubdet != 0 &&
noise_ == 0) {
528 for (std::vector<PCaloHit>::const_iterator simhits = simhitResult->begin(); simhits != simhitResult->end(); ++simhits) {
531 double en = simhits->energy();
533 int ieta = cell.ieta();
534 if (ieta > 0) ieta--;
535 int iphi = cell.iphi() - 1;
538 if (en > emax_Sim && sub == isubdet) {
543 if (
mode_ ==
"multi" &&
544 ((sub == 4 && en < 100. && en > 1.)
545 || ((sub != 4) && en < 1. && en > 0.02))) {
555 if (
mode_ !=
"multi" && emax_Sim > 0.) seedSimHit = 1;
571 int depth = cell.
depth();
572 int iphi = cell.iphi() - 1;
573 int ieta = cell.ieta();
574 if (ieta > 0) ieta--;
575 int sub = cell.subdet();
587 if (((
nevent1 == 1 && isubdet == 1) ||
588 (
nevent2 == 1 && isubdet == 2) ||
589 (
nevent3 == 1 && isubdet == 3) ||
590 (
nevent4 == 1 && isubdet == 4)) &&
noise_ == 1 && sub == isubdet) {
598 for (
int i = 0;
i < 4;
i++) {
601 fill1D(
"HcalDigiTask_pedestal_capId" +
str(
i) +
"_Depth" +
str(depth) +
"_" +
subdet_, pedestal->getValue(
i));
606 fill2D(
"HcalDigiTask_pwidthMap_Depth" +
str(depth) +
"_" +
subdet_,
double(ieta),
double(iphi), pedWidth->
getWidth(0));
611 if (sub == isubdet) Ndig++;
615 if (sub == isubdet &&
noise_ == 0) {
623 coder.
adc2fC(*digiItr, tool);
625 double noiseADC = (*digiItr)[0].adc();
626 double noisefC = tool[0];
628 fill1D(
"HcalDigiTask_ADC0_adc_depth" +
str(depth) +
"_" +
subdet_, noiseADC);
633 fill2D(
"HcalDigiTask_ieta_iphi_occupancy_map_depth" +
str(depth) +
"_" +
subdet_,
double(ieta),
double(iphi));
641 if (ieta == ieta_Sim && iphi == iphi_Sim) closen = seedSimHit;
643 for (
int ii = 0;
ii < tool.size();
ii++) {
644 int capid = (*digiItr)[
ii].capid();
646 double val = (tool[
ii] - calibrations.
pedestal(capid));
655 if (depth == 1) strtmp =
"HcalDigiTask_all_amplitudes_vs_bin_1D_depth1_" +
subdet_;
656 else strtmp =
"HcalDigiTask_all_amplitudes_vs_bin_1D_depth2_" +
subdet_;
661 strtmp =
"HcalDigiTask_signal_amplitude_vs_bin_all_depths_" +
subdet_;
667 if (isubdet != 4 &&
ii >= 4 &&
ii <= 7) {
669 if (depth == 1) ampl1 += val;
670 if (depth == 2) ampl2 += val;
671 if (depth == 3) ampl3 += val;
672 if (depth == 4) ampl4 += val;
676 if (depth == 1) ampl1_c += val;
677 if (depth == 2) ampl2_c += val;
678 if (depth == 3) ampl3_c += val;
679 if (depth == 4) ampl4_c += val;
684 if (isubdet == 4 &&
ii >= 2 &&
ii <= 4) {
686 if (depth == 1) ampl1 += val;
687 if (depth == 2) ampl2 += val;
688 if (depth == 3) ampl3 += val;
689 if (depth == 4) ampl4 += val;
692 if (depth == 1) ampl1_c += val;
693 if (depth == 2) ampl2_c += val;
694 if (depth == 3) ampl3_c += val;
695 if (depth == 4) ampl4_c += val;
715 strtmp =
"HcalDigiTask_sum_all_amplitudes_" +
subdet_;
719 if (ampl1 > 10. || ampl2 > 10. || ampl3 > 10. || ampl4 > 10.) indigis++;
722 if (ampl1 > 30. && depth == 1 && closen == 1 && isubdet != 4) {
723 double fBin5 = tool[4] - calibrations.
pedestal((*digiItr)[4].capid());
724 double fBin67 = tool[5] + tool[6]
725 - calibrations.
pedestal((*digiItr)[5].capid())
726 - calibrations.
pedestal((*digiItr)[6].capid());
731 strtmp =
"HcalDigiTask_bin_5_frac_" +
subdet_;
733 strtmp =
"HcalDigiTask_bin_6_7_frac_" +
subdet_;
739 if (isubdet == 4 && ampl1 > 30. && depth == 1) {
740 double fBin5 = tool[2] - calibrations.
pedestal((*digiItr)[2].capid());
741 double fBin67 = tool[3] + tool[4]
742 - calibrations.
pedestal((*digiItr)[3].capid())
743 - calibrations.
pedestal((*digiItr)[4].capid());
746 strtmp =
"HcalDigiTask_bin_5_frac_" +
subdet_;
748 strtmp =
"HcalDigiTask_bin_6_7_frac_" +
subdet_;
753 strtmp =
"HcalDigiTask_signal_amplitude_" +
subdet_;
755 strtmp =
"HcalDigiTask_signal_amplitude_depth1_" +
subdet_;
757 strtmp =
"HcalDigiTask_signal_amplitude_depth2_" +
subdet_;
759 strtmp =
"HcalDigiTask_signal_amplitude_depth3_" +
subdet_;
761 strtmp =
"HcalDigiTask_signal_amplitude_depth4_" +
subdet_;
766 if (isubdet != 0 &&
noise_ == 0) {
767 strtmp =
"HcalDigiTask_number_of_amplitudes_above_10fC_" +
subdet_;
782 for (std::vector<PCaloHit>::const_iterator simhits = simhitResult->begin(); simhits != simhitResult->end(); ++simhits) {
785 int ieta = cell.
ieta();
786 if (ieta > 0) ieta--;
787 int iphi = cell.iphi() - 1;
788 int sub = cell.subdet();
791 if (sub == isubdet && ieta == ieta_Sim && iphi == iphi_Sim) {
792 int depth = cell.depth();
793 double en = simhits->energy();
796 if (depth == 1) ehits1 += en;
797 if (depth == 2) ehits2 += en;
798 if (depth == 3) ehits3 += en;
799 if (depth == 4) ehits4 += en;
803 strtmp =
"HcalDigiTask_amplitude_vs_simhits_" +
subdet_;
804 if (ehits > eps)
fill2D(strtmp, ehits, ampl_c);
805 strtmp =
"HcalDigiTask_amplitude_vs_simhits_depth1_" +
subdet_;
806 if (ehits1 > eps)
fill2D(strtmp, ehits1, ampl1_c);
807 strtmp =
"HcalDigiTask_amplitude_vs_simhits_depth2_" +
subdet_;
808 if (ehits2 > eps)
fill2D(strtmp, ehits2, ampl2_c);
809 strtmp =
"HcalDigiTask_amplitude_vs_simhits_depth3_" +
subdet_;
810 if (ehits3 > eps)
fill2D(strtmp, ehits3, ampl3_c);
811 strtmp =
"HcalDigiTask_amplitude_vs_simhits_depth4_" +
subdet_;
812 if (ehits4 > eps)
fill2D(strtmp, ehits4, ampl4_c);
814 strtmp =
"HcalDigiTask_amplitude_vs_simhits_profile_" +
subdet_;
815 if (ehits > eps)
fillPf(strtmp, ehits, ampl_c);
816 strtmp =
"HcalDigiTask_amplitude_vs_simhits_profile_depth1_" +
subdet_;
817 if (ehits1 > eps)
fillPf(strtmp, ehits1, ampl1_c);
818 strtmp =
"HcalDigiTask_amplitude_vs_simhits_profile_depth2_" +
subdet_;
819 if (ehits2 > eps)
fillPf(strtmp, ehits2, ampl2_c);
820 strtmp =
"HcalDigiTask_amplitude_vs_simhits_profile_depth3_" +
subdet_;
821 if (ehits3 > eps)
fillPf(strtmp, ehits3, ampl3_c);
822 strtmp =
"HcalDigiTask_amplitude_vs_simhits_profile_depth4_" +
subdet_;
823 if (ehits4 > eps)
fillPf(strtmp, ehits4, ampl4_c);
825 strtmp =
"HcalDigiTask_ratio_amplitude_vs_simhits_" +
subdet_;
826 if (ehits > eps)
fill1D(strtmp, ampl_c / ehits);
827 strtmp =
"HcalDigiTask_ratio_amplitude_vs_simhits_depth1_" +
subdet_;
828 if (ehits1 > eps)
fill1D(strtmp, ampl1_c / ehits1);
829 strtmp =
"HcalDigiTask_ratio_amplitude_vs_simhits_depth2_" +
subdet_;
830 if (ehits2 > eps)
fill1D(strtmp, ampl2_c / ehits2);
831 strtmp =
"HcalDigiTask_ratio_amplitude_vs_simhits_depth3_" +
subdet_;
832 if (ehits3 > eps)
fill1D(strtmp, ampl3_c / ehits3);
833 strtmp =
"HcalDigiTask_ratio_amplitude_vs_simhits_depth4_" +
subdet_;
834 if (ehits4 > eps)
fill1D(strtmp, ampl4_c / ehits4);
838 strtmp =
"HcalDigiTask_Ndigis_" +
subdet_;
839 fill1D(strtmp,
double(Ndig));
847 HistLim ietaLim(82, -41., 41.);
852 float fev = float (
nevtot);
855 float sumphi_1, sumphi_2, sumphi_3, sumphi_4;
858 for (
int i = 1;
i <= nx;
i++) {
864 for (
int j = 1;
j <= ny;
j++) {
868 strtmp =
"HcalDigiTask_ieta_iphi_occupancy_map_depth1_" +
subdet_;
873 strtmp =
"HcalDigiTask_ieta_iphi_occupancy_map_depth2_" +
subdet_;
878 strtmp =
"HcalDigiTask_ieta_iphi_occupancy_map_depth3_" +
subdet_;
883 strtmp =
"HcalDigiTask_ieta_iphi_occupancy_map_depth4_" +
subdet_;
891 if (ieta >= 0) ieta += 1;
893 if (ieta >= -20 && ieta <= 20) {
896 if (ieta >= 40 || ieta <= -40) {
903 if (ieta >= 0) ieta -= 1;
904 double deta = double(ieta);
907 cnorm = sumphi_1 / phi_factor;
908 strtmp =
"HcalDigiTask_occupancy_vs_ieta_depth1_" +
subdet_;
909 fill1D(strtmp, deta, cnorm);
911 cnorm = sumphi_2 / phi_factor;
912 strtmp =
"HcalDigiTask_occupancy_vs_ieta_depth2_" +
subdet_;
913 fill1D(strtmp, deta, cnorm);
915 cnorm = sumphi_3 / phi_factor;
916 strtmp =
"HcalDigiTask_occupancy_vs_ieta_depth3_" +
subdet_;
917 fill1D(strtmp, deta, cnorm);
919 cnorm = sumphi_4 / phi_factor;
920 strtmp =
"HcalDigiTask_occupancy_vs_ieta_depth4_" +
subdet_;
921 fill1D(strtmp, deta, cnorm);
957 msm_->find(name)->second->Fill(X, weight);
965 msm_->find(name)->second->Fill(X, Y, weight);
973 msm_->find(name)->second->Fill(X, Y);
977 if (!
msm_->count(name))
return NULL;
978 else return msm_->find(name)->second;
982 std::stringstream
out;
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
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
edm::EDGetTokenT< edm::SortedCollection< HBHEDataFrame > > tok_hbhe_
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
void book1D(std::string name, int n, double min, double max)
std::map< std::string, MonitorElement * > * msm_
int depth() const
get the tower depth
const T & max(const T &a, const T &b)
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
HcalDigisValidation(const edm::ParameterSet &)
MonitorElement * bookProfile(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const char *option="s")
edm::EDGetTokenT< edm::SortedCollection< HFDataFrame > > tok_hf_
void fill1D(std::string name, double X, double weight=1)
edm::EDGetTokenT< edm::PCaloHitContainer > tok_mc_
float getWidth(int fCapId) const
get width (sqrt(sigma_i_i)) for capId = 0..3
T const * product() const
void bookPf(std::string name, const HistLim &limX, const HistLim &limY)
double getBinContent(int binx) const
get content of bin (1-D)
edm::ESHandle< HcalDbService > conditions
void book2D(std::string name, const HistLim &limX, const HistLim &limY)
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
void booking(std::string subdetopt, int bnoise, int bmc)
void setCurrentFolder(const std::string &fullpath)