12 edm::LogInfo(
"OutputInfo") <<
" Hcal RecHit Task histograms will NOT be saved";
48 if (eventype_ ==
"multi")
etype_ = 2;
51 if(sign_ ==
"-")
iz = -1;
52 if(sign_ ==
"*")
iz = 0;
55 if(mc_ ==
"no")
imc = 0;
72 sprintf (histo,
"N_HB" );
73 Nhb = ib.
book1D(histo, histo, 2600,0.,2600.);
74 sprintf (histo,
"N_HE" );
75 Nhe = ib.
book1D(histo, histo, 2600,0.,2600.);
76 sprintf (histo,
"N_HO" );
77 Nho = ib.
book1D(histo, histo, 2200,0.,2200.);
78 sprintf (histo,
"N_HF" );
79 Nhf = ib.
book1D(histo, histo, 1800,0., 1800.);
84 for (
unsigned int i1 = 0; i1 < 82; i1++) {
85 for (
unsigned int i2 = 0; i2 < 72; i2++) {
86 for (
unsigned int i3 = 0; i3 < 4; i3++) {
87 for (
unsigned int i4 = 0; i4 < 4; i4++) {
96 sprintf (histo,
"ZSmin_map_depth1" );
98 sprintf (histo,
"ZSmin_map_depth2" );
100 sprintf (histo,
"ZSmin_map_depth3" );
102 sprintf (histo,
"ZSmin_map_depth4" );
106 sprintf (histo,
"ZS_Nreco_HB1" );
108 sprintf (histo,
"ZS_Nreco_HB2" );
110 sprintf (histo,
"ZS_Nreco_HE1" );
112 sprintf (histo,
"ZS_Nreco_HE2" );
114 sprintf (histo,
"ZS_Nreco_HE3" );
116 sprintf (histo,
"ZS_Nreco_HO" );
118 sprintf (histo,
"ZS_Nreco_HF1" );
120 sprintf (histo,
"ZS_Nreco_HF2" );
123 sprintf (histo,
"ZSmin_simple1D_HB1" );
125 sprintf (histo,
"ZSmin_simple1D_HB2" );
127 sprintf (histo,
"ZSmin_simple1D_HE1" );
129 sprintf (histo,
"ZSmin_simple1D_HE2" );
131 sprintf (histo,
"ZSmin_simple1D_HE3" );
133 sprintf (histo,
"ZSmin_simple1D_HO" );
135 sprintf (histo,
"ZSmin_simple1D_HF1" );
137 sprintf (histo,
"ZSmin_simple1D_HF2" );
140 sprintf (histo,
"ZSmin_sequential1D_HB1" );
142 sprintf (histo,
"ZSmin_sequential1D_HB2" );
144 sprintf (histo,
"ZSmin_sequential1D_HE1" );
146 sprintf (histo,
"ZSmin_sequential1D_HE2" );
148 sprintf (histo,
"ZSmin_sequential1D_HE3" );
150 sprintf (histo,
"ZSmin_sequential1D_HO" );
152 sprintf (histo,
"ZSmin_sequential1D_HF1" );
154 sprintf (histo,
"ZSmin_sequential1D_HF2" );
162 sprintf (histo,
"emap_depth1" );
164 sprintf (histo,
"emap_depth2" );
166 sprintf (histo,
"emap_depth3" );
168 sprintf (histo,
"emap_depth4" );
174 sprintf (histo,
"map_ecal" );
175 map_ecal = ib.
book2D(histo, histo, 70, -3.045, 3.045, 72, -3.1415926536, 3.1415926536);
180 sprintf (histo,
"emean_vs_ieta_HB1" );
182 sprintf (histo,
"emean_vs_ieta_HB2" );
184 sprintf (histo,
"emean_vs_ieta_HE1" );
186 sprintf (histo,
"emean_vs_ieta_HE2" );
188 sprintf (histo,
"emean_vs_ieta_HE3" );
190 sprintf (histo,
"emean_vs_ieta_HO" );
192 sprintf (histo,
"emean_vs_ieta_HF1" );
194 sprintf (histo,
"emean_vs_ieta_HF2" );
198 sprintf (histo,
"RMS_vs_ieta_HB1" );
200 sprintf (histo,
"RMS_vs_ieta_HB2" );
202 sprintf (histo,
"RMS_vs_ieta_HE1" );
204 sprintf (histo,
"RMS_vs_ieta_HE2" );
206 sprintf (histo,
"RMS_vs_ieta_HE3" );
208 sprintf (histo,
"RMS_vs_ieta_HO" );
210 sprintf (histo,
"RMS_vs_ieta_HF1" );
212 sprintf (histo,
"RMS_vs_ieta_HF2" );
216 sprintf (histo,
"emean_seq_HB1" );
218 sprintf (histo,
"emean_seq_HB2" );
220 sprintf (histo,
"emean_seq_HE1" );
222 sprintf (histo,
"emean_seq_HE2" );
224 sprintf (histo,
"emean_seq_HE3" );
226 sprintf (histo,
"emean_seq_HO" );
228 sprintf (histo,
"emean_seq_HF1" );
230 sprintf (histo,
"emean_seq_HF2" );
233 sprintf (histo,
"RMS_seq_HB1" );
235 sprintf (histo,
"RMS_seq_HB2" );
237 sprintf (histo,
"RMS_seq_HE1" );
239 sprintf (histo,
"RMS_seq_HE2" );
241 sprintf (histo,
"RMS_seq_HE3" );
243 sprintf (histo,
"RMS_seq_HO" );
245 sprintf (histo,
"RMS_seq_HF1" );
247 sprintf (histo,
"RMS_seq_HF2" );
253 sprintf (histo,
"occupancy_map_HB1" );
255 sprintf (histo,
"occupancy_map_HB2" );
257 sprintf (histo,
"occupancy_map_HE1" );
259 sprintf (histo,
"occupancy_map_HE2" );
261 sprintf (histo,
"occupancy_map_HE3" );
263 sprintf (histo,
"occupancy_map_HO" );
265 sprintf (histo,
"occupancy_map_HF1" );
267 sprintf (histo,
"occupancy_map_HF2" );
271 sprintf (histo,
"occupancy_vs_ieta_HB1" );
273 sprintf (histo,
"occupancy_vs_ieta_HB2" );
275 sprintf (histo,
"occupancy_vs_ieta_HE1" );
277 sprintf (histo,
"occupancy_vs_ieta_HE2" );
279 sprintf (histo,
"occupancy_vs_ieta_HE3" );
281 sprintf (histo,
"occupancy_vs_ieta_HO" );
283 sprintf (histo,
"occupancy_vs_ieta_HF1" );
285 sprintf (histo,
"occupancy_vs_ieta_HF2" );
290 sprintf (histo,
"occ_sequential1D_HB1" );
292 sprintf (histo,
"occ_sequential1D_HB2" );
294 sprintf (histo,
"occ_sequential1D_HE1" );
296 sprintf (histo,
"occ_sequential1D_HE2" );
298 sprintf (histo,
"occ_sequential1D_HE3" );
300 sprintf (histo,
"occ_sequential1D_HO" );
302 sprintf (histo,
"occ_sequential1D_HF1" );
304 sprintf (histo,
"occ_sequential1D_HF2" );
309 sprintf (histo,
"HcalRecHitTask_RecHit_StatusWord_HB" ) ;
312 sprintf (histo,
"HcalRecHitTask_RecHit_StatusWord_HE" ) ;
315 sprintf (histo,
"HcalRecHitTask_RecHit_StatusWord_HF" ) ;
319 sprintf (histo,
"HcalRecHitTask_RecHit_StatusWord_HF67" ) ;
322 sprintf (histo,
"HcalRecHitTask_RecHit_StatusWord_HO" ) ;
326 sprintf (histo,
"HcalRecHitTask_RecHit_Aux_StatusWord_HB" ) ;
329 sprintf (histo,
"HcalRecHitTask_RecHit_Aux_StatusWord_HE" ) ;
332 sprintf (histo,
"HcalRecHitTask_RecHit_Aux_StatusWord_HF" ) ;
335 sprintf (histo,
"HcalRecHitTask_RecHit_Aux_StatusWord_HO" ) ;
339 sprintf (histo,
"HcalRecHitTask_RecHit_StatusWordCorr_HB");
342 sprintf (histo,
"HcalRecHitTask_RecHit_StatusWordCorr_HE");
346 sprintf (histo,
"map_econe_depth1" );
348 ib.
book2D(histo, histo, 520, -5.2, 5.2, 72, -3.1415926536, 3.1415926536);
349 sprintf (histo,
"map_econe_depth2" );
351 ib.
book2D(histo, histo, 520, -5.2, 5.2, 72, -3.1415926536, 3.1415926536);
352 sprintf (histo,
"map_econe_depth3" );
354 ib.
book2D(histo, histo, 520, -5.2, 5.2, 72, -3.1415926536, 3.1415926536);
355 sprintf (histo,
"map_econe_depth4" );
357 ib.
book2D(histo, histo, 520, -5.2, 5.2, 72, -3.1415926536, 3.1415926536);
365 sprintf (histo,
"HcalRecHitTask_En_rechits_cone_profile_vs_ieta_all_depths");
368 sprintf (histo,
"HcalRecHitTask_En_rechits_cone_profile_vs_ieta_all_depths_E");
371 sprintf (histo,
"HcalRecHitTask_En_rechits_cone_profile_vs_ieta_all_depths_EH");
380 sprintf (histo,
"HcalRecHitTask_En_rechits_cone_profile_vs_ieta_depth1");
383 sprintf (histo,
"HcalRecHitTask_En_rechits_cone_profile_vs_ieta_depth2");
386 sprintf (histo,
"HcalRecHitTask_En_rechits_cone_profile_vs_ieta_depth3");
389 sprintf (histo,
"HcalRecHitTask_En_rechits_cone_profile_vs_ieta_depth4");
396 sprintf (histo,
"Delta_phi_cluster-MC");
399 sprintf (histo,
"Delta_eta_cluster-MC");
402 sprintf (histo,
"Delta_phi_simcluster-MC");
405 sprintf (histo,
"Delta_eta_simcluster-MC");
412 sprintf (histo,
"e_hb" ) ;
414 sprintf (histo,
"e_he" ) ;
416 sprintf (histo,
"e_ho" ) ;
418 sprintf (histo,
"e_hfl" ) ;
420 sprintf (histo,
"e_hfs" ) ;
431 sprintf (histo,
"HcalRecHitTask_number_of_rechits_in_cone_HB" ) ;
434 sprintf (histo,
"HcalRecHitTask_sum_of_rechits_energy_in_cone_HB" ) ;
438 sprintf (histo,
"HcalRecHitTask_number_of_rechits_above_1GeV_HB");
441 sprintf (histo,
"HcalRecHitTask_sum_of_rechits_energy_HB" ) ;
446 sprintf (histo,
"HcalRecHitTask_number_of_ecalrechits_in_cone_HB");
448 sprintf (histo,
"HcalRecHitTask_energy_ecal_plus_hcal_in_cone_HB");
452 sprintf (histo,
"HcalRecHitTask_energy_hcal_vs_ecal_HB");
454 sprintf (histo,
"HcalRecHitTask_energy_ecal_plus_hcal_HB" ) ;
460 sprintf(histo,
"HcalRecHitTask_severityLevel_HB");
463 sprintf (histo,
"HcalRecHitTask_energy_of_rechits_HB" ) ;
466 sprintf (histo,
"HcalRecHitTask_timing_HB" ) ;
470 sprintf (histo,
"HcalRecHitTask_timing_vs_energy_Low_HB" ) ;
473 sprintf (histo,
"HcalRecHitTask_timing_vs_energy_HB" ) ;
474 meTE_HB = ib.
book2D(histo, histo, 150, -5., 295., 70, -48., 92.);
476 sprintf (histo,
"HcalRecHitTask_timing_vs_energy_High_HB" ) ;
479 sprintf (histo,
"HcalRecHitTask_timing_vs_energy_profile_Low_HB" ) ;
482 sprintf (histo,
"HcalRecHitTask_timing_vs_energy_profile_HB" ) ;
485 sprintf (histo,
"HcalRecHitTask_timing_vs_energy_profile_High_HB" ) ;
490 sprintf (histo,
"HcalRecHitTask_timing_vs_energy_HB_depth1" ) ;
491 meTE_HB1 = ib.
book2D(histo, histo, 3000, -5., 2995., 70, -48., 92.);
493 sprintf (histo,
"HcalRecHitTask_timing_vs_energy_HB_depth2" ) ;
494 meTE_HB2 = ib.
book2D(histo, histo, 3000, -5., 2995., 70, -48., 92.);
497 sprintf (histo,
"HcalRecHitTask_energy_rechits_vs_simhits_HB");
499 sprintf (histo,
"HcalRecHitTask_energy_rechits_vs_simhits_profile_HB");
513 sprintf (histo,
"HcalRecHitTask_number_of_rechits_in_cone_HE" ) ;
516 sprintf (histo,
"HcalRecHitTask_sum_of_rechits_energy_in_cone_HE" ) ;
520 sprintf (histo,
"HcalRecHitTask_number_of_rechits_above_1GeV_HE");
523 sprintf (histo,
"HcalRecHitTask_sum_of_rechits_energy_HE" ) ;
527 sprintf (histo,
"HcalRecHitTask_energy_ecal_plus_hcal_HE" ) ;
530 sprintf (histo,
"HcalRecHitTask_energy_hcal_vs_ecal_HE");
533 sprintf (histo,
"HcalRecHitTask_number_of_ecalrechits_in_cone_HE");
535 sprintf (histo,
"HcalRecHitTask_energy_ecal_plus_hcal_in_cone_HE");
543 sprintf(histo,
"HcalRecHitTask_severityLevel_HE");
546 sprintf (histo,
"HcalRecHitTask_energy_of_rechits_HE" ) ;
549 sprintf (histo,
"HcalRecHitTask_timing_HE" ) ;
552 sprintf (histo,
"HcalRecHitTask_timing_vs_energy_Low_HE" ) ;
555 sprintf (histo,
"HcalRecHitTask_timing_vs_energy_HE" ) ;
556 meTE_HE = ib.
book2D(histo, histo, 200, -5., 2995., 70, -48., 92.);
558 sprintf (histo,
"HcalRecHitTask_timing_vs_energy_profile_Low_HE" ) ;
561 sprintf (histo,
"HcalRecHitTask_timing_vs_energy_profile_HE" ) ;
566 sprintf (histo,
"HcalRecHitTask_timing_vs_energy_HE_depth1" ) ;
567 meTE_HE1 = ib.
book2D(histo, histo, 1000, -5., 995., 70, -48., 92.);
569 sprintf (histo,
"HcalRecHitTask_timing_vs_energy_HE_depth2" ) ;
570 meTE_HE2 = ib.
book2D(histo, histo, 1000, -5., 995., 70, -48., 92.);
573 sprintf (histo,
"HcalRecHitTask_energy_rechits_vs_simhits_HE");
575 sprintf (histo,
"HcalRecHitTask_energy_rechits_vs_simhits_profile_HE");
589 sprintf (histo,
"HcalRecHitTask_number_of_rechits_in_cone_HO" ) ;
592 sprintf (histo,
"HcalRecHitTask_sum_of_rechits_energy_in_cone_HO" ) ;
596 sprintf (histo,
"HcalRecHitTask_number_of_rechits_above_1GeV_HO");
599 sprintf (histo,
"HcalRecHitTask_sum_of_rechits_energy_HO" ) ;
604 sprintf(histo,
"HcalRecHitTask_severityLevel_HO");
607 sprintf (histo,
"HcalRecHitTask_energy_of_rechits_HO" ) ;
610 sprintf (histo,
"HcalRecHitTask_timing_HO" ) ;
613 sprintf (histo,
"HcalRecHitTask_timing_vs_energy_HO" ) ;
614 meTE_HO= ib.
book2D(histo, histo, 60, -5., 55., 70, -48., 92.);
616 sprintf (histo,
"HcalRecHitTask_timing_vs_energy_High_HO" ) ;
619 sprintf (histo,
"HcalRecHitTask_timing_vs_energy_profile_HO" ) ;
622 sprintf (histo,
"HcalRecHitTask_timing_vs_energy_profile_High_HO" ) ;
628 sprintf (histo,
"HcalRecHitTask_energy_rechits_vs_simhits_HO");
630 sprintf (histo,
"HcalRecHitTask_energy_rechits_vs_simhits_profile_HO");
644 sprintf (histo,
"HcalRecHitTask_number_of_rechits_in_cone_HF" ) ;
647 sprintf (histo,
"HcalRecHitTask_sum_of_rechits_energy_in_cone_HF" ) ;
650 sprintf (histo,
"HcalRecHitTask_sum_of_rechits_energy_in_cone_HFL" );
653 sprintf (histo,
"HcalRecHitTask_sum_of_rechits_energy_in_cone_HFS");
656 sprintf (histo,
"HcalRecHitTask_sum_of_rechits_energy_HF" ) ;
661 sprintf(histo,
"HcalRecHitTask_severityLevel_HF");
664 sprintf (histo,
"HcalRecHitTask_energy_of_rechits_HF" ) ;
667 sprintf (histo,
"HcalRecHitTask_timing_HF" ) ;
670 sprintf (histo,
"HcalRecHitTask_timing_vs_energy_Low_HF" ) ;
673 sprintf (histo,
"HcalRecHitTask_timing_vs_energy_HF" ) ;
674 meTE_HF = ib.
book2D(histo, histo, 200, -5., 995., 70, -48., 92.);
676 sprintf (histo,
"HcalRecHitTask_timing_vs_energy_profile_Low_HF" ) ;
679 sprintf (histo,
"HcalRecHitTask_timing_vs_energy_profile_HF" ) ;
684 sprintf (histo,
"HcalRecHitTask_timing_vs_energy_HFL" ) ;
685 meTE_HFL = ib.
book2D(histo, histo, 1000, -5., 995., 70, -48., 92.);
687 sprintf (histo,
"HcalRecHitTask_timing_vs_energy_HFS" ) ;
688 meTE_HFS = ib.
book2D(histo, histo, 1000, -5., 995., 70, -48., 92.);
691 sprintf (histo,
"HcalRecHitTask_energy_rechits_vs_simhits_HF");
693 sprintf (histo,
"HcalRecHitTask_energy_rechits_vs_simhits_HFL");
695 sprintf (histo,
"HcalRecHitTask_energy_rechits_vs_simhits_HFS");
697 sprintf (histo,
"HcalRecHitTask_energy_rechits_vs_simhits_profile_HF");
699 sprintf (histo,
"HcalRecHitTask_energy_rechits_vs_simhits_profile_HFL");
701 sprintf (histo,
"HcalRecHitTask_energy_rechits_vs_simhits_profile_HFS");
718 double eHcalCone = 0.;
719 double eHcalConeHB = 0.;
720 double eHcalConeHE = 0.;
721 double eHcalConeHO = 0.;
722 double eHcalConeHF = 0.;
723 double eHcalConeHFL = 0.;
724 double eHcalConeHFS = 0.;
727 int nrechitsCone = 0;
728 int nrechitsThresh = 0;
734 double eEcalCone = 0.;
735 int numrechitsEcal = 0;
738 double phi_MC = -999999.;
739 double eta_MC = -999999.;
743 double ehcal_coneMC_1 = 0.;
744 double ehcal_coneMC_2 = 0.;
745 double ehcal_coneMC_3 = 0.;
746 double ehcal_coneMC_4 = 0.;
749 double searchR = 1.0;
754 double etaHot = 99999.;
755 double phiHot = 99999.;
767 std::cout <<
"no HepMCProduct found" << std::endl;
773 double maxPt = -99999.;
775 const HepMC::GenEvent * myGenEvent = evtMC->GetEvent();
776 for ( HepMC::GenEvent::particle_const_iterator
p = myGenEvent->particles_begin();
777 p != myGenEvent->particles_end(); ++
p ) {
778 double phip = (*p)->momentum().phi();
779 double etap = (*p)->momentum().eta();
782 double pt = (*p)->momentum().perp();
783 if(pt > maxPt) { npart++; maxPt =
pt; phi_MC = phip; eta_MC = etap; }
849 for (; RecHit != RecHitEnd ; ++RecHit) {
853 geometry->getSubdetectorGeometry (EBid)->getGeometry (EBid) ;
854 double eta = cellGeometry->getPosition ().eta () ;
855 double phi = cellGeometry->getPosition ().phi () ;
856 double en = RecHit->energy();
862 double r =
dR(eta_MC, phi_MC, eta, phi);
874 RecHit = rhitEE.
product()->begin();
875 RecHitEnd = rhitEE.
product()->end();
877 for (; RecHit != RecHitEnd ; ++RecHit) {
881 geometry->getSubdetectorGeometry (EEid)->getGeometry (EEid) ;
882 double eta = cellGeometry->getPosition ().eta () ;
883 double phi = cellGeometry->getPosition ().phi () ;
884 double en = RecHit->energy();
890 double r =
dR(eta_MC, phi_MC, eta, phi);
904 double maxE = -99999.;
915 for (
unsigned int i = 0;
i <
cen.size();
i++) {
928 int index = ieta * 72 + iphi;
937 if( sub == 1 && depth == 1) nhb1++;
938 if( sub == 1 && depth == 2) nhb2++;
939 if( sub == 2 && depth == 1) nhe1++;
940 if( sub == 2 && depth == 2) nhe2++;
941 if( sub == 2 && depth == 3) nhe3++;
942 if( sub == 3 && depth == 4) nho++;
943 if( sub == 4 && depth == 1) nhf1++;
944 if( sub == 4 && depth == 2) nhf2++;
947 if( en <
emap_min[ieta+41][iphi][depth-1][sub-1] )
948 emap_min[ieta+41][iphi][depth-1][sub-1] = en;
952 if(fabs(eta) > 3.) emin = 5.;
954 double r =
dR(eta_MC, phi_MC, eta, phi);
956 if(maxE < en && en > emin) {
977 if( depth == 1 || depth == 2 ) {
980 if (ieta1 < 0) ieta1--;
990 if (depth == 1 && sub == 1 ) {
997 if (depth == 2 && sub == 1) {
1004 if (depth == 1 && sub == 2) {
1011 if (depth == 2 && sub == 2) {
1018 if (depth == 3 && sub == 2) {
1032 if (depth == 1 && sub == 4) {
1039 if (depth == 2 && sub == 4) {
1050 if (depth == 1) ehcal_coneMC_1 += en;
1051 if (depth == 2) ehcal_coneMC_2 += en;
1052 if (depth == 3) ehcal_coneMC_3 += en;
1053 if (depth == 4) ehcal_coneMC_4 += en;
1058 unsigned int isw67 = 0;
1061 unsigned int sw27 = 27;
1062 unsigned int sw13 = 13;
1064 uint32_t statadd27 = 0x1<<sw27;
1065 uint32_t statadd13 = 0x1<<sw13;
1070 if(stwd & statadd27) status27 = 1;
1071 if(stwd & statadd13) status13 = 1;
1075 }
else if (sub == 2){
1081 for (
unsigned int isw = 0; isw < 32; isw++){
1082 statadd = 0x1<<(isw);
1083 if (stwd & statadd){
1089 if (isw == 6) isw67 += 1;
1090 if (isw == 7) isw67 += 2;
1096 for (
unsigned int isw =0; isw < 32; isw++){
1097 statadd = 0x1<<(isw);
1098 if( auxstwd & statadd ){
1122 Nhb->
Fill(
double(nhb1 + nhb2));
1123 Nhe->
Fill(
double(nhe1 + nhe2 + nhe3));
1125 Nhf->
Fill(
double(nhf1 + nhf2));
1142 for (
unsigned int i = 0;
i <
cen.size();
i++) {
1169 double clusEta = 999.;
1170 double clusPhi = 999.;
1173 double HcalCone_d1 = 0.;
1174 double HcalCone_d2 = 0.;
1175 double HcalCone_d3 = 0.;
1176 double HcalCone_d4 = 0.;
1177 double HcalCone = 0.;
1179 int ietaMax1 = 9999;
1180 int ietaMax2 = 9999;
1181 int ietaMax3 = 9999;
1182 int ietaMax4 = 9999;
1184 double enMax1 = -9999.;
1185 double enMax2 = -9999.;
1186 double enMax3 = -9999.;
1187 double enMax4 = -9999.;
1200 for (
unsigned int i = 0;
i <
cen.size();
i++) {
1209 double rhot =
dR(etaHot, phiHot, eta, phi);
1210 if(rhot < partR && en > 1.) {
1211 clusEta = (clusEta * clusEn + eta * en)/(clusEn + en);
1212 clusPhi =
phi12(clusPhi, clusEn, phi, en);
1218 if(en > 1. ) nrechitsThresh++;
1220 double r =
dR(eta_MC, phi_MC, eta, phi);
1222 if(sub == 1) eHcalConeHB += en;
1223 if(sub == 2) eHcalConeHE += en;
1224 if(sub == 3) eHcalConeHO += en;
1227 if (depth == 1) eHcalConeHFL += en;
1228 else eHcalConeHFS += en;
1279 float eta_diff = fabs(eta_MC - eta);
1280 if(eta_diff < etaMax) {
1371 double phidev =
dPhiWsign(clusPhi, phi_MC);
1373 double etadev = clusEta - eta_MC;
1398 if(eHcalConeHF > eps ) {
1465 double maxES = -9999.;
1466 double etaHotS = 1000.;
1467 double phiHotS = 1000.;
1473 double enSimHits = 0.;
1474 double enSimHitsHB = 0.;
1475 double enSimHitsHE = 0.;
1476 double enSimHitsHO = 0.;
1477 double enSimHitsHF = 0.;
1478 double enSimHitsHFL = 0.;
1479 double enSimHitsHFS = 0.;
1482 for (std::vector<PCaloHit>::const_iterator SimHits = SimHitResult->begin () ; SimHits != SimHitResult->end(); ++SimHits) {
1486 geometry->getSubdetectorGeometry (cell)->getGeometry (cell) ;
1489 double en = SimHits->energy();
1492 if(fabs(etaS) > 3.) emin = 1.;
1494 double r =
dR(eta_MC, phi_MC, etaS, phiS);
1496 if(maxES < en && en > emin ) {
1505 if(sub == 1) enSimHitsHB += en;
1506 if(sub == 2) enSimHitsHE += en;
1507 if(sub == 3) enSimHitsHO += en;
1510 int depth = cell.depth();
1511 if(depth == 1) enSimHitsHFL += en;
1512 else enSimHitsHFS += en;
1520 double clusEta = 999.;
1521 double clusPhi = 999.;
1524 for (std::vector<PCaloHit>::const_iterator SimHits = SimHitResult->begin () ; SimHits != SimHitResult->end(); ++SimHits) {
1528 geometry->getSubdetectorGeometry (cell)->getGeometry (cell) ;
1529 double etaS = cellGeometry->getPosition().eta () ;
1530 double phiS = cellGeometry->getPosition().phi () ;
1531 double en = SimHits->energy();
1534 if(fabs(etaS) > 3.) emin = 1.;
1536 double rhot =
dR(etaHotS, phiHotS, etaS, phiS);
1537 if(rhot < partR && en > emin) {
1538 clusEta = (clusEta * clusEn + etaS * en)/(clusEn + en);
1539 clusPhi =
phi12(clusPhi, clusEn, phiS, en);
1548 double phidev =
dPhiWsign(clusPhi, phi_MC);
1550 double etadev = clusEta - eta_MC;
1556 if(eHcalConeHF > eps) {
1588 using namespace edm;
1608 if( subdet_ == 1 || subdet_ == 2 || subdet_ == 5 || subdet_ == 6 || subdet_ == 0) {
1617 geometry->getSubdetectorGeometry (cell)->getGeometry (cell) ;
1618 double eta = cellGeometry->getPosition().eta () ;
1619 double phi = cellGeometry->getPosition().phi () ;
1620 double zc = cellGeometry->getPosition().z ();
1621 int sub = cell.subdet();
1622 int depth = cell.depth();
1623 int inteta = cell.ieta();
1624 if(inteta > 0) inteta -= 1;
1625 int intphi = cell.iphi()-1;
1626 double en =
j->energy();
1627 double t =
j->time();
1628 int stwd =
j->flags();
1629 int auxstwd =
j->aux();
1638 if((
iz > 0 && eta > 0.) || (
iz < 0 && eta <0.) ||
iz == 0) {
1640 csub.push_back(sub);
1642 ceta.push_back(eta);
1643 cphi.push_back(phi);
1645 cieta.push_back(inteta);
1646 ciphi.push_back(intphi);
1649 cstwd.push_back(stwd);
1656 if( subdet_ == 4 || subdet_ == 5 || subdet_ == 6 || subdet_ == 0) {
1665 geometry->getSubdetectorGeometry (cell)->getGeometry (cell) ;
1666 double eta = cellGeometry->getPosition().eta () ;
1667 double phi = cellGeometry->getPosition().phi () ;
1668 double zc = cellGeometry->getPosition().z ();
1669 int sub = cell.subdet();
1670 int depth = cell.depth();
1671 int inteta = cell.ieta();
1672 if(inteta > 0) inteta -= 1;
1673 int intphi = cell.iphi()-1;
1674 double en =
j->energy();
1675 double t =
j->time();
1676 int stwd =
j->flags();
1677 int auxstwd =
j->aux();
1684 if((
iz > 0 && eta > 0.) || (
iz < 0 && eta <0.) ||
iz == 0) {
1686 csub.push_back(sub);
1688 ceta.push_back(eta);
1689 cphi.push_back(phi);
1691 cieta.push_back(inteta);
1692 ciphi.push_back(intphi);
1695 cstwd.push_back(stwd);
1702 if( subdet_ == 3 || subdet_ == 5 || subdet_ == 6 || subdet_ == 0) {
1710 geometry->getSubdetectorGeometry (cell)->getGeometry (cell) ;
1711 double eta = cellGeometry->getPosition().eta () ;
1712 double phi = cellGeometry->getPosition().phi () ;
1713 double zc = cellGeometry->getPosition().z ();
1714 int sub = cell.subdet();
1715 int depth = cell.depth();
1716 int inteta = cell.ieta();
1717 if(inteta > 0) inteta -= 1;
1718 int intphi = cell.iphi()-1;
1719 double t =
j->time();
1720 double en =
j->energy();
1721 int stwd =
j->flags();
1722 int auxstwd =
j->aux();
1729 if((
iz > 0 && eta > 0.) || (
iz < 0 && eta <0.) ||
iz == 0) {
1730 csub.push_back(sub);
1732 ceta.push_back(eta);
1733 cphi.push_back(phi);
1735 cieta.push_back(inteta);
1736 ciphi.push_back(intphi);
1739 cstwd.push_back(stwd);
1747 double PI = 3.1415926535898;
1748 double deltaphi= phi1 - phi2;
1749 if( phi2 > phi1 ) { deltaphi= phi2 - phi1;}
1750 if(deltaphi > PI) { deltaphi = 2.*PI - deltaphi;}
1751 double deltaeta = eta2 - eta1;
1752 double tmp =
sqrt(deltaeta* deltaeta + deltaphi*deltaphi);
1760 double PI = 3.1415926535898;
1761 double a1 = phi1;
double a2 = phi2;
1763 if( a1 > 0.5*PI && a2 < 0.) a2 += 2*
PI;
1764 if( a2 > 0.5*PI && a1 < 0.) a1 += 2*
PI;
1765 tmp = (a1 * en1 + a2 * en2)/(en1 + en2);
1766 if(tmp > PI) tmp -= 2.*
PI;
1776 double PI = 3.1415926535898;
1777 double a1 = phi1;
double a2 = phi2;
1778 double tmp = a2 - a1;
1780 if(a1 > 0.5 * PI) tmp += 2.*
PI;
1781 if(a2 > 0.5 * PI) tmp -= 2.*
PI;
1791 const uint32_t recHitFlag = hit->
flags();
1796 return severityLevel;
MonitorElement * emean_vs_ieta_HB2
MonitorElement * emap_depth2
MonitorElement * RMS_seq_HB1
MonitorElement * RMS_vs_ieta_HB1
T getUntrackedParameter(std::string const &, T const &) const
MonitorElement * emean_seqHE2
MonitorElement * occupancy_vs_ieta_HO
MonitorElement * meTimeHO
const HcalSeverityLevelComputer * theHcalSevLvlComputer
MonitorElement * meSumRecHitsEnergyConeHE
MonitorElement * occupancy_seqHB1
const HcalChannelQuality * theHcalChStatus
std::vector< PCaloHit > PCaloHitContainer
MonitorElement * occupancy_map_HB1
MonitorElement * occupancy_vs_ieta_HE3
MonitorElement * map_depth2
edm::EDGetTokenT< edm::PCaloHitContainer > tok_hh_
MonitorElement * meRecHitsEnergyHF
MonitorElement * map_depth1
MonitorElement * meTE_High_HB
MonitorElement * occupancy_vs_ieta_HF1
MonitorElement * RMS_vs_ieta_HF1
HcalSubdetector subdet() const
get the subdetector
MonitorElement * ZS_seqHE3
double phi12(double phi1, double en1, double phi2, double en2)
MonitorElement * meDeltaPhiS
MonitorElement * bookProfile(Args &&...args)
const DetId & detid() const
std::vector< int > hcalHBSevLvlVec
MonitorElement * RMS_seq_HE2
bool getByToken(EDGetToken token, Handle< PROD > &result) const
MonitorElement * meNumRecHitsConeHE
MonitorElement * meSumRecHitsEnergyConeHB
MonitorElement * meTEprofileHE_Low
std::string hcalselector_
#define DEFINE_FWK_MODULE(type)
MonitorElement * emap_depth4
std::vector< uint32_t > cstwd
MonitorElement * RMS_vs_ieta_HE3
MonitorElement * RecHit_Aux_StatusWord_HB
Geom::Phi< T > phi() const
MonitorElement * RMS_vs_ieta_HE1
MonitorElement * emean_vs_ieta_HB1
edm::EDGetTokenT< HFRecHitCollection > tok_hf_
std::vector< EcalRecHit >::const_iterator const_iterator
MonitorElement * occupancy_seqHO
MonitorElement * meTE_HB2
MonitorElement * ZS_seqHE1
MonitorElement * occupancy_seqHE3
MonitorElement * meEnConeEtaProfile
MonitorElement * RMS_seq_HB2
MonitorElement * occupancy_map_HE3
double dPhiWsign(double phi1, double phi2)
MonitorElement * meRecHitSimHitProfileHF
const Item * getValues(DetId fId, bool throwOnFail=true) const
MonitorElement * meEcalHcalEnergyHB
int hcalSevLvl(const CaloRecHit *hit)
MonitorElement * meRecHitSimHitProfileHFS
MonitorElement * meEnergyHcalVsEcalHE
MonitorElement * occupancy_map_HF1
MonitorElement * meEcalHcalEnergyConeHE
MonitorElement * meRecHitsEnergyHB
MonitorElement * meSumRecHitsEnergyHF
double emap_min[82][72][4][4]
MonitorElement * emap_depth1
MonitorElement * ZS_seqHB2
MonitorElement * meNumRecHitsConeHO
std::vector< double > ceta
MonitorElement * ZS_seqHO
std::string ecalselector_
MonitorElement * occupancy_seqHF2
MonitorElement * meNumRecHitsConeHB
MonitorElement * RMS_vs_ieta_HB2
MonitorElement * meRecHitSimHitHF
MonitorElement * meRecHitsEnergyHE
MonitorElement * occupancy_map_HE1
MonitorElement * meRecHitSimHitProfileHE
MonitorElement * RMS_seq_HE3
MonitorElement * ZS_seqHE2
MonitorElement * meSumRecHitsEnergyHB
edm::EDGetTokenT< HORecHitCollection > tok_ho_
MonitorElement * RMS_seq_HO
MonitorElement * meEnConeEtaProfile_E
MonitorElement * meDeltaEtaS
MonitorElement * meRecHitSimHitHB
MonitorElement * meRecHitSimHitHFS
MonitorElement * RMS_vs_ieta_HO
MonitorElement * meSumRecHitsEnergyConeHFS
MonitorElement * RecHit_Aux_StatusWord_HO
MonitorElement * RMS_seq_HE1
std::vector< double > cphi
MonitorElement * meTE_Low_HF
MonitorElement * meNumEcalRecHitsConeHB
MonitorElement * meNumRecHitsThreshHB
MonitorElement * meSumRecHitsEnergyHO
MonitorElement * meTE_Low_HB
std::vector< int > hcalHESevLvlVec
MonitorElement * meEnergyHcalVsEcalHB
MonitorElement * map_depth3
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
MonitorElement * meTE_Low_HE
MonitorElement * RecHit_StatusWord_HF
MonitorElement * RecHit_Aux_StatusWord_HE
MonitorElement * emean_seqHE3
edm::ESHandle< CaloGeometry > geometry
MonitorElement * meSumRecHitsEnergyConeHO
MonitorElement * meTEprofileHB
MonitorElement * meTE_HFL
MonitorElement * ZS_seqHB1
MonitorElement * map_econe_depth1
MonitorElement * book1D(Args &&...args)
virtual void fillRecHitsTmp(int subdet_, edm::Event const &ev)
MonitorElement * map_depth4
MonitorElement * map_econe_depth4
double dR(double eta1, double phi1, double eta2, double phi2)
MonitorElement * emean_seqHF1
MonitorElement * emean_vs_ieta_HE3
MonitorElement * meNumRecHitsThreshHO
MonitorElement * meEcalHcalEnergyConeHB
MonitorElement * RMS_seq_HF2
MonitorElement * meNumRecHitsThreshHE
MonitorElement * RecHit_StatusWordCorr_HB
edm::EDGetTokenT< HBHERecHitCollection > tok_hbhe_
std::vector< int > hcalHFSevLvlVec
MonitorElement * meTimeHF
MonitorElement * occupancy_map_HE2
MonitorElement * occupancy_vs_ieta_HB2
MonitorElement * meSumRecHitsEnergyConeHF
MonitorElement * RecHit_Aux_StatusWord_HF
MonitorElement * meRecHitSimHitHO
MonitorElement * meRecHitSimHitProfileHB
MonitorElement * RecHit_StatusWord_HO
MonitorElement * meEnConeEtaProfile_depth1
MonitorElement * emean_vs_ieta_HF2
virtual void analyze(edm::Event const &ev, edm::EventSetup const &c)
MonitorElement * sevLvl_HE
MonitorElement * meTimeHB
virtual void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &)
MonitorElement * occupancy_map_HO
MonitorElement * meTE_HE2
MonitorElement * occupancy_vs_ieta_HE2
MonitorElement * meTEprofileHF_Low
edm::EDGetTokenT< EBRecHitCollection > tok_EB_
MonitorElement * occupancy_map_HF2
MonitorElement * RecHit_StatusWord_HF67
MonitorElement * meTEprofileHO_High
MonitorElement * meTEprofileHE
MonitorElement * emap_depth3
MonitorElement * occupancy_seqHB2
MonitorElement * occupancy_map_HB2
MonitorElement * meTE_HE1
void setCurrentFolder(const std::string &fullpath)
MonitorElement * RMS_vs_ieta_HE2
MonitorElement * meTE_HB1
T const * product() const
MonitorElement * meNumRecHitsConeHF
MonitorElement * book2D(Args &&...args)
MonitorElement * meTEprofileHF
MonitorElement * meEnConeEtaProfile_depth3
MonitorElement * emean_vs_ieta_HE1
MonitorElement * meRecHitSimHitProfileHO
MonitorElement * emean_seqHO
std::vector< int > hcalHOSevLvlVec
MonitorElement * emean_vs_ieta_HE2
MonitorElement * occupancy_vs_ieta_HF2
edm::EDGetTokenT< EERecHitCollection > tok_EE_
MonitorElement * map_ecal
std::vector< double > ctime
MonitorElement * emean_seqHE1
MonitorElement * map_econe_depth2
int getSeverityLevel(const DetId &myid, const uint32_t &myflag, const uint32_t &mystatus) const
MonitorElement * RecHit_StatusWord_HE
MonitorElement * meEnConeEtaProfile_EH
MonitorElement * emean_seqHF2
MonitorElement * meRecHitSimHitProfileHFL
std::vector< int > cdepth
MonitorElement * meEnConeEtaProfile_depth2
MonitorElement * RMS_vs_ieta_HF2
std::vector< std::vector< double > > tmp
MonitorElement * meRecHitsEnergyHO
std::vector< uint32_t > cauxstwd
MonitorElement * sevLvl_HF
MonitorElement * emean_seqHB1
MonitorElement * meTE_HFS
MonitorElement * emean_vs_ieta_HO
MonitorElement * occupancy_seqHF1
MonitorElement * meSumRecHitsEnergyHE
MonitorElement * meRecHitSimHitHFL
MonitorElement * meSumRecHitsEnergyConeHFL
MonitorElement * meNumEcalRecHitsConeHE
MonitorElement * emean_seqHB2
MonitorElement * meTE_High_HO
MonitorElement * meEcalHcalEnergyHE
MonitorElement * emean_vs_ieta_HF1
MonitorElement * meTEprofileHO
MonitorElement * sevLvl_HO
MonitorElement * sevLvl_HB
MonitorElement * meTimeHE
MonitorElement * RMS_seq_HF1
MonitorElement * meDeltaPhi
edm::EDGetTokenT< edm::HepMCProduct > tok_evt_
MonitorElement * meDeltaEta
MonitorElement * meTEprofileHB_Low
MonitorElement * RecHit_StatusWordCorr_HE
MonitorElement * occupancy_vs_ieta_HB1
uint32_t getValue() const
const GlobalPoint & getPosition() const
Returns the position of reference for this cell.
MonitorElement * occupancy_seqHE2
MonitorElement * ZS_seqHF1
MonitorElement * meRecHitSimHitHE
HcalRecHitsValidation(edm::ParameterSet const &conf)
MonitorElement * map_econe_depth3
MonitorElement * occupancy_seqHE1
MonitorElement * meTEprofileHB_High
std::vector< double > cen
MonitorElement * meEnConeEtaProfile_depth4
MonitorElement * occupancy_vs_ieta_HE1
MonitorElement * RecHit_StatusWord_HB
MonitorElement * ZS_seqHF2