45 if (iConfig.
exists(
"simHits"))
68 msm_ =
new std::map<std::string, MonitorElement*>();
70 if (outputFile_.size() != 0)
edm::LogInfo(
"OutputInfo") <<
" Hcal Digi Task histograms will be saved to '" << outputFile_.c_str() <<
"'";
71 else edm::LogInfo(
"OutputInfo") <<
" Hcal Digi Task histograms will NOT be saved";
121 book1D(ib,
"nevtot", 1, 0, 1);
124 if (
subdet_ ==
"noise") bnoise = 1;
125 if (
mc_ ==
"yes") bmc = 1;
137 HistLim tp_hl_et(260, -10, 250);
138 HistLim tp_hl_ntp(640, -20, 3180);
139 HistLim tp_hl_ntp_sub(404, -20, 2000);
140 HistLim tp_hl_ieta(85, -42.5, 42.5);
141 HistLim tp_hl_iphi(74,-0.5,73.5);
144 book1D(ib,
"HcalDigiTask_tp_et", tp_hl_et);
145 book1D(ib,
"HcalDigiTask_tp_et_v0", tp_hl_et);
146 book1D(ib,
"HcalDigiTask_tp_et_v1", tp_hl_et);
147 book1D(ib,
"HcalDigiTask_tp_et_HB", tp_hl_et);
148 book1D(ib,
"HcalDigiTask_tp_et_HE", tp_hl_et);
149 book1D(ib,
"HcalDigiTask_tp_et_HF", tp_hl_et);
150 book1D(ib,
"HcalDigiTask_tp_et_HF_v0", tp_hl_et);
151 book1D(ib,
"HcalDigiTask_tp_et_HF_v1", tp_hl_et);
152 book1D(ib,
"HcalDigiTask_tp_ntp", tp_hl_ntp);
153 book1D(ib,
"HcalDigiTask_tp_ntp_v0", tp_hl_ntp);
154 book1D(ib,
"HcalDigiTask_tp_ntp_v1", tp_hl_ntp);
155 book1D(ib,
"HcalDigiTask_tp_ntp_HB", tp_hl_ntp_sub);
156 book1D(ib,
"HcalDigiTask_tp_ntp_HE", tp_hl_ntp_sub);
157 book1D(ib,
"HcalDigiTask_tp_ntp_HF", tp_hl_ntp_sub);
158 book1D(ib,
"HcalDigiTask_tp_ntp_HF_v0", tp_hl_ntp_sub);
159 book1D(ib,
"HcalDigiTask_tp_ntp_HF_v1", tp_hl_ntp_sub);
160 book1D(ib,
"HcalDigiTask_tp_ntp_ieta", tp_hl_ieta);
161 book1D(ib,
"HcalDigiTask_tp_ntp_ieta_v0", tp_hl_ieta);
162 book1D(ib,
"HcalDigiTask_tp_ntp_ieta_v1", tp_hl_ieta);
163 book1D(ib,
"HcalDigiTask_tp_ntp_iphi", tp_hl_iphi);
164 book1D(ib,
"HcalDigiTask_tp_ntp_iphi_v0", tp_hl_iphi);
165 book1D(ib,
"HcalDigiTask_tp_ntp_iphi_v1", tp_hl_iphi);
166 book1D(ib,
"HcalDigiTask_tp_ntp_10_ieta", tp_hl_ieta);
167 book1D(ib,
"HcalDigiTask_tp_ntp_10_ieta_v0", tp_hl_ieta);
168 book1D(ib,
"HcalDigiTask_tp_ntp_10_ieta_v1", tp_hl_ieta);
169 book2D(ib,
"HcalDigiTask_tp_et_ieta", tp_hl_ieta, tp_hl_et);
170 book2D(ib,
"HcalDigiTask_tp_et_ieta_v0", tp_hl_ieta, tp_hl_et);
171 book2D(ib,
"HcalDigiTask_tp_et_ieta_v1", tp_hl_ieta, tp_hl_et);
172 book2D(ib,
"HcalDigiTask_tp_ieta_iphi", tp_hl_ieta, tp_hl_iphi);
173 book2D(ib,
"HcalDigiTask_tp_ieta_iphi_v0", tp_hl_ieta, tp_hl_iphi);
174 book2D(ib,
"HcalDigiTask_tp_ieta_iphi_v1", tp_hl_ieta, tp_hl_iphi);
175 bookPf(ib,
"HcalDigiTask_tp_ave_et_ieta", tp_hl_ieta, tp_hl_et,
" ");
176 bookPf(ib,
"HcalDigiTask_tp_ave_et_ieta_v0", tp_hl_ieta, tp_hl_et,
" ");
177 bookPf(ib,
"HcalDigiTask_tp_ave_et_ieta_v1", tp_hl_ieta, tp_hl_et,
" ");
185 HistLim Ndigis(2600, 0., 2600.);
186 HistLim ndigis(520, -20., 1020.);
189 HistLim digiAmp(360, -100., 7100.);
190 HistLim digiAmpWide(360, -10000., 710000.);
192 HistLim sumAmp(100, -500., 1500.);
197 HistLim pedestalfC(400, -10., 30.);
202 HistLim pedWidthLim(100, 0., 2.);
205 HistLim gainWidthLim(160, 0., 0.32);
207 HistLim ietaLim(85, -42.5, 42.5);
208 HistLim iphiLim(74, -0.5, 73.5);
210 HistLim depthLim(15,-0.5,14.5);
212 if (bsubdet ==
"HB") {
214 }
else if (bsubdet ==
"HE") {
217 }
else if (bsubdet ==
"HF") {
219 pedLim =
HistLim(100, 0., 20.);
220 pedWidthLim =
HistLim(100, 0., 5.);
221 frac =
HistLim(400, -4.00, 4.00);
223 }
else if (bsubdet ==
"HO") {
225 gainLim =
HistLim(160, 0., 1.6);
230 if (bsubdet==
"HB") isubdet=1;
231 else if (bsubdet==
"HE") isubdet=2;
232 else if (bsubdet==
"HO") isubdet=3;
233 else if (bsubdet==
"HF") isubdet=4;
234 else edm::LogWarning(
"HcalDigisValidation") <<
"HcalDigisValidation Warning: not HB/HE/HF/HO " << bsubdet << std::endl;
237 const char * sub = bsubdet.c_str();
240 sprintf(histo,
"HcalDigiTask_Ndigis_%s", sub);
241 book1D(ib, histo, Ndigis);
245 sprintf(histo,
"HcalDigiTask_ieta_iphi_occupancy_map_depth%d_%s",
depth, sub);
246 book2D(ib, histo, ietaLim, iphiLim);
250 sprintf(histo,
"HcalDigiTask_depths_%s",sub);
251 book1D(ib,histo, depthLim);
255 sprintf(histo,
"HcalDigiTask_occupancy_vs_ieta_depth%d_%s",
depth, sub);
256 book1D(ib, histo, ietaLim);
261 sprintf(histo,
"HcalDigiTask_sum_all_amplitudes_%s", sub);
262 book1D(ib, histo, sumAmp);
264 sprintf(histo,
"HcalDigiTask_number_of_amplitudes_above_10fC_%s", sub);
265 book1D(ib, histo, ndigis);
268 sprintf(histo,
"HcalDigiTask_ADC0_adc_depth%d_%s",
depth, sub);
269 book1D(ib, histo, pedestal);
273 sprintf(histo,
"HcalDigiTask_ADC0_fC_depth%d_%s",
depth, sub);
274 book1D(ib, histo, pedestalfC);
277 sprintf(histo,
"HcalDigiTask_signal_amplitude_%s", sub);
278 book1D(ib, histo, digiAmp);
280 if(
hep17_ && bsubdet==
"HE"){
281 sprintf(histo,
"HcalDigiTask_signal_amplitude_HEP17");
282 book1D(ib, histo, digiAmpWide);
286 sprintf(histo,
"HcalDigiTask_signal_amplitude_depth%d_%s",
depth, sub);
287 book1D(ib, histo, digiAmp);
288 if(
hep17_ && bsubdet==
"HE"){
289 sprintf(histo,
"HcalDigiTask_signal_amplitude_depth%d_HEP17",
depth);
290 book1D(ib, histo, digiAmpWide);
294 sprintf(histo,
"HcalDigiTask_signal_amplitude_vs_bin_all_depths_%s", sub);
295 book2D(ib, histo, nbin, digiAmp);
296 if(
hep17_ && bsubdet==
"HE"){
297 sprintf(histo,
"HcalDigiTask_signal_amplitude_vs_bin_all_depths_HEP17");
298 book2D(ib, histo, nbin, digiAmpWide);
302 sprintf(histo,
"HcalDigiTask_all_amplitudes_vs_bin_1D_depth%d_%s",
depth, sub);
304 if(
hep17_ && bsubdet==
"HE"){
305 sprintf(histo,
"HcalDigiTask_all_amplitudes_vs_bin_1D_depth%d_HEP17",
depth);
310 sprintf(histo,
"HcalDigiTask_bin_5_frac_%s", sub);
312 sprintf(histo,
"HcalDigiTask_bin_6_7_frac_%s", sub);
316 sprintf(histo,
"HcalDigiTask_amplitude_vs_simhits_%s", sub);
317 book2D(ib, histo, sime, digiAmp);
319 sprintf(histo,
"HcalDigiTask_amplitude_vs_simhits_depth%d_%s",
depth, sub);
320 book2D(ib, histo, sime, digiAmp);
323 sprintf(histo,
"HcalDigiTask_amplitude_vs_simhits_profile_%s", sub);
324 bookPf(ib, histo, sime, digiAmp);
326 sprintf(histo,
"HcalDigiTask_amplitude_vs_simhits_profile_depth%d_%s",
depth, sub);
327 bookPf(ib, histo, sime, digiAmp);
330 sprintf(histo,
"HcalDigiTask_ratio_amplitude_vs_simhits_%s", sub);
333 sprintf(histo,
"HcalDigiTask_ratio_amplitude_vs_simhits_depth%d_%s",
depth, sub);
344 sprintf(histo,
"HcalDigiTask_gain_capId0_Depth%d_%s",
depth, sub);
345 book1D(ib, histo, gainLim);
346 sprintf(histo,
"HcalDigiTask_gain_capId1_Depth%d_%s",
depth, sub);
347 book1D(ib, histo, gainLim);
348 sprintf(histo,
"HcalDigiTask_gain_capId2_Depth%d_%s",
depth, sub);
349 book1D(ib, histo, gainLim);
350 sprintf(histo,
"HcalDigiTask_gain_capId3_Depth%d_%s",
depth, sub);
351 book1D(ib, histo, gainLim);
353 sprintf(histo,
"HcalDigiTask_gainWidth_capId0_Depth%d_%s",
depth, sub);
354 book1D(ib, histo, gainWidthLim);
355 sprintf(histo,
"HcalDigiTask_gainWidth_capId1_Depth%d_%s",
depth, sub);
356 book1D(ib, histo, gainWidthLim);
357 sprintf(histo,
"HcalDigiTask_gainWidth_capId2_Depth%d_%s",
depth, sub);
358 book1D(ib, histo, gainWidthLim);
359 sprintf(histo,
"HcalDigiTask_gainWidth_capId3_Depth%d_%s",
depth, sub);
360 book1D(ib, histo, gainWidthLim);
362 sprintf(histo,
"HcalDigiTask_pedestal_capId0_Depth%d_%s",
depth, sub);
363 book1D(ib, histo, pedLim);
364 sprintf(histo,
"HcalDigiTask_pedestal_capId1_Depth%d_%s",
depth, sub);
365 book1D(ib, histo, pedLim);
366 sprintf(histo,
"HcalDigiTask_pedestal_capId2_Depth%d_%s",
depth, sub);
367 book1D(ib, histo, pedLim);
368 sprintf(histo,
"HcalDigiTask_pedestal_capId3_Depth%d_%s",
depth, sub);
369 book1D(ib, histo, pedLim);
371 sprintf(histo,
"HcalDigiTask_pedestal_width_capId0_Depth%d_%s",
depth, sub);
372 book1D(ib, histo, pedWidthLim);
373 sprintf(histo,
"HcalDigiTask_pedestal_width_capId1_Depth%d_%s",
depth, sub);
374 book1D(ib, histo, pedWidthLim);
375 sprintf(histo,
"HcalDigiTask_pedestal_width_capId2_Depth%d_%s",
depth, sub);
376 book1D(ib, histo, pedWidthLim);
377 sprintf(histo,
"HcalDigiTask_pedestal_width_capId3_Depth%d_%s",
depth, sub);
378 book1D(ib, histo, pedWidthLim);
384 sprintf(histo,
"HcalDigiTask_gainMap_Depth%d_%s",
depth, sub);
385 book2D(ib, histo, ietaLim, iphiLim);
386 sprintf(histo,
"HcalDigiTask_pwidthMap_Depth%d_%s",
depth, sub);
387 book2D(ib, histo, ietaLim, iphiLim);
467 int c = 0, cv0 = 0, cv1 = 0, chb = 0, che = 0, chf = 0, chfv0 = 0, chfv1 = 0;
472 int ieta = itr->id().ieta();
473 int iphi = itr->id().iphi();
478 if (
abs(ieta) <= 16 )
482 else if (
abs(ieta) <= 42 )
489 float en = decoder->
hcaletValue(itr->id(), itr->t0());
491 if (en < 0.00001)
continue;
498 fill1D(
"HcalDigiTask_tp_et",en);
499 fill2D(
"HcalDigiTask_tp_et_ieta",ieta,en);
500 fill2D(
"HcalDigiTask_tp_ieta_iphi",ieta,iphi);
501 fillPf(
"HcalDigiTask_tp_ave_et_ieta",ieta,en);
502 fill1D(
"HcalDigiTask_tp_ntp_ieta",ieta);
503 fill1D(
"HcalDigiTask_tp_ntp_iphi",iphi);
504 if ( en > 10. )
fill1D(
"HcalDigiTask_tp_ntp_10_ieta",ieta);
508 fill1D(
"HcalDigiTask_tp_et_v0",en);
509 fill2D(
"HcalDigiTask_tp_et_ieta_v0",ieta,en);
510 fill2D(
"HcalDigiTask_tp_ieta_iphi_v0",ieta,iphi);
511 fillPf(
"HcalDigiTask_tp_ave_et_ieta_v0",ieta,en);
512 fill1D(
"HcalDigiTask_tp_ntp_ieta_v0",ieta);
513 fill1D(
"HcalDigiTask_tp_ntp_iphi_v0",iphi);
514 if ( en > 10. )
fill1D(
"HcalDigiTask_tp_ntp_10_ieta_v0",ieta);
519 fill1D(
"HcalDigiTask_tp_et_v1",en);
520 fill2D(
"HcalDigiTask_tp_et_ieta_v1",ieta,en);
521 fill2D(
"HcalDigiTask_tp_ieta_iphi_v1",ieta,iphi);
522 fillPf(
"HcalDigiTask_tp_ave_et_ieta_v1",ieta,en);
523 fill1D(
"HcalDigiTask_tp_ntp_ieta_v1",ieta);
524 fill1D(
"HcalDigiTask_tp_ntp_iphi_v1",iphi);
525 if ( en > 10. )
fill1D(
"HcalDigiTask_tp_ntp_10_ieta_v1",ieta);
530 fill1D(
"HcalDigiTask_tp_et_HB",en);
536 fill1D(
"HcalDigiTask_tp_et_HE",en);
542 fill1D(
"HcalDigiTask_tp_et_HF",en);
546 fill1D(
"HcalDigiTask_tp_et_HF_v0",en);
552 fill1D(
"HcalDigiTask_tp_et_HF_v1",en);
561 fill1D(
"HcalDigiTask_tp_ntp",c);
562 fill1D(
"HcalDigiTask_tp_ntp_v0",cv0);
563 fill1D(
"HcalDigiTask_tp_ntp_v1",cv1);
564 fill1D(
"HcalDigiTask_tp_ntp_HB",chb);
565 fill1D(
"HcalDigiTask_tp_ntp_HE",che);
566 fill1D(
"HcalDigiTask_tp_ntp_HF",chf);
567 fill1D(
"HcalDigiTask_tp_ntp_HF_v0",chfv0);
568 fill1D(
"HcalDigiTask_tp_ntp_HF_v1",chfv1);
589 if (!digiCollection.
isValid())
return;
591 if (
subdet_ ==
"HB") isubdet = 1;
592 if (
subdet_ ==
"HE") isubdet = 2;
593 if (
subdet_ ==
"HO") isubdet = 3;
594 if (
subdet_ ==
"HF") isubdet = 4;
603 std::vector<double> v_ampl_c(
maxDepth_[isubdet]+1,0);
610 double emax_Sim = -9999.;
619 if (isubdet != 0 &&
noise_ == 0) {
621 for (std::vector<PCaloHit>::const_iterator simhits = simhitResult->begin(); simhits != simhitResult->end(); ++simhits) {
623 unsigned int id_ = simhits->id();
632 double en = simhits->energy();
634 if (en > emax_Sim && sub == isubdet) {
639 if (
mode_ ==
"multi" &&
640 ((sub == 4 && en < 100. && en > 1.)
641 || ((sub != 4) && en < 1. && en > 0.02))) {
651 if (
mode_ !=
"multi" && emax_Sim > 0.) seedSimHit = 1;
658 for (digiItr = digiCollection->begin(); digiItr != digiCollection->end(); digiItr++) {
661 int depth = cell.depth();
662 int iphi = cell.iphi();
663 int ieta = cell.ieta();
664 int sub = cell.subdet();
666 if(depth >
maxDepth_[isubdet] && sub == isubdet){
667 edm::LogWarning(
"HcalDetId") <<
"HcalDetID presents conflicting information. Depth: " << depth <<
", iphi: " << iphi <<
", ieta: " << ieta <<
". Max depth from geometry is: " <<
maxDepth_[isubdet] <<
". TestNumber = " <<
testNumber_;
672 std::vector<double> v_ampl(
maxDepth_[isubdet]+1,0);
675 if (((
nevent1 == 1 && isubdet == 1) ||
676 (
nevent2 == 1 && isubdet == 2) ||
677 (
nevent3 == 1 && isubdet == 3) ||
678 (
nevent4 == 1 && isubdet == 4)) &&
noise_ == 1 && sub == isubdet) {
686 for (
int i = 0;
i < 4;
i++) {
689 fill1D(
"HcalDigiTask_pedestal_capId" +
str(
i) +
"_Depth" +
str(depth) +
"_" +
subdet_, pedestal->getValue(
i));
694 fill2D(
"HcalDigiTask_pwidthMap_Depth" +
str(depth) +
"_" +
subdet_,
double(ieta),
double(iphi), pedWidth->
getWidth(0));
698 if (sub == isubdet) Ndig++;
702 if (sub == isubdet &&
noise_ == 0) {
709 coder.
adc2fC(*digiItr, tool);
711 double noiseADC = (*digiItr)[0].adc();
712 double noisefC = tool[0];
714 fill1D(
"HcalDigiTask_ADC0_adc_depth" +
str(depth) +
"_" +
subdet_, noiseADC);
719 fill2D(
"HcalDigiTask_ieta_iphi_occupancy_map_depth" +
str(depth) +
"_" +
subdet_,
double(ieta),
double(iphi));
729 if (ieta == ieta_Sim && iphi == iphi_Sim) closen = seedSimHit;
732 int capid = (*digiItr)[
ii].capid();
737 fill1D(
"HcalDigiTask_ADC0_adc_depth" +
str(depth) +
"_" +
subdet_, noiseADC);
738 strtmp =
"HcalDigiTask_all_amplitudes_vs_bin_1D_depth" +
str(depth) +
"_" +
subdet_;
743 strtmp =
"HcalDigiTask_signal_amplitude_vs_bin_all_depths_" +
subdet_;
749 if (isubdet != 4 &&
ii >= 4 &&
ii <= 7) {
760 if (isubdet == 4 &&
ii >= 2 &&
ii <= 4) {
773 strtmp =
"HcalDigiTask_sum_all_amplitudes_" +
subdet_;
774 fill1D(strtmp, v_ampl[0]);
776 std::vector<int> v_ampl_sub(v_ampl.begin() + 1, v_ampl.end());
777 double ampl_max = *std::max_element(v_ampl_sub.begin(),v_ampl_sub.end());
778 if (ampl_max>10.) indigis++;
782 if (v_ampl[1] > 30. && depth == 1 && closen == 1 && isubdet != 4) {
783 double fBin5 = tool[4] - calibrations.
pedestal((*digiItr)[4].capid());
784 double fBin67 = tool[5] + tool[6]
785 - calibrations.
pedestal((*digiItr)[5].capid())
786 - calibrations.
pedestal((*digiItr)[6].capid());
791 strtmp =
"HcalDigiTask_bin_5_frac_" +
subdet_;
793 strtmp =
"HcalDigiTask_bin_6_7_frac_" +
subdet_;
799 if (isubdet == 4 && v_ampl[1] > 30. && depth == 1) {
800 double fBin5 = tool[2] - calibrations.
pedestal((*digiItr)[2].capid());
801 double fBin67 = tool[3] + tool[4]
802 - calibrations.
pedestal((*digiItr)[3].capid())
803 - calibrations.
pedestal((*digiItr)[4].capid());
806 strtmp =
"HcalDigiTask_bin_5_frac_" +
subdet_;
808 strtmp =
"HcalDigiTask_bin_6_7_frac_" +
subdet_;
812 strtmp =
"HcalDigiTask_signal_amplitude_" +
subdet_;
813 fill1D(strtmp, v_ampl[0]);
814 strtmp =
"HcalDigiTask_signal_amplitude_depth" +
str(depth) +
"_" +
subdet_;
815 fill1D(strtmp, v_ampl[depth]);
819 if (isubdet != 0 &&
noise_ == 0) {
820 strtmp =
"HcalDigiTask_number_of_amplitudes_above_10fC_" +
subdet_;
825 std::vector<double> v_ehits(
maxDepth_[isubdet]+1,0);
831 for (std::vector<PCaloHit>::const_iterator simhits = simhitResult->begin(); simhits != simhitResult->end(); ++simhits) {
833 unsigned int id_ = simhits->id();
834 int sub,
depth, ieta, iphi;
843 if(depth >
maxDepth_[isubdet] && sub == isubdet){
844 edm::LogWarning(
"HcalDetId") <<
"HcalDetID(SimHit) presents conflicting information. Depth: " << depth <<
", iphi: " << iphi <<
", ieta: " << ieta <<
". Max depth from geometry is: " <<
maxDepth_[isubdet] <<
". TestNumber = " <<
testNumber_;
850 if (sub == isubdet && ieta == ieta_Sim && iphi == iphi_Sim) {
851 double en = simhits->energy();
854 v_ehits[
depth] += en;
859 strtmp =
"HcalDigiTask_amplitude_vs_simhits_" +
subdet_;
860 if (v_ehits[0] > eps)
fill2D(strtmp, v_ehits[0], v_ampl_c[0]);
862 strtmp =
"HcalDigiTask_amplitude_vs_simhits_depth" +
str(
depth) +
"_" +
subdet_;
866 strtmp =
"HcalDigiTask_amplitude_vs_simhits_profile_" +
subdet_;
867 if (v_ehits[0] > eps)
fillPf(strtmp, v_ehits[0], v_ampl_c[0]);
869 strtmp =
"HcalDigiTask_amplitude_vs_simhits_profile_depth" +
str(
depth) +
"_" +
subdet_;
873 strtmp =
"HcalDigiTask_ratio_amplitude_vs_simhits_" +
subdet_;
874 if (v_ehits[0] > eps)
fill1D(strtmp, v_ampl_c[0] / v_ehits[0]);
876 strtmp =
"HcalDigiTask_amplitude_vs_simhits_profile_depth" +
str(
depth) +
"_" +
subdet_;
878 strtmp =
"HcalDigiTask_ratio_amplitude_vs_simhits_depth" +
str(depth) +
"_" +
subdet_;
879 if (v_ehits[depth] > eps)
fill1D(strtmp, v_ampl_c[depth] / v_ehits[depth]);
885 strtmp =
"HcalDigiTask_Ndigis_" +
subdet_;
886 fill1D(strtmp,
double(Ndig));
908 if (!digiHandle.
isValid())
return;
911 if (
subdet_ ==
"HB") isubdet = 1;
912 if (
subdet_ ==
"HE") isubdet = 2;
913 if (
subdet_ ==
"HO") isubdet = 3;
914 if (
subdet_ ==
"HF") isubdet = 4;
923 std::vector<double> v_ampl_c(
maxDepth_[isubdet]+1,0);
930 double emax_Sim = -9999.;
939 if (isubdet != 0 &&
noise_ == 0) {
941 for (std::vector<PCaloHit>::const_iterator simhits = simhitResult->begin(); simhits != simhitResult->end(); ++simhits) {
943 unsigned int id_ = simhits->id();
952 double en = simhits->energy();
954 if (en > emax_Sim && sub == isubdet) {
959 if (
mode_ ==
"multi" &&
960 ((sub == 4 && en < 100. && en > 1.)
961 || ((sub != 4) && en < 1. && en > 0.02))) {
971 if (
mode_ !=
"multi" && emax_Sim > 0.) seedSimHit = 1;
980 dataFrameType dataFrame = *digiItr;
983 int depth = cell.depth();
984 int iphi = cell.iphi();
985 int ieta = cell.ieta();
986 int sub = cell.subdet();
989 bool isHEP17 = (iphi>=63)&&(iphi<=66)&&(ieta>0)&&(sub == 2);
992 if(depth >
maxDepth_[isubdet] && sub == isubdet){
993 edm::LogWarning(
"HcalDetId") <<
"HcalDetID presents conflicting information. Depth: " << depth <<
", iphi: " << iphi <<
", ieta: " << ieta <<
". Max depth from geometry is: " <<
maxDepth_[isubdet] <<
". TestNumber = " <<
testNumber_;
998 std::vector<double> v_ampl(
maxDepth_[isubdet]+1,0);
1001 if (((
nevent1 == 1 && isubdet == 1) ||
1002 (
nevent2 == 1 && isubdet == 2) ||
1003 (
nevent3 == 1 && isubdet == 3) ||
1004 (
nevent4 == 1 && isubdet == 4)) &&
noise_ == 1 && sub == isubdet) {
1012 for (
int i = 0;
i < 4;
i++) {
1015 fill1D(
"HcalDigiTask_pedestal_capId" +
str(
i) +
"_Depth" +
str(depth) +
"_" +
subdet_, pedestal->getValue(
i));
1020 fill2D(
"HcalDigiTask_pwidthMap_Depth" +
str(depth) +
"_" +
subdet_,
double(ieta),
double(iphi), pedWidth->
getWidth(0));
1025 if (sub == isubdet) Ndig++;
1029 if (sub == isubdet &&
noise_ == 0) {
1036 coder.
adc2fC(dataFrame, tool);
1038 double noiseADC = (dataFrame)[0].
adc();
1039 double noisefC = tool[0];
1041 fill1D(
"HcalDigiTask_ADC0_adc_depth" +
str(depth) +
"_" +
subdet_, noiseADC);
1042 fill1D(
"HcalDigiTask_ADC0_fC_depth" +
str(depth) +
"_" +
subdet_, noisefC);
1046 fill2D(
"HcalDigiTask_ieta_iphi_occupancy_map_depth" +
str(depth) +
"_" +
subdet_,
double(ieta),
double(iphi));
1056 if (ieta == ieta_Sim && iphi == iphi_Sim) closen = seedSimHit;
1059 int capid = (dataFrame)[
ii].capid();
1064 fill1D(
"HcalDigiTask_ADC0_adc_depth" +
str(depth) +
"_" +
subdet_, noiseADC);
1067 strtmp =
"HcalDigiTask_all_amplitudes_vs_bin_1D_depth" +
str(depth) +
"_" +
subdet_;
1070 strtmp =
"HcalDigiTask_all_amplitudes_vs_bin_1D_depth" +
str(depth) +
"_HEP17";
1074 strtmp =
"HcalDigiTask_all_amplitudes_vs_bin_1D_depth" +
str(depth) +
"_" +
subdet_;
1082 strtmp =
"HcalDigiTask_signal_amplitude_vs_bin_all_depths_" +
subdet_;
1085 strtmp =
"HcalDigiTask_signal_amplitude_vs_bin_all_depths_HEP17";
1089 strtmp =
"HcalDigiTask_signal_amplitude_vs_bin_all_depths_" +
subdet_;
1096 if (isubdet != 4 &&
ii >= 4 &&
ii <= 7) {
1107 if (isubdet == 4 &&
ii >= 2 &&
ii <= 4) {
1119 strtmp =
"HcalDigiTask_sum_all_amplitudes_" +
subdet_;
1120 fill1D(strtmp, v_ampl[0]);
1122 std::vector<int> v_ampl_sub(v_ampl.begin() + 1, v_ampl.end());
1123 double ampl_max = *std::max_element(v_ampl_sub.begin(),v_ampl_sub.end());
1124 if (ampl_max>10.) indigis++;
1128 if (v_ampl[1] > 30. && depth == 1 && closen == 1 && isubdet != 4) {
1129 double fBin5 = tool[4] - calibrations.
pedestal((dataFrame)[4].capid());
1130 double fBin67 = tool[5] + tool[6]
1131 - calibrations.
pedestal((dataFrame)[5].capid())
1132 - calibrations.
pedestal((dataFrame)[6].capid());
1135 fBin67 /= v_ampl[1];
1137 strtmp =
"HcalDigiTask_bin_5_frac_" +
subdet_;
1139 strtmp =
"HcalDigiTask_bin_6_7_frac_" +
subdet_;
1145 if (isubdet == 4 && v_ampl[1] > 30. && depth == 1) {
1146 double fBin5 = tool[2] - calibrations.
pedestal((dataFrame)[2].capid());
1147 double fBin67 = tool[3] + tool[4]
1148 - calibrations.
pedestal((dataFrame)[3].capid())
1149 - calibrations.
pedestal((dataFrame)[4].capid());
1151 fBin67 /= v_ampl[1];
1152 strtmp =
"HcalDigiTask_bin_5_frac_" +
subdet_;
1154 strtmp =
"HcalDigiTask_bin_6_7_frac_" +
subdet_;
1161 strtmp =
"HcalDigiTask_signal_amplitude_" +
subdet_;
1162 fill1D(strtmp, v_ampl[0]);
1163 strtmp =
"HcalDigiTask_signal_amplitude_depth" +
str(depth) +
"_" +
subdet_;
1164 fill1D(strtmp, v_ampl[depth]);
1166 strtmp =
"HcalDigiTask_signal_amplitude_HEP17";
1167 fill1D(strtmp, v_ampl[0]);
1168 strtmp =
"HcalDigiTask_signal_amplitude_depth" +
str(depth) +
"_HEP17";
1169 fill1D(strtmp, v_ampl[depth]);
1172 strtmp =
"HcalDigiTask_signal_amplitude_" +
subdet_;
1173 fill1D(strtmp, v_ampl[0]);
1174 strtmp =
"HcalDigiTask_signal_amplitude_depth" +
str(depth) +
"_" +
subdet_;
1175 fill1D(strtmp, v_ampl[depth]);
1180 if (isubdet != 0 &&
noise_ == 0) {
1181 strtmp =
"HcalDigiTask_number_of_amplitudes_above_10fC_" +
subdet_;
1186 std::vector<double> v_ehits(
maxDepth_[isubdet]+1,0);
1192 for (std::vector<PCaloHit>::const_iterator simhits = simhitResult->begin(); simhits != simhitResult->end(); ++simhits) {
1194 unsigned int id_ = simhits->id();
1195 int sub,
depth, ieta, iphi;
1200 depth = hid.
depth();
1204 if(depth >
maxDepth_[isubdet] && sub == isubdet){
1205 edm::LogWarning(
"HcalDetId") <<
"HcalDetID(SimHit) presents conflicting information. Depth: " << depth <<
", iphi: " << iphi <<
", ieta: " << ieta <<
". Max depth from geometry is: " <<
maxDepth_[isubdet] <<
". TestNumber = " <<
testNumber_;
1211 if (sub == isubdet && ieta == ieta_Sim && iphi == iphi_Sim) {
1212 double en = simhits->energy();
1215 v_ehits[
depth] += en;
1220 strtmp =
"HcalDigiTask_amplitude_vs_simhits_" +
subdet_;
1221 if (v_ehits[0] > eps)
fill2D(strtmp, v_ehits[0], v_ampl_c[0]);
1223 strtmp =
"HcalDigiTask_amplitude_vs_simhits_depth" +
str(
depth) +
"_" +
subdet_;
1227 strtmp =
"HcalDigiTask_amplitude_vs_simhits_profile_" +
subdet_;
1228 if (v_ehits[0] > eps)
fillPf(strtmp, v_ehits[0], v_ampl_c[0]);
1230 strtmp =
"HcalDigiTask_amplitude_vs_simhits_profile_depth" +
str(
depth) +
"_" +
subdet_;
1234 strtmp =
"HcalDigiTask_ratio_amplitude_vs_simhits_" +
subdet_;
1235 if (v_ehits[0] > eps)
fill1D(strtmp, v_ampl_c[0] / v_ehits[0]);
1237 strtmp =
"HcalDigiTask_amplitude_vs_simhits_profile_depth" +
str(
depth) +
"_" +
subdet_;
1239 strtmp =
"HcalDigiTask_ratio_amplitude_vs_simhits_depth" +
str(depth) +
"_" +
subdet_;
1240 if (v_ehits[depth] > eps)
fill1D(strtmp, v_ampl_c[depth] / v_ehits[depth]);
1246 strtmp =
"HcalDigiTask_Ndigis_" +
subdet_;
1247 fill1D(strtmp,
double(Ndig));
1262 msm_->find(name)->second->Fill(X, weight);
1270 msm_->find(name)->second->Fill(X, Y, weight);
1282 msm_->find(name)->second->Fill(X, Y);
1286 if (!
msm_->count(name))
return NULL;
1287 else return msm_->find(name)->second;
1291 std::stringstream
out;
int adc(sample_type sample)
get the ADC sample (12 bits)
virtual void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &)
T getParameter(std::string const &) const
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
const HcalGainWidth * getGainWidth(const HcalGenericDetId &fId) const
T getUntrackedParameter(std::string const &, T const &) const
std::vector< PCaloHit > PCaloHitContainer
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
HcalSubdetector subdet() const
get the subdetector
MonitorElement * bookProfile(Args &&...args)
unsigned int getHxSize(const int type) const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
const HcalTopology * htopology
std::vector< HcalTriggerPrimitiveDigi >::const_iterator const_iterator
bool exists(std::string const ¶meterName) const
checks if a parameter exists
edm::InputTag dataTPsTag_
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
const_iterator begin() const
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
edm::EDGetTokenT< QIE11DigiCollection > tok_qie11_hbhe_
edm::EDGetTokenT< QIE10DigiCollection > tok_qie10_hf_
std::map< std::string, MonitorElement * > * msm_
int getMaxDepth(const int type) const
int depth() const
get the tower depth
edm::EDGetTokenT< HBHEDigiCollection > tok_hbhe_
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)
const HcalDDDRecConstants * hcons
virtual void dqmBeginRun(const edm::Run &run, const edm::EventSetup &c)
edm::InputTag QIE10inputTag_
void book2D(DQMStore::IBooker &ib, std::string name, const HistLim &limX, const HistLim &limY)
const_iterator end() const
int iphi() const
get the cell iphi
edm::InputTag emulTPsTag_
edm::EDGetTokenT< HFDigiCollection > 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)
int size() const
get the size
edm::EDGetTokenT< edm::PCaloHitContainer > tok_mc_
edm::EDGetTokenT< HODigiCollection > tok_ho_
void booking(DQMStore::IBooker &ib, std::string subdetopt, int bnoise, int bmc)
const HcalGain * getGain(const HcalGenericDetId &fId) const
float getWidth(int fCapId) const
get width (sqrt(sigma_i_i)) for capId = 0..3
const HcalQIECoder * getHcalCoder(const HcalGenericDetId &fId) const
edm::EDGetTokenT< HcalTrigPrimDigiCollection > tok_emulTPs_
edm::InputTag QIE11inputTag_
const HcalQIEShape * getHcalShape(const HcalGenericDetId &fId) const
const_iterator end() const
edm::EDGetTokenT< HcalTrigPrimDigiCollection > tok_dataTPs_
edm::ESHandle< HcalDbService > conditions
virtual double hcaletValue(const int &ieta, const int &iphi, const int &version, const int &compressedValue) const =0
void book1D(DQMStore::IBooker &ib, std::string name, int n, double min, double max)
DetId relabel(const uint32_t testId) const
const HcalCalibrations & getHcalCalibrations(const HcalGenericDetId &fId) const
const HcalPedestal * getPedestal(const HcalGenericDetId &fId) const
const_iterator begin() const
int firstHFTower(int version) const