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";
119 book1D(ib,
"nevtot", 1, 0, 1);
122 if (
subdet_ ==
"noise") bnoise = 1;
123 if (
mc_ ==
"yes") bmc = 1;
135 HistLim tp_hl_et(260, -10, 250);
136 HistLim tp_hl_ntp(640, -20, 3180);
137 HistLim tp_hl_ntp_sub(404, -20, 2000);
138 HistLim tp_hl_ieta(85, -42.5, 42.5);
139 HistLim tp_hl_iphi(74,-0.5,73.5);
142 book1D(ib,
"HcalDigiTask_tp_et", tp_hl_et);
143 book1D(ib,
"HcalDigiTask_tp_et_v0", tp_hl_et);
144 book1D(ib,
"HcalDigiTask_tp_et_v1", tp_hl_et);
145 book1D(ib,
"HcalDigiTask_tp_et_HB", tp_hl_et);
146 book1D(ib,
"HcalDigiTask_tp_et_HE", tp_hl_et);
147 book1D(ib,
"HcalDigiTask_tp_et_HF", tp_hl_et);
148 book1D(ib,
"HcalDigiTask_tp_et_HF_v0", tp_hl_et);
149 book1D(ib,
"HcalDigiTask_tp_et_HF_v1", tp_hl_et);
150 book1D(ib,
"HcalDigiTask_tp_ntp", tp_hl_ntp);
151 book1D(ib,
"HcalDigiTask_tp_ntp_v0", tp_hl_ntp);
152 book1D(ib,
"HcalDigiTask_tp_ntp_v1", tp_hl_ntp);
153 book1D(ib,
"HcalDigiTask_tp_ntp_HB", tp_hl_ntp_sub);
154 book1D(ib,
"HcalDigiTask_tp_ntp_HE", tp_hl_ntp_sub);
155 book1D(ib,
"HcalDigiTask_tp_ntp_HF", tp_hl_ntp_sub);
156 book1D(ib,
"HcalDigiTask_tp_ntp_HF_v0", tp_hl_ntp_sub);
157 book1D(ib,
"HcalDigiTask_tp_ntp_HF_v1", tp_hl_ntp_sub);
158 book1D(ib,
"HcalDigiTask_tp_ntp_ieta", tp_hl_ieta);
159 book1D(ib,
"HcalDigiTask_tp_ntp_ieta_v0", tp_hl_ieta);
160 book1D(ib,
"HcalDigiTask_tp_ntp_ieta_v1", tp_hl_ieta);
161 book1D(ib,
"HcalDigiTask_tp_ntp_iphi", tp_hl_iphi);
162 book1D(ib,
"HcalDigiTask_tp_ntp_iphi_v0", tp_hl_iphi);
163 book1D(ib,
"HcalDigiTask_tp_ntp_iphi_v1", tp_hl_iphi);
164 book1D(ib,
"HcalDigiTask_tp_ntp_10_ieta", tp_hl_ieta);
165 book1D(ib,
"HcalDigiTask_tp_ntp_10_ieta_v0", tp_hl_ieta);
166 book1D(ib,
"HcalDigiTask_tp_ntp_10_ieta_v1", tp_hl_ieta);
167 book2D(ib,
"HcalDigiTask_tp_et_ieta", tp_hl_ieta, tp_hl_et);
168 book2D(ib,
"HcalDigiTask_tp_et_ieta_v0", tp_hl_ieta, tp_hl_et);
169 book2D(ib,
"HcalDigiTask_tp_et_ieta_v1", tp_hl_ieta, tp_hl_et);
170 book2D(ib,
"HcalDigiTask_tp_ieta_iphi", tp_hl_ieta, tp_hl_iphi);
171 book2D(ib,
"HcalDigiTask_tp_ieta_iphi_v0", tp_hl_ieta, tp_hl_iphi);
172 book2D(ib,
"HcalDigiTask_tp_ieta_iphi_v1", tp_hl_ieta, tp_hl_iphi);
173 bookPf(ib,
"HcalDigiTask_tp_ave_et_ieta", tp_hl_ieta, tp_hl_et,
" ");
174 bookPf(ib,
"HcalDigiTask_tp_ave_et_ieta_v0", tp_hl_ieta, tp_hl_et,
" ");
175 bookPf(ib,
"HcalDigiTask_tp_ave_et_ieta_v1", tp_hl_ieta, tp_hl_et,
" ");
183 HistLim Ndigis(2600, 0., 2600.);
184 HistLim ndigis(520, -20., 1020.);
187 HistLim digiAmp(360, -100., 7100.);
188 HistLim digiAmpWide(360, -10000., 710000.);
190 HistLim sumAmp(100, -500., 1500.);
195 HistLim pedestalfC(400, -10., 30.);
200 HistLim pedWidthLim(100, 0., 2.);
203 HistLim gainWidthLim(160, 0., 0.32);
205 HistLim ietaLim(85, -42.5, 42.5);
206 HistLim iphiLim(74, -0.5, 73.5);
208 HistLim depthLim(15,-0.5,14.5);
210 if (bsubdet ==
"HB") {
212 }
else if (bsubdet ==
"HE") {
215 }
else if (bsubdet ==
"HF") {
217 pedLim =
HistLim(100, 0., 20.);
218 pedWidthLim =
HistLim(100, 0., 5.);
219 frac =
HistLim(400, -4.00, 4.00);
221 }
else if (bsubdet ==
"HO") {
223 gainLim =
HistLim(160, 0., 1.6);
228 if (bsubdet==
"HB") isubdet=1;
229 else if (bsubdet==
"HE") isubdet=2;
230 else if (bsubdet==
"HO") isubdet=3;
231 else if (bsubdet==
"HF") isubdet=4;
232 else edm::LogWarning(
"HcalDigisValidation") <<
"HcalDigisValidation Warning: not HB/HE/HF/HO " << bsubdet << std::endl;
235 const char * sub = bsubdet.c_str();
238 sprintf(histo,
"HcalDigiTask_Ndigis_%s", sub);
239 book1D(ib, histo, Ndigis);
243 sprintf(histo,
"HcalDigiTask_ieta_iphi_occupancy_map_depth%d_%s",
depth, sub);
244 book2D(ib, histo, ietaLim, iphiLim);
248 sprintf(histo,
"HcalDigiTask_depths_%s",sub);
249 book1D(ib,histo, depthLim);
253 sprintf(histo,
"HcalDigiTask_occupancy_vs_ieta_depth%d_%s",
depth, sub);
254 book1D(ib, histo, ietaLim);
259 sprintf(histo,
"HcalDigiTask_sum_all_amplitudes_%s", sub);
260 book1D(ib, histo, sumAmp);
262 sprintf(histo,
"HcalDigiTask_number_of_amplitudes_above_10fC_%s", sub);
263 book1D(ib, histo, ndigis);
266 sprintf(histo,
"HcalDigiTask_ADC0_adc_depth%d_%s",
depth, sub);
267 book1D(ib, histo, pedestal);
271 sprintf(histo,
"HcalDigiTask_ADC0_fC_depth%d_%s",
depth, sub);
272 book1D(ib, histo, pedestalfC);
275 sprintf(histo,
"HcalDigiTask_signal_amplitude_%s", sub);
276 book1D(ib, histo, digiAmp);
278 if(
hep17_ && bsubdet==
"HE"){
279 sprintf(histo,
"HcalDigiTask_signal_amplitude_HEP17");
280 book1D(ib, histo, digiAmpWide);
284 sprintf(histo,
"HcalDigiTask_signal_amplitude_depth%d_%s",
depth, sub);
285 book1D(ib, histo, digiAmp);
286 if(
hep17_ && bsubdet==
"HE"){
287 sprintf(histo,
"HcalDigiTask_signal_amplitude_depth%d_HEP17",
depth);
288 book1D(ib, histo, digiAmpWide);
292 sprintf(histo,
"HcalDigiTask_signal_amplitude_vs_bin_all_depths_%s", sub);
293 book2D(ib, histo, nbin, digiAmp);
294 if(
hep17_ && bsubdet==
"HE"){
295 sprintf(histo,
"HcalDigiTask_signal_amplitude_vs_bin_all_depths_HEP17");
296 book2D(ib, histo, nbin, digiAmpWide);
300 sprintf(histo,
"HcalDigiTask_all_amplitudes_vs_bin_1D_depth%d_%s",
depth, sub);
302 if(
hep17_ && bsubdet==
"HE"){
303 sprintf(histo,
"HcalDigiTask_all_amplitudes_vs_bin_1D_depth%d_HEP17",
depth);
308 sprintf(histo,
"HcalDigiTask_SOI_frac_%s", sub);
310 sprintf(histo,
"HcalDigiTask_postSOI_frac_%s", sub);
314 sprintf(histo,
"HcalDigiTask_amplitude_vs_simhits_%s", sub);
315 book2D(ib, histo, sime, digiAmp);
317 sprintf(histo,
"HcalDigiTask_amplitude_vs_simhits_depth%d_%s",
depth, sub);
318 book2D(ib, histo, sime, digiAmp);
321 sprintf(histo,
"HcalDigiTask_amplitude_vs_simhits_profile_%s", sub);
322 bookPf(ib, histo, sime, digiAmp);
324 sprintf(histo,
"HcalDigiTask_amplitude_vs_simhits_profile_depth%d_%s",
depth, sub);
325 bookPf(ib, histo, sime, digiAmp);
328 sprintf(histo,
"HcalDigiTask_ratio_amplitude_vs_simhits_%s", sub);
331 sprintf(histo,
"HcalDigiTask_ratio_amplitude_vs_simhits_depth%d_%s",
depth, sub);
342 sprintf(histo,
"HcalDigiTask_gain_capId0_Depth%d_%s",
depth, sub);
343 book1D(ib, histo, gainLim);
344 sprintf(histo,
"HcalDigiTask_gain_capId1_Depth%d_%s",
depth, sub);
345 book1D(ib, histo, gainLim);
346 sprintf(histo,
"HcalDigiTask_gain_capId2_Depth%d_%s",
depth, sub);
347 book1D(ib, histo, gainLim);
348 sprintf(histo,
"HcalDigiTask_gain_capId3_Depth%d_%s",
depth, sub);
349 book1D(ib, histo, gainLim);
351 sprintf(histo,
"HcalDigiTask_gainWidth_capId0_Depth%d_%s",
depth, sub);
352 book1D(ib, histo, gainWidthLim);
353 sprintf(histo,
"HcalDigiTask_gainWidth_capId1_Depth%d_%s",
depth, sub);
354 book1D(ib, histo, gainWidthLim);
355 sprintf(histo,
"HcalDigiTask_gainWidth_capId2_Depth%d_%s",
depth, sub);
356 book1D(ib, histo, gainWidthLim);
357 sprintf(histo,
"HcalDigiTask_gainWidth_capId3_Depth%d_%s",
depth, sub);
358 book1D(ib, histo, gainWidthLim);
360 sprintf(histo,
"HcalDigiTask_pedestal_capId0_Depth%d_%s",
depth, sub);
361 book1D(ib, histo, pedLim);
362 sprintf(histo,
"HcalDigiTask_pedestal_capId1_Depth%d_%s",
depth, sub);
363 book1D(ib, histo, pedLim);
364 sprintf(histo,
"HcalDigiTask_pedestal_capId2_Depth%d_%s",
depth, sub);
365 book1D(ib, histo, pedLim);
366 sprintf(histo,
"HcalDigiTask_pedestal_capId3_Depth%d_%s",
depth, sub);
367 book1D(ib, histo, pedLim);
369 sprintf(histo,
"HcalDigiTask_pedestal_width_capId0_Depth%d_%s",
depth, sub);
370 book1D(ib, histo, pedWidthLim);
371 sprintf(histo,
"HcalDigiTask_pedestal_width_capId1_Depth%d_%s",
depth, sub);
372 book1D(ib, histo, pedWidthLim);
373 sprintf(histo,
"HcalDigiTask_pedestal_width_capId2_Depth%d_%s",
depth, sub);
374 book1D(ib, histo, pedWidthLim);
375 sprintf(histo,
"HcalDigiTask_pedestal_width_capId3_Depth%d_%s",
depth, sub);
376 book1D(ib, histo, pedWidthLim);
382 sprintf(histo,
"HcalDigiTask_gainMap_Depth%d_%s",
depth, sub);
383 book2D(ib, histo, ietaLim, iphiLim);
384 sprintf(histo,
"HcalDigiTask_pwidthMap_Depth%d_%s",
depth, sub);
385 book2D(ib, histo, ietaLim, iphiLim);
465 int c = 0, cv0 = 0, cv1 = 0, chb = 0, che = 0, chf = 0, chfv0 = 0, chfv1 = 0;
470 int ieta = itr->id().ieta();
471 int iphi = itr->id().iphi();
476 if (
abs(ieta) <= 16 )
480 else if (
abs(ieta) <= 42 )
487 float en = decoder->
hcaletValue(itr->id(), itr->t0());
489 if (en < 0.00001)
continue;
496 fill1D(
"HcalDigiTask_tp_et",en);
497 fill2D(
"HcalDigiTask_tp_et_ieta",ieta,en);
498 fill2D(
"HcalDigiTask_tp_ieta_iphi",ieta,iphi);
499 fillPf(
"HcalDigiTask_tp_ave_et_ieta",ieta,en);
500 fill1D(
"HcalDigiTask_tp_ntp_ieta",ieta);
501 fill1D(
"HcalDigiTask_tp_ntp_iphi",iphi);
502 if ( en > 10. )
fill1D(
"HcalDigiTask_tp_ntp_10_ieta",ieta);
506 fill1D(
"HcalDigiTask_tp_et_v0",en);
507 fill2D(
"HcalDigiTask_tp_et_ieta_v0",ieta,en);
508 fill2D(
"HcalDigiTask_tp_ieta_iphi_v0",ieta,iphi);
509 fillPf(
"HcalDigiTask_tp_ave_et_ieta_v0",ieta,en);
510 fill1D(
"HcalDigiTask_tp_ntp_ieta_v0",ieta);
511 fill1D(
"HcalDigiTask_tp_ntp_iphi_v0",iphi);
512 if ( en > 10. )
fill1D(
"HcalDigiTask_tp_ntp_10_ieta_v0",ieta);
517 fill1D(
"HcalDigiTask_tp_et_v1",en);
518 fill2D(
"HcalDigiTask_tp_et_ieta_v1",ieta,en);
519 fill2D(
"HcalDigiTask_tp_ieta_iphi_v1",ieta,iphi);
520 fillPf(
"HcalDigiTask_tp_ave_et_ieta_v1",ieta,en);
521 fill1D(
"HcalDigiTask_tp_ntp_ieta_v1",ieta);
522 fill1D(
"HcalDigiTask_tp_ntp_iphi_v1",iphi);
523 if ( en > 10. )
fill1D(
"HcalDigiTask_tp_ntp_10_ieta_v1",ieta);
528 fill1D(
"HcalDigiTask_tp_et_HB",en);
534 fill1D(
"HcalDigiTask_tp_et_HE",en);
540 fill1D(
"HcalDigiTask_tp_et_HF",en);
544 fill1D(
"HcalDigiTask_tp_et_HF_v0",en);
550 fill1D(
"HcalDigiTask_tp_et_HF_v1",en);
559 fill1D(
"HcalDigiTask_tp_ntp",c);
560 fill1D(
"HcalDigiTask_tp_ntp_v0",cv0);
561 fill1D(
"HcalDigiTask_tp_ntp_v1",cv1);
562 fill1D(
"HcalDigiTask_tp_ntp_HB",chb);
563 fill1D(
"HcalDigiTask_tp_ntp_HE",che);
564 fill1D(
"HcalDigiTask_tp_ntp_HF",chf);
565 fill1D(
"HcalDigiTask_tp_ntp_HF_v0",chfv0);
566 fill1D(
"HcalDigiTask_tp_ntp_HF_v1",chfv1);
587 if (!digiCollection.
isValid())
return;
589 if (
subdet_ ==
"HB") isubdet = 1;
590 if (
subdet_ ==
"HE") isubdet = 2;
591 if (
subdet_ ==
"HO") isubdet = 3;
592 if (
subdet_ ==
"HF") isubdet = 4;
601 std::vector<double> v_ampl_c(
maxDepth_[isubdet]+1,0);
608 double emax_Sim = -9999.;
617 if (isubdet != 0 &&
noise_ == 0) {
619 for (std::vector<PCaloHit>::const_iterator simhits = simhitResult->begin(); simhits != simhitResult->end(); ++simhits) {
621 unsigned int id_ = simhits->id();
630 double en = simhits->energy();
632 if (en > emax_Sim && sub == isubdet) {
637 if (
mode_ ==
"multi" &&
638 ((sub == 4 && en < 100. && en > 1.)
639 || ((sub != 4) && en < 1. && en > 0.02))) {
649 if (
mode_ !=
"multi" && emax_Sim > 0.) seedSimHit = 1;
656 for (digiItr = digiCollection->begin(); digiItr != digiCollection->end(); digiItr++) {
659 int depth = cell.depth();
660 int iphi = cell.iphi();
661 int ieta = cell.ieta();
662 int sub = cell.subdet();
664 if(depth >
maxDepth_[isubdet] && sub == isubdet){
665 edm::LogWarning(
"HcalDetId") <<
"HcalDetID presents conflicting information. Depth: " << depth <<
", iphi: " << iphi <<
", ieta: " << ieta <<
". Max depth from geometry is: " <<
maxDepth_[isubdet] <<
". TestNumber = " <<
testNumber_;
670 std::vector<double> v_ampl(
maxDepth_[isubdet]+1,0);
673 if (((
nevent1 == 1 && isubdet == 1) ||
674 (
nevent2 == 1 && isubdet == 2) ||
675 (
nevent3 == 1 && isubdet == 3) ||
676 (
nevent4 == 1 && isubdet == 4)) &&
noise_ == 1 && sub == isubdet) {
684 for (
int i = 0;
i < 4;
i++) {
687 fill1D(
"HcalDigiTask_pedestal_capId" +
str(
i) +
"_Depth" +
str(depth) +
"_" +
subdet_, pedestal->getValue(
i));
692 fill2D(
"HcalDigiTask_pwidthMap_Depth" +
str(depth) +
"_" +
subdet_,
double(ieta),
double(iphi), pedWidth->
getWidth(0));
696 if (sub == isubdet) Ndig++;
700 if (sub == isubdet &&
noise_ == 0) {
707 coder.
adc2fC(*digiItr, tool);
709 double noiseADC = (*digiItr)[0].adc();
710 double noisefC = tool[0];
712 fill1D(
"HcalDigiTask_ADC0_adc_depth" +
str(depth) +
"_" +
subdet_, noiseADC);
717 fill2D(
"HcalDigiTask_ieta_iphi_occupancy_map_depth" +
str(depth) +
"_" +
subdet_,
double(ieta),
double(iphi));
727 if (ieta == ieta_Sim && iphi == iphi_Sim) closen = seedSimHit;
730 int capid = (*digiItr)[
ii].capid();
735 fill1D(
"HcalDigiTask_ADC0_adc_depth" +
str(depth) +
"_" +
subdet_, noiseADC);
736 strtmp =
"HcalDigiTask_all_amplitudes_vs_bin_1D_depth" +
str(depth) +
"_" +
subdet_;
741 strtmp =
"HcalDigiTask_signal_amplitude_vs_bin_all_depths_" +
subdet_;
747 if (isubdet != 4 &&
ii >= 4 &&
ii <= 7) {
758 if (isubdet == 4 &&
ii >= 2 &&
ii <= 4) {
771 strtmp =
"HcalDigiTask_sum_all_amplitudes_" +
subdet_;
772 fill1D(strtmp, v_ampl[0]);
774 std::vector<int> v_ampl_sub(v_ampl.begin() + 1, v_ampl.end());
775 double ampl_max = *std::max_element(v_ampl_sub.begin(),v_ampl_sub.end());
776 if (ampl_max>10.) indigis++;
780 if (v_ampl[1] > 30. && depth == 1) {
782 int lastbin = tool.
size() - 1;
784 double fbinSOI = tool[soi] - calibrations.
pedestal((*digiItr)[soi].capid());
787 for(
int j = soi+1; j <= lastbin; j++) fbinPS += tool[j] - calibrations.
pedestal((*digiItr)[j].capid());
789 fbinSOI /= v_ampl[1];
791 strtmp =
"HcalDigiTask_SOI_frac_" +
subdet_;
793 strtmp =
"HcalDigiTask_postSOI_frac_" +
subdet_;
797 strtmp =
"HcalDigiTask_signal_amplitude_" +
subdet_;
798 fill1D(strtmp, v_ampl[0]);
799 strtmp =
"HcalDigiTask_signal_amplitude_depth" +
str(depth) +
"_" +
subdet_;
800 fill1D(strtmp, v_ampl[depth]);
804 if (isubdet != 0 &&
noise_ == 0) {
805 strtmp =
"HcalDigiTask_number_of_amplitudes_above_10fC_" +
subdet_;
810 std::vector<double> v_ehits(
maxDepth_[isubdet]+1,0);
816 for (std::vector<PCaloHit>::const_iterator simhits = simhitResult->begin(); simhits != simhitResult->end(); ++simhits) {
818 unsigned int id_ = simhits->id();
819 int sub,
depth, ieta, iphi;
828 if(depth >
maxDepth_[isubdet] && sub == isubdet){
829 edm::LogWarning(
"HcalDetId") <<
"HcalDetID(SimHit) presents conflicting information. Depth: " << depth <<
", iphi: " << iphi <<
", ieta: " << ieta <<
". Max depth from geometry is: " <<
maxDepth_[isubdet] <<
". TestNumber = " <<
testNumber_;
835 if (sub == isubdet && ieta == ieta_Sim && iphi == iphi_Sim) {
836 double en = simhits->energy();
839 v_ehits[
depth] += en;
844 strtmp =
"HcalDigiTask_amplitude_vs_simhits_" +
subdet_;
845 if (v_ehits[0] > eps)
fill2D(strtmp, v_ehits[0], v_ampl_c[0]);
847 strtmp =
"HcalDigiTask_amplitude_vs_simhits_depth" +
str(
depth) +
"_" +
subdet_;
851 strtmp =
"HcalDigiTask_amplitude_vs_simhits_profile_" +
subdet_;
852 if (v_ehits[0] > eps)
fillPf(strtmp, v_ehits[0], v_ampl_c[0]);
854 strtmp =
"HcalDigiTask_amplitude_vs_simhits_profile_depth" +
str(
depth) +
"_" +
subdet_;
858 strtmp =
"HcalDigiTask_ratio_amplitude_vs_simhits_" +
subdet_;
859 if (v_ehits[0] > eps)
fill1D(strtmp, v_ampl_c[0] / v_ehits[0]);
861 strtmp =
"HcalDigiTask_amplitude_vs_simhits_profile_depth" +
str(
depth) +
"_" +
subdet_;
863 strtmp =
"HcalDigiTask_ratio_amplitude_vs_simhits_depth" +
str(depth) +
"_" +
subdet_;
864 if (v_ehits[depth] > eps)
fill1D(strtmp, v_ampl_c[depth] / v_ehits[depth]);
870 strtmp =
"HcalDigiTask_Ndigis_" +
subdet_;
871 fill1D(strtmp,
double(Ndig));
893 if (!digiHandle.
isValid())
return;
896 if (
subdet_ ==
"HB") isubdet = 1;
897 if (
subdet_ ==
"HE") isubdet = 2;
898 if (
subdet_ ==
"HO") isubdet = 3;
899 if (
subdet_ ==
"HF") isubdet = 4;
908 std::vector<double> v_ampl_c(
maxDepth_[isubdet]+1,0);
915 double emax_Sim = -9999.;
924 if (isubdet != 0 &&
noise_ == 0) {
926 for (std::vector<PCaloHit>::const_iterator simhits = simhitResult->begin(); simhits != simhitResult->end(); ++simhits) {
928 unsigned int id_ = simhits->id();
937 double en = simhits->energy();
939 if (en > emax_Sim && sub == isubdet) {
944 if (
mode_ ==
"multi" &&
945 ((sub == 4 && en < 100. && en > 1.)
946 || ((sub != 4) && en < 1. && en > 0.02))) {
956 if (
mode_ !=
"multi" && emax_Sim > 0.) seedSimHit = 1;
965 dataFrameType dataFrame = *digiItr;
968 int depth = cell.depth();
969 int iphi = cell.iphi();
970 int ieta = cell.ieta();
971 int sub = cell.subdet();
974 bool isHEP17 = (iphi>=63)&&(iphi<=66)&&(ieta>0)&&(sub == 2);
977 if(depth >
maxDepth_[isubdet] && sub == isubdet){
978 edm::LogWarning(
"HcalDetId") <<
"HcalDetID presents conflicting information. Depth: " << depth <<
", iphi: " << iphi <<
", ieta: " << ieta <<
". Max depth from geometry is: " <<
maxDepth_[isubdet] <<
". TestNumber = " <<
testNumber_;
983 std::vector<double> v_ampl(
maxDepth_[isubdet]+1,0);
986 if (((
nevent1 == 1 && isubdet == 1) ||
987 (
nevent2 == 1 && isubdet == 2) ||
988 (
nevent3 == 1 && isubdet == 3) ||
989 (
nevent4 == 1 && isubdet == 4)) &&
noise_ == 1 && sub == isubdet) {
997 for (
int i = 0;
i < 4;
i++) {
1000 fill1D(
"HcalDigiTask_pedestal_capId" +
str(
i) +
"_Depth" +
str(depth) +
"_" +
subdet_, pedestal->getValue(
i));
1005 fill2D(
"HcalDigiTask_pwidthMap_Depth" +
str(depth) +
"_" +
subdet_,
double(ieta),
double(iphi), pedWidth->
getWidth(0));
1010 if (sub == isubdet) Ndig++;
1014 if (sub == isubdet &&
noise_ == 0) {
1021 coder.
adc2fC(dataFrame, tool);
1023 double noiseADC = (dataFrame)[0].
adc();
1024 double noisefC = tool[0];
1026 fill1D(
"HcalDigiTask_ADC0_adc_depth" +
str(depth) +
"_" +
subdet_, noiseADC);
1027 fill1D(
"HcalDigiTask_ADC0_fC_depth" +
str(depth) +
"_" +
subdet_, noisefC);
1031 fill2D(
"HcalDigiTask_ieta_iphi_occupancy_map_depth" +
str(depth) +
"_" +
subdet_,
double(ieta),
double(iphi));
1041 if (ieta == ieta_Sim && iphi == iphi_Sim) closen = seedSimHit;
1044 int capid = (dataFrame)[
ii].capid();
1049 fill1D(
"HcalDigiTask_ADC0_adc_depth" +
str(depth) +
"_" +
subdet_, noiseADC);
1052 strtmp =
"HcalDigiTask_all_amplitudes_vs_bin_1D_depth" +
str(depth) +
"_" +
subdet_;
1055 strtmp =
"HcalDigiTask_all_amplitudes_vs_bin_1D_depth" +
str(depth) +
"_HEP17";
1059 strtmp =
"HcalDigiTask_all_amplitudes_vs_bin_1D_depth" +
str(depth) +
"_" +
subdet_;
1067 strtmp =
"HcalDigiTask_signal_amplitude_vs_bin_all_depths_" +
subdet_;
1070 strtmp =
"HcalDigiTask_signal_amplitude_vs_bin_all_depths_HEP17";
1074 strtmp =
"HcalDigiTask_signal_amplitude_vs_bin_all_depths_" +
subdet_;
1081 if (isubdet != 4 &&
ii >= 4 &&
ii <= 7) {
1092 if (isubdet == 4 &&
ii >= 2 &&
ii <= 4) {
1104 strtmp =
"HcalDigiTask_sum_all_amplitudes_" +
subdet_;
1105 fill1D(strtmp, v_ampl[0]);
1107 std::vector<int> v_ampl_sub(v_ampl.begin() + 1, v_ampl.end());
1108 double ampl_max = *std::max_element(v_ampl_sub.begin(),v_ampl_sub.end());
1109 if (ampl_max>10.) indigis++;
1114 if (v_ampl[1] > 30. && depth == 1) {
1116 int lastbin = tool.
size() - 1;
1118 double fbinSOI = tool[soi] - calibrations.
pedestal((dataFrame)[soi].capid());
1121 for(
int j = soi+1; j <= lastbin; j++) fbinPS += tool[j] - calibrations.
pedestal((dataFrame)[j].capid());
1124 fbinSOI /= v_ampl[1];
1125 fbinPS /= v_ampl[1];
1126 strtmp =
"HcalDigiTask_SOI_frac_" +
subdet_;
1128 strtmp =
"HcalDigiTask_postSOI_frac_" +
subdet_;
1135 strtmp =
"HcalDigiTask_signal_amplitude_" +
subdet_;
1136 fill1D(strtmp, v_ampl[0]);
1137 strtmp =
"HcalDigiTask_signal_amplitude_depth" +
str(depth) +
"_" +
subdet_;
1138 fill1D(strtmp, v_ampl[depth]);
1140 strtmp =
"HcalDigiTask_signal_amplitude_HEP17";
1141 fill1D(strtmp, v_ampl[0]);
1142 strtmp =
"HcalDigiTask_signal_amplitude_depth" +
str(depth) +
"_HEP17";
1143 fill1D(strtmp, v_ampl[depth]);
1146 strtmp =
"HcalDigiTask_signal_amplitude_" +
subdet_;
1147 fill1D(strtmp, v_ampl[0]);
1148 strtmp =
"HcalDigiTask_signal_amplitude_depth" +
str(depth) +
"_" +
subdet_;
1149 fill1D(strtmp, v_ampl[depth]);
1154 if (isubdet != 0 &&
noise_ == 0) {
1155 strtmp =
"HcalDigiTask_number_of_amplitudes_above_10fC_" +
subdet_;
1160 std::vector<double> v_ehits(
maxDepth_[isubdet]+1,0);
1166 for (std::vector<PCaloHit>::const_iterator simhits = simhitResult->begin(); simhits != simhitResult->end(); ++simhits) {
1168 unsigned int id_ = simhits->id();
1169 int sub,
depth, ieta, iphi;
1174 depth = hid.
depth();
1178 if(depth >
maxDepth_[isubdet] && sub == isubdet){
1179 edm::LogWarning(
"HcalDetId") <<
"HcalDetID(SimHit) presents conflicting information. Depth: " << depth <<
", iphi: " << iphi <<
", ieta: " << ieta <<
". Max depth from geometry is: " <<
maxDepth_[isubdet] <<
". TestNumber = " <<
testNumber_;
1185 if (sub == isubdet && ieta == ieta_Sim && iphi == iphi_Sim) {
1186 double en = simhits->energy();
1189 v_ehits[
depth] += en;
1194 strtmp =
"HcalDigiTask_amplitude_vs_simhits_" +
subdet_;
1195 if (v_ehits[0] > eps)
fill2D(strtmp, v_ehits[0], v_ampl_c[0]);
1197 strtmp =
"HcalDigiTask_amplitude_vs_simhits_depth" +
str(
depth) +
"_" +
subdet_;
1201 strtmp =
"HcalDigiTask_amplitude_vs_simhits_profile_" +
subdet_;
1202 if (v_ehits[0] > eps)
fillPf(strtmp, v_ehits[0], v_ampl_c[0]);
1204 strtmp =
"HcalDigiTask_amplitude_vs_simhits_profile_depth" +
str(
depth) +
"_" +
subdet_;
1208 strtmp =
"HcalDigiTask_ratio_amplitude_vs_simhits_" +
subdet_;
1209 if (v_ehits[0] > eps)
fill1D(strtmp, v_ampl_c[0] / v_ehits[0]);
1211 strtmp =
"HcalDigiTask_amplitude_vs_simhits_profile_depth" +
str(
depth) +
"_" +
subdet_;
1213 strtmp =
"HcalDigiTask_ratio_amplitude_vs_simhits_depth" +
str(depth) +
"_" +
subdet_;
1214 if (v_ehits[depth] > eps)
fill1D(strtmp, v_ampl_c[depth] / v_ehits[depth]);
1220 strtmp =
"HcalDigiTask_Ndigis_" +
subdet_;
1221 fill1D(strtmp,
double(Ndig));
1236 msm_->find(name)->second->Fill(X, weight);
1244 msm_->find(name)->second->Fill(X, Y, weight);
1256 msm_->find(name)->second->Fill(X, Y);
1260 if (!
msm_->count(name))
return NULL;
1261 else return msm_->find(name)->second;
1265 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
int presamples() const
access presample information
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