38 #include "CLHEP/Units/GlobalPhysicalConstants.h"
52 : beamSpot_(conf.getParameter<
edm::
InputTag>(
"beamSpot")) {
68 ptmax =
pset.getParameter<
double>(
"Ptmax");
69 pmax =
pset.getParameter<
double>(
"Pmax");
123 if (locJet != std::string::npos) {
124 std::cout <<
"Matching objects are CaloJets " << std::endl;
127 std::cout <<
"Didn't recognize input matching objects!! " << std::endl;
131 hlabel =
"h_" +
type_ +
"Num";
132 htitle =
"# " +
type_ +
"s";
137 histNum_ =
new TH1F(
"h_recEleNum",
"# rec electrons", 20, 0., 20.);
140 hlabel =
"h_" +
type_ +
"_eta";
141 htitle =
type_ +
" #eta";
143 hlabel =
"h_" +
type_ +
"_abseta";
144 htitle =
type_ +
" |#eta|";
146 hlabel =
"h_" +
type_ +
"_P";
147 htitle =
type_ +
" p";
149 hlabel =
"h_" +
type_ +
"_Pt";
150 htitle =
type_ +
" pt";
152 hlabel =
"h_" +
type_ +
"_phi";
153 htitle =
type_ +
" phi";
155 hlabel =
"h_" +
type_ +
"_z";
156 htitle =
type_ +
" z";
165 "ele #eta_{sc} - #eta_{tr}, prop from vertex, all reco electrons",
170 "ele #phi_{sc} - #phi_{tr}, prop from vertex, all reco electrons",
175 "ele #eta_{cl} - #eta_{tr}, prop from outermost, all reco electrons",
180 "ele #phi_{cl} - #phi_{tr}, prop from outermost, all reco electrons",
185 new TH1F(
"h_ele_HoE_all",
"ele hadronic energy / em energy, all reco electrons",
nbinhoe,
hoemin,
hoemax);
190 h_ele_TIP_all =
new TH1F(
"h_ele_TIP_all",
"ele vertex transverse radius, all reco electrons", 100, 0., 0.2);
196 "E2 - E1 vs ele pairs invariant mass, all electrons",
204 "E2 - E1 vs ele pairs invariant mass, ecal driven pairs, all electrons",
213 h_ele_charge =
new TH1F(
"h_ele_charge",
"ele charge", 5, -2., 2.);
224 new TH1F(
"h_ele_matchingObjectPt_matched",
"Efficiency vs matching jet p_{T}",
nbinpteff, 5.,
ptmax);
230 new TH1F(
"h_ele_matchingObjectAbsEta_matched",
"Efficiency vs matching jet |#eta|",
nbineta / 2, 0., 2.5);
233 new TH1F(
"h_ele_matchingObjectEta_matched",
"Efficiency vs matching jet #eta",
nbineta,
etamin,
etamax);
236 new TH1F(
"h_ele_matchingObjectPhi_matched",
"Efficiency vs matching jet phi",
nbinphi,
phimin,
phimax);
243 new TH1F(
"h_ele_matchingObjectZ_matched",
"Efficiency vs matching jet z",
nbinxyz, -25, 25);
245 h_ele_vertexTIP =
new TH1F(
"h_ele_vertexTIP",
"ele transverse impact parameter (wrt bs)", 90, 0., 0.15);
247 "ele transverse impact parameter (wrt bs) vs eta",
255 "ele transverse impact parameter (wrt bs) vs phi",
263 "h_ele_vertexTIPVsPt",
"ele transverse impact parameter (wrt bs) vs Pt",
nbinpt2D, 0.,
ptmax, 45, 0., 0.15);
264 h_ele_PoPmatchingObject =
new TH1F(
"h_ele_PoPmatchingObject",
"ele momentum / matching jet momentum", 75, 0., 1.5);
266 "ele momentum / matching jet momentum vs eta",
274 "ele momentum / matching jet momentum vs phi",
282 "h_ele_PoPmatchingObjectVsPt",
"ele momentum / matching jet momentum vs eta",
nbinpt2D, 0.,
ptmax, 50, 0., 1.5);
284 new TH1F(
"h_ele_PoPmatchingObject_barrel",
"ele momentum / matching jet momentum, barrel", 75, 0., 1.5);
286 new TH1F(
"h_ele_PoPmatchingObject_endcaps",
"ele momentum / matching jet momentum, endcaps", 75, 0., 1.5);
288 new TH1F(
"h_ele_EtaMnEtamatchingObject",
"ele momentum eta - matching jet eta",
nbindeta,
detamin,
detamax);
290 "ele momentum eta - matching jet eta vs eta",
298 "ele momentum eta - matching jet eta vs phi",
306 "ele momentum eta - matching jet eta vs pt",
314 new TH1F(
"h_ele_PhiMnPhimatchingObject",
"ele momentum phi - matching jet phi",
nbindphi,
dphimin,
dphimax);
316 "ele momentum phi - matching jet phi",
321 "ele momentum phi - matching SC phi vs eta",
329 "ele momentum phi - matching SC phi vs phi",
337 "ele momentum phi - matching SC phi vs pt",
348 new TH1F(
"h_scl_EoEmatchingObject_barrel",
"ele supercluster energy / matching jet energy, barrel", 50, 0.2, 1.2);
350 "h_scl_EoEmatchingObject_endcaps",
"ele supercluster energy / matching jet energy, endcaps", 50, 0.2, 1.2);
361 histSclSigIEtaIEta_ =
new TH1F(
"h_scl_sigietaieta",
"ele supercluster sigma ieta ieta", 100, 0., 0.05);
363 new TH1F(
"h_scl_sigietaieta_barrel",
"ele supercluster sigma ieta ieta, barrel", 100, 0., 0.05);
365 new TH1F(
"h_scl_sigietaieta_endcaps",
"ele supercluster sigma ieta ieta, endcaps", 100, 0., 0.05);
371 new TH1F(
"h_scl_E2x5max_barrel",
"ele supercluster energy in 2x5 max barrel",
nbinp, 0.,
pmax);
373 new TH1F(
"h_scl_E2x5max_endcaps",
"ele supercluster energy in 2x5 max endcaps",
nbinp, 0.,
pmax);
381 new TH2F(
"h_ele_ambiguousTracksVsEta",
"ele # ambiguous tracks vs eta",
nbineta2D,
etamin,
etamax, 5, 0., 5.);
383 new TH2F(
"h_ele_ambiguousTracksVsPhi",
"ele # ambiguous tracks vs phi",
nbinphi2D,
phimin,
phimax, 5, 0., 5.);
385 new TH2F(
"h_ele_ambiguousTracksVsPt",
"ele # ambiguous tracks vs pt",
nbinpt2D, 0.,
ptmax, 5, 0., 5.);
393 h_ele_lostHits =
new TH1F(
"h_ele_lostHits",
"ele track # lost hits", 5, 0., 5.);
400 h_ele_chi2 =
new TH1F(
"h_ele_chi2",
"ele track #chi^{2}", 100, 0., 15.);
404 h_ele_PinMnPout =
new TH1F(
"h_ele_PinMnPout",
"ele track inner p - outer p, mean",
nbinp, 0., 200.);
407 "ele track inner p - outer p vs eta, mode",
415 "ele track inner p - outer p vs phi, mode",
423 "h_ele_PinMnPoutVsPt_mode",
"ele track inner p - outer p vs pt, mode",
nbinpt2D, 0.,
ptmax,
nbinp2D, 0., 100.);
425 "h_ele_PinMnPoutVsE_mode",
"ele track inner p - outer p vs E, mode",
nbinp2D, 0., 200.,
nbinp2D, 0., 100.);
427 "h_ele_PinMnPoutVsChi2_mode",
"ele track inner p - outer p vs track chi2, mode", 50, 0., 20.,
nbinp2D, 0., 100.);
439 new TH2F(
"h_ele_outerPtVsPt_mode",
"ele track outer p_{T} vs pt, mode",
nbinpt2D, 0., 100.,
nbinpt2D, 0.,
ptmax);
458 h_ele_EoPVsE =
new TH2F(
"h_ele_EoPVsE",
"ele E/P_{vertex} vs E", 50, 0.,
pmax, 50, 0., 5.);
466 new TH1F(
"h_ele_EseedOP_eg_barrel",
"ele E_{seed}/P_{vertex}, ecal driven barrel",
nbineop, 0.,
eopmax);
471 new TH1F(
"h_ele_EseedOP_eg_endcaps",
"ele E_{seed}/P_{vertex}, ecal driven, endcaps",
nbineop, 0.,
eopmax);
477 h_ele_EseedOPVsE =
new TH2F(
"h_ele_EseedOPVsE",
"ele E_{seed}/P_{vertex} vs E", 50, 0.,
pmax, 50, 0., 5.);
485 new TH1F(
"h_ele_EoPout_eg_barrel",
"ele E_{seed}/P_{out}, ecal driven, barrel",
nbineop, 0.,
eopmax);
490 new TH1F(
"h_ele_EoPout_eg_endcaps",
"ele E_{seed}/P_{out}, ecal driven, endcaps",
nbineop, 0.,
eopmax);
504 new TH1F(
"h_ele_EeleOPout_eg_barrel",
"ele E_{ele}/P_{out}, ecal driven, barrel",
nbineop, 0.,
eopmax);
509 new TH1F(
"h_ele_EeleOPout_eg_endcaps",
"ele E_{ele}/P_{out}, ecal driven, endcaps",
nbineop, 0.,
eopmax);
521 "ele #eta_{sc} - #eta_{tr}, prop from vertex, ecal driven",
527 "ele #eta_{sc} - #eta_{tr}, prop from vertex, barrel",
533 "ele #eta_{sc} - #eta_{tr}, prop from vertex, ecal driven, barrel",
539 "ele #eta_{sc} - #eta_{tr}, prop from vertex, endcaps",
545 "ele #eta_{sc} - #eta_{tr}, prop from vertex, ecal driven, endcaps",
551 "ele #eta_{sc} - #eta_{tr} vs eta, prop from vertex",
559 "ele #eta_{sc} - #eta_{tr} vs phi, prop from vertex",
567 "ele #eta_{sc} - #eta_{tr} vs pt, prop from vertex",
578 "ele #phi_{sc} - #phi_{tr}, prop from vertex, ecal driven",
584 "ele #phi_{sc} - #phi_{tr}, prop from vertex, barrel",
590 "ele #phi_{sc} - #phi_{tr}, prop from vertex, ecal driven, barrel",
596 "ele #phi_{sc} - #phi_{tr}, prop from vertex, endcaps",
602 "ele #phi_{sc} - #phi_{tr}, prop from vertex, ecal driven, endcaps",
608 "ele #phi_{sc} - #phi_{tr} vs eta, prop from vertex",
616 "ele #phi_{sc} - #phi_{tr} vs phi, prop from vertex",
624 "ele #phi_{sc} - #phi_{tr} vs pt, prop from vertex",
632 "ele #eta_{cl} - #eta_{tr}, prop from outermost",
638 "ele #eta_{cl} - #eta_{tr}, prop from outermost, ecal driven",
644 "ele #eta_{cl} - #eta_{tr}, prop from outermost, barrel",
650 "ele #eta_{cl} - #eta_{tr}, prop from outermost, ecal driven, barrel",
656 "ele #eta_{cl} - #eta_{tr}, prop from outermost, endcaps",
662 "ele #eta_{cl} - #eta_{tr}, prop from outermost, ecal driven, endcaps",
668 "ele #eta_{cl} - #eta_{tr} vs eta, prop from out",
676 "ele #eta_{cl} - #eta_{tr} vs phi, prop from out",
684 "ele #eta_{cl} - #eta_{tr} vs pt, prop from out",
692 "ele #phi_{cl} - #phi_{tr}, prop from outermost",
698 "ele #phi_{cl} - #phi_{tr}, prop from outermost, ecal driven",
704 "ele #phi_{cl} - #phi_{tr}, prop from outermost, barrel",
710 "ele #phi_{cl} - #phi_{tr}, prop from outermost, ecal driven, barrel",
716 "ele #phi_{cl} - #phi_{tr}, prop from outermost, endcaps",
722 "ele #phi_{cl} - #phi_{tr}, prop from outermost, ecal driven, endcaps",
728 "ele #phi_{cl} - #phi_{tr} vs eta, prop from out",
736 "ele #phi_{cl} - #phi_{tr} vs phi, prop from out",
744 "ele #phi_{cl} - #phi_{tr} vs pt, prop from out",
752 "ele #eta_{EleCl} - #eta_{tr}, prop from outermost",
758 "ele #eta_{EleCl} - #eta_{tr}, prop from outermost, ecal driven",
764 "ele #eta_{EleCl} - #eta_{tr}, prop from outermost, barrel",
770 "ele #eta_{EleCl} - #eta_{tr}, prop from outermost, ecal driven, barrel",
776 "ele #eta_{EleCl} - #eta_{tr}, prop from outermost, endcaps",
782 new TH1F(
"h_ele_dEtaEleCl_propOut_eg_endcaps",
783 "ele #eta_{EleCl} - #eta_{tr}, prop from outermost, ecal driven, endcaps",
789 "ele #eta_{EleCl} - #eta_{tr} vs eta, prop from out",
797 "ele #eta_{EleCl} - #eta_{tr} vs phi, prop from out",
805 "ele #eta_{EleCl} - #eta_{tr} vs pt, prop from out",
813 "ele #phi_{EleCl} - #phi_{tr}, prop from outermost",
819 "ele #phi_{EleCl} - #phi_{tr}, prop from outermost, ecal driven",
825 "ele #phi_{EleCl} - #phi_{tr}, prop from outermost, barrel",
831 "ele #phi_{EleCl} - #phi_{tr}, prop from outermost, ecal driven, barrel",
837 "ele #phi_{EleCl} - #phi_{tr}, prop from outermost, endcaps",
843 new TH1F(
"h_ele_dPhiEleCl_propOut_eg_endcaps",
844 "ele #phi_{EleCl} - #phi_{tr}, prop from outermost, ecal driven, endcaps",
850 "ele #phi_{EleCl} - #phi_{tr} vs eta, prop from out",
858 "ele #phi_{EleCl} - #phi_{tr} vs phi, prop from out",
866 "ele #phi_{EleCl} - #phi_{tr} vs pt, prop from out",
881 new TH1F(
"h_ele_HoE_eg_barrel",
"ele hadronic energy / em energy, ecal driven, barrel",
nbinhoe,
hoemin,
hoemax);
884 new TH1F(
"h_ele_HoE_endcaps",
"ele hadronic energy / em energy, endcaps",
nbinhoe,
hoemin,
hoemax);
887 "h_ele_HoE_eg_endcaps",
"ele hadronic energy / em energy, ecal driven, endcaps",
nbinhoe,
hoemin,
hoemax);
897 h_ele_seed_dphi2_ =
new TH1F(
"h_ele_seedDphi2",
"ele seed dphi 2nd layer", 50, -0.003, +0.003);
899 new TH2F(
"h_ele_seedDphi2VsEta",
"ele seed dphi 2nd layer vs eta",
nbineta2D,
etamin,
etamax, 50, -0.003, +0.003);
901 new TH2F(
"h_ele_seedDphi2VsPt",
"ele seed dphi 2nd layer vs pt",
nbinpt2D, 0.,
ptmax, 50, -0.003, +0.003);
902 h_ele_seed_drz2_ =
new TH1F(
"h_ele_seedDrz2",
"ele seed dr/dz 2nd layer", 50, -0.03, +0.03);
904 new TH2F(
"h_ele_seedDrz2VsEta",
"ele seed dr/dz 2nd layer vs eta",
nbineta2D,
etamin,
etamax, 50, -0.03, +0.03);
906 new TH2F(
"h_ele_seedDrz2VsPt",
"ele seed dr/dz 2nd layer vs pt",
nbinpt2D, 0.,
ptmax, 50, -0.03, +0.03);
907 h_ele_seed_subdet2_ =
new TH1F(
"h_ele_seedSubdet2",
"ele seed subdet 2nd layer", 10, 0., 10.);
910 h_ele_classes =
new TH1F(
"h_ele_classes",
"electron classes", 20, 0.0, 20.);
917 "h_ele_PinVsPoutGolden_mode",
"ele track inner p vs outer p, golden, mode",
nbinp2D, 0.,
pmax, 50, 0.,
pmax);
919 "ele track inner p vs outer p vs eta, showering, mode",
927 "h_ele_PinVsPoutGolden_mean",
"ele track inner p vs outer p, golden, mean",
nbinp2D, 0.,
pmax, 50, 0.,
pmax);
929 "h_ele_PinVsPoutShowering_mean",
"ele track inner p vs outer p, showering, mean",
nbinp2D, 0.,
pmax, 50, 0.,
pmax);
931 "ele track inner pt vs outer pt, golden, mode",
939 "ele track inner pt vs outer pt, showering, mode",
947 "ele track inner pt vs outer pt, golden, mean",
955 "ele track inner pt vs outer pt, showering, mean",
963 "h_scl_EoEmatchingObject golden, barrel",
"ele SC energy over matching jet energy, golden, barrel", 100, 0.2, 1.2);
965 "ele SC energy over matching jet energy, golden, endcaps",
970 "ele SC energy over matching jet energy, showering, barrel",
975 "ele SC energy over matching jet energy, showering, endcaps",
981 h_ele_tkSumPt_dr03 =
new TH1F(
"h_ele_tkSumPt_dr03",
"tk isolation sum, dR=0.3", 100, 0.0, 20.);
984 new TH1F(
"h_ele_hcalDepth1TowerSumEt_dr03",
"hcal depth1 isolation sum, dR=0.3", 100, 0.0, 20.);
986 new TH1F(
"h_ele_hcalDepth2TowerSumEt_dr03",
"hcal depth2 isolation sum, dR=0.3", 100, 0.0, 20.);
987 h_ele_tkSumPt_dr04 =
new TH1F(
"h_ele_tkSumPt_dr04",
"hcal isolation sum", 100, 0.0, 20.);
990 new TH1F(
"h_ele_hcalDepth1TowerSumEt_dr04",
"hcal depth1 isolation sum, dR=0.4", 100, 0.0, 20.);
992 new TH1F(
"h_ele_hcalDepth2TowerSumEt_dr04",
"hcal depth2 isolation sum, dR=0.4", 100, 0.0, 20.);
995 h_ele_fbrem =
new TH1F(
"h_ele_fbrem",
"ele brem fraction, mode", 100, 0., 1.);
997 new TProfile(
"h_ele_fbremvsEtamode",
"mean ele brem fraction vs eta, mode",
nbineta2D,
etamin,
etamax, 0., 1.);
999 new TProfile(
"h_ele_fbremvsEtamean",
"mean ele brem fraction vs eta, mean",
nbineta2D,
etamin,
etamax, 0., 1.);
1002 h_ele_mva =
new TH1F(
"h_ele_mva",
"ele mva", 100, -1., 1.);
1003 h_ele_provenance =
new TH1F(
"h_ele_provenance",
"ele provenance", 5, -2., 3.);
1018 h_ele_chi2->GetXaxis()->SetTitle(
"#Chi^{2}");
1064 h_ele_PinMnPout->GetXaxis()->SetTitle(
"P_{vertex} - P_{out} (GeV/c)");
1076 h_ele_EoP->GetXaxis()->SetTitle(
"E/P_{vertex}");
1077 h_ele_EoP->GetYaxis()->SetTitle(
"Events");
1080 h_ele_EoPout->GetXaxis()->SetTitle(
"E_{seed}/P_{out}");
1154 h_ele_HoE->GetYaxis()->SetTitle(
"Events");
1161 h_ele_fbrem->GetXaxis()->SetTitle(
"P_{in} - P_{out} / P_{in}");
1191 h_ele_mee_os->GetXaxis()->SetTitle(
"m_{e^{+}e^{-}} (GeV/c^{2})");
1197 histNum_->GetXaxis()->SetTitle(
"N_{ele}");
1198 histNum_->GetYaxis()->SetTitle(
"Events");
1205 std::cout <<
"efficiency calculation " << std::endl;
1208 h_ele_etaEff->Reset();
1210 h_ele_etaEff->Print();
1211 h_ele_etaEff->GetXaxis()->SetTitle(
"#eta");
1212 h_ele_etaEff->GetYaxis()->SetTitle(
"Efficiency");
1216 h_ele_zEff->Reset();
1218 h_ele_zEff->Print();
1219 h_ele_zEff->GetXaxis()->SetTitle(
"z (cm)");
1220 h_ele_zEff->GetYaxis()->SetTitle(
"Efficiency");
1224 h_ele_absetaEff->Reset();
1226 h_ele_absetaEff->GetXaxis()->SetTitle(
"|#eta|");
1227 h_ele_absetaEff->GetYaxis()->SetTitle(
"Efficiency");
1231 h_ele_ptEff->Reset();
1233 h_ele_ptEff->GetXaxis()->SetTitle(
"p_{T} (GeV/c)");
1234 h_ele_ptEff->GetYaxis()->SetTitle(
"Efficiency");
1238 h_ele_phiEff->Reset();
1240 h_ele_phiEff->GetXaxis()->SetTitle(
"#phi (rad)");
1241 h_ele_phiEff->GetYaxis()->SetTitle(
"Efficiency");
1245 h_ele_etaEff_all->Reset();
1247 h_ele_etaEff_all->Print();
1248 h_ele_etaEff_all->GetXaxis()->SetTitle(
"#eta");
1249 h_ele_etaEff_all->GetYaxis()->SetTitle(
"N_{rec}/N_{matching jet}");
1251 h_ele_ptEff_all->Reset();
1253 h_ele_ptEff_all->Print();
1254 h_ele_ptEff_all->GetXaxis()->SetTitle(
"p_{T} (GeV/c)");
1255 h_ele_ptEff_all->GetYaxis()->SetTitle(
"N_{rec}/N_{matching jet}");
1258 TH1F *h_ele_eta_goldenFrac = (TH1F *)
h_ele_eta_golden->Clone(
"h_ele_eta_goldenFrac");
1259 h_ele_eta_goldenFrac->Reset();
1260 h_ele_eta_goldenFrac->GetXaxis()->SetTitle(
"|#eta|");
1261 h_ele_eta_goldenFrac->GetYaxis()->SetTitle(
"Fraction of electrons");
1263 h_ele_eta_goldenFrac->SetTitle(
"fraction of golden electrons vs eta");
1264 TH1F *h_ele_eta_bbremFrac = (TH1F *)
h_ele_eta_bbrem->Clone(
"h_ele_eta_bbremFrac");
1265 h_ele_eta_bbremFrac->Reset();
1267 h_ele_eta_bbremFrac->GetXaxis()->SetTitle(
"|#eta|");
1268 h_ele_eta_bbremFrac->GetYaxis()->SetTitle(
"Fraction of electrons");
1269 h_ele_eta_bbremFrac->SetTitle(
"fraction of big brem electrons vs eta");
1270 TH1F *h_ele_eta_narrowFrac = (TH1F *)
h_ele_eta_narrow->Clone(
"h_ele_eta_narrowFrac");
1271 h_ele_eta_narrowFrac->Reset();
1273 h_ele_eta_narrowFrac->GetXaxis()->SetTitle(
"|#eta|");
1274 h_ele_eta_narrowFrac->GetYaxis()->SetTitle(
"Fraction of electrons");
1275 h_ele_eta_narrowFrac->SetTitle(
"fraction of narrow electrons vs eta");
1276 TH1F *h_ele_eta_showerFrac = (TH1F *)
h_ele_eta_shower->Clone(
"h_ele_eta_showerFrac");
1277 h_ele_eta_showerFrac->Reset();
1279 h_ele_eta_showerFrac->GetXaxis()->SetTitle(
"|#eta|");
1280 h_ele_eta_showerFrac->GetYaxis()->SetTitle(
"Fraction of electrons");
1281 h_ele_eta_showerFrac->SetTitle(
"fraction of showering electrons vs eta");
1284 TH1F *h_ele_xOverX0VsEta =
new TH1F(
"h_ele_xOverx0VsEta",
"mean X/X_0 vs eta",
nbineta / 2, 0.0, 2.5);
1286 double xOverX0 = 0.;
1289 h_ele_xOverX0VsEta->SetBinContent(ibin, xOverX0);
1294 p_ele_PoPmatchingObjectVsEta->SetTitle(
"mean ele momentum / matching SC energy vs eta");
1295 p_ele_PoPmatchingObjectVsEta->GetXaxis()->SetTitle(
"#eta");
1296 p_ele_PoPmatchingObjectVsEta->GetYaxis()->SetTitle(
"<P/E_{matching jet}>");
1297 p_ele_PoPmatchingObjectVsEta->Write();
1299 p_ele_PoPmatchingObjectVsPhi->SetTitle(
"mean ele momentum / gen momentum vs phi");
1300 p_ele_PoPmatchingObjectVsPhi->GetXaxis()->SetTitle(
"#phi (rad)");
1301 p_ele_PoPmatchingObjectVsPhi->GetYaxis()->SetTitle(
"<P/E_{matching jet}>");
1302 p_ele_PoPmatchingObjectVsPhi->Write();
1304 p_ele_EtaMnEtamatchingObjectVsEta->GetXaxis()->SetTitle(
"#eta");
1305 p_ele_EtaMnEtamatchingObjectVsEta->GetYaxis()->SetTitle(
"<#eta_{rec} - #eta_{matching jet}>");
1306 p_ele_EtaMnEtamatchingObjectVsEta->Write();
1308 p_ele_EtaMnEtamatchingObjectVsPhi->GetXaxis()->SetTitle(
"#phi");
1309 p_ele_EtaMnEtamatchingObjectVsPhi->GetYaxis()->SetTitle(
"<#eta_{rec} - #eta_{matching jet}>");
1310 p_ele_EtaMnEtamatchingObjectVsPhi->Write();
1312 p_ele_PhiMnPhimatchingObjectVsEta->GetXaxis()->SetTitle(
"#eta");
1313 p_ele_PhiMnPhimatchingObjectVsEta->GetYaxis()->SetTitle(
"<#phi_{rec} - #phi_{matching jet}> (rad)");
1314 p_ele_PhiMnPhimatchingObjectVsEta->Write();
1316 p_ele_PhiMnPhimatchingObjectVsPhi->GetXaxis()->SetTitle(
"#phi");
1317 p_ele_PhiMnPhimatchingObjectVsPhi->GetYaxis()->SetTitle(
"<#phi_{rec} - #phi_{matching jet}> (rad)");
1318 p_ele_PhiMnPhimatchingObjectVsPhi->Write();
1320 p_ele_vertexPtVsEta->GetXaxis()->SetTitle(
"#eta");
1321 p_ele_vertexPtVsEta->GetYaxis()->SetTitle(
"<p_{T}> (GeV/c)");
1322 p_ele_vertexPtVsEta->Write();
1324 p_ele_vertexPtVsPhi->GetXaxis()->SetTitle(
"#phi (rad)");
1325 p_ele_vertexPtVsPhi->GetYaxis()->SetTitle(
"<p_{T}> (GeV/c)");
1326 p_ele_vertexPtVsPhi->Write();
1328 p_ele_EoPVsEta->GetXaxis()->SetTitle(
"#eta");
1329 p_ele_EoPVsEta->GetYaxis()->SetTitle(
"<E/P_{vertex}>");
1330 p_ele_EoPVsEta->Write();
1332 p_ele_EoPVsPhi->GetXaxis()->SetTitle(
"#phi (rad)");
1333 p_ele_EoPVsPhi->GetYaxis()->SetTitle(
"<E/P_{vertex}>");
1334 p_ele_EoPVsPhi->Write();
1336 p_ele_EoPoutVsEta->GetXaxis()->SetTitle(
"#eta");
1337 p_ele_EoPoutVsEta->GetYaxis()->SetTitle(
"<E_{seed}/P_{out}>");
1338 p_ele_EoPoutVsEta->Write();
1340 p_ele_EoPoutVsPhi->GetXaxis()->SetTitle(
"#phi (rad)");
1341 p_ele_EoPoutVsPhi->GetYaxis()->SetTitle(
"<E_{seed}/P_{out}>");
1342 p_ele_EoPoutVsPhi->Write();
1344 p_ele_EeleOPoutVsEta->SetTitle(
"mean ele Eele/pout vs eta");
1345 p_ele_EeleOPoutVsEta->GetXaxis()->SetTitle(
"#eta");
1346 p_ele_EeleOPoutVsEta->GetYaxis()->SetTitle(
"<E_{ele}/P_{out}>");
1347 p_ele_EeleOPoutVsEta->Write();
1349 p_ele_EeleOPoutVsPhi->SetTitle(
"mean ele Eele/pout vs phi");
1350 p_ele_EeleOPoutVsPhi->GetXaxis()->SetTitle(
"#phi (rad)");
1351 p_ele_EeleOPoutVsPhi->GetYaxis()->SetTitle(
"<E_{ele}/P_{out}>");
1352 p_ele_EeleOPoutVsPhi->Write();
1354 p_ele_HoEVsEta->GetXaxis()->SetTitle(
"#eta");
1355 p_ele_HoEVsEta->GetYaxis()->SetTitle(
"<H/E>");
1356 p_ele_HoEVsEta->Write();
1358 p_ele_HoEVsPhi->GetXaxis()->SetTitle(
"#phi (rad)");
1359 p_ele_HoEVsPhi->GetYaxis()->SetTitle(
"<H/E>");
1360 p_ele_HoEVsPhi->Write();
1362 p_ele_chi2VsEta->GetXaxis()->SetTitle(
"#eta");
1363 p_ele_chi2VsEta->GetYaxis()->SetTitle(
"<#Chi^{2}>");
1364 p_ele_chi2VsEta->Write();
1366 p_ele_chi2VsPhi->GetXaxis()->SetTitle(
"#phi (rad)");
1367 p_ele_chi2VsPhi->GetYaxis()->SetTitle(
"<#Chi^{2}>");
1368 p_ele_chi2VsPhi->Write();
1370 p_ele_foundHitsVsEta->GetXaxis()->SetTitle(
"#eta");
1371 p_ele_foundHitsVsEta->GetYaxis()->SetTitle(
"<N_{hits}>");
1372 p_ele_foundHitsVsEta->Write();
1374 p_ele_foundHitsVsPhi->GetXaxis()->SetTitle(
"#phi (rad)");
1375 p_ele_foundHitsVsPhi->GetYaxis()->SetTitle(
"<N_{hits}>");
1376 p_ele_foundHitsVsPhi->Write();
1378 p_ele_lostHitsVsEta->GetXaxis()->SetTitle(
"#eta");
1379 p_ele_lostHitsVsEta->GetYaxis()->SetTitle(
"<N_{hits}>");
1380 p_ele_lostHitsVsEta->Write();
1382 p_ele_lostHitsVsPhi->GetXaxis()->SetTitle(
"#phi (rad)");
1383 p_ele_lostHitsVsPhi->GetYaxis()->SetTitle(
"<N_{hits}>");
1384 p_ele_lostHitsVsPhi->Write();
1386 p_ele_vertexTIPVsEta->SetTitle(
"mean tip (wrt gen vtx) vs eta");
1387 p_ele_vertexTIPVsEta->GetXaxis()->SetTitle(
"#eta");
1388 p_ele_vertexTIPVsEta->GetYaxis()->SetTitle(
"<TIP> (cm)");
1389 p_ele_vertexTIPVsEta->Write();
1391 p_ele_vertexTIPVsPhi->SetTitle(
"mean tip (wrt gen vtx) vs phi");
1392 p_ele_vertexTIPVsPhi->GetXaxis()->SetTitle(
"#phi");
1393 p_ele_vertexTIPVsPhi->GetYaxis()->SetTitle(
"<TIP> (cm)");
1394 p_ele_vertexTIPVsPhi->Write();
1396 p_ele_vertexTIPVsPt->SetTitle(
"mean tip (wrt gen vtx) vs phi");
1397 p_ele_vertexTIPVsPt->GetXaxis()->SetTitle(
"p_{T} (GeV/c)");
1398 p_ele_vertexTIPVsPt->GetYaxis()->SetTitle(
"<TIP> (cm)");
1399 p_ele_vertexTIPVsPt->Write();
1636 p_ele_seed_dphi2VsEta_->SetTitle(
"mean ele seed dphi 2nd layer vs eta");
1637 p_ele_seed_dphi2VsEta_->GetXaxis()->SetTitle(
"#eta");
1638 p_ele_seed_dphi2VsEta_->GetYaxis()->SetTitle(
"<#phi_{pred} - #phi_{hit}, 2nd layer> (rad)");
1639 p_ele_seed_dphi2VsEta_->SetMinimum(-0.004);
1640 p_ele_seed_dphi2VsEta_->SetMaximum(0.004);
1641 p_ele_seed_dphi2VsEta_->Write();
1643 p_ele_seed_dphi2VsPt_->SetTitle(
"mean ele seed dphi 2nd layer vs pt");
1644 p_ele_seed_dphi2VsPt_->GetXaxis()->SetTitle(
"p_{T} (GeV/c)");
1645 p_ele_seed_dphi2VsPt_->GetYaxis()->SetTitle(
"<#phi_{pred} - #phi_{hit}, 2nd layer> (rad)");
1646 p_ele_seed_dphi2VsPt_->SetMinimum(-0.004);
1647 p_ele_seed_dphi2VsPt_->SetMaximum(0.004);
1648 p_ele_seed_dphi2VsPt_->Write();
1651 p_ele_seed_drz2VsEta_->SetTitle(
"mean ele seed dr(dz) 2nd layer vs eta");
1652 p_ele_seed_drz2VsEta_->GetXaxis()->SetTitle(
"#eta");
1653 p_ele_seed_drz2VsEta_->GetYaxis()->SetTitle(
"<r(z)_{pred} - r(z)_{hit}, 2nd layer> (cm)");
1654 p_ele_seed_drz2VsEta_->SetMinimum(-0.15);
1655 p_ele_seed_drz2VsEta_->SetMaximum(0.15);
1656 p_ele_seed_drz2VsEta_->Write();
1658 p_ele_seed_drz2VsPt_->SetTitle(
"mean ele seed dr(dz) 2nd layer vs pt");
1659 p_ele_seed_drz2VsPt_->GetXaxis()->SetTitle(
"p_{T} (GeV/c)");
1660 p_ele_seed_drz2VsPt_->GetYaxis()->SetTitle(
"<r(z)_{pred} - r(z)_{hit}, 2nd layer> (cm)");
1661 p_ele_seed_drz2VsPt_->SetMinimum(-0.15);
1662 p_ele_seed_drz2VsPt_->SetMaximum(0.15);
1663 p_ele_seed_drz2VsPt_->Write();
1689 h_ele_etaEff->Write();
1690 h_ele_zEff->Write();
1691 h_ele_phiEff->Write();
1692 h_ele_absetaEff->Write();
1693 h_ele_ptEff->Write();
1694 h_ele_etaEff_all->Write();
1695 h_ele_ptEff_all->Write();
1696 h_ele_eta_goldenFrac->Write();
1697 h_ele_eta_bbremFrac->Write();
1698 h_ele_eta_narrowFrac->Write();
1699 h_ele_eta_showerFrac->Write();
1700 h_ele_xOverX0VsEta->Write();
1734 std::cout <<
"analyzing new event " << std::endl;
1739 edm::LogInfo(
"") <<
"\n\n =================> Treating event " <<
iEvent.id() <<
" Number of electrons "
1751 histNum_->Fill((*gsfElectrons).size());
1768 double d = gsfIter->vertex().x() * gsfIter->vertex().x() + gsfIter->vertex().y() * gsfIter->vertex().y();
1772 float enrj1 = gsfIter->superCluster()->energy();
1774 for (reco::GsfElectronCollection::const_iterator gsfIter2 = gsfIter + 1; gsfIter2 !=
gsfElectrons->end();
1777 float mee2 = p12.Dot(p12);
1779 float enrj2 = gsfIter2->superCluster()->energy();
1781 if (gsfIter->ecalDrivenSeed() && gsfIter2->ecalDrivenSeed())
1783 if (gsfIter->charge() * gsfIter2->charge() < 0.)
1789 int matchingObjectNum = 0;
1791 for (reco::CaloJetCollection::const_iterator moIter = recoCaloJets->begin(); moIter != recoCaloJets->end();
1794 matchingObjectNum++;
1812 bool okGsfFound =
false;
1813 double gsfOkRatio = 999999.;
1819 double dphi = gsfIter->
phi() - moIter->phi();
1821 dphi = dphi < 0 ? (CLHEP::twopi) + dphi : dphi - CLHEP::twopi;
1826 double tmpGsfRatio = gsfIter->p() / moIter->energy();
1828 gsfOkRatio = tmpGsfRatio;
1829 bestGsfElectron = *gsfIter;
1860 (bestGsfElectron.
vertex().x() -
bs.position().x()) * (bestGsfElectron.
vertex().x() -
bs.position().x()) +
1861 (bestGsfElectron.
vertex().y() -
bs.position().y()) * (bestGsfElectron.
vertex().y() -
bs.position().y());
1880 if (bestGsfElectron.
isEB())
1882 if (bestGsfElectron.
isEE())
1890 double R = TMath::Sqrt(sclRef->x() * sclRef->x() + sclRef->y() * sclRef->y() + sclRef->z() * sclRef->z());
1891 double Rt = TMath::Sqrt(sclRef->x() * sclRef->x() + sclRef->y() * sclRef->y());
1895 if (bestGsfElectron.
isEB())
1897 if (bestGsfElectron.
isEE())
1903 if (bestGsfElectron.
isEB())
1905 if (bestGsfElectron.
isEE())
1908 if (bestGsfElectron.
isEB())
1910 if (bestGsfElectron.
isEE())
1913 if (bestGsfElectron.
isEB())
1915 if (bestGsfElectron.
isEE())
1918 if (bestGsfElectron.
isEB())
1920 if (bestGsfElectron.
isEE())
1945 bestGsfElectron.
gsfTrack()->outerMomentum().R());
1961 bestGsfElectron.
gsfTrack()->normalizedChi2(),
1985 if (bestGsfElectron.
isEB())
1989 if (bestGsfElectron.
isEE())
1999 if (bestGsfElectron.
isEB())
2003 if (bestGsfElectron.
isEE())
2013 if (bestGsfElectron.
isEB())
2017 if (bestGsfElectron.
isEE())
2027 if (bestGsfElectron.
isEB())
2031 if (bestGsfElectron.
isEE())
2041 if (bestGsfElectron.
isEB())
2045 if (bestGsfElectron.
isEE())
2055 if (bestGsfElectron.
isEB())
2059 if (bestGsfElectron.
isEE())
2069 if (bestGsfElectron.
isEB())
2073 if (bestGsfElectron.
isEE())
2083 if (bestGsfElectron.
isEB())
2087 if (bestGsfElectron.
isEE())
2097 if (bestGsfElectron.
isEB())
2101 if (bestGsfElectron.
isEE())
2111 if (bestGsfElectron.
isEB())
2115 if (bestGsfElectron.
isEE())
2125 if (bestGsfElectron.
isEB())
2129 if (bestGsfElectron.
isEE())
2142 if (bestGsfElectron.
isEE())
2156 double fbrem_mean = 0.;
2159 1. - bestGsfElectron.
gsfTrack()->outerMomentum().R() / bestGsfElectron.
gsfTrack()->innerMomentum().R();
2160 double fbrem_mode = bestGsfElectron.
fbrem();
2175 bestGsfElectron.
gsfTrack()->innerMomentum().R());
2179 bestGsfElectron.
gsfTrack()->innerMomentum().R());
2189 bestGsfElectron.
gsfTrack()->innerMomentum().Rho());
2193 bestGsfElectron.
gsfTrack()->innerMomentum().Rho());