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;
70 sprintf (histo,
"N_HB" );
71 Nhb = ib.
book1D(histo, histo, 2600,0.,2600.);
72 sprintf (histo,
"N_HE" );
73 Nhe = ib.
book1D(histo, histo, 2600,0.,2600.);
74 sprintf (histo,
"N_HO" );
75 Nho = ib.
book1D(histo, histo, 2200,0.,2200.);
76 sprintf (histo,
"N_HF" );
77 Nhf = ib.
book1D(histo, histo, 1800,0., 1800.);
82 for (
unsigned int i1 = 0; i1 < 82; i1++) {
83 for (
unsigned int i2 = 0; i2 < 72; i2++) {
84 for (
unsigned int i3 = 0; i3 < 4; i3++) {
85 for (
unsigned int i4 = 0; i4 < 4; i4++) {
94 sprintf (histo,
"ZSmin_map_depth1" );
96 sprintf (histo,
"ZSmin_map_depth2" );
98 sprintf (histo,
"ZSmin_map_depth3" );
100 sprintf (histo,
"ZSmin_map_depth4" );
104 sprintf (histo,
"ZS_Nreco_HB1" );
106 sprintf (histo,
"ZS_Nreco_HB2" );
108 sprintf (histo,
"ZS_Nreco_HE1" );
110 sprintf (histo,
"ZS_Nreco_HE2" );
112 sprintf (histo,
"ZS_Nreco_HE3" );
114 sprintf (histo,
"ZS_Nreco_HO" );
116 sprintf (histo,
"ZS_Nreco_HF1" );
118 sprintf (histo,
"ZS_Nreco_HF2" );
121 sprintf (histo,
"ZSmin_simple1D_HB1" );
123 sprintf (histo,
"ZSmin_simple1D_HB2" );
125 sprintf (histo,
"ZSmin_simple1D_HE1" );
127 sprintf (histo,
"ZSmin_simple1D_HE2" );
129 sprintf (histo,
"ZSmin_simple1D_HE3" );
131 sprintf (histo,
"ZSmin_simple1D_HO" );
133 sprintf (histo,
"ZSmin_simple1D_HF1" );
135 sprintf (histo,
"ZSmin_simple1D_HF2" );
138 sprintf (histo,
"ZSmin_sequential1D_HB1" );
140 sprintf (histo,
"ZSmin_sequential1D_HB2" );
142 sprintf (histo,
"ZSmin_sequential1D_HE1" );
144 sprintf (histo,
"ZSmin_sequential1D_HE2" );
146 sprintf (histo,
"ZSmin_sequential1D_HE3" );
148 sprintf (histo,
"ZSmin_sequential1D_HO" );
150 sprintf (histo,
"ZSmin_sequential1D_HF1" );
152 sprintf (histo,
"ZSmin_sequential1D_HF2" );
160 sprintf (histo,
"emap_depth1" );
162 sprintf (histo,
"emap_depth2" );
164 sprintf (histo,
"emap_depth3" );
166 sprintf (histo,
"emap_depth4" );
172 sprintf (histo,
"map_ecal" );
173 map_ecal = ib.
book2D(histo, histo, 70, -3.045, 3.045, 72, -3.1415926536, 3.1415926536);
178 sprintf (histo,
"emean_vs_ieta_HB1" );
180 sprintf (histo,
"emean_vs_ieta_HB2" );
182 sprintf (histo,
"emean_vs_ieta_HE1" );
184 sprintf (histo,
"emean_vs_ieta_HE2" );
186 sprintf (histo,
"emean_vs_ieta_HE3" );
188 sprintf (histo,
"emean_vs_ieta_HO" );
190 sprintf (histo,
"emean_vs_ieta_HF1" );
192 sprintf (histo,
"emean_vs_ieta_HF2" );
196 sprintf (histo,
"RMS_vs_ieta_HB1" );
198 sprintf (histo,
"RMS_vs_ieta_HB2" );
200 sprintf (histo,
"RMS_vs_ieta_HE1" );
202 sprintf (histo,
"RMS_vs_ieta_HE2" );
204 sprintf (histo,
"RMS_vs_ieta_HE3" );
206 sprintf (histo,
"RMS_vs_ieta_HO" );
208 sprintf (histo,
"RMS_vs_ieta_HF1" );
210 sprintf (histo,
"RMS_vs_ieta_HF2" );
214 sprintf (histo,
"emean_seq_HB1" );
216 sprintf (histo,
"emean_seq_HB2" );
218 sprintf (histo,
"emean_seq_HE1" );
220 sprintf (histo,
"emean_seq_HE2" );
222 sprintf (histo,
"emean_seq_HE3" );
224 sprintf (histo,
"emean_seq_HO" );
226 sprintf (histo,
"emean_seq_HF1" );
228 sprintf (histo,
"emean_seq_HF2" );
231 sprintf (histo,
"RMS_seq_HB1" );
233 sprintf (histo,
"RMS_seq_HB2" );
235 sprintf (histo,
"RMS_seq_HE1" );
237 sprintf (histo,
"RMS_seq_HE2" );
239 sprintf (histo,
"RMS_seq_HE3" );
241 sprintf (histo,
"RMS_seq_HO" );
243 sprintf (histo,
"RMS_seq_HF1" );
245 sprintf (histo,
"RMS_seq_HF2" );
251 sprintf (histo,
"occupancy_map_HB1" );
253 sprintf (histo,
"occupancy_map_HB2" );
255 sprintf (histo,
"occupancy_map_HE1" );
257 sprintf (histo,
"occupancy_map_HE2" );
259 sprintf (histo,
"occupancy_map_HE3" );
261 sprintf (histo,
"occupancy_map_HO" );
263 sprintf (histo,
"occupancy_map_HF1" );
265 sprintf (histo,
"occupancy_map_HF2" );
269 sprintf (histo,
"occupancy_vs_ieta_HB1" );
271 sprintf (histo,
"occupancy_vs_ieta_HB2" );
273 sprintf (histo,
"occupancy_vs_ieta_HE1" );
275 sprintf (histo,
"occupancy_vs_ieta_HE2" );
277 sprintf (histo,
"occupancy_vs_ieta_HE3" );
279 sprintf (histo,
"occupancy_vs_ieta_HO" );
281 sprintf (histo,
"occupancy_vs_ieta_HF1" );
283 sprintf (histo,
"occupancy_vs_ieta_HF2" );
288 sprintf (histo,
"occ_sequential1D_HB1" );
290 sprintf (histo,
"occ_sequential1D_HB2" );
292 sprintf (histo,
"occ_sequential1D_HE1" );
294 sprintf (histo,
"occ_sequential1D_HE2" );
296 sprintf (histo,
"occ_sequential1D_HE3" );
298 sprintf (histo,
"occ_sequential1D_HO" );
300 sprintf (histo,
"occ_sequential1D_HF1" );
302 sprintf (histo,
"occ_sequential1D_HF2" );
307 sprintf (histo,
"HcalRecHitTask_RecHit_StatusWord_HB" ) ;
310 sprintf (histo,
"HcalRecHitTask_RecHit_StatusWord_HE" ) ;
313 sprintf (histo,
"HcalRecHitTask_RecHit_StatusWord_HF" ) ;
317 sprintf (histo,
"HcalRecHitTask_RecHit_StatusWord_HF67" ) ;
320 sprintf (histo,
"HcalRecHitTask_RecHit_StatusWord_HO" ) ;
324 sprintf (histo,
"HcalRecHitTask_RecHit_Aux_StatusWord_HB" ) ;
327 sprintf (histo,
"HcalRecHitTask_RecHit_Aux_StatusWord_HE" ) ;
330 sprintf (histo,
"HcalRecHitTask_RecHit_Aux_StatusWord_HF" ) ;
333 sprintf (histo,
"HcalRecHitTask_RecHit_Aux_StatusWord_HO" ) ;
338 sprintf (histo,
"map_econe_depth1" );
340 ib.
book2D(histo, histo, 520, -5.2, 5.2, 72, -3.1415926536, 3.1415926536);
341 sprintf (histo,
"map_econe_depth2" );
343 ib.
book2D(histo, histo, 520, -5.2, 5.2, 72, -3.1415926536, 3.1415926536);
344 sprintf (histo,
"map_econe_depth3" );
346 ib.
book2D(histo, histo, 520, -5.2, 5.2, 72, -3.1415926536, 3.1415926536);
347 sprintf (histo,
"map_econe_depth4" );
349 ib.
book2D(histo, histo, 520, -5.2, 5.2, 72, -3.1415926536, 3.1415926536);
357 sprintf (histo,
"HcalRecHitTask_En_rechits_cone_profile_vs_ieta_all_depths");
360 sprintf (histo,
"HcalRecHitTask_En_rechits_cone_profile_vs_ieta_all_depths_E");
363 sprintf (histo,
"HcalRecHitTask_En_rechits_cone_profile_vs_ieta_all_depths_EH");
372 sprintf (histo,
"HcalRecHitTask_En_rechits_cone_profile_vs_ieta_depth1");
375 sprintf (histo,
"HcalRecHitTask_En_rechits_cone_profile_vs_ieta_depth2");
378 sprintf (histo,
"HcalRecHitTask_En_rechits_cone_profile_vs_ieta_depth3");
381 sprintf (histo,
"HcalRecHitTask_En_rechits_cone_profile_vs_ieta_depth4");
388 sprintf (histo,
"Delta_phi_cluster-MC");
391 sprintf (histo,
"Delta_eta_cluster-MC");
394 sprintf (histo,
"Delta_phi_simcluster-MC");
397 sprintf (histo,
"Delta_eta_simcluster-MC");
404 sprintf (histo,
"e_hb" ) ;
406 sprintf (histo,
"e_he" ) ;
408 sprintf (histo,
"e_ho" ) ;
410 sprintf (histo,
"e_hfl" ) ;
412 sprintf (histo,
"e_hfs" ) ;
423 sprintf (histo,
"HcalRecHitTask_number_of_rechits_in_cone_HB" ) ;
426 sprintf (histo,
"HcalRecHitTask_sum_of_rechits_energy_in_cone_HB" ) ;
430 sprintf (histo,
"HcalRecHitTask_number_of_rechits_above_1GeV_HB");
433 sprintf (histo,
"HcalRecHitTask_sum_of_rechits_energy_HB" ) ;
438 sprintf (histo,
"HcalRecHitTask_number_of_ecalrechits_in_cone_HB");
440 sprintf (histo,
"HcalRecHitTask_energy_ecal_plus_hcal_in_cone_HB");
444 sprintf (histo,
"HcalRecHitTask_energy_hcal_vs_ecal_HB");
446 sprintf (histo,
"HcalRecHitTask_energy_ecal_plus_hcal_HB" ) ;
452 sprintf(histo,
"HcalRecHitTask_severityLevel_HB");
455 sprintf (histo,
"HcalRecHitTask_energy_of_rechits_HB" ) ;
458 sprintf (histo,
"HcalRecHitTask_timing_HB" ) ;
462 sprintf (histo,
"HcalRecHitTask_timing_vs_energy_Low_HB" ) ;
465 sprintf (histo,
"HcalRecHitTask_timing_vs_energy_HB" ) ;
466 meTE_HB = ib.
book2D(histo, histo, 150, -5., 295., 70, -48., 92.);
468 sprintf (histo,
"HcalRecHitTask_timing_vs_energy_High_HB" ) ;
471 sprintf (histo,
"HcalRecHitTask_timing_vs_energy_profile_Low_HB" ) ;
474 sprintf (histo,
"HcalRecHitTask_timing_vs_energy_profile_HB" ) ;
477 sprintf (histo,
"HcalRecHitTask_timing_vs_energy_profile_High_HB" ) ;
482 sprintf (histo,
"HcalRecHitTask_timing_vs_energy_HB_depth1" ) ;
483 meTE_HB1 = ib.
book2D(histo, histo, 3000, -5., 2995., 70, -48., 92.);
485 sprintf (histo,
"HcalRecHitTask_timing_vs_energy_HB_depth2" ) ;
486 meTE_HB2 = ib.
book2D(histo, histo, 3000, -5., 2995., 70, -48., 92.);
489 sprintf (histo,
"HcalRecHitTask_energy_rechits_vs_simhits_HB");
491 sprintf (histo,
"HcalRecHitTask_energy_rechits_vs_simhits_profile_HB");
505 sprintf (histo,
"HcalRecHitTask_number_of_rechits_in_cone_HE" ) ;
508 sprintf (histo,
"HcalRecHitTask_sum_of_rechits_energy_in_cone_HE" ) ;
512 sprintf (histo,
"HcalRecHitTask_number_of_rechits_above_1GeV_HE");
515 sprintf (histo,
"HcalRecHitTask_sum_of_rechits_energy_HE" ) ;
519 sprintf (histo,
"HcalRecHitTask_energy_ecal_plus_hcal_HE" ) ;
522 sprintf (histo,
"HcalRecHitTask_energy_hcal_vs_ecal_HE");
525 sprintf (histo,
"HcalRecHitTask_number_of_ecalrechits_in_cone_HE");
527 sprintf (histo,
"HcalRecHitTask_energy_ecal_plus_hcal_in_cone_HE");
535 sprintf(histo,
"HcalRecHitTask_severityLevel_HE");
538 sprintf (histo,
"HcalRecHitTask_energy_of_rechits_HE" ) ;
541 sprintf (histo,
"HcalRecHitTask_timing_HE" ) ;
544 sprintf (histo,
"HcalRecHitTask_timing_vs_energy_Low_HE" ) ;
547 sprintf (histo,
"HcalRecHitTask_timing_vs_energy_HE" ) ;
548 meTE_HE = ib.
book2D(histo, histo, 200, -5., 395., 70, -48., 92.);
550 sprintf (histo,
"HcalRecHitTask_timing_vs_energy_profile_Low_HE" ) ;
553 sprintf (histo,
"HcalRecHitTask_timing_vs_energy_profile_HE" ) ;
558 sprintf (histo,
"HcalRecHitTask_timing_vs_energy_HE_depth1" ) ;
559 meTE_HE1 = ib.
book2D(histo, histo, 1000, -5., 995., 70, -48., 92.);
561 sprintf (histo,
"HcalRecHitTask_timing_vs_energy_HE_depth2" ) ;
562 meTE_HE2 = ib.
book2D(histo, histo, 1000, -5., 995., 70, -48., 92.);
565 sprintf (histo,
"HcalRecHitTask_energy_rechits_vs_simhits_HE");
567 sprintf (histo,
"HcalRecHitTask_energy_rechits_vs_simhits_profile_HE");
581 sprintf (histo,
"HcalRecHitTask_number_of_rechits_in_cone_HO" ) ;
584 sprintf (histo,
"HcalRecHitTask_sum_of_rechits_energy_in_cone_HO" ) ;
588 sprintf (histo,
"HcalRecHitTask_number_of_rechits_above_1GeV_HO");
591 sprintf (histo,
"HcalRecHitTask_sum_of_rechits_energy_HO" ) ;
596 sprintf(histo,
"HcalRecHitTask_severityLevel_HO");
599 sprintf (histo,
"HcalRecHitTask_energy_of_rechits_HO" ) ;
602 sprintf (histo,
"HcalRecHitTask_timing_HO" ) ;
605 sprintf (histo,
"HcalRecHitTask_timing_vs_energy_HO" ) ;
606 meTE_HO= ib.
book2D(histo, histo, 60, -5., 55., 70, -48., 92.);
608 sprintf (histo,
"HcalRecHitTask_timing_vs_energy_High_HO" ) ;
611 sprintf (histo,
"HcalRecHitTask_timing_vs_energy_profile_HO" ) ;
614 sprintf (histo,
"HcalRecHitTask_timing_vs_energy_profile_High_HO" ) ;
620 sprintf (histo,
"HcalRecHitTask_energy_rechits_vs_simhits_HO");
622 sprintf (histo,
"HcalRecHitTask_energy_rechits_vs_simhits_profile_HO");
636 sprintf (histo,
"HcalRecHitTask_number_of_rechits_in_cone_HF" ) ;
639 sprintf (histo,
"HcalRecHitTask_sum_of_rechits_energy_in_cone_HF" ) ;
642 sprintf (histo,
"HcalRecHitTask_sum_of_rechits_energy_in_cone_HFL" );
645 sprintf (histo,
"HcalRecHitTask_sum_of_rechits_energy_in_cone_HFS");
648 sprintf (histo,
"HcalRecHitTask_sum_of_rechits_energy_HF" ) ;
653 sprintf(histo,
"HcalRecHitTask_severityLevel_HF");
656 sprintf (histo,
"HcalRecHitTask_energy_of_rechits_HF" ) ;
659 sprintf (histo,
"HcalRecHitTask_timing_HF" ) ;
662 sprintf (histo,
"HcalRecHitTask_timing_vs_energy_Low_HF" ) ;
665 sprintf (histo,
"HcalRecHitTask_timing_vs_energy_HF" ) ;
666 meTE_HF = ib.
book2D(histo, histo, 200, -5., 995., 70, -48., 92.);
668 sprintf (histo,
"HcalRecHitTask_timing_vs_energy_profile_Low_HF" ) ;
671 sprintf (histo,
"HcalRecHitTask_timing_vs_energy_profile_HF" ) ;
676 sprintf (histo,
"HcalRecHitTask_timing_vs_energy_HFL" ) ;
677 meTE_HFL = ib.
book2D(histo, histo, 1000, -5., 995., 70, -48., 92.);
679 sprintf (histo,
"HcalRecHitTask_timing_vs_energy_HFS" ) ;
680 meTE_HFS = ib.
book2D(histo, histo, 1000, -5., 995., 70, -48., 92.);
683 sprintf (histo,
"HcalRecHitTask_energy_rechits_vs_simhits_HF");
685 sprintf (histo,
"HcalRecHitTask_energy_rechits_vs_simhits_HFL");
687 sprintf (histo,
"HcalRecHitTask_energy_rechits_vs_simhits_HFS");
689 sprintf (histo,
"HcalRecHitTask_energy_rechits_vs_simhits_profile_HF");
691 sprintf (histo,
"HcalRecHitTask_energy_rechits_vs_simhits_profile_HFL");
693 sprintf (histo,
"HcalRecHitTask_energy_rechits_vs_simhits_profile_HFS");
710 double eHcalCone = 0.;
711 double eHcalConeHB = 0.;
712 double eHcalConeHE = 0.;
713 double eHcalConeHO = 0.;
714 double eHcalConeHF = 0.;
715 double eHcalConeHFL = 0.;
716 double eHcalConeHFS = 0.;
719 int nrechitsCone = 0;
720 int nrechitsThresh = 0;
726 double eEcalCone = 0.;
727 int numrechitsEcal = 0;
730 double phi_MC = -999999.;
731 double eta_MC = -999999.;
735 double ehcal_coneMC_1 = 0.;
736 double ehcal_coneMC_2 = 0.;
737 double ehcal_coneMC_3 = 0.;
738 double ehcal_coneMC_4 = 0.;
741 double searchR = 1.0;
746 double etaHot = 99999.;
747 double phiHot = 99999.;
759 std::cout <<
"no HepMCProduct found" << std::endl;
765 double maxPt = -99999.;
767 const HepMC::GenEvent * myGenEvent = evtMC->GetEvent();
768 for ( HepMC::GenEvent::particle_const_iterator
p = myGenEvent->particles_begin();
769 p != myGenEvent->particles_end(); ++
p ) {
770 double phip = (*p)->momentum().phi();
771 double etap = (*p)->momentum().eta();
774 double pt = (*p)->momentum().perp();
775 if(pt > maxPt) { npart++; maxPt =
pt; phi_MC = phip; eta_MC = etap; }
846 for (; RecHit != RecHitEnd ; ++RecHit) {
850 geometry->getSubdetectorGeometry (EBid)->getGeometry (EBid) ;
851 double eta = cellGeometry->getPosition ().eta () ;
852 double phi = cellGeometry->getPosition ().phi () ;
853 double en = RecHit->energy();
859 double r =
dR(eta_MC, phi_MC, eta, phi);
871 RecHit = rhitEE.
product()->begin();
872 RecHitEnd = rhitEE.
product()->end();
874 for (; RecHit != RecHitEnd ; ++RecHit) {
878 geometry->getSubdetectorGeometry (EEid)->getGeometry (EEid) ;
879 double eta = cellGeometry->getPosition ().eta () ;
880 double phi = cellGeometry->getPosition ().phi () ;
881 double en = RecHit->energy();
887 double r =
dR(eta_MC, phi_MC, eta, phi);
901 double maxE = -99999.;
912 for (
unsigned int i = 0;
i <
cen.size();
i++) {
925 int index = ieta * 72 + iphi;
934 if( sub == 1 && depth == 1) nhb1++;
935 if( sub == 1 && depth == 2) nhb2++;
936 if( sub == 2 && depth == 1) nhe1++;
937 if( sub == 2 && depth == 2) nhe2++;
938 if( sub == 2 && depth == 3) nhe3++;
939 if( sub == 3 && depth == 4) nho++;
940 if( sub == 4 && depth == 1) nhf1++;
941 if( sub == 4 && depth == 2) nhf2++;
944 if( en <
emap_min[ieta+41][iphi][depth-1][sub-1] )
945 emap_min[ieta+41][iphi][depth-1][sub-1] = en;
949 if(fabs(eta) > 3.) emin = 5.;
951 double r =
dR(eta_MC, phi_MC, eta, phi);
953 if(maxE < en && en > emin) {
974 if( depth == 1 || depth == 2 ) {
977 if (ieta1 < 0) ieta1--;
987 if (depth == 1 && sub == 1 ) {
994 if (depth == 2 && sub == 1) {
1001 if (depth == 1 && sub == 2) {
1008 if (depth == 2 && sub == 2) {
1015 if (depth == 3 && sub == 2) {
1029 if (depth == 1 && sub == 4) {
1036 if (depth == 2 && sub == 4) {
1047 if (depth == 1) ehcal_coneMC_1 += en;
1048 if (depth == 2) ehcal_coneMC_2 += en;
1049 if (depth == 3) ehcal_coneMC_3 += en;
1050 if (depth == 4) ehcal_coneMC_4 += en;
1055 unsigned int isw67 = 0;
1056 for (
unsigned int isw = 0; isw < 32; isw++){
1057 statadd = 0x1<<(isw);
1058 if (stwd & statadd){
1064 if (isw == 6) isw67 += 1;
1065 if (isw == 7) isw67 += 2;
1071 for (
unsigned int isw =0; isw < 32; isw++){
1072 statadd = 0x1<<(isw);
1073 if( auxstwd & statadd ){
1097 Nhb->
Fill(
double(nhb1 + nhb2));
1098 Nhe->
Fill(
double(nhe1 + nhe2 + nhe3));
1100 Nhf->
Fill(
double(nhf1 + nhf2));
1117 for (
unsigned int i = 0;
i <
cen.size();
i++) {
1144 double clusEta = 999.;
1145 double clusPhi = 999.;
1148 double HcalCone_d1 = 0.;
1149 double HcalCone_d2 = 0.;
1150 double HcalCone_d3 = 0.;
1151 double HcalCone_d4 = 0.;
1152 double HcalCone = 0.;
1154 int ietaMax1 = 9999;
1155 int ietaMax2 = 9999;
1156 int ietaMax3 = 9999;
1157 int ietaMax4 = 9999;
1159 double enMax1 = -9999.;
1160 double enMax2 = -9999.;
1161 double enMax3 = -9999.;
1162 double enMax4 = -9999.;
1164 double etaMax = 9999.;
1175 for (
unsigned int i = 0;
i <
cen.size();
i++) {
1184 double rhot =
dR(etaHot, phiHot, eta, phi);
1185 if(rhot < partR && en > 1.) {
1186 clusEta = (clusEta * clusEn + eta * en)/(clusEn + en);
1187 clusPhi =
phi12(clusPhi, clusEn, phi, en);
1193 if(en > 1. ) nrechitsThresh++;
1195 double r =
dR(eta_MC, phi_MC, eta, phi);
1197 if(sub == 1) eHcalConeHB += en;
1198 if(sub == 2) eHcalConeHE += en;
1199 if(sub == 3) eHcalConeHO += en;
1202 if (depth == 1) eHcalConeHFL += en;
1203 else eHcalConeHFS += en;
1254 float eta_diff = fabs(eta_MC - eta);
1255 if(eta_diff < etaMax) {
1346 double phidev =
dPhiWsign(clusPhi, phi_MC);
1348 double etadev = clusEta - eta_MC;
1373 if(eHcalConeHF > eps ) {
1440 double maxES = -9999.;
1441 double etaHotS = 1000.;
1442 double phiHotS = 1000.;
1448 double enSimHits = 0.;
1449 double enSimHitsHB = 0.;
1450 double enSimHitsHE = 0.;
1451 double enSimHitsHO = 0.;
1452 double enSimHitsHF = 0.;
1453 double enSimHitsHFL = 0.;
1454 double enSimHitsHFS = 0.;
1457 for (std::vector<PCaloHit>::const_iterator SimHits = SimHitResult->begin () ; SimHits != SimHitResult->end(); ++SimHits) {
1461 geometry->getSubdetectorGeometry (cell)->getGeometry (cell) ;
1464 double en = SimHits->energy();
1467 if(fabs(etaS) > 3.) emin = 1.;
1469 double r =
dR(eta_MC, phi_MC, etaS, phiS);
1471 if(maxES < en && en > emin ) {
1480 if(sub == 1) enSimHitsHB += en;
1481 if(sub == 2) enSimHitsHE += en;
1482 if(sub == 3) enSimHitsHO += en;
1485 int depth = cell.depth();
1486 if(depth == 1) enSimHitsHFL += en;
1487 else enSimHitsHFS += en;
1495 double clusEta = 999.;
1496 double clusPhi = 999.;
1499 for (std::vector<PCaloHit>::const_iterator SimHits = SimHitResult->begin () ; SimHits != SimHitResult->end(); ++SimHits) {
1503 geometry->getSubdetectorGeometry (cell)->getGeometry (cell) ;
1504 double etaS = cellGeometry->getPosition().eta () ;
1505 double phiS = cellGeometry->getPosition().phi () ;
1506 double en = SimHits->energy();
1509 if(fabs(etaS) > 3.) emin = 1.;
1511 double rhot =
dR(etaHotS, phiHotS, etaS, phiS);
1512 if(rhot < partR && en > emin) {
1513 clusEta = (clusEta * clusEn + etaS * en)/(clusEn + en);
1514 clusPhi =
phi12(clusPhi, clusEn, phiS, en);
1523 double phidev =
dPhiWsign(clusPhi, phi_MC);
1525 double etadev = clusEta - eta_MC;
1531 if(eHcalConeHF > eps) {
1563 using namespace edm;
1583 if( subdet_ == 1 || subdet_ == 2 || subdet_ == 5 || subdet_ == 6 || subdet_ == 0) {
1592 geometry->getSubdetectorGeometry (cell)->getGeometry (cell) ;
1593 double eta = cellGeometry->getPosition().eta () ;
1594 double phi = cellGeometry->getPosition().phi () ;
1595 double zc = cellGeometry->getPosition().z ();
1596 int sub = cell.subdet();
1597 int depth = cell.depth();
1598 int inteta = cell.ieta();
1599 if(inteta > 0) inteta -= 1;
1600 int intphi = cell.iphi()-1;
1601 double en =
j->energy();
1602 double t =
j->time();
1603 int stwd =
j->flags();
1604 int auxstwd =
j->aux();
1613 if((
iz > 0 && eta > 0.) || (
iz < 0 && eta <0.) ||
iz == 0) {
1615 csub.push_back(sub);
1617 ceta.push_back(eta);
1618 cphi.push_back(phi);
1620 cieta.push_back(inteta);
1621 ciphi.push_back(intphi);
1624 cstwd.push_back(stwd);
1631 if( subdet_ == 4 || subdet_ == 5 || subdet_ == 6 || subdet_ == 0) {
1640 geometry->getSubdetectorGeometry (cell)->getGeometry (cell) ;
1641 double eta = cellGeometry->getPosition().eta () ;
1642 double phi = cellGeometry->getPosition().phi () ;
1643 double zc = cellGeometry->getPosition().z ();
1644 int sub = cell.subdet();
1645 int depth = cell.depth();
1646 int inteta = cell.ieta();
1647 if(inteta > 0) inteta -= 1;
1648 int intphi = cell.iphi()-1;
1649 double en =
j->energy();
1650 double t =
j->time();
1651 int stwd =
j->flags();
1652 int auxstwd =
j->aux();
1659 if((
iz > 0 && eta > 0.) || (
iz < 0 && eta <0.) ||
iz == 0) {
1661 csub.push_back(sub);
1663 ceta.push_back(eta);
1664 cphi.push_back(phi);
1666 cieta.push_back(inteta);
1667 ciphi.push_back(intphi);
1670 cstwd.push_back(stwd);
1677 if( subdet_ == 3 || subdet_ == 5 || subdet_ == 6 || subdet_ == 0) {
1685 geometry->getSubdetectorGeometry (cell)->getGeometry (cell) ;
1686 double eta = cellGeometry->getPosition().eta () ;
1687 double phi = cellGeometry->getPosition().phi () ;
1688 double zc = cellGeometry->getPosition().z ();
1689 int sub = cell.subdet();
1690 int depth = cell.depth();
1691 int inteta = cell.ieta();
1692 if(inteta > 0) inteta -= 1;
1693 int intphi = cell.iphi()-1;
1694 double t =
j->time();
1695 double en =
j->energy();
1696 int stwd =
j->flags();
1697 int auxstwd =
j->aux();
1704 if((
iz > 0 && eta > 0.) || (
iz < 0 && eta <0.) ||
iz == 0) {
1705 csub.push_back(sub);
1707 ceta.push_back(eta);
1708 cphi.push_back(phi);
1710 cieta.push_back(inteta);
1711 ciphi.push_back(intphi);
1714 cstwd.push_back(stwd);
1722 double PI = 3.1415926535898;
1723 double deltaphi= phi1 - phi2;
1724 if( phi2 > phi1 ) { deltaphi= phi2 - phi1;}
1725 if(deltaphi > PI) { deltaphi = 2.*PI - deltaphi;}
1726 double deltaeta = eta2 - eta1;
1727 double tmp =
sqrt(deltaeta* deltaeta + deltaphi*deltaphi);
1735 double PI = 3.1415926535898;
1736 double a1 = phi1;
double a2 = phi2;
1738 if( a1 > 0.5*PI && a2 < 0.) a2 += 2*
PI;
1739 if( a2 > 0.5*PI && a1 < 0.) a1 += 2*
PI;
1740 tmp = (a1 * en1 + a2 * en2)/(en1 + en2);
1741 if(tmp > PI) tmp -= 2.*
PI;
1751 double PI = 3.1415926535898;
1752 double a1 = phi1;
double a2 = phi2;
1753 double tmp = a2 - a1;
1755 if(a1 > 0.5 * PI) tmp += 2.*
PI;
1756 if(a2 > 0.5 * PI) tmp -= 2.*
PI;
1766 const uint32_t recHitFlag = hit->
flags();
1771 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
void setTopo(const HcalTopology *topo) const
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
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 * 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
const HcalTopology * topo() const
MonitorElement * meEnConeEtaProfile_depth4
MonitorElement * occupancy_vs_ieta_HE1
MonitorElement * RecHit_StatusWord_HB
MonitorElement * ZS_seqHF2