40 #include "CLHEP/Units/GlobalPhysicalConstants.h"
434 using namespace reco;
437 : beamSpot_(conf.getParameter<
edm::
InputTag>(
"beamSpot")) {
453 ptmax =
pset.getParameter<
double>(
"Ptmax");
454 pmax =
pset.getParameter<
double>(
"Pmax");
508 if (locJet != std::string::npos) {
509 std::cout <<
"Matching objects are CaloJets " << std::endl;
512 std::cout <<
"Didn't recognize input matching objects!! " << std::endl;
516 hlabel =
"h_" +
type_ +
"Num";
517 htitle =
"# " +
type_ +
"s";
522 histNum_ =
new TH1F(
"h_recEleNum",
"# rec electrons", 20, 0., 20.);
525 hlabel =
"h_" +
type_ +
"_eta";
526 htitle =
type_ +
" #eta";
528 hlabel =
"h_" +
type_ +
"_abseta";
529 htitle =
type_ +
" |#eta|";
531 hlabel =
"h_" +
type_ +
"_P";
532 htitle =
type_ +
" p";
534 hlabel =
"h_" +
type_ +
"_Pt";
535 htitle =
type_ +
" pt";
537 hlabel =
"h_" +
type_ +
"_phi";
538 htitle =
type_ +
" phi";
540 hlabel =
"h_" +
type_ +
"_z";
541 htitle =
type_ +
" z";
550 "ele #eta_{sc} - #eta_{tr}, prop from vertex, all reco electrons",
555 "ele #phi_{sc} - #phi_{tr}, prop from vertex, all reco electrons",
560 "ele #eta_{cl} - #eta_{tr}, prop from outermost, all reco electrons",
565 "ele #phi_{cl} - #phi_{tr}, prop from outermost, all reco electrons",
570 new TH1F(
"h_ele_HoE_all",
"ele hadronic energy / em energy, all reco electrons",
nbinhoe,
hoemin,
hoemax);
575 h_ele_TIP_all =
new TH1F(
"h_ele_TIP_all",
"ele vertex transverse radius, all reco electrons", 100, 0., 0.2);
581 "E2 - E1 vs ele pairs invariant mass, all electrons",
589 "E2 - E1 vs ele pairs invariant mass, ecal driven pairs, all electrons",
598 h_ele_charge =
new TH1F(
"h_ele_charge",
"ele charge", 5, -2., 2.);
609 new TH1F(
"h_ele_matchingObjectPt_matched",
"Efficiency vs matching jet p_{T}",
nbinpteff, 5.,
ptmax);
615 new TH1F(
"h_ele_matchingObjectAbsEta_matched",
"Efficiency vs matching jet |#eta|",
nbineta / 2, 0., 2.5);
618 new TH1F(
"h_ele_matchingObjectEta_matched",
"Efficiency vs matching jet #eta",
nbineta,
etamin,
etamax);
621 new TH1F(
"h_ele_matchingObjectPhi_matched",
"Efficiency vs matching jet phi",
nbinphi,
phimin,
phimax);
628 new TH1F(
"h_ele_matchingObjectZ_matched",
"Efficiency vs matching jet z",
nbinxyz, -25, 25);
630 h_ele_vertexTIP =
new TH1F(
"h_ele_vertexTIP",
"ele transverse impact parameter (wrt bs)", 90, 0., 0.15);
632 "ele transverse impact parameter (wrt bs) vs eta",
640 "ele transverse impact parameter (wrt bs) vs phi",
648 "h_ele_vertexTIPVsPt",
"ele transverse impact parameter (wrt bs) vs Pt",
nbinpt2D, 0.,
ptmax, 45, 0., 0.15);
649 h_ele_PoPmatchingObject =
new TH1F(
"h_ele_PoPmatchingObject",
"ele momentum / matching jet momentum", 75, 0., 1.5);
651 "ele momentum / matching jet momentum vs eta",
659 "ele momentum / matching jet momentum vs phi",
667 "h_ele_PoPmatchingObjectVsPt",
"ele momentum / matching jet momentum vs eta",
nbinpt2D, 0.,
ptmax, 50, 0., 1.5);
669 new TH1F(
"h_ele_PoPmatchingObject_barrel",
"ele momentum / matching jet momentum, barrel", 75, 0., 1.5);
671 new TH1F(
"h_ele_PoPmatchingObject_endcaps",
"ele momentum / matching jet momentum, endcaps", 75, 0., 1.5);
673 new TH1F(
"h_ele_EtaMnEtamatchingObject",
"ele momentum eta - matching jet eta",
nbindeta,
detamin,
detamax);
675 "ele momentum eta - matching jet eta vs eta",
683 "ele momentum eta - matching jet eta vs phi",
691 "ele momentum eta - matching jet eta vs pt",
699 new TH1F(
"h_ele_PhiMnPhimatchingObject",
"ele momentum phi - matching jet phi",
nbindphi,
dphimin,
dphimax);
701 "ele momentum phi - matching jet phi",
706 "ele momentum phi - matching SC phi vs eta",
714 "ele momentum phi - matching SC phi vs phi",
722 "ele momentum phi - matching SC phi vs pt",
733 new TH1F(
"h_scl_EoEmatchingObject_barrel",
"ele supercluster energy / matching jet energy, barrel", 50, 0.2, 1.2);
735 "h_scl_EoEmatchingObject_endcaps",
"ele supercluster energy / matching jet energy, endcaps", 50, 0.2, 1.2);
746 histSclSigIEtaIEta_ =
new TH1F(
"h_scl_sigietaieta",
"ele supercluster sigma ieta ieta", 100, 0., 0.05);
748 new TH1F(
"h_scl_sigietaieta_barrel",
"ele supercluster sigma ieta ieta, barrel", 100, 0., 0.05);
750 new TH1F(
"h_scl_sigietaieta_endcaps",
"ele supercluster sigma ieta ieta, endcaps", 100, 0., 0.05);
756 new TH1F(
"h_scl_E2x5max_barrel",
"ele supercluster energy in 2x5 max barrel",
nbinp, 0.,
pmax);
758 new TH1F(
"h_scl_E2x5max_endcaps",
"ele supercluster energy in 2x5 max endcaps",
nbinp, 0.,
pmax);
766 new TH2F(
"h_ele_ambiguousTracksVsEta",
"ele # ambiguous tracks vs eta",
nbineta2D,
etamin,
etamax, 5, 0., 5.);
768 new TH2F(
"h_ele_ambiguousTracksVsPhi",
"ele # ambiguous tracks vs phi",
nbinphi2D,
phimin,
phimax, 5, 0., 5.);
770 new TH2F(
"h_ele_ambiguousTracksVsPt",
"ele # ambiguous tracks vs pt",
nbinpt2D, 0.,
ptmax, 5, 0., 5.);
778 h_ele_lostHits =
new TH1F(
"h_ele_lostHits",
"ele track # lost hits", 5, 0., 5.);
785 h_ele_chi2 =
new TH1F(
"h_ele_chi2",
"ele track #chi^{2}", 100, 0., 15.);
789 h_ele_PinMnPout =
new TH1F(
"h_ele_PinMnPout",
"ele track inner p - outer p, mean",
nbinp, 0., 200.);
792 "ele track inner p - outer p vs eta, mode",
800 "ele track inner p - outer p vs phi, mode",
808 "h_ele_PinMnPoutVsPt_mode",
"ele track inner p - outer p vs pt, mode",
nbinpt2D, 0.,
ptmax,
nbinp2D, 0., 100.);
810 "h_ele_PinMnPoutVsE_mode",
"ele track inner p - outer p vs E, mode",
nbinp2D, 0., 200.,
nbinp2D, 0., 100.);
812 "h_ele_PinMnPoutVsChi2_mode",
"ele track inner p - outer p vs track chi2, mode", 50, 0., 20.,
nbinp2D, 0., 100.);
824 new TH2F(
"h_ele_outerPtVsPt_mode",
"ele track outer p_{T} vs pt, mode",
nbinpt2D, 0., 100.,
nbinpt2D, 0.,
ptmax);
843 h_ele_EoPVsE =
new TH2F(
"h_ele_EoPVsE",
"ele E/P_{vertex} vs E", 50, 0.,
pmax, 50, 0., 5.);
851 new TH1F(
"h_ele_EseedOP_eg_barrel",
"ele E_{seed}/P_{vertex}, ecal driven barrel",
nbineop, 0.,
eopmax);
856 new TH1F(
"h_ele_EseedOP_eg_endcaps",
"ele E_{seed}/P_{vertex}, ecal driven, endcaps",
nbineop, 0.,
eopmax);
862 h_ele_EseedOPVsE =
new TH2F(
"h_ele_EseedOPVsE",
"ele E_{seed}/P_{vertex} vs E", 50, 0.,
pmax, 50, 0., 5.);
870 new TH1F(
"h_ele_EoPout_eg_barrel",
"ele E_{seed}/P_{out}, ecal driven, barrel",
nbineop, 0.,
eopmax);
875 new TH1F(
"h_ele_EoPout_eg_endcaps",
"ele E_{seed}/P_{out}, ecal driven, endcaps",
nbineop, 0.,
eopmax);
889 new TH1F(
"h_ele_EeleOPout_eg_barrel",
"ele E_{ele}/P_{out}, ecal driven, barrel",
nbineop, 0.,
eopmax);
894 new TH1F(
"h_ele_EeleOPout_eg_endcaps",
"ele E_{ele}/P_{out}, ecal driven, endcaps",
nbineop, 0.,
eopmax);
906 "ele #eta_{sc} - #eta_{tr}, prop from vertex, ecal driven",
912 "ele #eta_{sc} - #eta_{tr}, prop from vertex, barrel",
918 "ele #eta_{sc} - #eta_{tr}, prop from vertex, ecal driven, barrel",
924 "ele #eta_{sc} - #eta_{tr}, prop from vertex, endcaps",
930 "ele #eta_{sc} - #eta_{tr}, prop from vertex, ecal driven, endcaps",
936 "ele #eta_{sc} - #eta_{tr} vs eta, prop from vertex",
944 "ele #eta_{sc} - #eta_{tr} vs phi, prop from vertex",
952 "ele #eta_{sc} - #eta_{tr} vs pt, prop from vertex",
963 "ele #phi_{sc} - #phi_{tr}, prop from vertex, ecal driven",
969 "ele #phi_{sc} - #phi_{tr}, prop from vertex, barrel",
975 "ele #phi_{sc} - #phi_{tr}, prop from vertex, ecal driven, barrel",
981 "ele #phi_{sc} - #phi_{tr}, prop from vertex, endcaps",
987 "ele #phi_{sc} - #phi_{tr}, prop from vertex, ecal driven, endcaps",
993 "ele #phi_{sc} - #phi_{tr} vs eta, prop from vertex",
1001 "ele #phi_{sc} - #phi_{tr} vs phi, prop from vertex",
1009 "ele #phi_{sc} - #phi_{tr} vs pt, prop from vertex",
1017 "ele #eta_{cl} - #eta_{tr}, prop from outermost",
1023 "ele #eta_{cl} - #eta_{tr}, prop from outermost, ecal driven",
1029 "ele #eta_{cl} - #eta_{tr}, prop from outermost, barrel",
1035 "ele #eta_{cl} - #eta_{tr}, prop from outermost, ecal driven, barrel",
1041 "ele #eta_{cl} - #eta_{tr}, prop from outermost, endcaps",
1047 "ele #eta_{cl} - #eta_{tr}, prop from outermost, ecal driven, endcaps",
1053 "ele #eta_{cl} - #eta_{tr} vs eta, prop from out",
1061 "ele #eta_{cl} - #eta_{tr} vs phi, prop from out",
1069 "ele #eta_{cl} - #eta_{tr} vs pt, prop from out",
1077 "ele #phi_{cl} - #phi_{tr}, prop from outermost",
1083 "ele #phi_{cl} - #phi_{tr}, prop from outermost, ecal driven",
1089 "ele #phi_{cl} - #phi_{tr}, prop from outermost, barrel",
1095 "ele #phi_{cl} - #phi_{tr}, prop from outermost, ecal driven, barrel",
1101 "ele #phi_{cl} - #phi_{tr}, prop from outermost, endcaps",
1107 "ele #phi_{cl} - #phi_{tr}, prop from outermost, ecal driven, endcaps",
1113 "ele #phi_{cl} - #phi_{tr} vs eta, prop from out",
1121 "ele #phi_{cl} - #phi_{tr} vs phi, prop from out",
1129 "ele #phi_{cl} - #phi_{tr} vs pt, prop from out",
1137 "ele #eta_{EleCl} - #eta_{tr}, prop from outermost",
1143 "ele #eta_{EleCl} - #eta_{tr}, prop from outermost, ecal driven",
1149 "ele #eta_{EleCl} - #eta_{tr}, prop from outermost, barrel",
1155 "ele #eta_{EleCl} - #eta_{tr}, prop from outermost, ecal driven, barrel",
1161 "ele #eta_{EleCl} - #eta_{tr}, prop from outermost, endcaps",
1167 new TH1F(
"h_ele_dEtaEleCl_propOut_eg_endcaps",
1168 "ele #eta_{EleCl} - #eta_{tr}, prop from outermost, ecal driven, endcaps",
1174 "ele #eta_{EleCl} - #eta_{tr} vs eta, prop from out",
1182 "ele #eta_{EleCl} - #eta_{tr} vs phi, prop from out",
1190 "ele #eta_{EleCl} - #eta_{tr} vs pt, prop from out",
1198 "ele #phi_{EleCl} - #phi_{tr}, prop from outermost",
1204 "ele #phi_{EleCl} - #phi_{tr}, prop from outermost, ecal driven",
1210 "ele #phi_{EleCl} - #phi_{tr}, prop from outermost, barrel",
1216 "ele #phi_{EleCl} - #phi_{tr}, prop from outermost, ecal driven, barrel",
1222 "ele #phi_{EleCl} - #phi_{tr}, prop from outermost, endcaps",
1228 new TH1F(
"h_ele_dPhiEleCl_propOut_eg_endcaps",
1229 "ele #phi_{EleCl} - #phi_{tr}, prop from outermost, ecal driven, endcaps",
1235 "ele #phi_{EleCl} - #phi_{tr} vs eta, prop from out",
1243 "ele #phi_{EleCl} - #phi_{tr} vs phi, prop from out",
1251 "ele #phi_{EleCl} - #phi_{tr} vs pt, prop from out",
1266 new TH1F(
"h_ele_HoE_eg_barrel",
"ele hadronic energy / em energy, ecal driven, barrel",
nbinhoe,
hoemin,
hoemax);
1269 new TH1F(
"h_ele_HoE_endcaps",
"ele hadronic energy / em energy, endcaps",
nbinhoe,
hoemin,
hoemax);
1272 "h_ele_HoE_eg_endcaps",
"ele hadronic energy / em energy, ecal driven, endcaps",
nbinhoe,
hoemin,
hoemax);
1282 h_ele_seed_dphi2_ =
new TH1F(
"h_ele_seedDphi2",
"ele seed dphi 2nd layer", 50, -0.003, +0.003);
1284 new TH2F(
"h_ele_seedDphi2VsEta",
"ele seed dphi 2nd layer vs eta",
nbineta2D,
etamin,
etamax, 50, -0.003, +0.003);
1286 new TH2F(
"h_ele_seedDphi2VsPt",
"ele seed dphi 2nd layer vs pt",
nbinpt2D, 0.,
ptmax, 50, -0.003, +0.003);
1287 h_ele_seed_drz2_ =
new TH1F(
"h_ele_seedDrz2",
"ele seed dr/dz 2nd layer", 50, -0.03, +0.03);
1289 new TH2F(
"h_ele_seedDrz2VsEta",
"ele seed dr/dz 2nd layer vs eta",
nbineta2D,
etamin,
etamax, 50, -0.03, +0.03);
1291 new TH2F(
"h_ele_seedDrz2VsPt",
"ele seed dr/dz 2nd layer vs pt",
nbinpt2D, 0.,
ptmax, 50, -0.03, +0.03);
1292 h_ele_seed_subdet2_ =
new TH1F(
"h_ele_seedSubdet2",
"ele seed subdet 2nd layer", 10, 0., 10.);
1295 h_ele_classes =
new TH1F(
"h_ele_classes",
"electron classes", 20, 0.0, 20.);
1302 "h_ele_PinVsPoutGolden_mode",
"ele track inner p vs outer p, golden, mode",
nbinp2D, 0.,
pmax, 50, 0.,
pmax);
1304 "ele track inner p vs outer p vs eta, showering, mode",
1312 "h_ele_PinVsPoutGolden_mean",
"ele track inner p vs outer p, golden, mean",
nbinp2D, 0.,
pmax, 50, 0.,
pmax);
1314 "h_ele_PinVsPoutShowering_mean",
"ele track inner p vs outer p, showering, mean",
nbinp2D, 0.,
pmax, 50, 0.,
pmax);
1316 "ele track inner pt vs outer pt, golden, mode",
1324 "ele track inner pt vs outer pt, showering, mode",
1332 "ele track inner pt vs outer pt, golden, mean",
1340 "ele track inner pt vs outer pt, showering, mean",
1348 "h_scl_EoEmatchingObject golden, barrel",
"ele SC energy over matching jet energy, golden, barrel", 100, 0.2, 1.2);
1350 "ele SC energy over matching jet energy, golden, endcaps",
1355 "ele SC energy over matching jet energy, showering, barrel",
1360 "ele SC energy over matching jet energy, showering, endcaps",
1366 h_ele_tkSumPt_dr03 =
new TH1F(
"h_ele_tkSumPt_dr03",
"tk isolation sum, dR=0.3", 100, 0.0, 20.);
1369 new TH1F(
"h_ele_hcalDepth1TowerSumEt_dr03",
"hcal depth1 isolation sum, dR=0.3", 100, 0.0, 20.);
1371 new TH1F(
"h_ele_hcalDepth2TowerSumEt_dr03",
"hcal depth2 isolation sum, dR=0.3", 100, 0.0, 20.);
1372 h_ele_tkSumPt_dr04 =
new TH1F(
"h_ele_tkSumPt_dr04",
"hcal isolation sum", 100, 0.0, 20.);
1375 new TH1F(
"h_ele_hcalDepth1TowerSumEt_dr04",
"hcal depth1 isolation sum, dR=0.4", 100, 0.0, 20.);
1377 new TH1F(
"h_ele_hcalDepth2TowerSumEt_dr04",
"hcal depth2 isolation sum, dR=0.4", 100, 0.0, 20.);
1380 h_ele_fbrem =
new TH1F(
"h_ele_fbrem",
"ele brem fraction, mode", 100, 0., 1.);
1382 new TProfile(
"h_ele_fbremvsEtamode",
"mean ele brem fraction vs eta, mode",
nbineta2D,
etamin,
etamax, 0., 1.);
1384 new TProfile(
"h_ele_fbremvsEtamean",
"mean ele brem fraction vs eta, mean",
nbineta2D,
etamin,
etamax, 0., 1.);
1387 h_ele_mva =
new TH1F(
"h_ele_mva",
"ele mva", 100, -1., 1.);
1388 h_ele_provenance =
new TH1F(
"h_ele_provenance",
"ele provenance", 5, -2., 3.);
1403 h_ele_chi2->GetXaxis()->SetTitle(
"#Chi^{2}");
1449 h_ele_PinMnPout->GetXaxis()->SetTitle(
"P_{vertex} - P_{out} (GeV/c)");
1461 h_ele_EoP->GetXaxis()->SetTitle(
"E/P_{vertex}");
1462 h_ele_EoP->GetYaxis()->SetTitle(
"Events");
1465 h_ele_EoPout->GetXaxis()->SetTitle(
"E_{seed}/P_{out}");
1539 h_ele_HoE->GetYaxis()->SetTitle(
"Events");
1546 h_ele_fbrem->GetXaxis()->SetTitle(
"P_{in} - P_{out} / P_{in}");
1576 h_ele_mee_os->GetXaxis()->SetTitle(
"m_{e^{+}e^{-}} (GeV/c^{2})");
1582 histNum_->GetXaxis()->SetTitle(
"N_{ele}");
1583 histNum_->GetYaxis()->SetTitle(
"Events");
1590 std::cout <<
"efficiency calculation " << std::endl;
1593 h_ele_etaEff->Reset();
1595 h_ele_etaEff->Print();
1596 h_ele_etaEff->GetXaxis()->SetTitle(
"#eta");
1597 h_ele_etaEff->GetYaxis()->SetTitle(
"Efficiency");
1601 h_ele_zEff->Reset();
1603 h_ele_zEff->Print();
1604 h_ele_zEff->GetXaxis()->SetTitle(
"z (cm)");
1605 h_ele_zEff->GetYaxis()->SetTitle(
"Efficiency");
1609 h_ele_absetaEff->Reset();
1611 h_ele_absetaEff->GetXaxis()->SetTitle(
"|#eta|");
1612 h_ele_absetaEff->GetYaxis()->SetTitle(
"Efficiency");
1616 h_ele_ptEff->Reset();
1618 h_ele_ptEff->GetXaxis()->SetTitle(
"p_{T} (GeV/c)");
1619 h_ele_ptEff->GetYaxis()->SetTitle(
"Efficiency");
1623 h_ele_phiEff->Reset();
1625 h_ele_phiEff->GetXaxis()->SetTitle(
"#phi (rad)");
1626 h_ele_phiEff->GetYaxis()->SetTitle(
"Efficiency");
1630 h_ele_etaEff_all->Reset();
1632 h_ele_etaEff_all->Print();
1633 h_ele_etaEff_all->GetXaxis()->SetTitle(
"#eta");
1634 h_ele_etaEff_all->GetYaxis()->SetTitle(
"N_{rec}/N_{matching jet}");
1636 h_ele_ptEff_all->Reset();
1638 h_ele_ptEff_all->Print();
1639 h_ele_ptEff_all->GetXaxis()->SetTitle(
"p_{T} (GeV/c)");
1640 h_ele_ptEff_all->GetYaxis()->SetTitle(
"N_{rec}/N_{matching jet}");
1643 TH1F *h_ele_eta_goldenFrac = (TH1F *)
h_ele_eta_golden->Clone(
"h_ele_eta_goldenFrac");
1644 h_ele_eta_goldenFrac->Reset();
1645 h_ele_eta_goldenFrac->GetXaxis()->SetTitle(
"|#eta|");
1646 h_ele_eta_goldenFrac->GetYaxis()->SetTitle(
"Fraction of electrons");
1648 h_ele_eta_goldenFrac->SetTitle(
"fraction of golden electrons vs eta");
1649 TH1F *h_ele_eta_bbremFrac = (TH1F *)
h_ele_eta_bbrem->Clone(
"h_ele_eta_bbremFrac");
1650 h_ele_eta_bbremFrac->Reset();
1652 h_ele_eta_bbremFrac->GetXaxis()->SetTitle(
"|#eta|");
1653 h_ele_eta_bbremFrac->GetYaxis()->SetTitle(
"Fraction of electrons");
1654 h_ele_eta_bbremFrac->SetTitle(
"fraction of big brem electrons vs eta");
1655 TH1F *h_ele_eta_narrowFrac = (TH1F *)
h_ele_eta_narrow->Clone(
"h_ele_eta_narrowFrac");
1656 h_ele_eta_narrowFrac->Reset();
1658 h_ele_eta_narrowFrac->GetXaxis()->SetTitle(
"|#eta|");
1659 h_ele_eta_narrowFrac->GetYaxis()->SetTitle(
"Fraction of electrons");
1660 h_ele_eta_narrowFrac->SetTitle(
"fraction of narrow electrons vs eta");
1661 TH1F *h_ele_eta_showerFrac = (TH1F *)
h_ele_eta_shower->Clone(
"h_ele_eta_showerFrac");
1662 h_ele_eta_showerFrac->Reset();
1664 h_ele_eta_showerFrac->GetXaxis()->SetTitle(
"|#eta|");
1665 h_ele_eta_showerFrac->GetYaxis()->SetTitle(
"Fraction of electrons");
1666 h_ele_eta_showerFrac->SetTitle(
"fraction of showering electrons vs eta");
1669 TH1F *h_ele_xOverX0VsEta =
new TH1F(
"h_ele_xOverx0VsEta",
"mean X/X_0 vs eta",
nbineta / 2, 0.0, 2.5);
1671 double xOverX0 = 0.;
1674 h_ele_xOverX0VsEta->SetBinContent(ibin, xOverX0);
1679 p_ele_PoPmatchingObjectVsEta->SetTitle(
"mean ele momentum / matching SC energy vs eta");
1680 p_ele_PoPmatchingObjectVsEta->GetXaxis()->SetTitle(
"#eta");
1681 p_ele_PoPmatchingObjectVsEta->GetYaxis()->SetTitle(
"<P/E_{matching jet}>");
1682 p_ele_PoPmatchingObjectVsEta->Write();
1684 p_ele_PoPmatchingObjectVsPhi->SetTitle(
"mean ele momentum / gen momentum vs phi");
1685 p_ele_PoPmatchingObjectVsPhi->GetXaxis()->SetTitle(
"#phi (rad)");
1686 p_ele_PoPmatchingObjectVsPhi->GetYaxis()->SetTitle(
"<P/E_{matching jet}>");
1687 p_ele_PoPmatchingObjectVsPhi->Write();
1689 p_ele_EtaMnEtamatchingObjectVsEta->GetXaxis()->SetTitle(
"#eta");
1690 p_ele_EtaMnEtamatchingObjectVsEta->GetYaxis()->SetTitle(
"<#eta_{rec} - #eta_{matching jet}>");
1691 p_ele_EtaMnEtamatchingObjectVsEta->Write();
1693 p_ele_EtaMnEtamatchingObjectVsPhi->GetXaxis()->SetTitle(
"#phi");
1694 p_ele_EtaMnEtamatchingObjectVsPhi->GetYaxis()->SetTitle(
"<#eta_{rec} - #eta_{matching jet}>");
1695 p_ele_EtaMnEtamatchingObjectVsPhi->Write();
1697 p_ele_PhiMnPhimatchingObjectVsEta->GetXaxis()->SetTitle(
"#eta");
1698 p_ele_PhiMnPhimatchingObjectVsEta->GetYaxis()->SetTitle(
"<#phi_{rec} - #phi_{matching jet}> (rad)");
1699 p_ele_PhiMnPhimatchingObjectVsEta->Write();
1701 p_ele_PhiMnPhimatchingObjectVsPhi->GetXaxis()->SetTitle(
"#phi");
1702 p_ele_PhiMnPhimatchingObjectVsPhi->GetYaxis()->SetTitle(
"<#phi_{rec} - #phi_{matching jet}> (rad)");
1703 p_ele_PhiMnPhimatchingObjectVsPhi->Write();
1705 p_ele_vertexPtVsEta->GetXaxis()->SetTitle(
"#eta");
1706 p_ele_vertexPtVsEta->GetYaxis()->SetTitle(
"<p_{T}> (GeV/c)");
1707 p_ele_vertexPtVsEta->Write();
1709 p_ele_vertexPtVsPhi->GetXaxis()->SetTitle(
"#phi (rad)");
1710 p_ele_vertexPtVsPhi->GetYaxis()->SetTitle(
"<p_{T}> (GeV/c)");
1711 p_ele_vertexPtVsPhi->Write();
1713 p_ele_EoPVsEta->GetXaxis()->SetTitle(
"#eta");
1714 p_ele_EoPVsEta->GetYaxis()->SetTitle(
"<E/P_{vertex}>");
1715 p_ele_EoPVsEta->Write();
1717 p_ele_EoPVsPhi->GetXaxis()->SetTitle(
"#phi (rad)");
1718 p_ele_EoPVsPhi->GetYaxis()->SetTitle(
"<E/P_{vertex}>");
1719 p_ele_EoPVsPhi->Write();
1721 p_ele_EoPoutVsEta->GetXaxis()->SetTitle(
"#eta");
1722 p_ele_EoPoutVsEta->GetYaxis()->SetTitle(
"<E_{seed}/P_{out}>");
1723 p_ele_EoPoutVsEta->Write();
1725 p_ele_EoPoutVsPhi->GetXaxis()->SetTitle(
"#phi (rad)");
1726 p_ele_EoPoutVsPhi->GetYaxis()->SetTitle(
"<E_{seed}/P_{out}>");
1727 p_ele_EoPoutVsPhi->Write();
1729 p_ele_EeleOPoutVsEta->SetTitle(
"mean ele Eele/pout vs eta");
1730 p_ele_EeleOPoutVsEta->GetXaxis()->SetTitle(
"#eta");
1731 p_ele_EeleOPoutVsEta->GetYaxis()->SetTitle(
"<E_{ele}/P_{out}>");
1732 p_ele_EeleOPoutVsEta->Write();
1734 p_ele_EeleOPoutVsPhi->SetTitle(
"mean ele Eele/pout vs phi");
1735 p_ele_EeleOPoutVsPhi->GetXaxis()->SetTitle(
"#phi (rad)");
1736 p_ele_EeleOPoutVsPhi->GetYaxis()->SetTitle(
"<E_{ele}/P_{out}>");
1737 p_ele_EeleOPoutVsPhi->Write();
1739 p_ele_HoEVsEta->GetXaxis()->SetTitle(
"#eta");
1740 p_ele_HoEVsEta->GetYaxis()->SetTitle(
"<H/E>");
1741 p_ele_HoEVsEta->Write();
1743 p_ele_HoEVsPhi->GetXaxis()->SetTitle(
"#phi (rad)");
1744 p_ele_HoEVsPhi->GetYaxis()->SetTitle(
"<H/E>");
1745 p_ele_HoEVsPhi->Write();
1747 p_ele_chi2VsEta->GetXaxis()->SetTitle(
"#eta");
1748 p_ele_chi2VsEta->GetYaxis()->SetTitle(
"<#Chi^{2}>");
1749 p_ele_chi2VsEta->Write();
1751 p_ele_chi2VsPhi->GetXaxis()->SetTitle(
"#phi (rad)");
1752 p_ele_chi2VsPhi->GetYaxis()->SetTitle(
"<#Chi^{2}>");
1753 p_ele_chi2VsPhi->Write();
1755 p_ele_foundHitsVsEta->GetXaxis()->SetTitle(
"#eta");
1756 p_ele_foundHitsVsEta->GetYaxis()->SetTitle(
"<N_{hits}>");
1757 p_ele_foundHitsVsEta->Write();
1759 p_ele_foundHitsVsPhi->GetXaxis()->SetTitle(
"#phi (rad)");
1760 p_ele_foundHitsVsPhi->GetYaxis()->SetTitle(
"<N_{hits}>");
1761 p_ele_foundHitsVsPhi->Write();
1763 p_ele_lostHitsVsEta->GetXaxis()->SetTitle(
"#eta");
1764 p_ele_lostHitsVsEta->GetYaxis()->SetTitle(
"<N_{hits}>");
1765 p_ele_lostHitsVsEta->Write();
1767 p_ele_lostHitsVsPhi->GetXaxis()->SetTitle(
"#phi (rad)");
1768 p_ele_lostHitsVsPhi->GetYaxis()->SetTitle(
"<N_{hits}>");
1769 p_ele_lostHitsVsPhi->Write();
1771 p_ele_vertexTIPVsEta->SetTitle(
"mean tip (wrt gen vtx) vs eta");
1772 p_ele_vertexTIPVsEta->GetXaxis()->SetTitle(
"#eta");
1773 p_ele_vertexTIPVsEta->GetYaxis()->SetTitle(
"<TIP> (cm)");
1774 p_ele_vertexTIPVsEta->Write();
1776 p_ele_vertexTIPVsPhi->SetTitle(
"mean tip (wrt gen vtx) vs phi");
1777 p_ele_vertexTIPVsPhi->GetXaxis()->SetTitle(
"#phi");
1778 p_ele_vertexTIPVsPhi->GetYaxis()->SetTitle(
"<TIP> (cm)");
1779 p_ele_vertexTIPVsPhi->Write();
1781 p_ele_vertexTIPVsPt->SetTitle(
"mean tip (wrt gen vtx) vs phi");
1782 p_ele_vertexTIPVsPt->GetXaxis()->SetTitle(
"p_{T} (GeV/c)");
1783 p_ele_vertexTIPVsPt->GetYaxis()->SetTitle(
"<TIP> (cm)");
1784 p_ele_vertexTIPVsPt->Write();
2021 p_ele_seed_dphi2VsEta_->SetTitle(
"mean ele seed dphi 2nd layer vs eta");
2022 p_ele_seed_dphi2VsEta_->GetXaxis()->SetTitle(
"#eta");
2023 p_ele_seed_dphi2VsEta_->GetYaxis()->SetTitle(
"<#phi_{pred} - #phi_{hit}, 2nd layer> (rad)");
2024 p_ele_seed_dphi2VsEta_->SetMinimum(-0.004);
2025 p_ele_seed_dphi2VsEta_->SetMaximum(0.004);
2026 p_ele_seed_dphi2VsEta_->Write();
2028 p_ele_seed_dphi2VsPt_->SetTitle(
"mean ele seed dphi 2nd layer vs pt");
2029 p_ele_seed_dphi2VsPt_->GetXaxis()->SetTitle(
"p_{T} (GeV/c)");
2030 p_ele_seed_dphi2VsPt_->GetYaxis()->SetTitle(
"<#phi_{pred} - #phi_{hit}, 2nd layer> (rad)");
2031 p_ele_seed_dphi2VsPt_->SetMinimum(-0.004);
2032 p_ele_seed_dphi2VsPt_->SetMaximum(0.004);
2033 p_ele_seed_dphi2VsPt_->Write();
2036 p_ele_seed_drz2VsEta_->SetTitle(
"mean ele seed dr(dz) 2nd layer vs eta");
2037 p_ele_seed_drz2VsEta_->GetXaxis()->SetTitle(
"#eta");
2038 p_ele_seed_drz2VsEta_->GetYaxis()->SetTitle(
"<r(z)_{pred} - r(z)_{hit}, 2nd layer> (cm)");
2039 p_ele_seed_drz2VsEta_->SetMinimum(-0.15);
2040 p_ele_seed_drz2VsEta_->SetMaximum(0.15);
2041 p_ele_seed_drz2VsEta_->Write();
2043 p_ele_seed_drz2VsPt_->SetTitle(
"mean ele seed dr(dz) 2nd layer vs pt");
2044 p_ele_seed_drz2VsPt_->GetXaxis()->SetTitle(
"p_{T} (GeV/c)");
2045 p_ele_seed_drz2VsPt_->GetYaxis()->SetTitle(
"<r(z)_{pred} - r(z)_{hit}, 2nd layer> (cm)");
2046 p_ele_seed_drz2VsPt_->SetMinimum(-0.15);
2047 p_ele_seed_drz2VsPt_->SetMaximum(0.15);
2048 p_ele_seed_drz2VsPt_->Write();
2074 h_ele_etaEff->Write();
2075 h_ele_zEff->Write();
2076 h_ele_phiEff->Write();
2077 h_ele_absetaEff->Write();
2078 h_ele_ptEff->Write();
2079 h_ele_etaEff_all->Write();
2080 h_ele_ptEff_all->Write();
2081 h_ele_eta_goldenFrac->Write();
2082 h_ele_eta_bbremFrac->Write();
2083 h_ele_eta_narrowFrac->Write();
2084 h_ele_eta_showerFrac->Write();
2085 h_ele_xOverX0VsEta->Write();
2119 std::cout <<
"analyzing new event " << std::endl;
2124 edm::LogInfo(
"") <<
"\n\n =================> Treating event " <<
iEvent.id() <<
" Number of electrons "
2136 histNum_->Fill((*gsfElectrons).size());
2153 double d = gsfIter->vertex().x() * gsfIter->vertex().x() + gsfIter->vertex().y() * gsfIter->vertex().y();
2157 float enrj1 = gsfIter->superCluster()->energy();
2159 for (reco::GsfElectronCollection::const_iterator gsfIter2 = gsfIter + 1; gsfIter2 !=
gsfElectrons->end();
2162 float mee2 = p12.Dot(p12);
2164 float enrj2 = gsfIter2->superCluster()->energy();
2166 if (gsfIter->ecalDrivenSeed() && gsfIter2->ecalDrivenSeed())
2168 if (gsfIter->charge() * gsfIter2->charge() < 0.)
2174 int matchingObjectNum = 0;
2176 for (reco::CaloJetCollection::const_iterator moIter = recoCaloJets->begin(); moIter != recoCaloJets->end();
2179 matchingObjectNum++;
2197 bool okGsfFound =
false;
2198 double gsfOkRatio = 999999.;
2204 double dphi = gsfIter->
phi() - moIter->phi();
2206 dphi = dphi < 0 ? (CLHEP::twopi) + dphi : dphi - CLHEP::twopi;
2211 double tmpGsfRatio = gsfIter->p() / moIter->energy();
2213 gsfOkRatio = tmpGsfRatio;
2214 bestGsfElectron = *gsfIter;
2245 (bestGsfElectron.
vertex().x() -
bs.position().x()) * (bestGsfElectron.
vertex().x() -
bs.position().x()) +
2246 (bestGsfElectron.
vertex().y() -
bs.position().y()) * (bestGsfElectron.
vertex().y() -
bs.position().y());
2265 if (bestGsfElectron.
isEB())
2267 if (bestGsfElectron.
isEE())
2275 double R =
std::sqrt(sclRef->x() * sclRef->x() + sclRef->y() * sclRef->y() + sclRef->z() * sclRef->z());
2276 double Rt =
std::sqrt(sclRef->x() * sclRef->x() + sclRef->y() * sclRef->y());
2280 if (bestGsfElectron.
isEB())
2282 if (bestGsfElectron.
isEE())
2288 if (bestGsfElectron.
isEB())
2290 if (bestGsfElectron.
isEE())
2293 if (bestGsfElectron.
isEB())
2295 if (bestGsfElectron.
isEE())
2298 if (bestGsfElectron.
isEB())
2300 if (bestGsfElectron.
isEE())
2303 if (bestGsfElectron.
isEB())
2305 if (bestGsfElectron.
isEE())
2330 bestGsfElectron.
gsfTrack()->outerMomentum().R());
2346 bestGsfElectron.
gsfTrack()->normalizedChi2(),
2370 if (bestGsfElectron.
isEB())
2374 if (bestGsfElectron.
isEE())
2384 if (bestGsfElectron.
isEB())
2388 if (bestGsfElectron.
isEE())
2398 if (bestGsfElectron.
isEB())
2402 if (bestGsfElectron.
isEE())
2412 if (bestGsfElectron.
isEB())
2416 if (bestGsfElectron.
isEE())
2426 if (bestGsfElectron.
isEB())
2430 if (bestGsfElectron.
isEE())
2440 if (bestGsfElectron.
isEB())
2444 if (bestGsfElectron.
isEE())
2454 if (bestGsfElectron.
isEB())
2458 if (bestGsfElectron.
isEE())
2468 if (bestGsfElectron.
isEB())
2472 if (bestGsfElectron.
isEE())
2482 if (bestGsfElectron.
isEB())
2486 if (bestGsfElectron.
isEE())
2496 if (bestGsfElectron.
isEB())
2500 if (bestGsfElectron.
isEE())
2510 if (bestGsfElectron.
isEB())
2514 if (bestGsfElectron.
isEE())
2527 if (bestGsfElectron.
isEE())
2541 double fbrem_mean = 0.;
2544 1. - bestGsfElectron.
gsfTrack()->outerMomentum().R() / bestGsfElectron.
gsfTrack()->innerMomentum().R();
2545 double fbrem_mode = bestGsfElectron.
fbrem();
2560 bestGsfElectron.
gsfTrack()->innerMomentum().R());
2564 bestGsfElectron.
gsfTrack()->innerMomentum().R());
2574 bestGsfElectron.
gsfTrack()->innerMomentum().Rho());
2578 bestGsfElectron.
gsfTrack()->innerMomentum().Rho());