41 #include "CLHEP/Units/GlobalPhysicalConstants.h"
435 using namespace reco;
438 : beamSpot_(conf.getParameter<
edm::
InputTag>(
"beamSpot")) {
498 ptmax =
pset.getParameter<
double>(
"Ptmax");
499 pmax =
pset.getParameter<
double>(
"Pmax");
559 if (locSC != std::string::npos) {
560 std::cout <<
"Matching objects are SuperClusters " << std::endl;
563 std::cout <<
"Didn't recognize input matching objects!! " << std::endl;
567 hlabel =
"h_" +
type_ +
"Num";
568 htitle =
"# " +
type_ +
"s";
573 histNum_ =
new TH1F(
"h_recEleNum",
"# rec electrons", 20, 0., 20.);
576 hlabel =
"h_" +
type_ +
"_eta";
577 htitle =
type_ +
" #eta";
579 hlabel =
"h_" +
type_ +
"_abseta";
580 htitle =
type_ +
" |#eta|";
582 hlabel =
"h_" +
type_ +
"_P";
583 htitle =
type_ +
" p";
585 hlabel =
"h_" +
type_ +
"_Pt";
586 htitle =
type_ +
" pt";
588 hlabel =
"h_" +
type_ +
"_phi";
589 htitle =
type_ +
" phi";
591 hlabel =
"h_" +
type_ +
"_z";
592 htitle =
type_ +
" z";
597 new TH1F(
"h_ele_mee_all",
"ele pairs invariant mass, all charge combinations",
nbinmee,
meemin,
meemax);
600 new TH1F(
"h_ele_mee_os_ebeb",
"ele pairs invariant mass, opp. sign, EB-EB",
nbinmee,
meemin,
meemax);
603 new TH1F(
"h_ele_mee_os_ebee",
"ele pairs invariant mass, opp. sign, EB-EE",
nbinmee,
meemin,
meemax);
606 new TH1F(
"h_ele_mee_os_eeee",
"ele pairs invariant mass, opp. sign, EE-EE",
nbinmee,
meemin,
meemax);
609 new TH1F(
"h_ele_mee_os_gg",
"ele pairs invariant mass, opp. sign, good-good",
nbinmee,
meemin,
meemax);
612 new TH1F(
"h_ele_mee_os_gb",
"ele pairs invariant mass, opp. sign, good-bad",
nbinmee,
meemin,
meemax);
615 new TH1F(
"h_ele_mee_os_bb",
"ele pairs invariant mass, opp. sign, bad-bad",
nbinmee,
meemin,
meemax);
620 "E2 - E1 vs ele pairs invariant mass, all electrons",
628 "E2 - E1 vs ele pairs invariant mass, ecal driven pairs, all electrons",
637 h_ele_charge =
new TH1F(
"h_ele_charge",
"ele charge", 5, -2., 2.);
649 new TH1F(
"h_ele_matchingObjectPt_matched",
"Efficiency vs matching SC E_{T}",
nbinpteff, 5.,
ptmax);
655 new TH1F(
"h_ele_matchingObjectAbsEta_matched",
"Efficiency vs matching SC |#eta|",
nbineta / 2, 0., 2.5);
658 new TH1F(
"h_ele_matchingObjectEta_matched",
"Efficiency vs matching SC #eta",
nbineta,
etamin,
etamax);
661 new TH1F(
"h_ele_matchingObjectPhi_matched",
"Efficiency vs matching SC phi",
nbinphi,
phimin,
phimax);
668 new TH1F(
"h_ele_matchingObjectZ_matched",
"Efficiency vs matching SC z",
nbinxyz, -25, 25);
670 h_ele_vertexTIP =
new TH1F(
"h_ele_vertexTIP",
"ele transverse impact parameter (wrt bs)", 90, 0., 0.15);
672 "ele transverse impact parameter (wrt bs) vs eta",
680 "ele transverse impact parameter (wrt bs) vs phi",
688 "ele transverse impact parameter (wrt bs) vs transverse momentum",
698 "ele trans momentum / matching SC trans energy",
703 "ele momentum / matching SC energy vs eta",
711 "ele momentum / matching SC energy vs phi",
719 "ele momentum / matching SC energy vs eta",
727 "ele momentum / matching SC energy, barrel",
732 "ele momentum / matching SC energy, endcaps",
737 "ele trans momentum / matching SC trans energy, barrel",
742 "ele trans momentum / matching SC trans energy, endcaps",
747 "h_ele_EtaMnEtamatchingObject_matched",
"ele momentum eta - matching SC eta",
nbindeta,
detamin,
detamax);
749 "ele momentum eta - matching SC eta vs eta",
757 "ele momentum eta - matching SC eta vs phi",
765 "ele momentum eta - matching SC eta vs pt",
773 "h_ele_PhiMnPhimatchingObject_matched",
"ele momentum phi - matching SC phi",
nbindphi,
dphimin,
dphimax);
775 "ele momentum phi - matching SC phi",
780 "ele momentum phi - matching SC phi vs eta",
788 "ele momentum phi - matching SC phi vs phi",
796 "ele momentum phi - matching SC phi vs pt",
807 "h_scl_EoEmatchingObject_barrel_matched",
"ele supercluster energy / matching SC energy, barrel", 50, 0.2, 1.2);
809 "h_scl_EoEmatchingObject_endcaps_matched",
"ele supercluster energy / matching SC energy, endcaps", 50, 0.2, 1.2);
811 "ele supercluster energy / matching SC energy, barrel",
816 "ele supercluster energy / matching SC energy, endcaps",
830 histSclSigEtaEta_ =
new TH1F(
"h_scl_sigetaeta",
"ele supercluster sigma eta eta", 100, 0., 0.05);
832 new TH1F(
"h_scl_sigietaieta_barrel",
"ele supercluster sigma ieta ieta, barrel", 100, 0., 0.05);
834 new TH1F(
"h_scl_sigietaieta_endcaps",
"ele supercluster sigma ieta ieta, endcaps", 100, 0., 0.05);
840 new TH1F(
"h_scl_E2x5max_barrel",
"ele supercluster energy in 2x5 max barrel",
nbinp, 0.,
pmax);
842 new TH1F(
"h_scl_E2x5max_endcaps",
"ele supercluster energy in 2x5 max endcaps",
nbinp, 0.,
pmax);
850 new TH2F(
"h_ele_ambiguousTracksVsEta",
"ele # ambiguous tracks vs eta",
nbineta2D,
etamin,
etamax, 5, 0., 5.);
852 new TH2F(
"h_ele_ambiguousTracksVsPhi",
"ele # ambiguous tracks vs phi",
nbinphi2D,
phimin,
phimax, 5, 0., 5.);
854 new TH2F(
"h_ele_ambiguousTracksVsPt",
"ele # ambiguous tracks vs pt",
nbinpt2D, 0.,
ptmax, 5, 0., 5.);
862 h_ele_lostHits =
new TH1F(
"h_ele_lostHits",
"ele track # lost hits", 5, 0., 5.);
869 h_ele_chi2 =
new TH1F(
"h_ele_chi2",
"ele track #chi^{2}", 100, 0., 15.);
873 h_ele_PinMnPout =
new TH1F(
"h_ele_PinMnPout",
"ele track inner p - outer p, mean",
nbinp, 0., 200.);
876 "ele track inner p - outer p vs eta, mode",
884 "ele track inner p - outer p vs phi, mode",
892 "h_ele_PinMnPoutVsPt_mode",
"ele track inner p - outer p vs pt, mode",
nbinpt2D, 0.,
ptmax,
nbinp2D, 0., 100.);
894 "h_ele_PinMnPoutVsE_mode",
"ele track inner p - outer p vs E, mode",
nbinp2D, 0., 200.,
nbinp2D, 0., 100.);
896 "h_ele_PinMnPoutVsChi2_mode",
"ele track inner p - outer p vs track chi2, mode", 50, 0., 20.,
nbinp2D, 0., 100.);
908 new TH2F(
"h_ele_outerPtVsPt_mode",
"ele track outer p_{T} vs pt, mode",
nbinpt2D, 0., 100.,
nbinpt2D, 0.,
ptmax);
916 h_ele_EoPVsE =
new TH2F(
"h_ele_EoPVsE",
"ele E/P_{vertex} vs E", 50, 0.,
pmax, 50, 0., 5.);
922 h_ele_EseedOPVsE =
new TH2F(
"h_ele_EseedOPVsE",
"ele E_{seed}/P_{vertex} vs E", 50, 0.,
pmax, 50, 0., 5.);
939 "ele #eta_{sc} - #eta_{tr} vs eta, prop from vertex",
947 "ele #eta_{sc} - #eta_{tr} vs phi, prop from vertex",
955 "ele #eta_{sc} - #eta_{tr} vs pt, prop from vertex",
965 "ele #phi_{sc} - #phi_{tr} vs eta, prop from vertex",
973 "ele #phi_{sc} - #phi_{tr} vs phi, prop from vertex",
981 "ele #phi_{sc} - #phi_{tr} vs pt, prop from vertex",
989 "ele #eta_{cl} - #eta_{tr}, prop from outermost",
994 "ele #eta_{cl} - #eta_{tr} vs eta, prop from out",
1002 "ele #eta_{cl} - #eta_{tr} vs phi, prop from out",
1010 "ele #eta_{cl} - #eta_{tr} vs pt, prop from out",
1018 "ele #phi_{cl} - #phi_{tr}, prop from outermost",
1023 "ele #phi_{cl} - #phi_{tr} vs eta, prop from out",
1031 "ele #phi_{cl} - #phi_{tr} vs phi, prop from out",
1039 "ele #phi_{cl} - #phi_{tr} vs pt, prop from out",
1047 "ele #eta_{EleCl} - #eta_{tr}, prop from outermost",
1052 "ele #eta_{EleCl} - #eta_{tr} vs eta, prop from out",
1060 "ele #eta_{EleCl} - #eta_{tr} vs phi, prop from out",
1068 "ele #eta_{EleCl} - #eta_{tr} vs pt, prop from out",
1076 "ele #phi_{EleCl} - #phi_{tr}, prop from outermost",
1081 "ele #phi_{EleCl} - #phi_{tr} vs eta, prop from out",
1089 "ele #phi_{EleCl} - #phi_{tr} vs phi, prop from out",
1097 "ele #phi_{EleCl} - #phi_{tr} vs pt, prop from out",
1107 new TH1F(
"h_ele_HoE_fiducial",
"ele hadronic energy / em energy, fiducial region",
nbinhoe,
hoemin,
hoemax);
1115 h_ele_seed_dphi2_ =
new TH1F(
"h_ele_seedDphi2",
"ele seed dphi 2nd layer", 50, -0.003, +0.003);
1117 new TH2F(
"h_ele_seedDphi2VsEta",
"ele seed dphi 2nd layer vs eta",
nbineta2D,
etamin,
etamax, 50, -0.003, +0.003);
1119 new TH2F(
"h_ele_seedDphi2VsPt",
"ele seed dphi 2nd layer vs pt",
nbinpt2D, 0.,
ptmax, 50, -0.003, +0.003);
1120 h_ele_seed_drz2_ =
new TH1F(
"h_ele_seedDrz2",
"ele seed dr/dz 2nd layer", 50, -0.03, +0.03);
1122 new TH2F(
"h_ele_seedDrz2VsEta",
"ele seed dr/dz 2nd layer vs eta",
nbineta2D,
etamin,
etamax, 50, -0.03, +0.03);
1124 new TH2F(
"h_ele_seedDrz2VsPt",
"ele seed dr/dz 2nd layer vs pt",
nbinpt2D, 0.,
ptmax, 50, -0.03, +0.03);
1125 h_ele_seed_subdet2_ =
new TH1F(
"h_ele_seedSubdet2",
"ele seed subdet 2nd layer", 10, 0., 10.);
1128 h_ele_classes =
new TH1F(
"h_ele_classes",
"electron classes", 20, 0.0, 20.);
1135 "ele track inner p vs outer p vs eta, golden, mode",
1143 "ele track inner p vs outer p vs eta, Showering, mode",
1151 "ele track inner p vs outer p vs eta, golden, mean",
1159 "ele track inner p vs outer p vs eta, Showering, mean",
1167 "ele track inner pt vs outer pt vs eta, golden, mode",
1175 "ele track inner pt vs outer pt vs eta, showering, mode",
1183 "ele track inner pt vs outer pt vs eta, golden, mean",
1191 "ele track inner pt vs outer pt vs eta, showering, mean",
1199 "ele supercluster energy over matchingObject energy, golden, barrel",
1204 new TH1F(
"h_scl_EoEmatchingObject golden, endcaps",
1205 "ele supercluster energy over matchingObject energy, golden, endcaps",
1210 new TH1F(
"h_scl_EoEmatchingObject Showering, barrel",
1211 "ele supercluster energy over matchingObject energy, showering, barrel",
1216 new TH1F(
"h_scl_EoEmatchingObject Showering, endcaps",
1217 "ele supercluster energy over matchingObject energy, showering, endcaps",
1223 h_ele_tkSumPt_dr03 =
new TH1F(
"h_ele_tkSumPt_dr03",
"tk isolation sum, dR=0.3", 100, 0.0, 20.);
1226 new TH1F(
"h_ele_hcalDepth1TowerSumEt_dr03",
"hcal depth1 isolation sum, dR=0.3", 100, 0.0, 20.);
1228 new TH1F(
"h_ele_hcalDepth2TowerSumEt_dr03",
"hcal depth2 isolation sum, dR=0.3", 100, 0.0, 20.);
1229 h_ele_tkSumPt_dr04 =
new TH1F(
"h_ele_tkSumPt_dr04",
"hcal isolation sum", 100, 0.0, 20.);
1232 new TH1F(
"h_ele_hcalDepth1TowerSumEt_dr04",
"hcal depth1 isolation sum, dR=0.4", 100, 0.0, 20.);
1234 new TH1F(
"h_ele_hcalDepth2TowerSumEt_dr04",
"hcal depth2 isolation sum, dR=0.4", 100, 0.0, 20.);
1237 h_ele_fbrem =
new TH1F(
"h_ele_fbrem",
"ele brem fraction, mode", 100, 0., 1.);
1239 new TProfile(
"h_ele_fbremvsEtamode",
"mean ele brem fraction vs eta, mode",
nbineta2D,
etamin,
etamax, 0., 1.);
1241 new TProfile(
"h_ele_fbremvsEtamean",
"mean ele brem fraction vs eta, mean",
nbineta2D,
etamin,
etamax, 0., 1.);
1244 h_ele_mva =
new TH1F(
"h_ele_mva",
"ele identification mva", 100, -1., 1.);
1245 h_ele_provenance =
new TH1F(
"h_ele_provenance",
"ele provenance", 5, -2., 3.);
1260 h_ele_chi2->GetXaxis()->SetTitle(
"#Chi^{2}");
1268 h_ele_Et->GetXaxis()->SetTitle(
"E_{T} (GeV)");
1269 h_ele_Et->GetYaxis()->SetTitle(
"Events");
1314 h_ele_PinMnPout->GetXaxis()->SetTitle(
"P_{vertex} - P_{out} (GeV/c)");
1326 h_ele_EoP->GetXaxis()->SetTitle(
"E/P_{vertex}");
1327 h_ele_EoP->GetYaxis()->SetTitle(
"Events");
1330 h_ele_EoPout->GetXaxis()->SetTitle(
"E_{seed}/P_{out}");
1361 h_ele_HoE->GetYaxis()->SetTitle(
"Events");
1364 h_ele_fbrem->GetXaxis()->SetTitle(
"P_{in} - P_{out} / P_{in}");
1376 h_ele_mee_os->GetXaxis()->SetTitle(
"m_{e^{+}e^{-}} (GeV/c^{2})");
1394 histNum_->GetXaxis()->SetTitle(
"N_{ele}");
1395 histNum_->GetYaxis()->SetTitle(
"Events");
1402 std::cout <<
"efficiency calculation " << std::endl;
1405 h_ele_etaEff->Reset();
1407 h_ele_etaEff->Print();
1408 h_ele_etaEff->GetXaxis()->SetTitle(
"#eta");
1409 h_ele_etaEff->GetYaxis()->SetTitle(
"Efficiency");
1413 h_ele_zEff->Reset();
1415 h_ele_zEff->Print();
1416 h_ele_zEff->GetXaxis()->SetTitle(
"z (cm)");
1417 h_ele_zEff->GetYaxis()->SetTitle(
"Efficiency");
1421 h_ele_absetaEff->Reset();
1423 h_ele_absetaEff->GetXaxis()->SetTitle(
"|#eta|");
1424 h_ele_absetaEff->GetYaxis()->SetTitle(
"Efficiency");
1428 h_ele_ptEff->Reset();
1430 h_ele_ptEff->GetXaxis()->SetTitle(
"p_{T} (GeV/c)");
1431 h_ele_ptEff->GetYaxis()->SetTitle(
"Efficiency");
1435 h_ele_phiEff->Reset();
1437 h_ele_phiEff->GetXaxis()->SetTitle(
"#phi (rad)");
1438 h_ele_phiEff->GetYaxis()->SetTitle(
"Efficiency");
1441 TH1F *h_ele_eta_goldenFrac = (TH1F *)
h_ele_eta_golden->Clone(
"h_ele_eta_goldenFrac");
1442 h_ele_eta_goldenFrac->Reset();
1444 h_ele_eta_goldenFrac->GetXaxis()->SetTitle(
"|#eta|");
1445 h_ele_eta_goldenFrac->GetYaxis()->SetTitle(
"Fraction of electrons");
1446 h_ele_eta_goldenFrac->SetTitle(
"fraction of golden electrons vs eta");
1447 TH1F *h_ele_eta_bbremFrac = (TH1F *)
h_ele_eta_bbrem->Clone(
"h_ele_eta_bbremFrac");
1448 h_ele_eta_bbremFrac->Reset();
1450 h_ele_eta_bbremFrac->GetXaxis()->SetTitle(
"|#eta|");
1451 h_ele_eta_bbremFrac->GetYaxis()->SetTitle(
"Fraction of electrons");
1452 h_ele_eta_bbremFrac->SetTitle(
"fraction of big brem electrons vs eta");
1453 TH1F *h_ele_eta_narrowFrac = (TH1F *)
h_ele_eta_narrow->Clone(
"h_ele_eta_narrowFrac");
1454 h_ele_eta_narrowFrac->Reset();
1456 h_ele_eta_narrowFrac->GetXaxis()->SetTitle(
"|#eta|");
1457 h_ele_eta_narrowFrac->GetYaxis()->SetTitle(
"Fraction of electrons");
1458 h_ele_eta_narrowFrac->SetTitle(
"fraction of narrow electrons vs eta");
1459 TH1F *h_ele_eta_showerFrac = (TH1F *)
h_ele_eta_shower->Clone(
"h_ele_eta_showerFrac");
1460 h_ele_eta_showerFrac->Reset();
1462 h_ele_eta_showerFrac->GetXaxis()->SetTitle(
"|#eta|");
1463 h_ele_eta_showerFrac->GetYaxis()->SetTitle(
"Fraction of electrons");
1464 h_ele_eta_showerFrac->SetTitle(
"fraction of showering electrons vs eta");
1467 TH1F *h_ele_xOverX0VsEta =
new TH1F(
"h_ele_xOverx0VsEta",
"mean X/X_0 vs eta",
nbineta / 2, 0.0, 2.5);
1469 double xOverX0 = 0.;
1472 h_ele_xOverX0VsEta->SetBinContent(ibin, xOverX0);
1477 p_ele_PoPmatchingObjectVsEta_matched->SetTitle(
"mean ele momentum / matching SC energy vs eta");
1478 p_ele_PoPmatchingObjectVsEta_matched->GetXaxis()->SetTitle(
"#eta");
1479 p_ele_PoPmatchingObjectVsEta_matched->GetYaxis()->SetTitle(
"<P/E_{matching SC}>");
1480 p_ele_PoPmatchingObjectVsEta_matched->Write();
1482 p_ele_PoPmatchingObjectVsPhi_matched->SetTitle(
"mean ele momentum / gen momentum vs phi");
1483 p_ele_PoPmatchingObjectVsPhi_matched->GetXaxis()->SetTitle(
"#phi (rad)");
1484 p_ele_PoPmatchingObjectVsPhi_matched->GetYaxis()->SetTitle(
"<P/E_{matching SC}>");
1485 p_ele_PoPmatchingObjectVsPhi_matched->Write();
1487 p_ele_EtaMnEtamatchingObjectVsEta_matched->GetXaxis()->SetTitle(
"#eta");
1488 p_ele_EtaMnEtamatchingObjectVsEta_matched->GetYaxis()->SetTitle(
"<#eta_{rec} - #eta_{matching SC}>");
1489 p_ele_EtaMnEtamatchingObjectVsEta_matched->Write();
1491 p_ele_EtaMnEtamatchingObjectVsPhi_matched->GetXaxis()->SetTitle(
"#phi");
1492 p_ele_EtaMnEtamatchingObjectVsPhi_matched->GetYaxis()->SetTitle(
"<#eta_{rec} - #eta_{matching SC}>");
1493 p_ele_EtaMnEtamatchingObjectVsPhi_matched->Write();
1495 p_ele_PhiMnPhimatchingObjectVsEta_matched->GetXaxis()->SetTitle(
"#eta");
1496 p_ele_PhiMnPhimatchingObjectVsEta_matched->GetYaxis()->SetTitle(
"<#phi_{rec} - #phi_{matching SC}> (rad)");
1497 p_ele_PhiMnPhimatchingObjectVsEta_matched->Write();
1499 p_ele_PhiMnPhimatchingObjectVsPhi_matched->GetXaxis()->SetTitle(
"#phi");
1500 p_ele_PhiMnPhimatchingObjectVsPhi_matched->GetYaxis()->SetTitle(
"<#phi_{rec} - #phi_{matching SC}> (rad)");
1501 p_ele_PhiMnPhimatchingObjectVsPhi_matched->Write();
1503 p_ele_vertexPtVsEta->GetXaxis()->SetTitle(
"#eta");
1504 p_ele_vertexPtVsEta->GetYaxis()->SetTitle(
"<p_{T}> (GeV/c)");
1505 p_ele_vertexPtVsEta->Write();
1507 p_ele_vertexPtVsPhi->GetXaxis()->SetTitle(
"#phi (rad)");
1508 p_ele_vertexPtVsPhi->GetYaxis()->SetTitle(
"<p_{T}> (GeV/c)");
1509 p_ele_vertexPtVsPhi->Write();
1511 p_ele_EoPVsEta->GetXaxis()->SetTitle(
"#eta");
1512 p_ele_EoPVsEta->GetYaxis()->SetTitle(
"<E/P_{vertex}>");
1513 p_ele_EoPVsEta->Write();
1515 p_ele_EoPVsPhi->GetXaxis()->SetTitle(
"#phi (rad)");
1516 p_ele_EoPVsPhi->GetYaxis()->SetTitle(
"<E/P_{vertex}>");
1517 p_ele_EoPVsPhi->Write();
1519 p_ele_EoPoutVsEta->GetXaxis()->SetTitle(
"#eta");
1520 p_ele_EoPoutVsEta->GetYaxis()->SetTitle(
"<E_{seed}/P_{out}>");
1521 p_ele_EoPoutVsEta->Write();
1523 p_ele_EoPoutVsPhi->GetXaxis()->SetTitle(
"#phi (rad)");
1524 p_ele_EoPoutVsPhi->GetYaxis()->SetTitle(
"<E_{seed}/P_{out}>");
1525 p_ele_EoPoutVsPhi->Write();
1527 p_ele_EeleOPoutVsEta->SetTitle(
"mean ele Eele/pout vs eta");
1528 p_ele_EeleOPoutVsEta->GetXaxis()->SetTitle(
"#eta");
1529 p_ele_EeleOPoutVsEta->GetYaxis()->SetTitle(
"<E_{ele}/P_{out}>");
1530 p_ele_EeleOPoutVsEta->Write();
1532 p_ele_EeleOPoutVsPhi->SetTitle(
"mean ele Eele/pout vs phi");
1533 p_ele_EeleOPoutVsPhi->GetXaxis()->SetTitle(
"#phi (rad)");
1534 p_ele_EeleOPoutVsPhi->GetYaxis()->SetTitle(
"<E_{ele}/P_{out}>");
1535 p_ele_EeleOPoutVsPhi->Write();
1537 p_ele_HoEVsEta->GetXaxis()->SetTitle(
"#eta");
1538 p_ele_HoEVsEta->GetYaxis()->SetTitle(
"<H/E>");
1539 p_ele_HoEVsEta->Write();
1541 p_ele_HoEVsPhi->GetXaxis()->SetTitle(
"#phi (rad)");
1542 p_ele_HoEVsPhi->GetYaxis()->SetTitle(
"<H/E>");
1543 p_ele_HoEVsPhi->Write();
1545 p_ele_chi2VsEta->GetXaxis()->SetTitle(
"#eta");
1546 p_ele_chi2VsEta->GetYaxis()->SetTitle(
"<#Chi^{2}>");
1547 p_ele_chi2VsEta->Write();
1549 p_ele_chi2VsPhi->GetXaxis()->SetTitle(
"#phi (rad)");
1550 p_ele_chi2VsPhi->GetYaxis()->SetTitle(
"<#Chi^{2}>");
1551 p_ele_chi2VsPhi->Write();
1553 p_ele_foundHitsVsEta->GetXaxis()->SetTitle(
"#eta");
1554 p_ele_foundHitsVsEta->GetYaxis()->SetTitle(
"<N_{hits}>");
1555 p_ele_foundHitsVsEta->Write();
1557 p_ele_foundHitsVsPhi->GetXaxis()->SetTitle(
"#phi (rad)");
1558 p_ele_foundHitsVsPhi->GetYaxis()->SetTitle(
"<N_{hits}>");
1559 p_ele_foundHitsVsPhi->Write();
1561 p_ele_lostHitsVsEta->GetXaxis()->SetTitle(
"#eta");
1562 p_ele_lostHitsVsEta->GetYaxis()->SetTitle(
"<N_{hits}>");
1563 p_ele_lostHitsVsEta->Write();
1565 p_ele_lostHitsVsPhi->GetXaxis()->SetTitle(
"#phi (rad)");
1566 p_ele_lostHitsVsPhi->GetYaxis()->SetTitle(
"<N_{hits}>");
1567 p_ele_lostHitsVsPhi->Write();
1569 p_ele_vertexTIPVsEta->SetTitle(
"mean tip (wrt gen vtx) vs eta");
1570 p_ele_vertexTIPVsEta->GetXaxis()->SetTitle(
"#eta");
1571 p_ele_vertexTIPVsEta->GetYaxis()->SetTitle(
"<TIP> (cm)");
1572 p_ele_vertexTIPVsEta->Write();
1574 p_ele_vertexTIPVsPhi->SetTitle(
"mean tip (wrt gen vtx) vs phi");
1575 p_ele_vertexTIPVsPhi->GetXaxis()->SetTitle(
"#phi");
1576 p_ele_vertexTIPVsPhi->GetYaxis()->SetTitle(
"<TIP> (cm)");
1577 p_ele_vertexTIPVsPhi->Write();
1579 p_ele_vertexTIPVsPt->SetTitle(
"mean tip (wrt gen vtx) vs phi");
1580 p_ele_vertexTIPVsPt->GetXaxis()->SetTitle(
"p_{T} (GeV/c)");
1581 p_ele_vertexTIPVsPt->GetYaxis()->SetTitle(
"<TIP> (cm)");
1582 p_ele_vertexTIPVsPt->Write();
1763 p_ele_seed_dphi2VsEta_->SetTitle(
"mean ele seed dphi 2nd layer vs eta");
1764 p_ele_seed_dphi2VsEta_->GetXaxis()->SetTitle(
"#eta");
1765 p_ele_seed_dphi2VsEta_->GetYaxis()->SetTitle(
"<#phi_{pred} - #phi_{hit}, 2nd layer> (rad)");
1766 p_ele_seed_dphi2VsEta_->SetMinimum(-0.004);
1767 p_ele_seed_dphi2VsEta_->SetMaximum(0.004);
1768 p_ele_seed_dphi2VsEta_->Write();
1770 p_ele_seed_dphi2VsPt_->SetTitle(
"mean ele seed dphi 2nd layer vs pt");
1771 p_ele_seed_dphi2VsPt_->GetXaxis()->SetTitle(
"p_{T} (GeV/c)");
1772 p_ele_seed_dphi2VsPt_->GetYaxis()->SetTitle(
"<#phi_{pred} - #phi_{hit}, 2nd layer> (rad)");
1773 p_ele_seed_dphi2VsPt_->Write();
1774 p_ele_seed_dphi2VsPt_->SetMinimum(-0.004);
1775 p_ele_seed_dphi2VsPt_->SetMaximum(0.004);
1778 p_ele_seed_drz2VsEta_->SetTitle(
"mean ele seed dr(dz) 2nd layer vs eta");
1779 p_ele_seed_drz2VsEta_->GetXaxis()->SetTitle(
"#eta");
1780 p_ele_seed_drz2VsEta_->GetYaxis()->SetTitle(
"<r(z)_{pred} - r(z)_{hit}, 2nd layer> (cm)");
1781 p_ele_seed_drz2VsEta_->SetMinimum(-0.15);
1782 p_ele_seed_drz2VsEta_->SetMaximum(0.15);
1783 p_ele_seed_drz2VsEta_->Write();
1785 p_ele_seed_drz2VsPt_->SetTitle(
"mean ele seed dr(dz) 2nd layer vs pt");
1786 p_ele_seed_drz2VsPt_->GetXaxis()->SetTitle(
"p_{T} (GeV/c)");
1787 p_ele_seed_drz2VsPt_->GetYaxis()->SetTitle(
"<r(z)_{pred} - r(z)_{hit}, 2nd layer> (cm)");
1788 p_ele_seed_drz2VsPt_->SetMinimum(-0.15);
1789 p_ele_seed_drz2VsPt_->SetMaximum(0.15);
1790 p_ele_seed_drz2VsPt_->Write();
1816 h_ele_etaEff->Write();
1817 h_ele_zEff->Write();
1818 h_ele_phiEff->Write();
1819 h_ele_absetaEff->Write();
1820 h_ele_ptEff->Write();
1821 h_ele_eta_goldenFrac->Write();
1822 h_ele_eta_bbremFrac->Write();
1823 h_ele_eta_narrowFrac->Write();
1824 h_ele_eta_showerFrac->Write();
1825 h_ele_xOverX0VsEta->Write();
1859 std::cout <<
"analyzing new event " << std::endl;
1866 std::cout <<
"new event passing trigger " << std::endl;
1872 edm::LogInfo(
"") <<
"\n\n =================> Treating event " <<
iEvent.id() <<
" Number of electrons "
1884 histNum_->Fill((*gsfElectrons).size());
1890 if (gsfIter->superCluster()->energy() / cosh(gsfIter->superCluster()->eta()) <
minEt_)
1894 if (gsfIter->pt() <
minPt_)
1897 if (gsfIter->isEB() &&
isEE_)
1899 if (gsfIter->isEE() &&
isEB_)
1945 if (gsfIter->mva_e_pi() <
mvaMin_)
1948 double d = (gsfIter->vertex().x() -
bs.position().x()) * (gsfIter->vertex().x() -
bs.position().x()) +
1949 (gsfIter->vertex().y() -
bs.position().y()) * (gsfIter->vertex().y() -
bs.position().y());
1976 h_ele_Et->Fill(gsfIter->superCluster()->energy() / cosh(gsfIter->superCluster()->eta()));
1993 if (!gsfIter->ecalDrivenSeed() && gsfIter->trackerDrivenSeed())
1994 sclRef = gsfIter->parentSuperCluster();
1996 double R = TMath::Sqrt(sclRef->x() * sclRef->x() + sclRef->y() * sclRef->y() + sclRef->z() * sclRef->z());
1997 double Rt = TMath::Sqrt(sclRef->x() * sclRef->x() + sclRef->y() * sclRef->y());
2005 if (gsfIter->isEB())
2007 if (gsfIter->isEE())
2010 if (gsfIter->isEB())
2012 if (gsfIter->isEE())
2015 if (gsfIter->isEB())
2017 if (gsfIter->isEE())
2020 if (gsfIter->isEB())
2022 if (gsfIter->isEE())
2039 h_ele_chi2->Fill(gsfIter->gsfTrack()->normalizedChi2());
2040 h_ele_chi2VsEta->Fill(gsfIter->eta(), gsfIter->gsfTrack()->normalizedChi2());
2041 h_ele_chi2VsPhi->Fill(gsfIter->phi(), gsfIter->gsfTrack()->normalizedChi2());
2042 h_ele_chi2VsPt->Fill(gsfIter->pt(), gsfIter->gsfTrack()->normalizedChi2());
2046 h_ele_PinMnPout->Fill(gsfIter->gsfTrack()->innerMomentum().R() - gsfIter->gsfTrack()->outerMomentum().R());
2047 h_ele_outerP->Fill(gsfIter->gsfTrack()->outerMomentum().R());
2048 h_ele_outerPt->Fill(gsfIter->gsfTrack()->outerMomentum().Rho());
2051 h_ele_PinMnPout_mode->Fill(gsfIter->trackMomentumAtVtx().R() - gsfIter->trackMomentumOut().R());
2053 gsfIter->trackMomentumAtVtx().R() - gsfIter->trackMomentumOut().R());
2055 gsfIter->trackMomentumAtVtx().R() - gsfIter->trackMomentumOut().R());
2056 h_ele_PinMnPoutVsPt_mode->Fill(gsfIter->pt(), gsfIter->trackMomentumAtVtx().R() - gsfIter->trackMomentumOut().R());
2058 gsfIter->trackMomentumAtVtx().R() - gsfIter->trackMomentumOut().R());
2061 gsfIter->trackMomentumAtVtx().R() - gsfIter->trackMomentumOut().R());
2081 h_ele_EoP->Fill(gsfIter->eSuperClusterOverP());
2082 h_ele_EoPVsEta->Fill(gsfIter->eta(), gsfIter->eSuperClusterOverP());
2083 h_ele_EoPVsPhi->Fill(gsfIter->phi(), gsfIter->eSuperClusterOverP());
2084 h_ele_EoPVsE->Fill(gsfIter->caloEnergy(), gsfIter->eSuperClusterOverP());
2088 h_ele_EseedOPVsE->Fill(gsfIter->caloEnergy(), gsfIter->eSeedClusterOverP());
2092 h_ele_EoPoutVsE->Fill(gsfIter->caloEnergy(), gsfIter->eSeedClusterOverPout());
2121 h_ele_HoE->Fill(gsfIter->hadronicOverEm());
2122 if (!gsfIter->isEBEtaGap() && !gsfIter->isEBPhiGap() && !gsfIter->isEBEEGap() && !gsfIter->isEERingGap() &&
2123 !gsfIter->isEEDeeGap())
2127 h_ele_HoEVsE->Fill(gsfIter->caloEnergy(), gsfIter->hadronicOverEm());
2130 int eleClass = gsfIter->classification();
2131 if (gsfIter->isEE())
2136 if (gsfIter->classification() == GsfElectron::GOLDEN)
2138 if (gsfIter->classification() == GsfElectron::BIGBREM)
2141 if (gsfIter->classification() == GsfElectron::SHOWERING)
2145 double fbrem_mean = 0.;
2147 fbrem_mean = 1. - gsfIter->gsfTrack()->outerMomentum().R() / gsfIter->gsfTrack()->innerMomentum().R();
2148 double fbrem_mode = gsfIter->fbrem();
2154 if (gsfIter->classification() == GsfElectron::GOLDEN)
2156 if (gsfIter->classification() == GsfElectron::SHOWERING)
2159 if (gsfIter->classification() == GsfElectron::GOLDEN)
2161 gsfIter->gsfTrack()->innerMomentum().R());
2163 if (gsfIter->classification() == GsfElectron::SHOWERING)
2165 gsfIter->gsfTrack()->innerMomentum().R());
2166 if (gsfIter->classification() == GsfElectron::GOLDEN)
2168 if (gsfIter->classification() == GsfElectron::SHOWERING)
2171 if (gsfIter->classification() == GsfElectron::GOLDEN)
2173 gsfIter->gsfTrack()->innerMomentum().Rho());
2175 if (gsfIter->classification() == GsfElectron::SHOWERING)
2177 gsfIter->gsfTrack()->innerMomentum().Rho());
2180 if (gsfIter->ecalDrivenSeed())
2182 if (gsfIter->trackerDrivenSeed())
2184 if (gsfIter->trackerDrivenSeed() || gsfIter->ecalDrivenSeed())
2186 if (gsfIter->trackerDrivenSeed() && !gsfIter->ecalDrivenSeed())
2188 if (!gsfIter->trackerDrivenSeed() && gsfIter->ecalDrivenSeed())
2200 float enrj1 = gsfIter->superCluster()->energy();
2202 for (reco::GsfElectronCollection::const_iterator gsfIter2 = gsfIter + 1; gsfIter2 !=
gsfElectrons->end();
2205 float mee2 = p12.Dot(p12);
2206 float enrj2 = gsfIter2->superCluster()->energy();
2209 if (gsfIter->ecalDrivenSeed() && gsfIter2->ecalDrivenSeed())
2211 if (gsfIter->charge() * gsfIter2->charge() < 0.) {
2213 if (gsfIter->isEB() && gsfIter2->isEB())
2215 if ((gsfIter->isEB() && gsfIter2->isEE()) || (gsfIter->isEE() && gsfIter2->isEB()))
2217 if (gsfIter->isEE() && gsfIter2->isEE())
2219 if ((gsfIter->classification()==GsfElectron::GOLDEN && gsfIter2->classification()==GsfElectron::GOLDEN) ||
2220 (gsfIter->classification()==GsfElectron::GOLDEN && gsfIter2->classification()==GsfElectron::BIGBREM) ||
2222 (gsfIter->classification()==GsfElectron::BIGBREM && gsfIter2->classification()==GsfElectron::GOLDEN) ||
2223 (gsfIter->classification()==GsfElectron::BIGBREM && gsfIter2->classification()==GsfElectron::BIGBREM)
2230 }
else if ((gsfIter->classification() == GsfElectron::SHOWERING &&
2231 gsfIter2->classification() == GsfElectron::SHOWERING) ||
2232 (gsfIter->classification() == GsfElectron::SHOWERING && gsfIter2->isGap()) ||
2233 (gsfIter->isGap() && gsfIter2->classification() == GsfElectron::SHOWERING) ||
2234 (gsfIter->isGap() && gsfIter2->isGap())) {
2244 int matchingObjectNum = 0;
2246 for (reco::SuperClusterCollection::const_iterator moIter = recoClusters->begin(); moIter != recoClusters->end();
2249 matchingObjectNum++;
2268 bool okGsfFound =
false;
2269 double gsfOkRatio = 999999.;
2277 double dphi = gsfIter->
phi() - moIter->phi();
2279 dphi = dphi < 0 ? (CLHEP::twopi) + dphi : dphi - CLHEP::twopi;
2284 double tmpGsfRatio = gsfIter->p() / moIter->energy();
2286 gsfOkRatio = tmpGsfRatio;
2287 bestGsfElectron = *gsfIter;
2319 if (bestGsfElectron.
isEB())
2321 if (bestGsfElectron.
isEE())
2323 if (bestGsfElectron.
isEB())
2325 if (bestGsfElectron.
isEE())
2329 if (bestGsfElectron.
isEB())
2331 if (bestGsfElectron.
isEE())
2333 if (bestGsfElectron.
isEB())
2335 if (bestGsfElectron.
isEE())
2367 for (
unsigned int i = 0;
i !=
n;
i++) {
2376 for (
unsigned int i = 0;
i !=
n;
i++) {
2384 std::cout <<
"HLT trigger paths requested: index, name and valididty:" << std::endl;
2385 for (
unsigned int i = 0;
i !=
n;
i++) {
2393 unsigned int fired = 0;
2394 for (
unsigned int i = 0;
i !=
n;
i++) {