42 #include "CLHEP/Units/GlobalPhysicalConstants.h"
56 : beamSpot_(conf.getParameter<
edm::
InputTag>(
"beamSpot")) {
116 ptmax =
pset.getParameter<
double>(
"Ptmax");
117 pmax =
pset.getParameter<
double>(
"Pmax");
177 if (locSC != std::string::npos) {
178 std::cout <<
"Matching objects are SuperClusters " << std::endl;
181 std::cout <<
"Didn't recognize input matching objects!! " << std::endl;
185 hlabel =
"h_" +
type_ +
"Num";
186 htitle =
"# " +
type_ +
"s";
191 histNum_ =
new TH1F(
"h_recEleNum",
"# rec electrons", 20, 0., 20.);
194 hlabel =
"h_" +
type_ +
"_eta";
195 htitle =
type_ +
" #eta";
197 hlabel =
"h_" +
type_ +
"_abseta";
198 htitle =
type_ +
" |#eta|";
200 hlabel =
"h_" +
type_ +
"_P";
201 htitle =
type_ +
" p";
203 hlabel =
"h_" +
type_ +
"_Pt";
204 htitle =
type_ +
" pt";
206 hlabel =
"h_" +
type_ +
"_phi";
207 htitle =
type_ +
" phi";
209 hlabel =
"h_" +
type_ +
"_z";
210 htitle =
type_ +
" z";
215 new TH1F(
"h_ele_mee_all",
"ele pairs invariant mass, all charge combinations",
nbinmee,
meemin,
meemax);
218 new TH1F(
"h_ele_mee_os_ebeb",
"ele pairs invariant mass, opp. sign, EB-EB",
nbinmee,
meemin,
meemax);
221 new TH1F(
"h_ele_mee_os_ebee",
"ele pairs invariant mass, opp. sign, EB-EE",
nbinmee,
meemin,
meemax);
224 new TH1F(
"h_ele_mee_os_eeee",
"ele pairs invariant mass, opp. sign, EE-EE",
nbinmee,
meemin,
meemax);
227 new TH1F(
"h_ele_mee_os_gg",
"ele pairs invariant mass, opp. sign, good-good",
nbinmee,
meemin,
meemax);
230 new TH1F(
"h_ele_mee_os_gb",
"ele pairs invariant mass, opp. sign, good-bad",
nbinmee,
meemin,
meemax);
233 new TH1F(
"h_ele_mee_os_bb",
"ele pairs invariant mass, opp. sign, bad-bad",
nbinmee,
meemin,
meemax);
238 "E2 - E1 vs ele pairs invariant mass, all electrons",
246 "E2 - E1 vs ele pairs invariant mass, ecal driven pairs, all electrons",
255 h_ele_charge =
new TH1F(
"h_ele_charge",
"ele charge", 5, -2., 2.);
267 new TH1F(
"h_ele_matchingObjectPt_matched",
"Efficiency vs matching SC E_{T}",
nbinpteff, 5.,
ptmax);
273 new TH1F(
"h_ele_matchingObjectAbsEta_matched",
"Efficiency vs matching SC |#eta|",
nbineta / 2, 0., 2.5);
276 new TH1F(
"h_ele_matchingObjectEta_matched",
"Efficiency vs matching SC #eta",
nbineta,
etamin,
etamax);
279 new TH1F(
"h_ele_matchingObjectPhi_matched",
"Efficiency vs matching SC phi",
nbinphi,
phimin,
phimax);
286 new TH1F(
"h_ele_matchingObjectZ_matched",
"Efficiency vs matching SC z",
nbinxyz, -25, 25);
288 h_ele_vertexTIP =
new TH1F(
"h_ele_vertexTIP",
"ele transverse impact parameter (wrt bs)", 90, 0., 0.15);
290 "ele transverse impact parameter (wrt bs) vs eta",
298 "ele transverse impact parameter (wrt bs) vs phi",
306 "ele transverse impact parameter (wrt bs) vs transverse momentum",
316 "ele trans momentum / matching SC trans energy",
321 "ele momentum / matching SC energy vs eta",
329 "ele momentum / matching SC energy vs phi",
337 "ele momentum / matching SC energy vs eta",
345 "ele momentum / matching SC energy, barrel",
350 "ele momentum / matching SC energy, endcaps",
355 "ele trans momentum / matching SC trans energy, barrel",
360 "ele trans momentum / matching SC trans energy, endcaps",
365 "h_ele_EtaMnEtamatchingObject_matched",
"ele momentum eta - matching SC eta",
nbindeta,
detamin,
detamax);
367 "ele momentum eta - matching SC eta vs eta",
375 "ele momentum eta - matching SC eta vs phi",
383 "ele momentum eta - matching SC eta vs pt",
391 "h_ele_PhiMnPhimatchingObject_matched",
"ele momentum phi - matching SC phi",
nbindphi,
dphimin,
dphimax);
393 "ele momentum phi - matching SC phi",
398 "ele momentum phi - matching SC phi vs eta",
406 "ele momentum phi - matching SC phi vs phi",
414 "ele momentum phi - matching SC phi vs pt",
425 "h_scl_EoEmatchingObject_barrel_matched",
"ele supercluster energy / matching SC energy, barrel", 50, 0.2, 1.2);
427 "h_scl_EoEmatchingObject_endcaps_matched",
"ele supercluster energy / matching SC energy, endcaps", 50, 0.2, 1.2);
429 "ele supercluster energy / matching SC energy, barrel",
434 "ele supercluster energy / matching SC energy, endcaps",
448 histSclSigEtaEta_ =
new TH1F(
"h_scl_sigetaeta",
"ele supercluster sigma eta eta", 100, 0., 0.05);
450 new TH1F(
"h_scl_sigietaieta_barrel",
"ele supercluster sigma ieta ieta, barrel", 100, 0., 0.05);
452 new TH1F(
"h_scl_sigietaieta_endcaps",
"ele supercluster sigma ieta ieta, endcaps", 100, 0., 0.05);
458 new TH1F(
"h_scl_E2x5max_barrel",
"ele supercluster energy in 2x5 max barrel",
nbinp, 0.,
pmax);
460 new TH1F(
"h_scl_E2x5max_endcaps",
"ele supercluster energy in 2x5 max endcaps",
nbinp, 0.,
pmax);
468 new TH2F(
"h_ele_ambiguousTracksVsEta",
"ele # ambiguous tracks vs eta",
nbineta2D,
etamin,
etamax, 5, 0., 5.);
470 new TH2F(
"h_ele_ambiguousTracksVsPhi",
"ele # ambiguous tracks vs phi",
nbinphi2D,
phimin,
phimax, 5, 0., 5.);
472 new TH2F(
"h_ele_ambiguousTracksVsPt",
"ele # ambiguous tracks vs pt",
nbinpt2D, 0.,
ptmax, 5, 0., 5.);
480 h_ele_lostHits =
new TH1F(
"h_ele_lostHits",
"ele track # lost hits", 5, 0., 5.);
487 h_ele_chi2 =
new TH1F(
"h_ele_chi2",
"ele track #chi^{2}", 100, 0., 15.);
491 h_ele_PinMnPout =
new TH1F(
"h_ele_PinMnPout",
"ele track inner p - outer p, mean",
nbinp, 0., 200.);
494 "ele track inner p - outer p vs eta, mode",
502 "ele track inner p - outer p vs phi, mode",
510 "h_ele_PinMnPoutVsPt_mode",
"ele track inner p - outer p vs pt, mode",
nbinpt2D, 0.,
ptmax,
nbinp2D, 0., 100.);
512 "h_ele_PinMnPoutVsE_mode",
"ele track inner p - outer p vs E, mode",
nbinp2D, 0., 200.,
nbinp2D, 0., 100.);
514 "h_ele_PinMnPoutVsChi2_mode",
"ele track inner p - outer p vs track chi2, mode", 50, 0., 20.,
nbinp2D, 0., 100.);
526 new TH2F(
"h_ele_outerPtVsPt_mode",
"ele track outer p_{T} vs pt, mode",
nbinpt2D, 0., 100.,
nbinpt2D, 0.,
ptmax);
534 h_ele_EoPVsE =
new TH2F(
"h_ele_EoPVsE",
"ele E/P_{vertex} vs E", 50, 0.,
pmax, 50, 0., 5.);
540 h_ele_EseedOPVsE =
new TH2F(
"h_ele_EseedOPVsE",
"ele E_{seed}/P_{vertex} vs E", 50, 0.,
pmax, 50, 0., 5.);
557 "ele #eta_{sc} - #eta_{tr} vs eta, prop from vertex",
565 "ele #eta_{sc} - #eta_{tr} vs phi, prop from vertex",
573 "ele #eta_{sc} - #eta_{tr} vs pt, prop from vertex",
583 "ele #phi_{sc} - #phi_{tr} vs eta, prop from vertex",
591 "ele #phi_{sc} - #phi_{tr} vs phi, prop from vertex",
599 "ele #phi_{sc} - #phi_{tr} vs pt, prop from vertex",
607 "ele #eta_{cl} - #eta_{tr}, prop from outermost",
612 "ele #eta_{cl} - #eta_{tr} vs eta, prop from out",
620 "ele #eta_{cl} - #eta_{tr} vs phi, prop from out",
628 "ele #eta_{cl} - #eta_{tr} vs pt, prop from out",
636 "ele #phi_{cl} - #phi_{tr}, prop from outermost",
641 "ele #phi_{cl} - #phi_{tr} vs eta, prop from out",
649 "ele #phi_{cl} - #phi_{tr} vs phi, prop from out",
657 "ele #phi_{cl} - #phi_{tr} vs pt, prop from out",
665 "ele #eta_{EleCl} - #eta_{tr}, prop from outermost",
670 "ele #eta_{EleCl} - #eta_{tr} vs eta, prop from out",
678 "ele #eta_{EleCl} - #eta_{tr} vs phi, prop from out",
686 "ele #eta_{EleCl} - #eta_{tr} vs pt, prop from out",
694 "ele #phi_{EleCl} - #phi_{tr}, prop from outermost",
699 "ele #phi_{EleCl} - #phi_{tr} vs eta, prop from out",
707 "ele #phi_{EleCl} - #phi_{tr} vs phi, prop from out",
715 "ele #phi_{EleCl} - #phi_{tr} vs pt, prop from out",
725 new TH1F(
"h_ele_HoE_fiducial",
"ele hadronic energy / em energy, fiducial region",
nbinhoe,
hoemin,
hoemax);
733 h_ele_seed_dphi2_ =
new TH1F(
"h_ele_seedDphi2",
"ele seed dphi 2nd layer", 50, -0.003, +0.003);
735 new TH2F(
"h_ele_seedDphi2VsEta",
"ele seed dphi 2nd layer vs eta",
nbineta2D,
etamin,
etamax, 50, -0.003, +0.003);
737 new TH2F(
"h_ele_seedDphi2VsPt",
"ele seed dphi 2nd layer vs pt",
nbinpt2D, 0.,
ptmax, 50, -0.003, +0.003);
738 h_ele_seed_drz2_ =
new TH1F(
"h_ele_seedDrz2",
"ele seed dr/dz 2nd layer", 50, -0.03, +0.03);
740 new TH2F(
"h_ele_seedDrz2VsEta",
"ele seed dr/dz 2nd layer vs eta",
nbineta2D,
etamin,
etamax, 50, -0.03, +0.03);
742 new TH2F(
"h_ele_seedDrz2VsPt",
"ele seed dr/dz 2nd layer vs pt",
nbinpt2D, 0.,
ptmax, 50, -0.03, +0.03);
743 h_ele_seed_subdet2_ =
new TH1F(
"h_ele_seedSubdet2",
"ele seed subdet 2nd layer", 10, 0., 10.);
746 h_ele_classes =
new TH1F(
"h_ele_classes",
"electron classes", 20, 0.0, 20.);
753 "ele track inner p vs outer p vs eta, golden, mode",
761 "ele track inner p vs outer p vs eta, Showering, mode",
769 "ele track inner p vs outer p vs eta, golden, mean",
777 "ele track inner p vs outer p vs eta, Showering, mean",
785 "ele track inner pt vs outer pt vs eta, golden, mode",
793 "ele track inner pt vs outer pt vs eta, showering, mode",
801 "ele track inner pt vs outer pt vs eta, golden, mean",
809 "ele track inner pt vs outer pt vs eta, showering, mean",
817 "ele supercluster energy over matchingObject energy, golden, barrel",
822 new TH1F(
"h_scl_EoEmatchingObject golden, endcaps",
823 "ele supercluster energy over matchingObject energy, golden, endcaps",
828 new TH1F(
"h_scl_EoEmatchingObject Showering, barrel",
829 "ele supercluster energy over matchingObject energy, showering, barrel",
834 new TH1F(
"h_scl_EoEmatchingObject Showering, endcaps",
835 "ele supercluster energy over matchingObject energy, showering, endcaps",
841 h_ele_tkSumPt_dr03 =
new TH1F(
"h_ele_tkSumPt_dr03",
"tk isolation sum, dR=0.3", 100, 0.0, 20.);
844 new TH1F(
"h_ele_hcalDepth1TowerSumEt_dr03",
"hcal depth1 isolation sum, dR=0.3", 100, 0.0, 20.);
846 new TH1F(
"h_ele_hcalDepth2TowerSumEt_dr03",
"hcal depth2 isolation sum, dR=0.3", 100, 0.0, 20.);
847 h_ele_tkSumPt_dr04 =
new TH1F(
"h_ele_tkSumPt_dr04",
"hcal isolation sum", 100, 0.0, 20.);
850 new TH1F(
"h_ele_hcalDepth1TowerSumEt_dr04",
"hcal depth1 isolation sum, dR=0.4", 100, 0.0, 20.);
852 new TH1F(
"h_ele_hcalDepth2TowerSumEt_dr04",
"hcal depth2 isolation sum, dR=0.4", 100, 0.0, 20.);
855 h_ele_fbrem =
new TH1F(
"h_ele_fbrem",
"ele brem fraction, mode", 100, 0., 1.);
857 new TProfile(
"h_ele_fbremvsEtamode",
"mean ele brem fraction vs eta, mode",
nbineta2D,
etamin,
etamax, 0., 1.);
859 new TProfile(
"h_ele_fbremvsEtamean",
"mean ele brem fraction vs eta, mean",
nbineta2D,
etamin,
etamax, 0., 1.);
862 h_ele_mva =
new TH1F(
"h_ele_mva",
"ele identification mva", 100, -1., 1.);
863 h_ele_provenance =
new TH1F(
"h_ele_provenance",
"ele provenance", 5, -2., 3.);
886 h_ele_Et->GetXaxis()->SetTitle(
"E_{T} (GeV)");
887 h_ele_Et->GetYaxis()->SetTitle(
"Events");
944 h_ele_EoP->GetXaxis()->SetTitle(
"E/P_{vertex}");
945 h_ele_EoP->GetYaxis()->SetTitle(
"Events");
979 h_ele_HoE->GetYaxis()->SetTitle(
"Events");
982 h_ele_fbrem->GetXaxis()->SetTitle(
"P_{in} - P_{out} / P_{in}");
994 h_ele_mee_os->GetXaxis()->SetTitle(
"m_{e^{+}e^{-}} (GeV/c^{2})");
1012 histNum_->GetXaxis()->SetTitle(
"N_{ele}");
1013 histNum_->GetYaxis()->SetTitle(
"Events");
1020 std::cout <<
"efficiency calculation " << std::endl;
1023 h_ele_etaEff->Reset();
1025 h_ele_etaEff->Print();
1026 h_ele_etaEff->GetXaxis()->SetTitle(
"#eta");
1027 h_ele_etaEff->GetYaxis()->SetTitle(
"Efficiency");
1031 h_ele_zEff->Reset();
1033 h_ele_zEff->Print();
1034 h_ele_zEff->GetXaxis()->SetTitle(
"z (cm)");
1035 h_ele_zEff->GetYaxis()->SetTitle(
"Efficiency");
1039 h_ele_absetaEff->Reset();
1041 h_ele_absetaEff->GetXaxis()->SetTitle(
"|#eta|");
1042 h_ele_absetaEff->GetYaxis()->SetTitle(
"Efficiency");
1046 h_ele_ptEff->Reset();
1048 h_ele_ptEff->GetXaxis()->SetTitle(
"p_{T} (GeV/c)");
1049 h_ele_ptEff->GetYaxis()->SetTitle(
"Efficiency");
1053 h_ele_phiEff->Reset();
1055 h_ele_phiEff->GetXaxis()->SetTitle(
"#phi (rad)");
1056 h_ele_phiEff->GetYaxis()->SetTitle(
"Efficiency");
1059 TH1F *h_ele_eta_goldenFrac = (TH1F *)
h_ele_eta_golden->Clone(
"h_ele_eta_goldenFrac");
1060 h_ele_eta_goldenFrac->Reset();
1062 h_ele_eta_goldenFrac->GetXaxis()->SetTitle(
"|#eta|");
1063 h_ele_eta_goldenFrac->GetYaxis()->SetTitle(
"Fraction of electrons");
1064 h_ele_eta_goldenFrac->SetTitle(
"fraction of golden electrons vs eta");
1065 TH1F *h_ele_eta_bbremFrac = (TH1F *)
h_ele_eta_bbrem->Clone(
"h_ele_eta_bbremFrac");
1066 h_ele_eta_bbremFrac->Reset();
1068 h_ele_eta_bbremFrac->GetXaxis()->SetTitle(
"|#eta|");
1069 h_ele_eta_bbremFrac->GetYaxis()->SetTitle(
"Fraction of electrons");
1070 h_ele_eta_bbremFrac->SetTitle(
"fraction of big brem electrons vs eta");
1071 TH1F *h_ele_eta_narrowFrac = (TH1F *)
h_ele_eta_narrow->Clone(
"h_ele_eta_narrowFrac");
1072 h_ele_eta_narrowFrac->Reset();
1074 h_ele_eta_narrowFrac->GetXaxis()->SetTitle(
"|#eta|");
1075 h_ele_eta_narrowFrac->GetYaxis()->SetTitle(
"Fraction of electrons");
1076 h_ele_eta_narrowFrac->SetTitle(
"fraction of narrow electrons vs eta");
1077 TH1F *h_ele_eta_showerFrac = (TH1F *)
h_ele_eta_shower->Clone(
"h_ele_eta_showerFrac");
1078 h_ele_eta_showerFrac->Reset();
1080 h_ele_eta_showerFrac->GetXaxis()->SetTitle(
"|#eta|");
1081 h_ele_eta_showerFrac->GetYaxis()->SetTitle(
"Fraction of electrons");
1082 h_ele_eta_showerFrac->SetTitle(
"fraction of showering electrons vs eta");
1085 TH1F *h_ele_xOverX0VsEta =
new TH1F(
"h_ele_xOverx0VsEta",
"mean X/X_0 vs eta",
nbineta / 2, 0.0, 2.5);
1087 double xOverX0 = 0.;
1090 h_ele_xOverX0VsEta->SetBinContent(ibin, xOverX0);
1095 p_ele_PoPmatchingObjectVsEta_matched->SetTitle(
"mean ele momentum / matching SC energy vs eta");
1096 p_ele_PoPmatchingObjectVsEta_matched->GetXaxis()->SetTitle(
"#eta");
1097 p_ele_PoPmatchingObjectVsEta_matched->GetYaxis()->SetTitle(
"<P/E_{matching SC}>");
1098 p_ele_PoPmatchingObjectVsEta_matched->Write();
1100 p_ele_PoPmatchingObjectVsPhi_matched->SetTitle(
"mean ele momentum / gen momentum vs phi");
1101 p_ele_PoPmatchingObjectVsPhi_matched->GetXaxis()->SetTitle(
"#phi (rad)");
1102 p_ele_PoPmatchingObjectVsPhi_matched->GetYaxis()->SetTitle(
"<P/E_{matching SC}>");
1103 p_ele_PoPmatchingObjectVsPhi_matched->Write();
1105 p_ele_EtaMnEtamatchingObjectVsEta_matched->GetXaxis()->SetTitle(
"#eta");
1106 p_ele_EtaMnEtamatchingObjectVsEta_matched->GetYaxis()->SetTitle(
"<#eta_{rec} - #eta_{matching SC}>");
1107 p_ele_EtaMnEtamatchingObjectVsEta_matched->Write();
1109 p_ele_EtaMnEtamatchingObjectVsPhi_matched->GetXaxis()->SetTitle(
"#phi");
1110 p_ele_EtaMnEtamatchingObjectVsPhi_matched->GetYaxis()->SetTitle(
"<#eta_{rec} - #eta_{matching SC}>");
1111 p_ele_EtaMnEtamatchingObjectVsPhi_matched->Write();
1113 p_ele_PhiMnPhimatchingObjectVsEta_matched->GetXaxis()->SetTitle(
"#eta");
1114 p_ele_PhiMnPhimatchingObjectVsEta_matched->GetYaxis()->SetTitle(
"<#phi_{rec} - #phi_{matching SC}> (rad)");
1115 p_ele_PhiMnPhimatchingObjectVsEta_matched->Write();
1117 p_ele_PhiMnPhimatchingObjectVsPhi_matched->GetXaxis()->SetTitle(
"#phi");
1118 p_ele_PhiMnPhimatchingObjectVsPhi_matched->GetYaxis()->SetTitle(
"<#phi_{rec} - #phi_{matching SC}> (rad)");
1119 p_ele_PhiMnPhimatchingObjectVsPhi_matched->Write();
1121 p_ele_vertexPtVsEta->GetXaxis()->SetTitle(
"#eta");
1122 p_ele_vertexPtVsEta->GetYaxis()->SetTitle(
"<p_{T}> (GeV/c)");
1123 p_ele_vertexPtVsEta->Write();
1125 p_ele_vertexPtVsPhi->GetXaxis()->SetTitle(
"#phi (rad)");
1126 p_ele_vertexPtVsPhi->GetYaxis()->SetTitle(
"<p_{T}> (GeV/c)");
1127 p_ele_vertexPtVsPhi->Write();
1129 p_ele_EoPVsEta->GetXaxis()->SetTitle(
"#eta");
1130 p_ele_EoPVsEta->GetYaxis()->SetTitle(
"<E/P_{vertex}>");
1131 p_ele_EoPVsEta->Write();
1133 p_ele_EoPVsPhi->GetXaxis()->SetTitle(
"#phi (rad)");
1134 p_ele_EoPVsPhi->GetYaxis()->SetTitle(
"<E/P_{vertex}>");
1135 p_ele_EoPVsPhi->Write();
1137 p_ele_EoPoutVsEta->GetXaxis()->SetTitle(
"#eta");
1138 p_ele_EoPoutVsEta->GetYaxis()->SetTitle(
"<E_{seed}/P_{out}>");
1139 p_ele_EoPoutVsEta->Write();
1141 p_ele_EoPoutVsPhi->GetXaxis()->SetTitle(
"#phi (rad)");
1142 p_ele_EoPoutVsPhi->GetYaxis()->SetTitle(
"<E_{seed}/P_{out}>");
1143 p_ele_EoPoutVsPhi->Write();
1145 p_ele_EeleOPoutVsEta->SetTitle(
"mean ele Eele/pout vs eta");
1146 p_ele_EeleOPoutVsEta->GetXaxis()->SetTitle(
"#eta");
1147 p_ele_EeleOPoutVsEta->GetYaxis()->SetTitle(
"<E_{ele}/P_{out}>");
1148 p_ele_EeleOPoutVsEta->Write();
1150 p_ele_EeleOPoutVsPhi->SetTitle(
"mean ele Eele/pout vs phi");
1151 p_ele_EeleOPoutVsPhi->GetXaxis()->SetTitle(
"#phi (rad)");
1152 p_ele_EeleOPoutVsPhi->GetYaxis()->SetTitle(
"<E_{ele}/P_{out}>");
1153 p_ele_EeleOPoutVsPhi->Write();
1155 p_ele_HoEVsEta->GetXaxis()->SetTitle(
"#eta");
1156 p_ele_HoEVsEta->GetYaxis()->SetTitle(
"<H/E>");
1157 p_ele_HoEVsEta->Write();
1159 p_ele_HoEVsPhi->GetXaxis()->SetTitle(
"#phi (rad)");
1160 p_ele_HoEVsPhi->GetYaxis()->SetTitle(
"<H/E>");
1161 p_ele_HoEVsPhi->Write();
1163 p_ele_chi2VsEta->GetXaxis()->SetTitle(
"#eta");
1164 p_ele_chi2VsEta->GetYaxis()->SetTitle(
"<#Chi^{2}>");
1165 p_ele_chi2VsEta->Write();
1167 p_ele_chi2VsPhi->GetXaxis()->SetTitle(
"#phi (rad)");
1168 p_ele_chi2VsPhi->GetYaxis()->SetTitle(
"<#Chi^{2}>");
1169 p_ele_chi2VsPhi->Write();
1171 p_ele_foundHitsVsEta->GetXaxis()->SetTitle(
"#eta");
1172 p_ele_foundHitsVsEta->GetYaxis()->SetTitle(
"<N_{hits}>");
1173 p_ele_foundHitsVsEta->Write();
1175 p_ele_foundHitsVsPhi->GetXaxis()->SetTitle(
"#phi (rad)");
1176 p_ele_foundHitsVsPhi->GetYaxis()->SetTitle(
"<N_{hits}>");
1177 p_ele_foundHitsVsPhi->Write();
1179 p_ele_lostHitsVsEta->GetXaxis()->SetTitle(
"#eta");
1180 p_ele_lostHitsVsEta->GetYaxis()->SetTitle(
"<N_{hits}>");
1181 p_ele_lostHitsVsEta->Write();
1183 p_ele_lostHitsVsPhi->GetXaxis()->SetTitle(
"#phi (rad)");
1184 p_ele_lostHitsVsPhi->GetYaxis()->SetTitle(
"<N_{hits}>");
1185 p_ele_lostHitsVsPhi->Write();
1187 p_ele_vertexTIPVsEta->SetTitle(
"mean tip (wrt gen vtx) vs eta");
1188 p_ele_vertexTIPVsEta->GetXaxis()->SetTitle(
"#eta");
1189 p_ele_vertexTIPVsEta->GetYaxis()->SetTitle(
"<TIP> (cm)");
1190 p_ele_vertexTIPVsEta->Write();
1192 p_ele_vertexTIPVsPhi->SetTitle(
"mean tip (wrt gen vtx) vs phi");
1193 p_ele_vertexTIPVsPhi->GetXaxis()->SetTitle(
"#phi");
1194 p_ele_vertexTIPVsPhi->GetYaxis()->SetTitle(
"<TIP> (cm)");
1195 p_ele_vertexTIPVsPhi->Write();
1197 p_ele_vertexTIPVsPt->SetTitle(
"mean tip (wrt gen vtx) vs phi");
1198 p_ele_vertexTIPVsPt->GetXaxis()->SetTitle(
"p_{T} (GeV/c)");
1199 p_ele_vertexTIPVsPt->GetYaxis()->SetTitle(
"<TIP> (cm)");
1200 p_ele_vertexTIPVsPt->Write();
1381 p_ele_seed_dphi2VsEta_->SetTitle(
"mean ele seed dphi 2nd layer vs eta");
1382 p_ele_seed_dphi2VsEta_->GetXaxis()->SetTitle(
"#eta");
1383 p_ele_seed_dphi2VsEta_->GetYaxis()->SetTitle(
"<#phi_{pred} - #phi_{hit}, 2nd layer> (rad)");
1384 p_ele_seed_dphi2VsEta_->SetMinimum(-0.004);
1385 p_ele_seed_dphi2VsEta_->SetMaximum(0.004);
1386 p_ele_seed_dphi2VsEta_->Write();
1388 p_ele_seed_dphi2VsPt_->SetTitle(
"mean ele seed dphi 2nd layer vs pt");
1389 p_ele_seed_dphi2VsPt_->GetXaxis()->SetTitle(
"p_{T} (GeV/c)");
1390 p_ele_seed_dphi2VsPt_->GetYaxis()->SetTitle(
"<#phi_{pred} - #phi_{hit}, 2nd layer> (rad)");
1391 p_ele_seed_dphi2VsPt_->Write();
1392 p_ele_seed_dphi2VsPt_->SetMinimum(-0.004);
1393 p_ele_seed_dphi2VsPt_->SetMaximum(0.004);
1396 p_ele_seed_drz2VsEta_->SetTitle(
"mean ele seed dr(dz) 2nd layer vs eta");
1397 p_ele_seed_drz2VsEta_->GetXaxis()->SetTitle(
"#eta");
1398 p_ele_seed_drz2VsEta_->GetYaxis()->SetTitle(
"<r(z)_{pred} - r(z)_{hit}, 2nd layer> (cm)");
1399 p_ele_seed_drz2VsEta_->SetMinimum(-0.15);
1400 p_ele_seed_drz2VsEta_->SetMaximum(0.15);
1401 p_ele_seed_drz2VsEta_->Write();
1403 p_ele_seed_drz2VsPt_->SetTitle(
"mean ele seed dr(dz) 2nd layer vs pt");
1404 p_ele_seed_drz2VsPt_->GetXaxis()->SetTitle(
"p_{T} (GeV/c)");
1405 p_ele_seed_drz2VsPt_->GetYaxis()->SetTitle(
"<r(z)_{pred} - r(z)_{hit}, 2nd layer> (cm)");
1406 p_ele_seed_drz2VsPt_->SetMinimum(-0.15);
1407 p_ele_seed_drz2VsPt_->SetMaximum(0.15);
1408 p_ele_seed_drz2VsPt_->Write();
1434 h_ele_etaEff->Write();
1435 h_ele_zEff->Write();
1436 h_ele_phiEff->Write();
1437 h_ele_absetaEff->Write();
1438 h_ele_ptEff->Write();
1439 h_ele_eta_goldenFrac->Write();
1440 h_ele_eta_bbremFrac->Write();
1441 h_ele_eta_narrowFrac->Write();
1442 h_ele_eta_showerFrac->Write();
1443 h_ele_xOverX0VsEta->Write();
1477 std::cout <<
"analyzing new event " << std::endl;
1484 std::cout <<
"new event passing trigger " << std::endl;
1490 edm::LogInfo(
"") <<
"\n\n =================> Treating event " <<
iEvent.id() <<
" Number of electrons "
1502 histNum_->Fill((*gsfElectrons).size());
1508 if (gsfIter->superCluster()->energy() / cosh(gsfIter->superCluster()->eta()) <
minEt_)
1512 if (gsfIter->pt() <
minPt_)
1515 if (gsfIter->isEB() &&
isEE_)
1517 if (gsfIter->isEE() &&
isEB_)
1563 if (gsfIter->mva_e_pi() <
mvaMin_)
1566 double d = (gsfIter->vertex().x() -
bs.position().x()) * (gsfIter->vertex().x() -
bs.position().x()) +
1567 (gsfIter->vertex().y() -
bs.position().y()) * (gsfIter->vertex().y() -
bs.position().y());
1594 h_ele_Et->Fill(gsfIter->superCluster()->energy() / cosh(gsfIter->superCluster()->eta()));
1611 if (!gsfIter->ecalDrivenSeed() && gsfIter->trackerDrivenSeed())
1612 sclRef = gsfIter->parentSuperCluster();
1614 double R = TMath::Sqrt(sclRef->x() * sclRef->x() + sclRef->y() * sclRef->y() + sclRef->z() * sclRef->z());
1615 double Rt = TMath::Sqrt(sclRef->x() * sclRef->x() + sclRef->y() * sclRef->y());
1623 if (gsfIter->isEB())
1625 if (gsfIter->isEE())
1628 if (gsfIter->isEB())
1630 if (gsfIter->isEE())
1633 if (gsfIter->isEB())
1635 if (gsfIter->isEE())
1638 if (gsfIter->isEB())
1640 if (gsfIter->isEE())
1657 h_ele_chi2->Fill(gsfIter->gsfTrack()->normalizedChi2());
1658 h_ele_chi2VsEta->Fill(gsfIter->eta(), gsfIter->gsfTrack()->normalizedChi2());
1659 h_ele_chi2VsPhi->Fill(gsfIter->phi(), gsfIter->gsfTrack()->normalizedChi2());
1660 h_ele_chi2VsPt->Fill(gsfIter->pt(), gsfIter->gsfTrack()->normalizedChi2());
1664 h_ele_PinMnPout->Fill(gsfIter->gsfTrack()->innerMomentum().R() - gsfIter->gsfTrack()->outerMomentum().R());
1665 h_ele_outerP->Fill(gsfIter->gsfTrack()->outerMomentum().R());
1666 h_ele_outerPt->Fill(gsfIter->gsfTrack()->outerMomentum().Rho());
1669 h_ele_PinMnPout_mode->Fill(gsfIter->trackMomentumAtVtx().R() - gsfIter->trackMomentumOut().R());
1671 gsfIter->trackMomentumAtVtx().R() - gsfIter->trackMomentumOut().R());
1673 gsfIter->trackMomentumAtVtx().R() - gsfIter->trackMomentumOut().R());
1674 h_ele_PinMnPoutVsPt_mode->Fill(gsfIter->pt(), gsfIter->trackMomentumAtVtx().R() - gsfIter->trackMomentumOut().R());
1676 gsfIter->trackMomentumAtVtx().R() - gsfIter->trackMomentumOut().R());
1679 gsfIter->trackMomentumAtVtx().R() - gsfIter->trackMomentumOut().R());
1699 h_ele_EoP->Fill(gsfIter->eSuperClusterOverP());
1700 h_ele_EoPVsEta->Fill(gsfIter->eta(), gsfIter->eSuperClusterOverP());
1701 h_ele_EoPVsPhi->Fill(gsfIter->phi(), gsfIter->eSuperClusterOverP());
1702 h_ele_EoPVsE->Fill(gsfIter->caloEnergy(), gsfIter->eSuperClusterOverP());
1706 h_ele_EseedOPVsE->Fill(gsfIter->caloEnergy(), gsfIter->eSeedClusterOverP());
1710 h_ele_EoPoutVsE->Fill(gsfIter->caloEnergy(), gsfIter->eSeedClusterOverPout());
1739 h_ele_HoE->Fill(gsfIter->hadronicOverEm());
1740 if (!gsfIter->isEBEtaGap() && !gsfIter->isEBPhiGap() && !gsfIter->isEBEEGap() && !gsfIter->isEERingGap() &&
1741 !gsfIter->isEEDeeGap())
1745 h_ele_HoEVsE->Fill(gsfIter->caloEnergy(), gsfIter->hadronicOverEm());
1748 int eleClass = gsfIter->classification();
1749 if (gsfIter->isEE())
1754 if (gsfIter->classification() == GsfElectron::GOLDEN)
1756 if (gsfIter->classification() == GsfElectron::BIGBREM)
1759 if (gsfIter->classification() == GsfElectron::SHOWERING)
1763 double fbrem_mean = 0.;
1765 fbrem_mean = 1. - gsfIter->gsfTrack()->outerMomentum().R() / gsfIter->gsfTrack()->innerMomentum().R();
1766 double fbrem_mode = gsfIter->fbrem();
1772 if (gsfIter->classification() == GsfElectron::GOLDEN)
1774 if (gsfIter->classification() == GsfElectron::SHOWERING)
1777 if (gsfIter->classification() == GsfElectron::GOLDEN)
1779 gsfIter->gsfTrack()->innerMomentum().R());
1781 if (gsfIter->classification() == GsfElectron::SHOWERING)
1783 gsfIter->gsfTrack()->innerMomentum().R());
1784 if (gsfIter->classification() == GsfElectron::GOLDEN)
1786 if (gsfIter->classification() == GsfElectron::SHOWERING)
1789 if (gsfIter->classification() == GsfElectron::GOLDEN)
1791 gsfIter->gsfTrack()->innerMomentum().Rho());
1793 if (gsfIter->classification() == GsfElectron::SHOWERING)
1795 gsfIter->gsfTrack()->innerMomentum().Rho());
1798 if (gsfIter->ecalDrivenSeed())
1800 if (gsfIter->trackerDrivenSeed())
1802 if (gsfIter->trackerDrivenSeed() || gsfIter->ecalDrivenSeed())
1804 if (gsfIter->trackerDrivenSeed() && !gsfIter->ecalDrivenSeed())
1806 if (!gsfIter->trackerDrivenSeed() && gsfIter->ecalDrivenSeed())
1818 float enrj1 = gsfIter->superCluster()->energy();
1820 for (reco::GsfElectronCollection::const_iterator gsfIter2 = gsfIter + 1; gsfIter2 !=
gsfElectrons->end();
1823 float mee2 = p12.Dot(p12);
1824 float enrj2 = gsfIter2->superCluster()->energy();
1827 if (gsfIter->ecalDrivenSeed() && gsfIter2->ecalDrivenSeed())
1829 if (gsfIter->charge() * gsfIter2->charge() < 0.) {
1831 if (gsfIter->isEB() && gsfIter2->isEB())
1833 if ((gsfIter->isEB() && gsfIter2->isEE()) || (gsfIter->isEE() && gsfIter2->isEB()))
1835 if (gsfIter->isEE() && gsfIter2->isEE())
1837 if ((gsfIter->classification()==GsfElectron::GOLDEN && gsfIter2->classification()==GsfElectron::GOLDEN) ||
1838 (gsfIter->classification()==GsfElectron::GOLDEN && gsfIter2->classification()==GsfElectron::BIGBREM) ||
1840 (gsfIter->classification()==GsfElectron::BIGBREM && gsfIter2->classification()==GsfElectron::GOLDEN) ||
1841 (gsfIter->classification()==GsfElectron::BIGBREM && gsfIter2->classification()==GsfElectron::BIGBREM)
1848 }
else if ((gsfIter->classification() == GsfElectron::SHOWERING &&
1849 gsfIter2->classification() == GsfElectron::SHOWERING) ||
1850 (gsfIter->classification() == GsfElectron::SHOWERING && gsfIter2->isGap()) ||
1851 (gsfIter->isGap() && gsfIter2->classification() == GsfElectron::SHOWERING) ||
1852 (gsfIter->isGap() && gsfIter2->isGap())) {
1862 int matchingObjectNum = 0;
1864 for (reco::SuperClusterCollection::const_iterator moIter = recoClusters->begin(); moIter != recoClusters->end();
1867 matchingObjectNum++;
1886 bool okGsfFound =
false;
1887 double gsfOkRatio = 999999.;
1895 double dphi = gsfIter->
phi() - moIter->phi();
1897 dphi = dphi < 0 ? (CLHEP::twopi) + dphi : dphi - CLHEP::twopi;
1902 double tmpGsfRatio = gsfIter->p() / moIter->energy();
1904 gsfOkRatio = tmpGsfRatio;
1905 bestGsfElectron = *gsfIter;
1937 if (bestGsfElectron.
isEB())
1939 if (bestGsfElectron.
isEE())
1941 if (bestGsfElectron.
isEB())
1943 if (bestGsfElectron.
isEE())
1947 if (bestGsfElectron.
isEB())
1949 if (bestGsfElectron.
isEE())
1951 if (bestGsfElectron.
isEB())
1953 if (bestGsfElectron.
isEE())
1985 for (
unsigned int i = 0;
i !=
n;
i++) {
1994 for (
unsigned int i = 0;
i !=
n;
i++) {
2002 std::cout <<
"HLT trigger paths requested: index, name and valididty:" << std::endl;
2003 for (
unsigned int i = 0;
i !=
n;
i++) {
2011 unsigned int fired = 0;
2012 for (
unsigned int i = 0;
i !=
n;
i++) {