40 #include "CLHEP/Units/GlobalPhysicalConstants.h"
435 using namespace reco;
438 : beamSpot_(conf.getParameter<
edm::
InputTag>(
"beamSpot")) {
454 ptmax =
pset.getParameter<
double>(
"Ptmax");
455 pmax =
pset.getParameter<
double>(
"Pmax");
509 if (locJet != std::string::npos) {
510 std::cout <<
"Matching objects are CaloJets " << std::endl;
513 std::cout <<
"Didn't recognize input matching objects!! " << std::endl;
517 hlabel =
"h_" +
type_ +
"Num";
518 htitle =
"# " +
type_ +
"s";
523 histNum_ =
new TH1F(
"h_recEleNum",
"# rec electrons", 20, 0., 20.);
526 hlabel =
"h_" +
type_ +
"_eta";
527 htitle =
type_ +
" #eta";
529 hlabel =
"h_" +
type_ +
"_abseta";
530 htitle =
type_ +
" |#eta|";
532 hlabel =
"h_" +
type_ +
"_P";
533 htitle =
type_ +
" p";
535 hlabel =
"h_" +
type_ +
"_Pt";
536 htitle =
type_ +
" pt";
538 hlabel =
"h_" +
type_ +
"_phi";
539 htitle =
type_ +
" phi";
541 hlabel =
"h_" +
type_ +
"_z";
542 htitle =
type_ +
" z";
551 "ele #eta_{sc} - #eta_{tr}, prop from vertex, all reco electrons",
556 "ele #phi_{sc} - #phi_{tr}, prop from vertex, all reco electrons",
561 "ele #eta_{cl} - #eta_{tr}, prop from outermost, all reco electrons",
566 "ele #phi_{cl} - #phi_{tr}, prop from outermost, all reco electrons",
571 new TH1F(
"h_ele_HoE_all",
"ele hadronic energy / em energy, all reco electrons",
nbinhoe,
hoemin,
hoemax);
576 h_ele_TIP_all =
new TH1F(
"h_ele_TIP_all",
"ele vertex transverse radius, all reco electrons", 100, 0., 0.2);
582 "E2 - E1 vs ele pairs invariant mass, all electrons",
590 "E2 - E1 vs ele pairs invariant mass, ecal driven pairs, all electrons",
599 h_ele_charge =
new TH1F(
"h_ele_charge",
"ele charge", 5, -2., 2.);
610 new TH1F(
"h_ele_matchingObjectPt_matched",
"Efficiency vs matching jet p_{T}",
nbinpteff, 5.,
ptmax);
616 new TH1F(
"h_ele_matchingObjectAbsEta_matched",
"Efficiency vs matching jet |#eta|",
nbineta / 2, 0., 2.5);
619 new TH1F(
"h_ele_matchingObjectEta_matched",
"Efficiency vs matching jet #eta",
nbineta,
etamin,
etamax);
622 new TH1F(
"h_ele_matchingObjectPhi_matched",
"Efficiency vs matching jet phi",
nbinphi,
phimin,
phimax);
629 new TH1F(
"h_ele_matchingObjectZ_matched",
"Efficiency vs matching jet z",
nbinxyz, -25, 25);
631 h_ele_vertexTIP =
new TH1F(
"h_ele_vertexTIP",
"ele transverse impact parameter (wrt bs)", 90, 0., 0.15);
633 "ele transverse impact parameter (wrt bs) vs eta",
641 "ele transverse impact parameter (wrt bs) vs phi",
649 "h_ele_vertexTIPVsPt",
"ele transverse impact parameter (wrt bs) vs Pt",
nbinpt2D, 0.,
ptmax, 45, 0., 0.15);
650 h_ele_PoPmatchingObject =
new TH1F(
"h_ele_PoPmatchingObject",
"ele momentum / matching jet momentum", 75, 0., 1.5);
652 "ele momentum / matching jet momentum vs eta",
660 "ele momentum / matching jet momentum vs phi",
668 "h_ele_PoPmatchingObjectVsPt",
"ele momentum / matching jet momentum vs eta",
nbinpt2D, 0.,
ptmax, 50, 0., 1.5);
670 new TH1F(
"h_ele_PoPmatchingObject_barrel",
"ele momentum / matching jet momentum, barrel", 75, 0., 1.5);
672 new TH1F(
"h_ele_PoPmatchingObject_endcaps",
"ele momentum / matching jet momentum, endcaps", 75, 0., 1.5);
674 new TH1F(
"h_ele_EtaMnEtamatchingObject",
"ele momentum eta - matching jet eta",
nbindeta,
detamin,
detamax);
676 "ele momentum eta - matching jet eta vs eta",
684 "ele momentum eta - matching jet eta vs phi",
692 "ele momentum eta - matching jet eta vs pt",
700 new TH1F(
"h_ele_PhiMnPhimatchingObject",
"ele momentum phi - matching jet phi",
nbindphi,
dphimin,
dphimax);
702 "ele momentum phi - matching jet phi",
707 "ele momentum phi - matching SC phi vs eta",
715 "ele momentum phi - matching SC phi vs phi",
723 "ele momentum phi - matching SC phi vs pt",
734 new TH1F(
"h_scl_EoEmatchingObject_barrel",
"ele supercluster energy / matching jet energy, barrel", 50, 0.2, 1.2);
736 "h_scl_EoEmatchingObject_endcaps",
"ele supercluster energy / matching jet energy, endcaps", 50, 0.2, 1.2);
747 histSclSigIEtaIEta_ =
new TH1F(
"h_scl_sigietaieta",
"ele supercluster sigma ieta ieta", 100, 0., 0.05);
749 new TH1F(
"h_scl_sigietaieta_barrel",
"ele supercluster sigma ieta ieta, barrel", 100, 0., 0.05);
751 new TH1F(
"h_scl_sigietaieta_endcaps",
"ele supercluster sigma ieta ieta, endcaps", 100, 0., 0.05);
757 new TH1F(
"h_scl_E2x5max_barrel",
"ele supercluster energy in 2x5 max barrel",
nbinp, 0.,
pmax);
759 new TH1F(
"h_scl_E2x5max_endcaps",
"ele supercluster energy in 2x5 max endcaps",
nbinp, 0.,
pmax);
767 new TH2F(
"h_ele_ambiguousTracksVsEta",
"ele # ambiguous tracks vs eta",
nbineta2D,
etamin,
etamax, 5, 0., 5.);
769 new TH2F(
"h_ele_ambiguousTracksVsPhi",
"ele # ambiguous tracks vs phi",
nbinphi2D,
phimin,
phimax, 5, 0., 5.);
771 new TH2F(
"h_ele_ambiguousTracksVsPt",
"ele # ambiguous tracks vs pt",
nbinpt2D, 0.,
ptmax, 5, 0., 5.);
779 h_ele_lostHits =
new TH1F(
"h_ele_lostHits",
"ele track # lost hits", 5, 0., 5.);
786 h_ele_chi2 =
new TH1F(
"h_ele_chi2",
"ele track #chi^{2}", 100, 0., 15.);
790 h_ele_PinMnPout =
new TH1F(
"h_ele_PinMnPout",
"ele track inner p - outer p, mean",
nbinp, 0., 200.);
793 "ele track inner p - outer p vs eta, mode",
801 "ele track inner p - outer p vs phi, mode",
809 "h_ele_PinMnPoutVsPt_mode",
"ele track inner p - outer p vs pt, mode",
nbinpt2D, 0.,
ptmax,
nbinp2D, 0., 100.);
811 "h_ele_PinMnPoutVsE_mode",
"ele track inner p - outer p vs E, mode",
nbinp2D, 0., 200.,
nbinp2D, 0., 100.);
813 "h_ele_PinMnPoutVsChi2_mode",
"ele track inner p - outer p vs track chi2, mode", 50, 0., 20.,
nbinp2D, 0., 100.);
825 new TH2F(
"h_ele_outerPtVsPt_mode",
"ele track outer p_{T} vs pt, mode",
nbinpt2D, 0., 100.,
nbinpt2D, 0.,
ptmax);
844 h_ele_EoPVsE =
new TH2F(
"h_ele_EoPVsE",
"ele E/P_{vertex} vs E", 50, 0.,
pmax, 50, 0., 5.);
852 new TH1F(
"h_ele_EseedOP_eg_barrel",
"ele E_{seed}/P_{vertex}, ecal driven barrel",
nbineop, 0.,
eopmax);
857 new TH1F(
"h_ele_EseedOP_eg_endcaps",
"ele E_{seed}/P_{vertex}, ecal driven, endcaps",
nbineop, 0.,
eopmax);
863 h_ele_EseedOPVsE =
new TH2F(
"h_ele_EseedOPVsE",
"ele E_{seed}/P_{vertex} vs E", 50, 0.,
pmax, 50, 0., 5.);
871 new TH1F(
"h_ele_EoPout_eg_barrel",
"ele E_{seed}/P_{out}, ecal driven, barrel",
nbineop, 0.,
eopmax);
876 new TH1F(
"h_ele_EoPout_eg_endcaps",
"ele E_{seed}/P_{out}, ecal driven, endcaps",
nbineop, 0.,
eopmax);
890 new TH1F(
"h_ele_EeleOPout_eg_barrel",
"ele E_{ele}/P_{out}, ecal driven, barrel",
nbineop, 0.,
eopmax);
895 new TH1F(
"h_ele_EeleOPout_eg_endcaps",
"ele E_{ele}/P_{out}, ecal driven, endcaps",
nbineop, 0.,
eopmax);
907 "ele #eta_{sc} - #eta_{tr}, prop from vertex, ecal driven",
913 "ele #eta_{sc} - #eta_{tr}, prop from vertex, barrel",
919 "ele #eta_{sc} - #eta_{tr}, prop from vertex, ecal driven, barrel",
925 "ele #eta_{sc} - #eta_{tr}, prop from vertex, endcaps",
931 "ele #eta_{sc} - #eta_{tr}, prop from vertex, ecal driven, endcaps",
937 "ele #eta_{sc} - #eta_{tr} vs eta, prop from vertex",
945 "ele #eta_{sc} - #eta_{tr} vs phi, prop from vertex",
953 "ele #eta_{sc} - #eta_{tr} vs pt, prop from vertex",
964 "ele #phi_{sc} - #phi_{tr}, prop from vertex, ecal driven",
970 "ele #phi_{sc} - #phi_{tr}, prop from vertex, barrel",
976 "ele #phi_{sc} - #phi_{tr}, prop from vertex, ecal driven, barrel",
982 "ele #phi_{sc} - #phi_{tr}, prop from vertex, endcaps",
988 "ele #phi_{sc} - #phi_{tr}, prop from vertex, ecal driven, endcaps",
994 "ele #phi_{sc} - #phi_{tr} vs eta, prop from vertex",
1002 "ele #phi_{sc} - #phi_{tr} vs phi, prop from vertex",
1010 "ele #phi_{sc} - #phi_{tr} vs pt, prop from vertex",
1018 "ele #eta_{cl} - #eta_{tr}, prop from outermost",
1024 "ele #eta_{cl} - #eta_{tr}, prop from outermost, ecal driven",
1030 "ele #eta_{cl} - #eta_{tr}, prop from outermost, barrel",
1036 "ele #eta_{cl} - #eta_{tr}, prop from outermost, ecal driven, barrel",
1042 "ele #eta_{cl} - #eta_{tr}, prop from outermost, endcaps",
1048 "ele #eta_{cl} - #eta_{tr}, prop from outermost, ecal driven, endcaps",
1054 "ele #eta_{cl} - #eta_{tr} vs eta, prop from out",
1062 "ele #eta_{cl} - #eta_{tr} vs phi, prop from out",
1070 "ele #eta_{cl} - #eta_{tr} vs pt, prop from out",
1078 "ele #phi_{cl} - #phi_{tr}, prop from outermost",
1084 "ele #phi_{cl} - #phi_{tr}, prop from outermost, ecal driven",
1090 "ele #phi_{cl} - #phi_{tr}, prop from outermost, barrel",
1096 "ele #phi_{cl} - #phi_{tr}, prop from outermost, ecal driven, barrel",
1102 "ele #phi_{cl} - #phi_{tr}, prop from outermost, endcaps",
1108 "ele #phi_{cl} - #phi_{tr}, prop from outermost, ecal driven, endcaps",
1114 "ele #phi_{cl} - #phi_{tr} vs eta, prop from out",
1122 "ele #phi_{cl} - #phi_{tr} vs phi, prop from out",
1130 "ele #phi_{cl} - #phi_{tr} vs pt, prop from out",
1138 "ele #eta_{EleCl} - #eta_{tr}, prop from outermost",
1144 "ele #eta_{EleCl} - #eta_{tr}, prop from outermost, ecal driven",
1150 "ele #eta_{EleCl} - #eta_{tr}, prop from outermost, barrel",
1156 "ele #eta_{EleCl} - #eta_{tr}, prop from outermost, ecal driven, barrel",
1162 "ele #eta_{EleCl} - #eta_{tr}, prop from outermost, endcaps",
1168 new TH1F(
"h_ele_dEtaEleCl_propOut_eg_endcaps",
1169 "ele #eta_{EleCl} - #eta_{tr}, prop from outermost, ecal driven, endcaps",
1175 "ele #eta_{EleCl} - #eta_{tr} vs eta, prop from out",
1183 "ele #eta_{EleCl} - #eta_{tr} vs phi, prop from out",
1191 "ele #eta_{EleCl} - #eta_{tr} vs pt, prop from out",
1199 "ele #phi_{EleCl} - #phi_{tr}, prop from outermost",
1205 "ele #phi_{EleCl} - #phi_{tr}, prop from outermost, ecal driven",
1211 "ele #phi_{EleCl} - #phi_{tr}, prop from outermost, barrel",
1217 "ele #phi_{EleCl} - #phi_{tr}, prop from outermost, ecal driven, barrel",
1223 "ele #phi_{EleCl} - #phi_{tr}, prop from outermost, endcaps",
1229 new TH1F(
"h_ele_dPhiEleCl_propOut_eg_endcaps",
1230 "ele #phi_{EleCl} - #phi_{tr}, prop from outermost, ecal driven, endcaps",
1236 "ele #phi_{EleCl} - #phi_{tr} vs eta, prop from out",
1244 "ele #phi_{EleCl} - #phi_{tr} vs phi, prop from out",
1252 "ele #phi_{EleCl} - #phi_{tr} vs pt, prop from out",
1267 new TH1F(
"h_ele_HoE_eg_barrel",
"ele hadronic energy / em energy, ecal driven, barrel",
nbinhoe,
hoemin,
hoemax);
1270 new TH1F(
"h_ele_HoE_endcaps",
"ele hadronic energy / em energy, endcaps",
nbinhoe,
hoemin,
hoemax);
1273 "h_ele_HoE_eg_endcaps",
"ele hadronic energy / em energy, ecal driven, endcaps",
nbinhoe,
hoemin,
hoemax);
1283 h_ele_seed_dphi2_ =
new TH1F(
"h_ele_seedDphi2",
"ele seed dphi 2nd layer", 50, -0.003, +0.003);
1285 new TH2F(
"h_ele_seedDphi2VsEta",
"ele seed dphi 2nd layer vs eta",
nbineta2D,
etamin,
etamax, 50, -0.003, +0.003);
1287 new TH2F(
"h_ele_seedDphi2VsPt",
"ele seed dphi 2nd layer vs pt",
nbinpt2D, 0.,
ptmax, 50, -0.003, +0.003);
1288 h_ele_seed_drz2_ =
new TH1F(
"h_ele_seedDrz2",
"ele seed dr/dz 2nd layer", 50, -0.03, +0.03);
1290 new TH2F(
"h_ele_seedDrz2VsEta",
"ele seed dr/dz 2nd layer vs eta",
nbineta2D,
etamin,
etamax, 50, -0.03, +0.03);
1292 new TH2F(
"h_ele_seedDrz2VsPt",
"ele seed dr/dz 2nd layer vs pt",
nbinpt2D, 0.,
ptmax, 50, -0.03, +0.03);
1293 h_ele_seed_subdet2_ =
new TH1F(
"h_ele_seedSubdet2",
"ele seed subdet 2nd layer", 10, 0., 10.);
1296 h_ele_classes =
new TH1F(
"h_ele_classes",
"electron classes", 20, 0.0, 20.);
1303 "h_ele_PinVsPoutGolden_mode",
"ele track inner p vs outer p, golden, mode",
nbinp2D, 0.,
pmax, 50, 0.,
pmax);
1305 "ele track inner p vs outer p vs eta, showering, mode",
1313 "h_ele_PinVsPoutGolden_mean",
"ele track inner p vs outer p, golden, mean",
nbinp2D, 0.,
pmax, 50, 0.,
pmax);
1315 "h_ele_PinVsPoutShowering_mean",
"ele track inner p vs outer p, showering, mean",
nbinp2D, 0.,
pmax, 50, 0.,
pmax);
1317 "ele track inner pt vs outer pt, golden, mode",
1325 "ele track inner pt vs outer pt, showering, mode",
1333 "ele track inner pt vs outer pt, golden, mean",
1341 "ele track inner pt vs outer pt, showering, mean",
1349 "h_scl_EoEmatchingObject golden, barrel",
"ele SC energy over matching jet energy, golden, barrel", 100, 0.2, 1.2);
1351 "ele SC energy over matching jet energy, golden, endcaps",
1356 "ele SC energy over matching jet energy, showering, barrel",
1361 "ele SC energy over matching jet energy, showering, endcaps",
1367 h_ele_tkSumPt_dr03 =
new TH1F(
"h_ele_tkSumPt_dr03",
"tk isolation sum, dR=0.3", 100, 0.0, 20.);
1370 new TH1F(
"h_ele_hcalDepth1TowerSumEt_dr03",
"hcal depth1 isolation sum, dR=0.3", 100, 0.0, 20.);
1372 new TH1F(
"h_ele_hcalDepth2TowerSumEt_dr03",
"hcal depth2 isolation sum, dR=0.3", 100, 0.0, 20.);
1373 h_ele_tkSumPt_dr04 =
new TH1F(
"h_ele_tkSumPt_dr04",
"hcal isolation sum", 100, 0.0, 20.);
1376 new TH1F(
"h_ele_hcalDepth1TowerSumEt_dr04",
"hcal depth1 isolation sum, dR=0.4", 100, 0.0, 20.);
1378 new TH1F(
"h_ele_hcalDepth2TowerSumEt_dr04",
"hcal depth2 isolation sum, dR=0.4", 100, 0.0, 20.);
1381 h_ele_fbrem =
new TH1F(
"h_ele_fbrem",
"ele brem fraction, mode", 100, 0., 1.);
1383 new TProfile(
"h_ele_fbremvsEtamode",
"mean ele brem fraction vs eta, mode",
nbineta2D,
etamin,
etamax, 0., 1.);
1385 new TProfile(
"h_ele_fbremvsEtamean",
"mean ele brem fraction vs eta, mean",
nbineta2D,
etamin,
etamax, 0., 1.);
1388 h_ele_mva =
new TH1F(
"h_ele_mva",
"ele mva", 100, -1., 1.);
1389 h_ele_provenance =
new TH1F(
"h_ele_provenance",
"ele provenance", 5, -2., 3.);
1404 h_ele_chi2->GetXaxis()->SetTitle(
"#Chi^{2}");
1450 h_ele_PinMnPout->GetXaxis()->SetTitle(
"P_{vertex} - P_{out} (GeV/c)");
1462 h_ele_EoP->GetXaxis()->SetTitle(
"E/P_{vertex}");
1463 h_ele_EoP->GetYaxis()->SetTitle(
"Events");
1466 h_ele_EoPout->GetXaxis()->SetTitle(
"E_{seed}/P_{out}");
1540 h_ele_HoE->GetYaxis()->SetTitle(
"Events");
1547 h_ele_fbrem->GetXaxis()->SetTitle(
"P_{in} - P_{out} / P_{in}");
1577 h_ele_mee_os->GetXaxis()->SetTitle(
"m_{e^{+}e^{-}} (GeV/c^{2})");
1583 histNum_->GetXaxis()->SetTitle(
"N_{ele}");
1584 histNum_->GetYaxis()->SetTitle(
"Events");
1591 std::cout <<
"efficiency calculation " << std::endl;
1594 h_ele_etaEff->Reset();
1596 h_ele_etaEff->Print();
1597 h_ele_etaEff->GetXaxis()->SetTitle(
"#eta");
1598 h_ele_etaEff->GetYaxis()->SetTitle(
"Efficiency");
1602 h_ele_zEff->Reset();
1604 h_ele_zEff->Print();
1605 h_ele_zEff->GetXaxis()->SetTitle(
"z (cm)");
1606 h_ele_zEff->GetYaxis()->SetTitle(
"Efficiency");
1610 h_ele_absetaEff->Reset();
1612 h_ele_absetaEff->GetXaxis()->SetTitle(
"|#eta|");
1613 h_ele_absetaEff->GetYaxis()->SetTitle(
"Efficiency");
1617 h_ele_ptEff->Reset();
1619 h_ele_ptEff->GetXaxis()->SetTitle(
"p_{T} (GeV/c)");
1620 h_ele_ptEff->GetYaxis()->SetTitle(
"Efficiency");
1624 h_ele_phiEff->Reset();
1626 h_ele_phiEff->GetXaxis()->SetTitle(
"#phi (rad)");
1627 h_ele_phiEff->GetYaxis()->SetTitle(
"Efficiency");
1631 h_ele_etaEff_all->Reset();
1633 h_ele_etaEff_all->Print();
1634 h_ele_etaEff_all->GetXaxis()->SetTitle(
"#eta");
1635 h_ele_etaEff_all->GetYaxis()->SetTitle(
"N_{rec}/N_{matching jet}");
1637 h_ele_ptEff_all->Reset();
1639 h_ele_ptEff_all->Print();
1640 h_ele_ptEff_all->GetXaxis()->SetTitle(
"p_{T} (GeV/c)");
1641 h_ele_ptEff_all->GetYaxis()->SetTitle(
"N_{rec}/N_{matching jet}");
1644 TH1F *h_ele_eta_goldenFrac = (TH1F *)
h_ele_eta_golden->Clone(
"h_ele_eta_goldenFrac");
1645 h_ele_eta_goldenFrac->Reset();
1646 h_ele_eta_goldenFrac->GetXaxis()->SetTitle(
"|#eta|");
1647 h_ele_eta_goldenFrac->GetYaxis()->SetTitle(
"Fraction of electrons");
1649 h_ele_eta_goldenFrac->SetTitle(
"fraction of golden electrons vs eta");
1650 TH1F *h_ele_eta_bbremFrac = (TH1F *)
h_ele_eta_bbrem->Clone(
"h_ele_eta_bbremFrac");
1651 h_ele_eta_bbremFrac->Reset();
1653 h_ele_eta_bbremFrac->GetXaxis()->SetTitle(
"|#eta|");
1654 h_ele_eta_bbremFrac->GetYaxis()->SetTitle(
"Fraction of electrons");
1655 h_ele_eta_bbremFrac->SetTitle(
"fraction of big brem electrons vs eta");
1656 TH1F *h_ele_eta_narrowFrac = (TH1F *)
h_ele_eta_narrow->Clone(
"h_ele_eta_narrowFrac");
1657 h_ele_eta_narrowFrac->Reset();
1659 h_ele_eta_narrowFrac->GetXaxis()->SetTitle(
"|#eta|");
1660 h_ele_eta_narrowFrac->GetYaxis()->SetTitle(
"Fraction of electrons");
1661 h_ele_eta_narrowFrac->SetTitle(
"fraction of narrow electrons vs eta");
1662 TH1F *h_ele_eta_showerFrac = (TH1F *)
h_ele_eta_shower->Clone(
"h_ele_eta_showerFrac");
1663 h_ele_eta_showerFrac->Reset();
1665 h_ele_eta_showerFrac->GetXaxis()->SetTitle(
"|#eta|");
1666 h_ele_eta_showerFrac->GetYaxis()->SetTitle(
"Fraction of electrons");
1667 h_ele_eta_showerFrac->SetTitle(
"fraction of showering electrons vs eta");
1670 TH1F *h_ele_xOverX0VsEta =
new TH1F(
"h_ele_xOverx0VsEta",
"mean X/X_0 vs eta",
nbineta / 2, 0.0, 2.5);
1672 double xOverX0 = 0.;
1675 h_ele_xOverX0VsEta->SetBinContent(ibin, xOverX0);
1680 p_ele_PoPmatchingObjectVsEta->SetTitle(
"mean ele momentum / matching SC energy vs eta");
1681 p_ele_PoPmatchingObjectVsEta->GetXaxis()->SetTitle(
"#eta");
1682 p_ele_PoPmatchingObjectVsEta->GetYaxis()->SetTitle(
"<P/E_{matching jet}>");
1683 p_ele_PoPmatchingObjectVsEta->Write();
1685 p_ele_PoPmatchingObjectVsPhi->SetTitle(
"mean ele momentum / gen momentum vs phi");
1686 p_ele_PoPmatchingObjectVsPhi->GetXaxis()->SetTitle(
"#phi (rad)");
1687 p_ele_PoPmatchingObjectVsPhi->GetYaxis()->SetTitle(
"<P/E_{matching jet}>");
1688 p_ele_PoPmatchingObjectVsPhi->Write();
1690 p_ele_EtaMnEtamatchingObjectVsEta->GetXaxis()->SetTitle(
"#eta");
1691 p_ele_EtaMnEtamatchingObjectVsEta->GetYaxis()->SetTitle(
"<#eta_{rec} - #eta_{matching jet}>");
1692 p_ele_EtaMnEtamatchingObjectVsEta->Write();
1694 p_ele_EtaMnEtamatchingObjectVsPhi->GetXaxis()->SetTitle(
"#phi");
1695 p_ele_EtaMnEtamatchingObjectVsPhi->GetYaxis()->SetTitle(
"<#eta_{rec} - #eta_{matching jet}>");
1696 p_ele_EtaMnEtamatchingObjectVsPhi->Write();
1698 p_ele_PhiMnPhimatchingObjectVsEta->GetXaxis()->SetTitle(
"#eta");
1699 p_ele_PhiMnPhimatchingObjectVsEta->GetYaxis()->SetTitle(
"<#phi_{rec} - #phi_{matching jet}> (rad)");
1700 p_ele_PhiMnPhimatchingObjectVsEta->Write();
1702 p_ele_PhiMnPhimatchingObjectVsPhi->GetXaxis()->SetTitle(
"#phi");
1703 p_ele_PhiMnPhimatchingObjectVsPhi->GetYaxis()->SetTitle(
"<#phi_{rec} - #phi_{matching jet}> (rad)");
1704 p_ele_PhiMnPhimatchingObjectVsPhi->Write();
1706 p_ele_vertexPtVsEta->GetXaxis()->SetTitle(
"#eta");
1707 p_ele_vertexPtVsEta->GetYaxis()->SetTitle(
"<p_{T}> (GeV/c)");
1708 p_ele_vertexPtVsEta->Write();
1710 p_ele_vertexPtVsPhi->GetXaxis()->SetTitle(
"#phi (rad)");
1711 p_ele_vertexPtVsPhi->GetYaxis()->SetTitle(
"<p_{T}> (GeV/c)");
1712 p_ele_vertexPtVsPhi->Write();
1714 p_ele_EoPVsEta->GetXaxis()->SetTitle(
"#eta");
1715 p_ele_EoPVsEta->GetYaxis()->SetTitle(
"<E/P_{vertex}>");
1716 p_ele_EoPVsEta->Write();
1718 p_ele_EoPVsPhi->GetXaxis()->SetTitle(
"#phi (rad)");
1719 p_ele_EoPVsPhi->GetYaxis()->SetTitle(
"<E/P_{vertex}>");
1720 p_ele_EoPVsPhi->Write();
1722 p_ele_EoPoutVsEta->GetXaxis()->SetTitle(
"#eta");
1723 p_ele_EoPoutVsEta->GetYaxis()->SetTitle(
"<E_{seed}/P_{out}>");
1724 p_ele_EoPoutVsEta->Write();
1726 p_ele_EoPoutVsPhi->GetXaxis()->SetTitle(
"#phi (rad)");
1727 p_ele_EoPoutVsPhi->GetYaxis()->SetTitle(
"<E_{seed}/P_{out}>");
1728 p_ele_EoPoutVsPhi->Write();
1730 p_ele_EeleOPoutVsEta->SetTitle(
"mean ele Eele/pout vs eta");
1731 p_ele_EeleOPoutVsEta->GetXaxis()->SetTitle(
"#eta");
1732 p_ele_EeleOPoutVsEta->GetYaxis()->SetTitle(
"<E_{ele}/P_{out}>");
1733 p_ele_EeleOPoutVsEta->Write();
1735 p_ele_EeleOPoutVsPhi->SetTitle(
"mean ele Eele/pout vs phi");
1736 p_ele_EeleOPoutVsPhi->GetXaxis()->SetTitle(
"#phi (rad)");
1737 p_ele_EeleOPoutVsPhi->GetYaxis()->SetTitle(
"<E_{ele}/P_{out}>");
1738 p_ele_EeleOPoutVsPhi->Write();
1740 p_ele_HoEVsEta->GetXaxis()->SetTitle(
"#eta");
1741 p_ele_HoEVsEta->GetYaxis()->SetTitle(
"<H/E>");
1742 p_ele_HoEVsEta->Write();
1744 p_ele_HoEVsPhi->GetXaxis()->SetTitle(
"#phi (rad)");
1745 p_ele_HoEVsPhi->GetYaxis()->SetTitle(
"<H/E>");
1746 p_ele_HoEVsPhi->Write();
1748 p_ele_chi2VsEta->GetXaxis()->SetTitle(
"#eta");
1749 p_ele_chi2VsEta->GetYaxis()->SetTitle(
"<#Chi^{2}>");
1750 p_ele_chi2VsEta->Write();
1752 p_ele_chi2VsPhi->GetXaxis()->SetTitle(
"#phi (rad)");
1753 p_ele_chi2VsPhi->GetYaxis()->SetTitle(
"<#Chi^{2}>");
1754 p_ele_chi2VsPhi->Write();
1756 p_ele_foundHitsVsEta->GetXaxis()->SetTitle(
"#eta");
1757 p_ele_foundHitsVsEta->GetYaxis()->SetTitle(
"<N_{hits}>");
1758 p_ele_foundHitsVsEta->Write();
1760 p_ele_foundHitsVsPhi->GetXaxis()->SetTitle(
"#phi (rad)");
1761 p_ele_foundHitsVsPhi->GetYaxis()->SetTitle(
"<N_{hits}>");
1762 p_ele_foundHitsVsPhi->Write();
1764 p_ele_lostHitsVsEta->GetXaxis()->SetTitle(
"#eta");
1765 p_ele_lostHitsVsEta->GetYaxis()->SetTitle(
"<N_{hits}>");
1766 p_ele_lostHitsVsEta->Write();
1768 p_ele_lostHitsVsPhi->GetXaxis()->SetTitle(
"#phi (rad)");
1769 p_ele_lostHitsVsPhi->GetYaxis()->SetTitle(
"<N_{hits}>");
1770 p_ele_lostHitsVsPhi->Write();
1772 p_ele_vertexTIPVsEta->SetTitle(
"mean tip (wrt gen vtx) vs eta");
1773 p_ele_vertexTIPVsEta->GetXaxis()->SetTitle(
"#eta");
1774 p_ele_vertexTIPVsEta->GetYaxis()->SetTitle(
"<TIP> (cm)");
1775 p_ele_vertexTIPVsEta->Write();
1777 p_ele_vertexTIPVsPhi->SetTitle(
"mean tip (wrt gen vtx) vs phi");
1778 p_ele_vertexTIPVsPhi->GetXaxis()->SetTitle(
"#phi");
1779 p_ele_vertexTIPVsPhi->GetYaxis()->SetTitle(
"<TIP> (cm)");
1780 p_ele_vertexTIPVsPhi->Write();
1782 p_ele_vertexTIPVsPt->SetTitle(
"mean tip (wrt gen vtx) vs phi");
1783 p_ele_vertexTIPVsPt->GetXaxis()->SetTitle(
"p_{T} (GeV/c)");
1784 p_ele_vertexTIPVsPt->GetYaxis()->SetTitle(
"<TIP> (cm)");
1785 p_ele_vertexTIPVsPt->Write();
2022 p_ele_seed_dphi2VsEta_->SetTitle(
"mean ele seed dphi 2nd layer vs eta");
2023 p_ele_seed_dphi2VsEta_->GetXaxis()->SetTitle(
"#eta");
2024 p_ele_seed_dphi2VsEta_->GetYaxis()->SetTitle(
"<#phi_{pred} - #phi_{hit}, 2nd layer> (rad)");
2025 p_ele_seed_dphi2VsEta_->SetMinimum(-0.004);
2026 p_ele_seed_dphi2VsEta_->SetMaximum(0.004);
2027 p_ele_seed_dphi2VsEta_->Write();
2029 p_ele_seed_dphi2VsPt_->SetTitle(
"mean ele seed dphi 2nd layer vs pt");
2030 p_ele_seed_dphi2VsPt_->GetXaxis()->SetTitle(
"p_{T} (GeV/c)");
2031 p_ele_seed_dphi2VsPt_->GetYaxis()->SetTitle(
"<#phi_{pred} - #phi_{hit}, 2nd layer> (rad)");
2032 p_ele_seed_dphi2VsPt_->SetMinimum(-0.004);
2033 p_ele_seed_dphi2VsPt_->SetMaximum(0.004);
2034 p_ele_seed_dphi2VsPt_->Write();
2037 p_ele_seed_drz2VsEta_->SetTitle(
"mean ele seed dr(dz) 2nd layer vs eta");
2038 p_ele_seed_drz2VsEta_->GetXaxis()->SetTitle(
"#eta");
2039 p_ele_seed_drz2VsEta_->GetYaxis()->SetTitle(
"<r(z)_{pred} - r(z)_{hit}, 2nd layer> (cm)");
2040 p_ele_seed_drz2VsEta_->SetMinimum(-0.15);
2041 p_ele_seed_drz2VsEta_->SetMaximum(0.15);
2042 p_ele_seed_drz2VsEta_->Write();
2044 p_ele_seed_drz2VsPt_->SetTitle(
"mean ele seed dr(dz) 2nd layer vs pt");
2045 p_ele_seed_drz2VsPt_->GetXaxis()->SetTitle(
"p_{T} (GeV/c)");
2046 p_ele_seed_drz2VsPt_->GetYaxis()->SetTitle(
"<r(z)_{pred} - r(z)_{hit}, 2nd layer> (cm)");
2047 p_ele_seed_drz2VsPt_->SetMinimum(-0.15);
2048 p_ele_seed_drz2VsPt_->SetMaximum(0.15);
2049 p_ele_seed_drz2VsPt_->Write();
2075 h_ele_etaEff->Write();
2076 h_ele_zEff->Write();
2077 h_ele_phiEff->Write();
2078 h_ele_absetaEff->Write();
2079 h_ele_ptEff->Write();
2080 h_ele_etaEff_all->Write();
2081 h_ele_ptEff_all->Write();
2082 h_ele_eta_goldenFrac->Write();
2083 h_ele_eta_bbremFrac->Write();
2084 h_ele_eta_narrowFrac->Write();
2085 h_ele_eta_showerFrac->Write();
2086 h_ele_xOverX0VsEta->Write();
2120 std::cout <<
"analyzing new event " << std::endl;
2125 edm::LogInfo(
"") <<
"\n\n =================> Treating event " <<
iEvent.id() <<
" Number of electrons "
2137 histNum_->Fill((*gsfElectrons).size());
2154 double d = gsfIter->vertex().x() * gsfIter->vertex().x() + gsfIter->vertex().y() * gsfIter->vertex().y();
2158 float enrj1 = gsfIter->superCluster()->energy();
2160 for (reco::GsfElectronCollection::const_iterator gsfIter2 = gsfIter + 1; gsfIter2 !=
gsfElectrons->end();
2163 float mee2 = p12.Dot(p12);
2165 float enrj2 = gsfIter2->superCluster()->energy();
2167 if (gsfIter->ecalDrivenSeed() && gsfIter2->ecalDrivenSeed())
2169 if (gsfIter->charge() * gsfIter2->charge() < 0.)
2175 int matchingObjectNum = 0;
2177 for (reco::CaloJetCollection::const_iterator moIter = recoCaloJets->begin(); moIter != recoCaloJets->end();
2180 matchingObjectNum++;
2198 bool okGsfFound =
false;
2199 double gsfOkRatio = 999999.;
2205 double dphi = gsfIter->
phi() - moIter->phi();
2207 dphi = dphi < 0 ? (CLHEP::twopi) + dphi : dphi - CLHEP::twopi;
2212 double tmpGsfRatio = gsfIter->p() / moIter->energy();
2214 gsfOkRatio = tmpGsfRatio;
2215 bestGsfElectron = *gsfIter;
2246 (bestGsfElectron.
vertex().x() -
bs.position().x()) * (bestGsfElectron.
vertex().x() -
bs.position().x()) +
2247 (bestGsfElectron.
vertex().y() -
bs.position().y()) * (bestGsfElectron.
vertex().y() -
bs.position().y());
2266 if (bestGsfElectron.
isEB())
2268 if (bestGsfElectron.
isEE())
2276 double R = TMath::Sqrt(sclRef->x() * sclRef->x() + sclRef->y() * sclRef->y() + sclRef->z() * sclRef->z());
2277 double Rt = TMath::Sqrt(sclRef->x() * sclRef->x() + sclRef->y() * sclRef->y());
2281 if (bestGsfElectron.
isEB())
2283 if (bestGsfElectron.
isEE())
2289 if (bestGsfElectron.
isEB())
2291 if (bestGsfElectron.
isEE())
2294 if (bestGsfElectron.
isEB())
2296 if (bestGsfElectron.
isEE())
2299 if (bestGsfElectron.
isEB())
2301 if (bestGsfElectron.
isEE())
2304 if (bestGsfElectron.
isEB())
2306 if (bestGsfElectron.
isEE())
2331 bestGsfElectron.
gsfTrack()->outerMomentum().R());
2347 bestGsfElectron.
gsfTrack()->normalizedChi2(),
2371 if (bestGsfElectron.
isEB())
2375 if (bestGsfElectron.
isEE())
2385 if (bestGsfElectron.
isEB())
2389 if (bestGsfElectron.
isEE())
2399 if (bestGsfElectron.
isEB())
2403 if (bestGsfElectron.
isEE())
2413 if (bestGsfElectron.
isEB())
2417 if (bestGsfElectron.
isEE())
2427 if (bestGsfElectron.
isEB())
2431 if (bestGsfElectron.
isEE())
2441 if (bestGsfElectron.
isEB())
2445 if (bestGsfElectron.
isEE())
2455 if (bestGsfElectron.
isEB())
2459 if (bestGsfElectron.
isEE())
2469 if (bestGsfElectron.
isEB())
2473 if (bestGsfElectron.
isEE())
2483 if (bestGsfElectron.
isEB())
2487 if (bestGsfElectron.
isEE())
2497 if (bestGsfElectron.
isEB())
2501 if (bestGsfElectron.
isEE())
2511 if (bestGsfElectron.
isEB())
2515 if (bestGsfElectron.
isEE())
2528 if (bestGsfElectron.
isEE())
2542 double fbrem_mean = 0.;
2545 1. - bestGsfElectron.
gsfTrack()->outerMomentum().R() / bestGsfElectron.
gsfTrack()->innerMomentum().R();
2546 double fbrem_mode = bestGsfElectron.
fbrem();
2561 bestGsfElectron.
gsfTrack()->innerMomentum().R());
2565 bestGsfElectron.
gsfTrack()->innerMomentum().R());
2575 bestGsfElectron.
gsfTrack()->innerMomentum().Rho());
2579 bestGsfElectron.
gsfTrack()->innerMomentum().Rho());