39 #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 GenJets " << std::endl;
127 std::cout <<
"Didn't recognize input matching objects!! " << std::endl;
131 hlabel =
"h_" + type_ +
"Num";
132 htitle =
"# " + type_ +
"s";
136 histNum_ =
new TH1F(
"h_recEleNum",
"# rec electrons", 20, 0., 20.);
139 hlabel =
"h_matchingObject_eta";
140 htitle = type_ +
" #eta";
142 hlabel =
"h_matchingObject_abseta";
143 htitle = type_ +
" |#eta|";
145 hlabel =
"h_matchingObject_P";
146 htitle = type_ +
" p";
148 hlabel =
"h_matchingObject_Pt";
149 htitle = type_ +
" pt";
151 hlabel =
"h_matchingObject_phi";
152 htitle = type_ +
" phi";
154 hlabel =
"h_matchingObject_z";
155 htitle = type_ +
" z";
164 "ele #eta_{sc} - #eta_{tr}, prop from vertex, all reco electrons",
169 "ele #phi_{sc} - #phi_{tr}, prop from vertex, all reco electrons",
174 "ele #eta_{cl} - #eta_{tr}, prop from outermost, all reco electrons",
179 "ele #phi_{cl} - #phi_{tr}, prop from outermost, all reco electrons",
183 h_ele_TIP_all =
new TH1F(
"h_ele_TIP_all",
"ele vertex transverse radius, all reco electrons", 100, 0., 0.2);
185 new TH1F(
"h_ele_HoE_all",
"ele hadronic energy / em energy, all reco electrons",
nbinhoe,
hoemin,
hoemax);
195 "E2 - E1 vs ele pairs invariant mass, all electrons",
203 "E2 - E1 vs ele pairs invariant mass, ecal driven pairs, all electrons",
214 new TH1F(
"h_ele_matchingObjectPt_matched",
"Efficiency vs matching jet p_{T}",
nbinpteff, 5.,
ptmax);
217 new TH1F(
"h_ele_matchingObjectAbsEta_matched",
"Efficiency vs matching jet |#eta|",
nbineta / 2, 0., 2.5);
220 new TH1F(
"h_ele_matchingObjectEta_matched",
"Efficiency vs matching jet #eta",
nbineta,
etamin,
etamax);
223 new TH1F(
"h_ele_matchingObjectPhi_matched",
"Efficiency vs matching jet phi",
nbinphi,
phimin,
phimax);
226 new TH1F(
"h_ele_matchingObjectZ_matched",
"Efficiency vs matching jet z",
nbinxyz, -25, 25);
229 h_ele_charge =
new TH1F(
"h_ele_charge",
"ele charge", 5, -2., 2.);
246 h_ele_vertexTIP =
new TH1F(
"h_ele_vertexTIP",
"ele transverse impact parameter (wrt bs)", 90, 0., 0.15);
248 "ele transverse impact parameter (wrt bs) vs eta",
256 "ele transverse impact parameter (wrt bs) vs phi",
264 "h_ele_vertexTIPVsPt",
"ele transverse impact parameter (wrt bs) vs Pt",
nbinpt2D, 0.,
ptmax, 45, 0., 0.15);
266 h_ele_PoPmatchingObject =
new TH1F(
"h_ele_PoPmatchingObject",
"ele momentum / matching jet momentum", 75, 0., 1.5);
268 "ele momentum / matching jet momentum vs eta",
276 "ele momentum / matching jet momentum vs phi",
284 "h_ele_PoPmatchingObjectVsPt",
"ele momentum / matching jet momentum vs eta",
nbinpt2D, 0.,
ptmax, 50, 0., 1.5);
286 new TH1F(
"h_ele_PoPmatchingObject_barrel",
"ele momentum / matching jet momentum, barrel", 75, 0., 1.5);
288 new TH1F(
"h_ele_PoPmatchingObject_endcaps",
"ele momentum / matching jet momentum, endcaps", 75, 0., 1.5);
291 new TH1F(
"h_ele_EtaMnEtamatchingObject",
"ele momentum eta - matching jet eta",
nbindeta,
detamin,
detamax);
293 "ele momentum eta - matching jet eta vs eta",
301 "ele momentum eta - matching jet eta vs phi",
309 "ele momentum eta - matching jet eta vs pt",
317 new TH1F(
"h_ele_PhiMnPhimatchingObject",
"ele momentum phi - matching jet phi",
nbindphi,
dphimin,
dphimax);
319 "ele momentum phi - matching jet phi",
324 "ele momentum phi - matching SC phi vs eta",
332 "ele momentum phi - matching SC phi vs phi",
340 "ele momentum phi - matching SC phi vs pt",
351 new TH1F(
"h_scl_EoEmatchingObject_barrel",
"ele supercluster energy / matching jet energy, barrel", 50, 0.2, 1.2);
353 "h_scl_EoEmatchingObject_endcaps",
"ele supercluster energy / matching jet energy, endcaps", 50, 0.2, 1.2);
364 histSclSigIEtaIEta_ =
new TH1F(
"h_scl_sigietaieta",
"ele supercluster sigma ieta ieta", 100, 0., 0.05);
366 new TH1F(
"h_scl_sigietaieta_barrel",
"ele supercluster sigma ieta ieta, barrel", 100, 0., 0.05);
368 new TH1F(
"h_scl_sigietaieta_endcaps",
"ele supercluster sigma ieta ieta, endcaps", 100, 0., 0.05);
374 new TH1F(
"h_scl_E2x5max_barrel",
"ele supercluster energy in 2x5 max barrel",
nbinp, 0.,
pmax);
376 new TH1F(
"h_scl_E2x5max_endcaps",
"ele supercluster energy in 2x5 max endcaps",
nbinp, 0.,
pmax);
384 new TH2F(
"h_ele_ambiguousTracksVsEta",
"ele # ambiguous tracks vs eta",
nbineta2D,
etamin,
etamax, 5, 0., 5.);
386 new TH2F(
"h_ele_ambiguousTracksVsPhi",
"ele # ambiguous tracks vs phi",
nbinphi2D,
phimin,
phimax, 5, 0., 5.);
388 new TH2F(
"h_ele_ambiguousTracksVsPt",
"ele # ambiguous tracks vs pt",
nbinpt2D, 0.,
ptmax, 5, 0., 5.);
396 h_ele_lostHits =
new TH1F(
"h_ele_lostHits",
"ele track # lost hits", 5, 0., 5.);
403 h_ele_chi2 =
new TH1F(
"h_ele_chi2",
"ele track #chi^{2}", 100, 0., 15.);
407 h_ele_PinMnPout =
new TH1F(
"h_ele_PinMnPout",
"ele track inner p - outer p, mean",
nbinp, 0., 200.);
410 "ele track inner p - outer p vs eta, mode",
418 "ele track inner p - outer p vs phi, mode",
426 "h_ele_PinMnPoutVsPt_mode",
"ele track inner p - outer p vs pt, mode",
nbinpt2D, 0.,
ptmax,
nbinp2D, 0., 100.);
428 "h_ele_PinMnPoutVsE_mode",
"ele track inner p - outer p vs E, mode",
nbinp2D, 0., 200.,
nbinp2D, 0., 100.);
430 "h_ele_PinMnPoutVsChi2_mode",
"ele track inner p - outer p vs track chi2, mode", 50, 0., 20.,
nbinp2D, 0., 100.);
442 new TH2F(
"h_ele_outerPtVsPt_mode",
"ele track outer p_{T} vs pt, mode",
nbinpt2D, 0., 100.,
nbinpt2D, 0.,
ptmax);
461 h_ele_EoPVsE =
new TH2F(
"h_ele_EoPVsE",
"ele E/P_{vertex} vs E", 50, 0.,
pmax, 50, 0., 5.);
469 new TH1F(
"h_ele_EseedOP_eg_barrel",
"ele E_{seed}/P_{vertex}, ecal driven barrel",
nbineop, 0.,
eopmax);
474 new TH1F(
"h_ele_EseedOP_eg_endcaps",
"ele E_{seed}/P_{vertex}, ecal driven, endcaps",
nbineop, 0.,
eopmax);
480 h_ele_EseedOPVsE =
new TH2F(
"h_ele_EseedOPVsE",
"ele E_{seed}/P_{vertex} vs E", 50, 0.,
pmax, 50, 0., 5.);
488 new TH1F(
"h_ele_EoPout_eg_barrel",
"ele E_{seed}/P_{out}, ecal driven, barrel",
nbineop, 0.,
eopmax);
493 new TH1F(
"h_ele_EoPout_eg_endcaps",
"ele E_{seed}/P_{out}, ecal driven, endcaps",
nbineop, 0.,
eopmax);
507 new TH1F(
"h_ele_EeleOPout_eg_barrel",
"ele E_{ele}/P_{out}, ecal driven, barrel",
nbineop, 0.,
eopmax);
512 new TH1F(
"h_ele_EeleOPout_eg_endcaps",
"ele E_{ele}/P_{out}, ecal driven, endcaps",
nbineop, 0.,
eopmax);
524 "ele #eta_{sc} - #eta_{tr}, prop from vertex, ecal driven",
530 "ele #eta_{sc} - #eta_{tr}, prop from vertex, barrel",
536 "ele #eta_{sc} - #eta_{tr}, prop from vertex, ecal driven, barrel",
542 "ele #eta_{sc} - #eta_{tr}, prop from vertex, endcaps",
548 "ele #eta_{sc} - #eta_{tr}, prop from vertex, ecal driven, endcaps",
554 "ele #eta_{sc} - #eta_{tr} vs eta, prop from vertex",
562 "ele #eta_{sc} - #eta_{tr} vs phi, prop from vertex",
570 "ele #eta_{sc} - #eta_{tr} vs pt, prop from vertex",
581 "ele #phi_{sc} - #phi_{tr}, prop from vertex, ecal driven",
587 "ele #phi_{sc} - #phi_{tr}, prop from vertex, barrel",
593 "ele #phi_{sc} - #phi_{tr}, prop from vertex, ecal driven, barrel",
599 "ele #phi_{sc} - #phi_{tr}, prop from vertex, endcaps",
605 "ele #phi_{sc} - #phi_{tr}, prop from vertex, ecal driven, endcaps",
611 "ele #phi_{sc} - #phi_{tr} vs eta, prop from vertex",
619 "ele #phi_{sc} - #phi_{tr} vs phi, prop from vertex",
627 "ele #phi_{sc} - #phi_{tr} vs pt, prop from vertex",
635 "ele #eta_{cl} - #eta_{tr}, prop from outermost",
641 "ele #eta_{cl} - #eta_{tr}, prop from outermost, ecal driven",
647 "ele #eta_{cl} - #eta_{tr}, prop from outermost, barrel",
653 "ele #eta_{cl} - #eta_{tr}, prop from outermost, ecal driven, barrel",
659 "ele #eta_{cl} - #eta_{tr}, prop from outermost, endcaps",
665 "ele #eta_{cl} - #eta_{tr}, prop from outermost, ecal driven, endcaps",
671 "ele #eta_{cl} - #eta_{tr} vs eta, prop from out",
679 "ele #eta_{cl} - #eta_{tr} vs phi, prop from out",
687 "ele #eta_{cl} - #eta_{tr} vs pt, prop from out",
695 "ele #phi_{cl} - #phi_{tr}, prop from outermost",
701 "ele #phi_{cl} - #phi_{tr}, prop from outermost, ecal driven",
707 "ele #phi_{cl} - #phi_{tr}, prop from outermost, barrel",
713 "ele #phi_{cl} - #phi_{tr}, prop from outermost, ecal driven, barrel",
719 "ele #phi_{cl} - #phi_{tr}, prop from outermost, endcaps",
725 "ele #phi_{cl} - #phi_{tr}, prop from outermost, ecal driven, endcaps",
731 "ele #phi_{cl} - #phi_{tr} vs eta, prop from out",
739 "ele #phi_{cl} - #phi_{tr} vs phi, prop from out",
747 "ele #phi_{cl} - #phi_{tr} vs pt, prop from out",
755 "ele #eta_{EleCl} - #eta_{tr}, prop from outermost",
761 "ele #eta_{EleCl} - #eta_{tr}, prop from outermost, ecal driven",
767 "ele #eta_{EleCl} - #eta_{tr}, prop from outermost, barrel",
773 "ele #eta_{EleCl} - #eta_{tr}, prop from outermost, ecal driven, barrel",
779 "ele #eta_{EleCl} - #eta_{tr}, prop from outermost, endcaps",
785 new TH1F(
"h_ele_dEtaEleCl_propOut_eg_endcaps",
786 "ele #eta_{EleCl} - #eta_{tr}, prop from outermost, ecal driven, endcaps",
792 "ele #eta_{EleCl} - #eta_{tr} vs eta, prop from out",
800 "ele #eta_{EleCl} - #eta_{tr} vs phi, prop from out",
808 "ele #eta_{EleCl} - #eta_{tr} vs pt, prop from out",
816 "ele #phi_{EleCl} - #phi_{tr}, prop from outermost",
822 "ele #phi_{EleCl} - #phi_{tr}, prop from outermost, ecal driven",
828 "ele #phi_{EleCl} - #phi_{tr}, prop from outermost, barrel",
834 "ele #phi_{EleCl} - #phi_{tr}, prop from outermost, ecal driven, barrel",
840 "ele #phi_{EleCl} - #phi_{tr}, prop from outermost, endcaps",
846 new TH1F(
"h_ele_dPhiEleCl_propOut_eg_endcaps",
847 "ele #phi_{EleCl} - #phi_{tr}, prop from outermost, ecal driven, endcaps",
853 "ele #phi_{EleCl} - #phi_{tr} vs eta, prop from out",
861 "ele #phi_{EleCl} - #phi_{tr} vs phi, prop from out",
869 "ele #phi_{EleCl} - #phi_{tr} vs pt, prop from out",
884 new TH1F(
"h_ele_HoE_eg_barrel",
"ele hadronic energy / em energy, ecal driven, barrel",
nbinhoe,
hoemin,
hoemax);
887 new TH1F(
"h_ele_HoE_endcaps",
"ele hadronic energy / em energy, endcaps",
nbinhoe,
hoemin,
hoemax);
890 "h_ele_HoE_eg_endcaps",
"ele hadronic energy / em energy, ecal driven, endcaps",
nbinhoe,
hoemin,
hoemax);
900 h_ele_seed_dphi2_ =
new TH1F(
"h_ele_seedDphi2",
"ele seed dphi 2nd layer", 50, -0.003, +0.003);
902 new TH2F(
"h_ele_seedDphi2VsEta",
"ele seed dphi 2nd layer vs eta",
nbineta2D,
etamin,
etamax, 50, -0.003, +0.003);
904 new TH2F(
"h_ele_seedDphi2VsPt",
"ele seed dphi 2nd layer vs pt",
nbinpt2D, 0.,
ptmax, 50, -0.003, +0.003);
905 h_ele_seed_drz2_ =
new TH1F(
"h_ele_seedDrz2",
"ele seed dr/dz 2nd layer", 50, -0.03, +0.03);
907 new TH2F(
"h_ele_seedDrz2VsEta",
"ele seed dr/dz 2nd layer vs eta",
nbineta2D,
etamin,
etamax, 50, -0.03, +0.03);
909 new TH2F(
"h_ele_seedDrz2VsPt",
"ele seed dr/dz 2nd layer vs pt",
nbinpt2D, 0.,
ptmax, 50, -0.03, +0.03);
910 h_ele_seed_subdet2_ =
new TH1F(
"h_ele_seedSubdet2",
"ele seed subdet 2nd layer", 10, 0., 10.);
913 h_ele_classes =
new TH1F(
"h_ele_classes",
"electron classes", 20, 0.0, 20.);
920 "h_ele_PinVsPoutGolden_mode",
"ele track inner p vs outer p, golden, mode",
nbinp2D, 0.,
pmax, 50, 0.,
pmax);
922 "ele track inner p vs outer p vs eta, showering, mode",
930 "h_ele_PinVsPoutGolden_mean",
"ele track inner p vs outer p, golden, mean",
nbinp2D, 0.,
pmax, 50, 0.,
pmax);
932 "h_ele_PinVsPoutShowering_mean",
"ele track inner p vs outer p, showering, mean",
nbinp2D, 0.,
pmax, 50, 0.,
pmax);
934 "ele track inner pt vs outer pt, golden, mode",
942 "ele track inner pt vs outer pt, showering, mode",
950 "ele track inner pt vs outer pt, golden, mean",
958 "ele track inner pt vs outer pt, showering, mean",
966 "h_scl_EoEmatchingObject golden, barrel",
"ele SC energy over matching jet energy, golden, barrel", 100, 0.2, 1.2);
968 "ele SC energy over matching jet energy, golden, endcaps",
973 "ele SC energy over matching jet energy, showering, barrel",
978 "ele SC energy over matching jet energy, showering, endcaps",
984 h_ele_tkSumPt_dr03 =
new TH1F(
"h_ele_tkSumPt_dr03",
"tk isolation sum, dR=0.3", 100, 0.0, 20.);
987 new TH1F(
"h_ele_hcalDepth1TowerSumEt_dr03",
"hcal depth1 isolation sum, dR=0.3", 100, 0.0, 20.);
989 new TH1F(
"h_ele_hcalDepth2TowerSumEt_dr03",
"hcal depth2 isolation sum, dR=0.3", 100, 0.0, 20.);
990 h_ele_tkSumPt_dr04 =
new TH1F(
"h_ele_tkSumPt_dr04",
"hcal isolation sum", 100, 0.0, 20.);
993 new TH1F(
"h_ele_hcalDepth1TowerSumEt_dr04",
"hcal depth1 isolation sum, dR=0.4", 100, 0.0, 20.);
995 new TH1F(
"h_ele_hcalDepth2TowerSumEt_dr04",
"hcal depth2 isolation sum, dR=0.4", 100, 0.0, 20.);
998 h_ele_fbrem =
new TH1F(
"h_ele_fbrem",
"ele brem fraction, mode", 100, 0., 1.);
1000 new TProfile(
"h_ele_fbremvsEtamode",
"mean ele brem fraction vs eta, mode",
nbineta2D,
etamin,
etamax, 0., 1.);
1002 new TProfile(
"h_ele_fbremvsEtamean",
"mean ele brem fraction vs eta, mean",
nbineta2D,
etamin,
etamax, 0., 1.);
1005 h_ele_mva =
new TH1F(
"h_ele_mva",
"ele mva", 100, -1., 1.);
1006 h_ele_provenance =
new TH1F(
"h_ele_provenance",
"ele provenance", 5, -2., 3.);
1021 h_ele_chi2->GetXaxis()->SetTitle(
"#Chi^{2}");
1067 h_ele_PinMnPout->GetXaxis()->SetTitle(
"P_{vertex} - P_{out} (GeV/c)");
1079 h_ele_EoP->GetXaxis()->SetTitle(
"E/P_{vertex}");
1080 h_ele_EoP->GetYaxis()->SetTitle(
"Events");
1083 h_ele_EoPout->GetXaxis()->SetTitle(
"E_{seed}/P_{out}");
1157 h_ele_HoE->GetYaxis()->SetTitle(
"Events");
1164 h_ele_fbrem->GetXaxis()->SetTitle(
"P_{in} - P_{out} / P_{in}");
1194 h_ele_mee_os->GetXaxis()->SetTitle(
"m_{e^{+}e^{-}} (GeV/c^{2})");
1200 histNum_->GetXaxis()->SetTitle(
"N_{ele}");
1201 histNum_->GetYaxis()->SetTitle(
"Events");
1208 std::cout <<
"efficiency calculation " << std::endl;
1211 h_ele_etaEff->Reset();
1213 h_ele_etaEff->Print();
1214 h_ele_etaEff->GetXaxis()->SetTitle(
"#eta");
1215 h_ele_etaEff->GetYaxis()->SetTitle(
"Efficiency");
1219 h_ele_zEff->Reset();
1221 h_ele_zEff->Print();
1222 h_ele_zEff->GetXaxis()->SetTitle(
"z (cm)");
1223 h_ele_zEff->GetYaxis()->SetTitle(
"Efficiency");
1227 h_ele_absetaEff->Reset();
1229 h_ele_absetaEff->GetXaxis()->SetTitle(
"|#eta|");
1230 h_ele_absetaEff->GetYaxis()->SetTitle(
"Efficiency");
1234 h_ele_ptEff->Reset();
1236 h_ele_ptEff->GetXaxis()->SetTitle(
"p_{T} (GeV/c)");
1237 h_ele_ptEff->GetYaxis()->SetTitle(
"Efficiency");
1241 h_ele_phiEff->Reset();
1243 h_ele_phiEff->GetXaxis()->SetTitle(
"#phi (rad)");
1244 h_ele_phiEff->GetYaxis()->SetTitle(
"Efficiency");
1248 h_ele_etaEff_all->Reset();
1250 h_ele_etaEff_all->Print();
1251 h_ele_etaEff_all->GetXaxis()->SetTitle(
"#eta");
1252 h_ele_etaEff_all->GetYaxis()->SetTitle(
"N_{rec}/N_{matching jet}");
1255 h_ele_ptEff_all->Reset();
1257 h_ele_ptEff_all->Print();
1258 h_ele_ptEff_all->GetXaxis()->SetTitle(
"p_{T} (GeV/c)");
1259 h_ele_ptEff_all->GetYaxis()->SetTitle(
"N_{rec}/N_{matching gen jet}");
1262 TH1F *h_ele_eta_goldenFrac = (TH1F *)
h_ele_eta_golden->Clone(
"h_ele_eta_goldenFrac");
1263 h_ele_eta_goldenFrac->Reset();
1264 h_ele_eta_goldenFrac->GetXaxis()->SetTitle(
"|#eta|");
1265 h_ele_eta_goldenFrac->GetYaxis()->SetTitle(
"Fraction of electrons");
1267 h_ele_eta_goldenFrac->SetTitle(
"fraction of golden electrons vs eta");
1268 TH1F *h_ele_eta_bbremFrac = (TH1F *)
h_ele_eta_bbrem->Clone(
"h_ele_eta_bbremFrac");
1269 h_ele_eta_bbremFrac->Reset();
1271 h_ele_eta_bbremFrac->GetXaxis()->SetTitle(
"|#eta|");
1272 h_ele_eta_bbremFrac->GetYaxis()->SetTitle(
"Fraction of electrons");
1273 h_ele_eta_bbremFrac->SetTitle(
"fraction of big brem electrons vs eta");
1274 TH1F *h_ele_eta_narrowFrac = (TH1F *)
h_ele_eta_narrow->Clone(
"h_ele_eta_narrowFrac");
1275 h_ele_eta_narrowFrac->Reset();
1277 h_ele_eta_narrowFrac->GetXaxis()->SetTitle(
"|#eta|");
1278 h_ele_eta_narrowFrac->GetYaxis()->SetTitle(
"Fraction of electrons");
1279 h_ele_eta_narrowFrac->SetTitle(
"fraction of narrow electrons vs eta");
1280 TH1F *h_ele_eta_showerFrac = (TH1F *)
h_ele_eta_shower->Clone(
"h_ele_eta_showerFrac");
1281 h_ele_eta_showerFrac->Reset();
1283 h_ele_eta_showerFrac->GetXaxis()->SetTitle(
"|#eta|");
1284 h_ele_eta_showerFrac->GetYaxis()->SetTitle(
"Fraction of electrons");
1285 h_ele_eta_showerFrac->SetTitle(
"fraction of showering electrons vs eta");
1288 TH1F *h_ele_xOverX0VsEta =
new TH1F(
"h_ele_xOverx0VsEta",
"mean X/X_0 vs eta",
nbineta / 2, 0.0, 2.5);
1290 double xOverX0 = 0.;
1293 h_ele_xOverX0VsEta->SetBinContent(ibin, xOverX0);
1298 p_ele_PoPmatchingObjectVsEta->SetTitle(
"mean ele momentum / matching SC energy vs eta");
1299 p_ele_PoPmatchingObjectVsEta->GetXaxis()->SetTitle(
"#eta");
1300 p_ele_PoPmatchingObjectVsEta->GetYaxis()->SetTitle(
"<P/E_{matching gen jet}>");
1301 p_ele_PoPmatchingObjectVsEta->Write();
1303 p_ele_PoPmatchingObjectVsPhi->SetTitle(
"mean ele momentum / gen momentum vs phi");
1304 p_ele_PoPmatchingObjectVsPhi->GetXaxis()->SetTitle(
"#phi (rad)");
1305 p_ele_PoPmatchingObjectVsPhi->GetYaxis()->SetTitle(
"<P/E_{matching gen jet}>");
1306 p_ele_PoPmatchingObjectVsPhi->Write();
1308 p_ele_EtaMnEtamatchingObjectVsEta->GetXaxis()->SetTitle(
"#eta");
1309 p_ele_EtaMnEtamatchingObjectVsEta->GetYaxis()->SetTitle(
"<#eta_{rec} - #eta_{matching gen jet}>");
1310 p_ele_EtaMnEtamatchingObjectVsEta->Write();
1312 p_ele_EtaMnEtamatchingObjectVsPhi->GetXaxis()->SetTitle(
"#phi");
1313 p_ele_EtaMnEtamatchingObjectVsPhi->GetYaxis()->SetTitle(
"<#eta_{rec} - #eta_{matching gen jet}>");
1314 p_ele_EtaMnEtamatchingObjectVsPhi->Write();
1316 p_ele_PhiMnPhimatchingObjectVsEta->GetXaxis()->SetTitle(
"#eta");
1317 p_ele_PhiMnPhimatchingObjectVsEta->GetYaxis()->SetTitle(
"<#phi_{rec} - #phi_{matching gen jet}> (rad)");
1318 p_ele_PhiMnPhimatchingObjectVsEta->Write();
1320 p_ele_PhiMnPhimatchingObjectVsPhi->GetXaxis()->SetTitle(
"#phi");
1321 p_ele_PhiMnPhimatchingObjectVsPhi->GetYaxis()->SetTitle(
"<#phi_{rec} - #phi_{matching gen jet}> (rad)");
1322 p_ele_PhiMnPhimatchingObjectVsPhi->Write();
1324 p_ele_vertexPtVsEta->GetXaxis()->SetTitle(
"#eta");
1325 p_ele_vertexPtVsEta->GetYaxis()->SetTitle(
"<p_{T}> (GeV/c)");
1326 p_ele_vertexPtVsEta->Write();
1328 p_ele_vertexPtVsPhi->GetXaxis()->SetTitle(
"#phi (rad)");
1329 p_ele_vertexPtVsPhi->GetYaxis()->SetTitle(
"<p_{T}> (GeV/c)");
1330 p_ele_vertexPtVsPhi->Write();
1332 p_ele_EoPVsEta->GetXaxis()->SetTitle(
"#eta");
1333 p_ele_EoPVsEta->GetYaxis()->SetTitle(
"<E/P_{vertex}>");
1334 p_ele_EoPVsEta->Write();
1336 p_ele_EoPVsPhi->GetXaxis()->SetTitle(
"#phi (rad)");
1337 p_ele_EoPVsPhi->GetYaxis()->SetTitle(
"<E/P_{vertex}>");
1338 p_ele_EoPVsPhi->Write();
1340 p_ele_EoPoutVsEta->GetXaxis()->SetTitle(
"#eta");
1341 p_ele_EoPoutVsEta->GetYaxis()->SetTitle(
"<E_{seed}/P_{out}>");
1342 p_ele_EoPoutVsEta->Write();
1344 p_ele_EoPoutVsPhi->GetXaxis()->SetTitle(
"#phi (rad)");
1345 p_ele_EoPoutVsPhi->GetYaxis()->SetTitle(
"<E_{seed}/P_{out}>");
1346 p_ele_EoPoutVsPhi->Write();
1348 p_ele_EeleOPoutVsEta->SetTitle(
"mean ele Eele/pout vs eta");
1349 p_ele_EeleOPoutVsEta->GetXaxis()->SetTitle(
"#eta");
1350 p_ele_EeleOPoutVsEta->GetYaxis()->SetTitle(
"<E_{ele}/P_{out}>");
1351 p_ele_EeleOPoutVsEta->Write();
1353 p_ele_EeleOPoutVsPhi->SetTitle(
"mean ele Eele/pout vs phi");
1354 p_ele_EeleOPoutVsPhi->GetXaxis()->SetTitle(
"#phi (rad)");
1355 p_ele_EeleOPoutVsPhi->GetYaxis()->SetTitle(
"<E_{ele}/P_{out}>");
1356 p_ele_EeleOPoutVsPhi->Write();
1358 p_ele_HoEVsEta->GetXaxis()->SetTitle(
"#eta");
1359 p_ele_HoEVsEta->GetYaxis()->SetTitle(
"<H/E>");
1360 p_ele_HoEVsEta->Write();
1362 p_ele_HoEVsPhi->GetXaxis()->SetTitle(
"#phi (rad)");
1363 p_ele_HoEVsPhi->GetYaxis()->SetTitle(
"<H/E>");
1364 p_ele_HoEVsPhi->Write();
1366 p_ele_chi2VsEta->GetXaxis()->SetTitle(
"#eta");
1367 p_ele_chi2VsEta->GetYaxis()->SetTitle(
"<#Chi^{2}>");
1368 p_ele_chi2VsEta->Write();
1370 p_ele_chi2VsPhi->GetXaxis()->SetTitle(
"#phi (rad)");
1371 p_ele_chi2VsPhi->GetYaxis()->SetTitle(
"<#Chi^{2}>");
1372 p_ele_chi2VsPhi->Write();
1374 p_ele_foundHitsVsEta->GetXaxis()->SetTitle(
"#eta");
1375 p_ele_foundHitsVsEta->GetYaxis()->SetTitle(
"<N_{hits}>");
1376 p_ele_foundHitsVsEta->Write();
1378 p_ele_foundHitsVsPhi->GetXaxis()->SetTitle(
"#phi (rad)");
1379 p_ele_foundHitsVsPhi->GetYaxis()->SetTitle(
"<N_{hits}>");
1380 p_ele_foundHitsVsPhi->Write();
1382 p_ele_lostHitsVsEta->GetXaxis()->SetTitle(
"#eta");
1383 p_ele_lostHitsVsEta->GetYaxis()->SetTitle(
"<N_{hits}>");
1384 p_ele_lostHitsVsEta->Write();
1386 p_ele_lostHitsVsPhi->GetXaxis()->SetTitle(
"#phi (rad)");
1387 p_ele_lostHitsVsPhi->GetYaxis()->SetTitle(
"<N_{hits}>");
1388 p_ele_lostHitsVsPhi->Write();
1390 p_ele_vertexTIPVsEta->SetTitle(
"mean tip (wrt gen vtx) vs eta");
1391 p_ele_vertexTIPVsEta->GetXaxis()->SetTitle(
"#eta");
1392 p_ele_vertexTIPVsEta->GetYaxis()->SetTitle(
"<TIP> (cm)");
1393 p_ele_vertexTIPVsEta->Write();
1395 p_ele_vertexTIPVsPhi->SetTitle(
"mean tip (wrt gen vtx) vs phi");
1396 p_ele_vertexTIPVsPhi->GetXaxis()->SetTitle(
"#phi");
1397 p_ele_vertexTIPVsPhi->GetYaxis()->SetTitle(
"<TIP> (cm)");
1398 p_ele_vertexTIPVsPhi->Write();
1400 p_ele_vertexTIPVsPt->SetTitle(
"mean tip (wrt gen vtx) vs phi");
1401 p_ele_vertexTIPVsPt->GetXaxis()->SetTitle(
"p_{T} (GeV/c)");
1402 p_ele_vertexTIPVsPt->GetYaxis()->SetTitle(
"<TIP> (cm)");
1403 p_ele_vertexTIPVsPt->Write();
1640 p_ele_seed_dphi2VsEta_->SetTitle(
"mean ele seed dphi 2nd layer vs eta");
1641 p_ele_seed_dphi2VsEta_->GetXaxis()->SetTitle(
"#eta");
1642 p_ele_seed_dphi2VsEta_->GetYaxis()->SetTitle(
"<#phi_{pred} - #phi_{hit}, 2nd layer> (rad)");
1643 p_ele_seed_dphi2VsEta_->SetMinimum(-0.004);
1644 p_ele_seed_dphi2VsEta_->SetMaximum(0.004);
1645 p_ele_seed_dphi2VsEta_->Write();
1647 p_ele_seed_dphi2VsPt_->SetTitle(
"mean ele seed dphi 2nd layer vs pt");
1648 p_ele_seed_dphi2VsPt_->GetXaxis()->SetTitle(
"p_{T} (GeV/c)");
1649 p_ele_seed_dphi2VsPt_->GetYaxis()->SetTitle(
"<#phi_{pred} - #phi_{hit}, 2nd layer> (rad)");
1650 p_ele_seed_dphi2VsPt_->SetMinimum(-0.004);
1651 p_ele_seed_dphi2VsPt_->SetMaximum(0.004);
1652 p_ele_seed_dphi2VsPt_->Write();
1655 p_ele_seed_drz2VsEta_->SetTitle(
"mean ele seed dr(dz) 2nd layer vs eta");
1656 p_ele_seed_drz2VsEta_->GetXaxis()->SetTitle(
"#eta");
1657 p_ele_seed_drz2VsEta_->GetYaxis()->SetTitle(
"<r(z)_{pred} - r(z)_{hit}, 2nd layer> (cm)");
1658 p_ele_seed_drz2VsEta_->SetMinimum(-0.15);
1659 p_ele_seed_drz2VsEta_->SetMaximum(0.15);
1660 p_ele_seed_drz2VsEta_->Write();
1662 p_ele_seed_drz2VsPt_->SetTitle(
"mean ele seed dr(dz) 2nd layer vs pt");
1663 p_ele_seed_drz2VsPt_->GetXaxis()->SetTitle(
"p_{T} (GeV/c)");
1664 p_ele_seed_drz2VsPt_->GetYaxis()->SetTitle(
"<r(z)_{pred} - r(z)_{hit}, 2nd layer> (cm)");
1665 p_ele_seed_drz2VsPt_->SetMinimum(-0.15);
1666 p_ele_seed_drz2VsPt_->SetMaximum(0.15);
1667 p_ele_seed_drz2VsPt_->Write();
1693 h_ele_etaEff->Write();
1694 h_ele_zEff->Write();
1695 h_ele_phiEff->Write();
1696 h_ele_absetaEff->Write();
1697 h_ele_ptEff->Write();
1698 h_ele_etaEff_all->Write();
1699 h_ele_ptEff_all->Write();
1700 h_ele_eta_goldenFrac->Write();
1701 h_ele_eta_bbremFrac->Write();
1702 h_ele_eta_narrowFrac->Write();
1703 h_ele_eta_showerFrac->Write();
1704 h_ele_xOverX0VsEta->Write();
1738 std::cout <<
"analyzing new event " << std::endl;
1743 edm::LogInfo(
"") <<
"\n\n =================> Treating event " <<
iEvent.id() <<
" Number of electrons "
1755 histNum_->Fill((*gsfElectrons).size());
1772 double d = gsfIter->vertex().x() * gsfIter->vertex().x() + gsfIter->vertex().y() * gsfIter->vertex().y();
1776 float enrj1 = gsfIter->superCluster()->energy();
1778 for (reco::GsfElectronCollection::const_iterator gsfIter2 = gsfIter + 1; gsfIter2 !=
gsfElectrons->end();
1781 float mee2 = p12.Dot(p12);
1783 float enrj2 = gsfIter2->superCluster()->energy();
1785 if (gsfIter->ecalDrivenSeed() && gsfIter2->ecalDrivenSeed())
1787 if (gsfIter->charge() * gsfIter2->charge() < 0.)
1793 int matchingObjectNum = 0;
1795 for (reco::GenJetCollection::const_iterator moIter =
genJets->begin(); moIter !=
genJets->end(); ++moIter) {
1797 matchingObjectNum++;
1815 bool okGsfFound =
false;
1816 double gsfOkRatio = 999999.;
1822 double dphi = gsfIter->
phi() - moIter->phi();
1824 dphi = dphi < 0 ? (CLHEP::twopi) + dphi : dphi - CLHEP::twopi;
1829 double tmpGsfRatio = gsfIter->p() / moIter->energy();
1831 gsfOkRatio = tmpGsfRatio;
1832 bestGsfElectron = *gsfIter;
1863 (bestGsfElectron.
vertex().x() -
bs.position().x()) * (bestGsfElectron.
vertex().x() -
bs.position().x()) +
1864 (bestGsfElectron.
vertex().y() -
bs.position().y()) * (bestGsfElectron.
vertex().y() -
bs.position().y());
1883 if (bestGsfElectron.
isEB())
1885 if (bestGsfElectron.
isEE())
1893 double R = TMath::Sqrt(sclRef->x() * sclRef->x() + sclRef->y() * sclRef->y() + sclRef->z() * sclRef->z());
1894 double Rt = TMath::Sqrt(sclRef->x() * sclRef->x() + sclRef->y() * sclRef->y());
1898 if (bestGsfElectron.
isEB())
1900 if (bestGsfElectron.
isEE())
1906 if (bestGsfElectron.
isEB())
1908 if (bestGsfElectron.
isEE())
1911 if (bestGsfElectron.
isEB())
1913 if (bestGsfElectron.
isEE())
1916 if (bestGsfElectron.
isEB())
1918 if (bestGsfElectron.
isEE())
1921 if (bestGsfElectron.
isEB())
1923 if (bestGsfElectron.
isEE())
1948 bestGsfElectron.
gsfTrack()->outerMomentum().R());
1964 bestGsfElectron.
gsfTrack()->normalizedChi2(),
1988 if (bestGsfElectron.
isEB())
1992 if (bestGsfElectron.
isEE())
2002 if (bestGsfElectron.
isEB())
2006 if (bestGsfElectron.
isEE())
2016 if (bestGsfElectron.
isEB())
2020 if (bestGsfElectron.
isEE())
2030 if (bestGsfElectron.
isEB())
2034 if (bestGsfElectron.
isEE())
2044 if (bestGsfElectron.
isEB())
2048 if (bestGsfElectron.
isEE())
2058 if (bestGsfElectron.
isEB())
2062 if (bestGsfElectron.
isEE())
2072 if (bestGsfElectron.
isEB())
2076 if (bestGsfElectron.
isEE())
2086 if (bestGsfElectron.
isEB())
2090 if (bestGsfElectron.
isEE())
2100 if (bestGsfElectron.
isEB())
2104 if (bestGsfElectron.
isEE())
2114 if (bestGsfElectron.
isEB())
2118 if (bestGsfElectron.
isEE())
2128 if (bestGsfElectron.
isEB())
2132 if (bestGsfElectron.
isEE())
2145 if (bestGsfElectron.
isEE())
2159 double fbrem_mean = 0.;
2162 1. - bestGsfElectron.
gsfTrack()->outerMomentum().R() / bestGsfElectron.
gsfTrack()->innerMomentum().R();
2163 double fbrem_mode = bestGsfElectron.
fbrem();
2178 bestGsfElectron.
gsfTrack()->innerMomentum().R());
2182 bestGsfElectron.
gsfTrack()->innerMomentum().R());
2192 bestGsfElectron.
gsfTrack()->innerMomentum().Rho());
2196 bestGsfElectron.
gsfTrack()->innerMomentum().Rho());