44 #include "CLHEP/Units/GlobalPhysicalConstants.h"
58 beamSpot_(conf.getParameter<edm::InputTag>(
"beamSpot"))
69 assert (matchingCondition_ ==
"Cone");
117 etamin=pset.getParameter<
double>(
"Etamin");
118 etamax=pset.getParameter<
double>(
"Etamax");
119 phimin=pset.getParameter<
double>(
"Phimin");
120 phimax=pset.getParameter<
double>(
"Phimax");
121 ptmax=pset.getParameter<
double>(
"Ptmax");
122 pmax=pset.getParameter<
double>(
"Pmax");
123 eopmax=pset.getParameter<
double>(
"Eopmax");
124 eopmaxsht=pset.getParameter<
double>(
"Eopmaxsht");
125 detamin=pset.getParameter<
double>(
"Detamin");
126 detamax=pset.getParameter<
double>(
"Detamax");
127 dphimin=pset.getParameter<
double>(
"Dphimin");
128 dphimax=pset.getParameter<
double>(
"Dphimax");
133 fhitsmax=pset.getParameter<
double>(
"Fhitsmax");
134 lhitsmax=pset.getParameter<
double>(
"Lhitsmax");
135 nbineta=pset.getParameter<
int>(
"Nbineta");
136 nbineta2D=pset.getParameter<
int>(
"Nbineta2D");
137 nbinp=pset.getParameter<
int>(
"Nbinp");
138 nbinpt=pset.getParameter<
int>(
"Nbinpt");
139 nbinp2D=pset.getParameter<
int>(
"Nbinp2D");
140 nbinpt2D=pset.getParameter<
int>(
"Nbinpt2D");
141 nbinpteff=pset.getParameter<
int>(
"Nbinpteff");
142 nbinphi=pset.getParameter<
int>(
"Nbinphi");
143 nbinphi2D=pset.getParameter<
int>(
"Nbinphi2D");
144 nbineop=pset.getParameter<
int>(
"Nbineop");
145 nbineop2D=pset.getParameter<
int>(
"Nbineop2D");
146 nbinfhits=pset.getParameter<
int>(
"Nbinfhits");
147 nbinlhits=pset.getParameter<
int>(
"Nbinlhits");
148 nbinxyz=pset.getParameter<
int>(
"Nbinxyz");
149 nbindeta=pset.getParameter<
int>(
"Nbindeta");
150 nbindphi=pset.getParameter<
int>(
"Nbindphi");
155 nbinpoptrue= pset.getParameter<
int>(
"Nbinpoptrue");
156 poptruemin=pset.getParameter<
double>(
"Poptruemin");
157 poptruemax=pset.getParameter<
double>(
"Poptruemax");
158 nbinmee= pset.getParameter<
int>(
"Nbinmee");
159 meemin=pset.getParameter<
double>(
"Meemin");
160 meemax=pset.getParameter<
double>(
"Meemax");
161 nbinhoe= pset.getParameter<
int>(
"Nbinhoe");
162 hoemin=pset.getParameter<
double>(
"Hoemin");
163 hoemax=pset.getParameter<
double>(
"Hoemax");
186 if ( locSC != std::string::npos ) {
187 std::cout <<
"Matching objects are SuperClusters "<< std::endl;
190 std::cout <<
"Didn't recognize input matching objects!! " << std::endl;
194 hlabel=
"h_"+type_+
"Num"; htitle=
"# "+type_+
"s";
199 histNum_=
new TH1F(
"h_recEleNum",
"# rec electrons",20, 0.,20.);
202 hlabel=
"h_"+type_+
"_eta"; htitle=type_+
" #eta";
204 hlabel=
"h_"+type_+
"_abseta"; htitle=type_+
" |#eta|";
206 hlabel=
"h_"+type_+
"_P"; htitle=type_+
" p";
208 hlabel=
"h_"+type_+
"_Pt"; htitle=type_+
" pt";
210 hlabel=
"h_"+type_+
"_phi"; htitle=type_+
" phi";
212 hlabel=
"h_"+type_+
"_z"; htitle=type_+
" z";
236 h_ele_charge =
new TH1F(
"h_ele_charge",
"ele charge", 5,-2.,2.);
261 h_ele_vertexTIP =
new TH1F(
"h_ele_vertexTIP",
"ele transverse impact parameter (wrt bs)", 90,0.,0.15);
297 histSclSigEtaEta_ =
new TH1F(
"h_scl_sigetaeta",
"ele supercluster sigma eta eta",100,0.,0.05);
319 h_ele_lostHits =
new TH1F(
"h_ele_lostHits",
"ele track # lost hits", 5,0.,5.);
323 h_ele_chi2 =
new TH1F(
"h_ele_chi2",
"ele track #chi^{2}", 100,0.,15.);
327 h_ele_PinMnPout =
new TH1F(
"h_ele_PinMnPout",
"ele track inner p - outer p, mean" ,
nbinp,0.,200.);
347 h_ele_EoPVsE =
new TH2F(
"h_ele_EoPVsE",
"ele E/P_{vertex} vs E", 50,0.,
pmax ,50,0.,5.);
351 h_ele_EseedOPVsE =
new TH2F(
"h_ele_EseedOPVsE",
"ele E_{seed}/P_{vertex} vs E", 50,0.,
pmax ,50,0.,5.);
391 h_ele_seed_dphi2_ =
new TH1F(
"h_ele_seedDphi2",
"ele seed dphi 2nd layer", 50,-0.003,+0.003) ;
394 h_ele_seed_drz2_ =
new TH1F(
"h_ele_seedDrz2",
"ele seed dr/dz 2nd layer", 50,-0.03,+0.03) ;
397 h_ele_seed_subdet2_ =
new TH1F(
"h_ele_seedSubdet2",
"ele seed subdet 2nd layer", 10,0.,10.) ;
400 h_ele_classes =
new TH1F(
"h_ele_classes",
"electron classes", 20,0.0,20.);
420 h_ele_tkSumPt_dr03 =
new TH1F(
"h_ele_tkSumPt_dr03",
"tk isolation sum, dR=0.3",100,0.0,20.);
430 h_ele_fbrem =
new TH1F(
"h_ele_fbrem",
"ele brem fraction, mode",100,0.,1.);
435 h_ele_mva =
new TH1F(
"h_ele_mva",
"ele identification mva",100,-1.,1.);
451 h_ele_chi2 -> GetXaxis()-> SetTitle(
"#Chi^{2}");
452 h_ele_chi2 -> GetYaxis()-> SetTitle(
"Events");
455 h_ele_vertexP -> GetXaxis()-> SetTitle(
"p_{vertex} (GeV/c)");
459 h_ele_Et -> GetXaxis()-> SetTitle(
"E_{T} (GeV)");
460 h_ele_Et -> GetYaxis()-> SetTitle(
"Events");
505 h_ele_PinMnPout -> GetXaxis()-> SetTitle(
"P_{vertex} - P_{out} (GeV/c)");
509 h_ele_outerP -> GetXaxis()-> SetTitle(
"P_{out} (GeV/c)");
517 h_ele_EoP -> GetXaxis()-> SetTitle(
"E/P_{vertex}");
518 h_ele_EoP -> GetYaxis()-> SetTitle(
"Events");
519 h_ele_EseedOP -> GetXaxis()-> SetTitle(
"E_{seed}/P_{vertex}");
521 h_ele_EoPout -> GetXaxis()-> SetTitle(
"E_{seed}/P_{out}");
551 h_ele_HoE-> GetXaxis()-> SetTitle(
"H/E") ;
552 h_ele_HoE-> GetYaxis()-> SetTitle(
"Events") ;
555 h_ele_fbrem-> GetXaxis()-> SetTitle(
"P_{in} - P_{out} / P_{in}");
565 h_ele_mee_all-> GetXaxis()-> SetTitle(
"m_{ee} (GeV/c^{2})");
566 h_ele_mee_all-> GetYaxis()-> SetTitle(
"Events");
567 h_ele_mee_os-> GetXaxis()-> SetTitle(
"m_{e^{+}e^{-}} (GeV/c^{2})");
585 histNum_-> GetXaxis()-> SetTitle(
"N_{ele}");
586 histNum_-> GetYaxis()-> SetTitle(
"Events");
596 std::cout <<
"efficiency calculation " << std::endl;
599 h_ele_etaEff->Reset();
601 h_ele_etaEff->Print();
602 h_ele_etaEff->GetXaxis()->SetTitle(
"#eta");
603 h_ele_etaEff->GetYaxis()->SetTitle(
"Efficiency");
610 h_ele_zEff->GetXaxis()->SetTitle(
"z (cm)");
611 h_ele_zEff->GetYaxis()->SetTitle(
"Efficiency");
615 h_ele_absetaEff->Reset();
617 h_ele_absetaEff->GetXaxis()->SetTitle(
"|#eta|");
618 h_ele_absetaEff->GetYaxis()->SetTitle(
"Efficiency");
622 h_ele_ptEff->Reset();
624 h_ele_ptEff->GetXaxis()->SetTitle(
"p_{T} (GeV/c)");
625 h_ele_ptEff->GetYaxis()->SetTitle(
"Efficiency");
629 h_ele_phiEff->Reset();
631 h_ele_phiEff->GetXaxis()->SetTitle(
"#phi (rad)");
632 h_ele_phiEff->GetYaxis()->SetTitle(
"Efficiency");
635 TH1F *h_ele_eta_goldenFrac = (TH1F*)
h_ele_eta_golden->Clone(
"h_ele_eta_goldenFrac");
636 h_ele_eta_goldenFrac->Reset();
638 h_ele_eta_goldenFrac->GetXaxis()->SetTitle(
"|#eta|");
639 h_ele_eta_goldenFrac->GetYaxis()->SetTitle(
"Fraction of electrons");
640 h_ele_eta_goldenFrac->SetTitle(
"fraction of golden electrons vs eta");
641 TH1F *h_ele_eta_bbremFrac = (TH1F*)
h_ele_eta_bbrem->Clone(
"h_ele_eta_bbremFrac");
642 h_ele_eta_bbremFrac->Reset();
644 h_ele_eta_bbremFrac->GetXaxis()->SetTitle(
"|#eta|");
645 h_ele_eta_bbremFrac->GetYaxis()->SetTitle(
"Fraction of electrons");
646 h_ele_eta_bbremFrac->SetTitle(
"fraction of big brem electrons vs eta");
647 TH1F *h_ele_eta_narrowFrac = (TH1F*)
h_ele_eta_narrow->Clone(
"h_ele_eta_narrowFrac");
648 h_ele_eta_narrowFrac->Reset();
650 h_ele_eta_narrowFrac->GetXaxis()->SetTitle(
"|#eta|");
651 h_ele_eta_narrowFrac->GetYaxis()->SetTitle(
"Fraction of electrons");
652 h_ele_eta_narrowFrac->SetTitle(
"fraction of narrow electrons vs eta");
653 TH1F *h_ele_eta_showerFrac = (TH1F*)
h_ele_eta_shower->Clone(
"h_ele_eta_showerFrac");
654 h_ele_eta_showerFrac->Reset();
656 h_ele_eta_showerFrac->GetXaxis()->SetTitle(
"|#eta|");
657 h_ele_eta_showerFrac->GetYaxis()->SetTitle(
"Fraction of electrons");
658 h_ele_eta_showerFrac->SetTitle(
"fraction of showering electrons vs eta");
661 TH1F *h_ele_xOverX0VsEta =
new TH1F(
"h_ele_xOverx0VsEta",
"mean X/X_0 vs eta",
nbineta/2,0.0,2.5);
665 h_ele_xOverX0VsEta->SetBinContent(ibin,xOverX0);
670 p_ele_PoPmatchingObjectVsEta_matched->SetTitle(
"mean ele momentum / matching SC energy vs eta");
671 p_ele_PoPmatchingObjectVsEta_matched->GetXaxis()->SetTitle(
"#eta");
672 p_ele_PoPmatchingObjectVsEta_matched->GetYaxis()->SetTitle(
"<P/E_{matching SC}>");
673 p_ele_PoPmatchingObjectVsEta_matched->Write();
675 p_ele_PoPmatchingObjectVsPhi_matched->SetTitle(
"mean ele momentum / gen momentum vs phi");
676 p_ele_PoPmatchingObjectVsPhi_matched->GetXaxis()->SetTitle(
"#phi (rad)");
677 p_ele_PoPmatchingObjectVsPhi_matched->GetYaxis()->SetTitle(
"<P/E_{matching SC}>");
678 p_ele_PoPmatchingObjectVsPhi_matched->Write();
680 p_ele_EtaMnEtamatchingObjectVsEta_matched->GetXaxis()->SetTitle(
"#eta");
681 p_ele_EtaMnEtamatchingObjectVsEta_matched->GetYaxis()->SetTitle(
"<#eta_{rec} - #eta_{matching SC}>");
682 p_ele_EtaMnEtamatchingObjectVsEta_matched->Write();
684 p_ele_EtaMnEtamatchingObjectVsPhi_matched-> GetXaxis()-> SetTitle(
"#phi");
685 p_ele_EtaMnEtamatchingObjectVsPhi_matched-> GetYaxis()-> SetTitle(
"<#eta_{rec} - #eta_{matching SC}>");
686 p_ele_EtaMnEtamatchingObjectVsPhi_matched->Write();
688 p_ele_PhiMnPhimatchingObjectVsEta_matched-> GetXaxis()-> SetTitle(
"#eta");
689 p_ele_PhiMnPhimatchingObjectVsEta_matched-> GetYaxis()-> SetTitle(
"<#phi_{rec} - #phi_{matching SC}> (rad)");
690 p_ele_PhiMnPhimatchingObjectVsEta_matched->Write();
692 p_ele_PhiMnPhimatchingObjectVsPhi_matched-> GetXaxis()-> SetTitle(
"#phi");
693 p_ele_PhiMnPhimatchingObjectVsPhi_matched-> GetYaxis()-> SetTitle(
"<#phi_{rec} - #phi_{matching SC}> (rad)");
694 p_ele_PhiMnPhimatchingObjectVsPhi_matched->Write();
696 p_ele_vertexPtVsEta->GetXaxis()->SetTitle(
"#eta");
697 p_ele_vertexPtVsEta->GetYaxis()->SetTitle(
"<p_{T}> (GeV/c)");
698 p_ele_vertexPtVsEta->Write();
700 p_ele_vertexPtVsPhi->GetXaxis()->SetTitle(
"#phi (rad)");
701 p_ele_vertexPtVsPhi->GetYaxis()->SetTitle(
"<p_{T}> (GeV/c)");
702 p_ele_vertexPtVsPhi->Write();
704 p_ele_EoPVsEta->GetXaxis()->SetTitle(
"#eta");
705 p_ele_EoPVsEta->GetYaxis()->SetTitle(
"<E/P_{vertex}>");
706 p_ele_EoPVsEta->Write();
708 p_ele_EoPVsPhi->GetXaxis()->SetTitle(
"#phi (rad)");
709 p_ele_EoPVsPhi->GetYaxis()->SetTitle(
"<E/P_{vertex}>");
710 p_ele_EoPVsPhi->Write();
712 p_ele_EoPoutVsEta->GetXaxis()->SetTitle(
"#eta");
713 p_ele_EoPoutVsEta->GetYaxis()->SetTitle(
"<E_{seed}/P_{out}>");
714 p_ele_EoPoutVsEta->Write();
716 p_ele_EoPoutVsPhi->GetXaxis()->SetTitle(
"#phi (rad)");
717 p_ele_EoPoutVsPhi->GetYaxis()->SetTitle(
"<E_{seed}/P_{out}>");
718 p_ele_EoPoutVsPhi->Write();
720 p_ele_EeleOPoutVsEta->SetTitle(
"mean ele Eele/pout vs eta");
721 p_ele_EeleOPoutVsEta->GetXaxis()->SetTitle(
"#eta");
722 p_ele_EeleOPoutVsEta->GetYaxis()->SetTitle(
"<E_{ele}/P_{out}>");
723 p_ele_EeleOPoutVsEta->Write();
725 p_ele_EeleOPoutVsPhi->SetTitle(
"mean ele Eele/pout vs phi");
726 p_ele_EeleOPoutVsPhi->GetXaxis()->SetTitle(
"#phi (rad)");
727 p_ele_EeleOPoutVsPhi->GetYaxis()->SetTitle(
"<E_{ele}/P_{out}>");
728 p_ele_EeleOPoutVsPhi->Write();
730 p_ele_HoEVsEta->GetXaxis()->SetTitle(
"#eta");
731 p_ele_HoEVsEta->GetYaxis()->SetTitle(
"<H/E>");
732 p_ele_HoEVsEta->Write();
734 p_ele_HoEVsPhi->GetXaxis()->SetTitle(
"#phi (rad)");
735 p_ele_HoEVsPhi->GetYaxis()->SetTitle(
"<H/E>");
736 p_ele_HoEVsPhi->Write();
738 p_ele_chi2VsEta->GetXaxis()->SetTitle(
"#eta");
739 p_ele_chi2VsEta->GetYaxis()->SetTitle(
"<#Chi^{2}>");
740 p_ele_chi2VsEta->Write();
742 p_ele_chi2VsPhi->GetXaxis()->SetTitle(
"#phi (rad)");
743 p_ele_chi2VsPhi->GetYaxis()->SetTitle(
"<#Chi^{2}>");
744 p_ele_chi2VsPhi->Write();
746 p_ele_foundHitsVsEta->GetXaxis()->SetTitle(
"#eta");
747 p_ele_foundHitsVsEta->GetYaxis()->SetTitle(
"<N_{hits}>");
748 p_ele_foundHitsVsEta->Write();
750 p_ele_foundHitsVsPhi->GetXaxis()->SetTitle(
"#phi (rad)");
751 p_ele_foundHitsVsPhi->GetYaxis()->SetTitle(
"<N_{hits}>");
752 p_ele_foundHitsVsPhi->Write();
754 p_ele_lostHitsVsEta->GetXaxis()->SetTitle(
"#eta");
755 p_ele_lostHitsVsEta->GetYaxis()->SetTitle(
"<N_{hits}>");
756 p_ele_lostHitsVsEta->Write();
758 p_ele_lostHitsVsPhi->GetXaxis()->SetTitle(
"#phi (rad)");
759 p_ele_lostHitsVsPhi->GetYaxis()->SetTitle(
"<N_{hits}>");
760 p_ele_lostHitsVsPhi->Write();
762 p_ele_vertexTIPVsEta->SetTitle(
"mean tip (wrt gen vtx) vs eta");
763 p_ele_vertexTIPVsEta->GetXaxis()->SetTitle(
"#eta");
764 p_ele_vertexTIPVsEta->GetYaxis()->SetTitle(
"<TIP> (cm)");
765 p_ele_vertexTIPVsEta->Write();
767 p_ele_vertexTIPVsPhi->SetTitle(
"mean tip (wrt gen vtx) vs phi");
768 p_ele_vertexTIPVsPhi->GetXaxis()->SetTitle(
"#phi");
769 p_ele_vertexTIPVsPhi->GetYaxis()->SetTitle(
"<TIP> (cm)");
770 p_ele_vertexTIPVsPhi->Write();
772 p_ele_vertexTIPVsPt->SetTitle(
"mean tip (wrt gen vtx) vs phi");
773 p_ele_vertexTIPVsPt->GetXaxis()->SetTitle(
"p_{T} (GeV/c)");
774 p_ele_vertexTIPVsPt->GetYaxis()->SetTitle(
"<TIP> (cm)");
775 p_ele_vertexTIPVsPt->Write();
956 p_ele_seed_dphi2VsEta_->SetTitle(
"mean ele seed dphi 2nd layer vs eta");
957 p_ele_seed_dphi2VsEta_->GetXaxis()->SetTitle(
"#eta");
958 p_ele_seed_dphi2VsEta_->GetYaxis()->SetTitle(
"<#phi_{pred} - #phi_{hit}, 2nd layer> (rad)");
959 p_ele_seed_dphi2VsEta_->SetMinimum(-0.004);
960 p_ele_seed_dphi2VsEta_->SetMaximum(0.004);
961 p_ele_seed_dphi2VsEta_->Write();
963 p_ele_seed_dphi2VsPt_->SetTitle(
"mean ele seed dphi 2nd layer vs pt");
964 p_ele_seed_dphi2VsPt_->GetXaxis()->SetTitle(
"p_{T} (GeV/c)");
965 p_ele_seed_dphi2VsPt_->GetYaxis()->SetTitle(
"<#phi_{pred} - #phi_{hit}, 2nd layer> (rad)");
966 p_ele_seed_dphi2VsPt_->Write();
967 p_ele_seed_dphi2VsPt_->SetMinimum(-0.004);
968 p_ele_seed_dphi2VsPt_->SetMaximum(0.004);
971 p_ele_seed_drz2VsEta_->SetTitle(
"mean ele seed dr(dz) 2nd layer vs eta");
972 p_ele_seed_drz2VsEta_->GetXaxis()->SetTitle(
"#eta");
973 p_ele_seed_drz2VsEta_->GetYaxis()->SetTitle(
"<r(z)_{pred} - r(z)_{hit}, 2nd layer> (cm)");
974 p_ele_seed_drz2VsEta_->SetMinimum(-0.15);
975 p_ele_seed_drz2VsEta_->SetMaximum(0.15);
976 p_ele_seed_drz2VsEta_->Write();
978 p_ele_seed_drz2VsPt_->SetTitle(
"mean ele seed dr(dz) 2nd layer vs pt");
979 p_ele_seed_drz2VsPt_->GetXaxis()->SetTitle(
"p_{T} (GeV/c)");
980 p_ele_seed_drz2VsPt_->GetYaxis()->SetTitle(
"<r(z)_{pred} - r(z)_{hit}, 2nd layer> (cm)");
981 p_ele_seed_drz2VsPt_->SetMinimum(-0.15);
982 p_ele_seed_drz2VsPt_->SetMaximum(0.15);
983 p_ele_seed_drz2VsPt_->Write();
1009 h_ele_etaEff->Write();
1010 h_ele_zEff->Write();
1011 h_ele_phiEff->Write();
1012 h_ele_absetaEff->Write();
1013 h_ele_ptEff->Write();
1014 h_ele_eta_goldenFrac->Write();
1015 h_ele_eta_bbremFrac->Write();
1016 h_ele_eta_narrowFrac->Write();
1017 h_ele_eta_showerFrac->Write();
1018 h_ele_xOverX0VsEta->Write();
1057 std::cout <<
"analyzing new event " << std::endl;
1063 std::cout <<
"new event passing trigger " << std::endl;
1069 edm::LogInfo(
"")<<
"\n\n =================> Treating event "<<iEvent.
id()<<
" Number of electrons "<<gsfElectrons.
product()->size();
1078 const BeamSpot bs = *recoBeamSpotHandle;
1080 histNum_->Fill((*gsfElectrons).size());
1083 for (reco::GsfElectronCollection::const_iterator gsfIter=gsfElectrons->begin();
1084 gsfIter!=gsfElectrons->end(); gsfIter++){
1087 if (gsfIter->superCluster()->energy()/cosh(gsfIter->superCluster()->eta())<
minEt_)
continue;
1089 if (gsfIter->pt()<
minPt_)
continue;
1091 if (gsfIter->isEB() &&
isEE_)
continue;
1092 if (gsfIter->isEE() &&
isEB_)
continue;
1096 if (gsfIter->trackerDrivenSeed() &&
isEcalDriven_)
continue;
1098 if (gsfIter->isEB() && gsfIter->eSuperClusterOverP() <
eOverPMinBarrel_)
continue;
1099 if (gsfIter->isEB() && gsfIter->eSuperClusterOverP() >
eOverPMaxBarrel_)
continue;
1100 if (gsfIter->isEE() && gsfIter->eSuperClusterOverP() <
eOverPMinEndcaps_)
continue;
1101 if (gsfIter->isEE() && gsfIter->eSuperClusterOverP() >
eOverPMaxEndcaps_)
continue;
1116 if (gsfIter->mva_e_pi() <
mvaMin_)
continue;
1118 double d = (gsfIter->vertex().x()-bs.
position().x())
1119 *(gsfIter->vertex().x()-bs.
position().x())+
1120 (gsfIter->vertex().y()-bs.
position().y())
1121 *(gsfIter->vertex().y()-bs.
position().y());
1126 if (gsfIter->dr03TkSumPt() >
tkIso03Max_)
continue;
1140 h_ele_Et ->
Fill( gsfIter->superCluster()->energy()/cosh( gsfIter->superCluster()->eta()) );
1157 if (!gsfIter->ecalDrivenSeed()&&gsfIter->trackerDrivenSeed()) sclRef = gsfIter->parentSuperCluster();
1159 double R=TMath::Sqrt(sclRef->x()*sclRef->x() + sclRef->y()*sclRef->y() +sclRef->z()*sclRef->z());
1160 double Rt=TMath::Sqrt(sclRef->x()*sclRef->x() + sclRef->y()*sclRef->y());
1201 h_ele_PinMnPout ->
Fill( gsfIter->gsfTrack()->innerMomentum().R() - gsfIter->gsfTrack()->outerMomentum().R() );
1212 h_ele_PinMnPoutVsChi2_mode ->
Fill( gsfIter->gsfTrack()->normalizedChi2(), gsfIter->trackMomentumAtVtx().R() - gsfIter->trackMomentumOut().R() );
1235 h_ele_EoPVsE ->
Fill(gsfIter->caloEnergy(), gsfIter->eSuperClusterOverP() );
1273 if (!gsfIter->isEBEtaGap() && !gsfIter->isEBPhiGap()&& !gsfIter->isEBEEGap() &&
1274 !gsfIter->isEERingGap() && !gsfIter->isEEDeeGap())
h_ele_HoE_fiducial ->
Fill(gsfIter->hadronicOverEm());
1280 int eleClass = gsfIter->classification();
1281 if (gsfIter->isEE()) eleClass+=10;
1291 double fbrem_mean=0.;
1293 fbrem_mean = 1. - gsfIter->gsfTrack()->outerMomentum().R()/gsfIter->gsfTrack()->innerMomentum().R();
1294 double fbrem_mode = gsfIter->fbrem();
1300 if (gsfIter->classification() == GsfElectron::GOLDEN)
h_ele_PinVsPoutGolden_mode ->
Fill(gsfIter->trackMomentumOut().R(), gsfIter->trackMomentumAtVtx().R());
1301 if (gsfIter->classification() == GsfElectron::SHOWERING)
1304 if (gsfIter->classification() == GsfElectron::GOLDEN)
h_ele_PinVsPoutGolden_mean ->
Fill(gsfIter->gsfTrack()->outerMomentum().R(), gsfIter->gsfTrack()->innerMomentum().R());
1306 if (gsfIter->classification() == GsfElectron::SHOWERING)
1308 if (gsfIter->classification() == GsfElectron::GOLDEN)
h_ele_PtinVsPtoutGolden_mode ->
Fill(gsfIter->trackMomentumOut().Rho(), gsfIter->trackMomentumAtVtx().Rho());
1309 if (gsfIter->classification() == GsfElectron::SHOWERING)
1312 if (gsfIter->classification() == GsfElectron::GOLDEN)
h_ele_PtinVsPtoutGolden_mean ->
Fill(gsfIter->gsfTrack()->outerMomentum().Rho(), gsfIter->gsfTrack()->innerMomentum().Rho());
1314 if (gsfIter->classification() == GsfElectron::SHOWERING)
1320 if (gsfIter->trackerDrivenSeed()||gsfIter->ecalDrivenSeed())
h_ele_provenance->Fill(0.);
1321 if (gsfIter->trackerDrivenSeed()&&!gsfIter->ecalDrivenSeed())
h_ele_provenance->Fill(-2.);
1322 if (!gsfIter->trackerDrivenSeed()&&gsfIter->ecalDrivenSeed())
h_ele_provenance->Fill(2.);
1333 float enrj1=gsfIter->superCluster()->energy();
1335 for (reco::GsfElectronCollection::const_iterator gsfIter2=gsfIter+1;
1336 gsfIter2!=gsfElectrons->end(); gsfIter2++){
1339 float mee2 = p12.Dot(p12);
1340 float enrj2=gsfIter2->superCluster()->energy();
1344 if (gsfIter->charge()*gsfIter2->charge()<0.) {
1347 if ((gsfIter->isEB() && gsfIter2->isEE()) || (gsfIter->isEE() && gsfIter2->isEB()))
h_ele_mee_os_ebee ->
Fill(
sqrt(mee2));
1349 if ((gsfIter->classification()==GsfElectron::GOLDEN && gsfIter2->classification()==GsfElectron::GOLDEN) ||
1350 (gsfIter->classification()==GsfElectron::GOLDEN && gsfIter2->classification()==GsfElectron::BIGBREM) ||
1352 (gsfIter->classification()==GsfElectron::BIGBREM && gsfIter2->classification()==GsfElectron::GOLDEN) ||
1353 (gsfIter->classification()==GsfElectron::BIGBREM && gsfIter2->classification()==GsfElectron::BIGBREM)
1360 (gsfIter->classification()==GsfElectron::SHOWERING && gsfIter2->classification()==GsfElectron::SHOWERING) ||
1361 (gsfIter->classification()==GsfElectron::SHOWERING && gsfIter2->isGap()) ||
1362 (gsfIter->isGap() && gsfIter2->classification()==GsfElectron::SHOWERING) ||
1363 (gsfIter->isGap() && gsfIter2->isGap()))
1374 int matchingObjectNum=0;
1376 for ( reco::SuperClusterCollection::const_iterator moIter=recoClusters->begin();
1377 moIter!=recoClusters->end(); moIter++ ) {
1380 matchingObjectNum++;
1397 bool okGsfFound =
false;
1398 double gsfOkRatio = 999999.;
1402 for (reco::GsfElectronCollection::const_iterator gsfIter=gsfElectrons->begin();
1403 gsfIter!=gsfElectrons->end(); gsfIter++){
1407 double dphi = gsfIter->
phi()-moIter->phi();
1409 dphi = dphi < 0? (CLHEP::twopi) + dphi : dphi - CLHEP::twopi;
1414 double tmpGsfRatio = gsfIter->p()/moIter->energy();
1416 gsfOkRatio = tmpGsfRatio;
1417 bestGsfElectron=*gsfIter;
1481 if (triggerResults.
isValid()) {
1487 for (
unsigned int i=0;
i<triggerNames.
size();
i++) {
1493 for (
unsigned int i=0;
i!=
n;
i++) {
1499 n=triggerResults->size();
1502 for (
unsigned int i=0;
i!=
n;
i++) {
1510 std::cout <<
"HLT trigger paths requested: index, name and valididty:" << std::endl;
1511 for (
unsigned int i=0;
i!=
n;
i++) {
1515 <<
" " << validity << std::endl;
1521 unsigned int fired=0;
1522 for (
unsigned int i=0;
i!=
n;
i++) {
TH2F * h_ele_dPhiEleClVsEta_propOut
T getParameter(std::string const &) const
TH2F * h_ele_EseedOPVsEta
TH1F * h_ele_PtoPtmatchingObject_endcaps_matched
double ecalIso03MaxBarrel_
virtual double p() const
magnitude of momentum vector
TH1F * histSclE2x5max_barrel_
TH2F * h_ele_EtaMnEtamatchingObjectVsEta_matched
virtual edm::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const
TH2F * h_ele_dPhiClVsEta_propOut
TH2F * h_ele_PinMnPoutVsPt_mode
TH1F * histSclSigIEtaIEta_barrel_
TH2F * h_ele_PtinVsPtoutShowering_mode
TH1F * h_ele_dEtaCl_propOut
TH2F * h_ele_PoPmatchingObjectVsEta_matched
std::vector< unsigned int > HLTPathsByIndex_
TH1F * h_ele_matchingObjectZ_matched
TH1F * h_ele_ambiguousTracks
TH2F * h_ele_dPhiClVsPhi_propOut
TH2F * h_ele_dPhiEleClVsPt_propOut
virtual float pt() const
transverse momentum
TH2F * h_ele_EtaMnEtamatchingObjectVsPhi_matched
TH1F * h_ele_PtoPtmatchingObject_barrel_matched
TH1F * h_ele_matchingObjectAbsEta_matched
TH1F * h_ele_PtoPtmatchingObject_matched
TH2F * h_ele_dEtaClVsEta_propOut
std::string matchingCondition_
double hcalIso03Depth2MaxEndcaps_
TH2F * h_ele_EeleOPoutVsE
double sigIetaIetaMinBarrel_
virtual float phi() const
momentum azimuthal angle
TH1F * h_matchingObjectAbsEta
TH2F * h_ele_PinMnPoutVsChi2_mode
TH1F * h_ele_tkSumPt_dr04
TH1F * h_ele_EtaMnEtamatchingObject_matched
TH2F * h_ele_outerPtVsPt_mode
TH1F * histSclEoEmatchingObject_barrel_matched
TH2F * h_ele_dEtaEleClVsEta_propOut
TH2F * h_ele_dEtaScVsPhi_propVtx
TH2F * h_ele_ambiguousTracksVsEta
TH2F * h_ele_PhiMnPhimatchingObjectVsPhi_matched
Strings::size_type size() const
TH2F * h_ele_EeleOPoutVsEta
TH1F * h_ele_matchingObjectPt_matched
TH2F * h_ele_seed_drz2VsEta_
TH1F * histSclE1x5_endcaps_
TH2F * h_ele_vertexPtVsPhi
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
double maxAbsEtaMatchingObject_
unsigned int nAfterTrigger_
TH1F * histSclEoEmatchingObject_endcaps_new_matched
TH2F * h_ele_foundHitsVsPt
TH1F * h_ele_outerPt_mode
TH2F * h_ele_PinMnPoutVsEta_mode
TH1F * h_ele_PhiMnPhimatchingObject_matched
TH2F * h_ele_outerPtVsPhi_mode
TH1F * h_ele_hcalDepth2TowerSumEt_dr03
virtual ~GsfElectronDataAnalyzer()
TH2F * h_ele_PhiMnPhimatchingObjectVsPt_matched
TH1F * h_ele_ecalRecHitSumEt_dr04
TH2F * h_ele_EeleOPoutVsPhi
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
TH2F * h_ele_vertexTIPVsEta
TH1F * h_matchingObjectEta
TH2F * h_ele_dEtaScVsEta_propVtx
TH2F * h_ele_seed_dphi2VsEta_
TH2F * h_ele_outerPtVsEta_mode
double ecalIso03MaxEndcaps_
TH2F * h_ele_PinMnPoutVsPhi_mode
unsigned int triggerIndex(std::string const &name) const
TH1F * histSclEoEmatchingObjectShowering_endcaps
TH1F * histSclEoEmatchingObject_endcaps_matched
double hadronicOverEmMaxEndcaps_
TH2F * h_ele_PtinVsPtoutGolden_mode
TH2F * h_ele_dPhiScVsPhi_propVtx
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
TH2F * h_ele_dEtaClVsPt_propOut
virtual float eta() const
momentum pseudorapidity
virtual SuperClusterRef superCluster() const
reference to a SuperCluster
TH1F * h_ele_hcalDepth2TowerSumEt_dr04
GsfElectronDataAnalyzer(const edm::ParameterSet &conf)
TH2F * h_ele_ambiguousTracksVsPt
TH2F * h_ele_PinVsPoutGolden_mode
bool trigger(const edm::Event &e)
TH1F * histSclE2x5max_endcaps_
TH2F * h_ele_dEtaEleClVsPhi_propOut
TH1F * h_ele_PoPmatchingObject_matched
TH1F * h_ele_hcalDepth1TowerSumEt_dr04
TH1F * h_ele_tkSumPt_dr03
Abs< T >::type abs(const T &t)
TH2F * h_ele_dPhiScVsEta_propVtx
TH2F * h_ele_E2mnE1vsMee_all
double hcalIso03Depth1MaxEndcaps_
TProfile * h_ele_fbremVsEta_mean
TH1F * h_ele_PinMnPout_mode
TH2F * h_ele_lostHitsVsEta
static std::string const triggerResults
TH2F * h_ele_PtinVsPtoutGolden_mean
TH1F * histSclEoEmatchingObjectShowering_barrel
edm::InputTag electronCollection_
edm::InputTag triggerResults_
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
TH1F * histSclE1x5_barrel_
TH1F * h_ele_dEtaEleCl_propOut
TH2F * h_ele_vertexTIPVsPhi
TH1F * histSclE5x5_barrel_
double hadronicOverEmMaxBarrel_
double deltaR(double eta1, double eta2, double phi1, double phi2)
TH1F * histSclEoEmatchingObjectGolden_endcaps
TH2F * h_ele_dPhiScVsPt_propVtx
TH2F * h_ele_dPhiClVsPt_propOut
TH2F * h_ele_dPhiEleClVsPhi_propOut
TH1F * h_ele_hcalDepth1TowerSumEt_dr03
TH1F * h_ele_dPhiEleCl_propOut
TH1F * h_ele_dPhiCl_propOut
double hcalIso03Depth1MaxBarrel_
T const * product() const
TH1F * h_ele_matchingObjectPhi_matched
std::string const & triggerName(unsigned int index) const
TH2F * h_ele_seed_drz2VsPt_
TH2F * h_ele_PinVsPoutGolden_mean
TH2F * h_ele_outerPVsEta_mode
TH2F * h_ele_EtaMnEtamatchingObjectVsPt_matched
TH2F * h_ele_dEtaClVsPhi_propOut
REF castTo() const
cast to a concrete type
double sigIetaIetaMaxBarrel_
TH2F * h_ele_vertexEtaVsPhi
TH2F * h_ele_foundHitsVsPhi
TH1F * h_ele_dEtaSc_propVtx
TH2F * h_ele_PinVsPoutShowering_mean
TH2F * h_ele_E2mnE1vsMee_egeg_all
TH2F * h_ele_vertexPtVsEta
TH2F * h_ele_PtinVsPtoutShowering_mean
TH2F * h_ele_vertexTIPVsPt
TH1F * h_ele_PoPmatchingObject_barrel_matched
TH1F * h_ele_HoE_fiducial
TH1F * histSclE5x5_endcaps_
TH1F * h_ele_ecalRecHitSumEt_dr03
TH2F * h_ele_dEtaScVsPt_propVtx
TH2F * h_ele_seed_dphi2VsPt_
TH2F * h_ele_PhiMnPhimatchingObjectVsEta_matched
TH2F * h_ele_lostHitsVsPt
TH1F * histSclEoEmatchingObject_barrel_new_matched
TH2F * h_ele_PoPmatchingObjectVsPt_matched
TH2F * h_ele_PinVsPoutShowering_mode
const Point & position() const
position
TH1F * h_ele_PoPmatchingObject_endcaps_matched
TH2F * h_ele_ambiguousTracksVsPhi
TH2F * h_ele_EseedOPVsPhi
double maxPtMatchingObject_
virtual void analyze(const edm::Event &e, const edm::EventSetup &c)
double sigIetaIetaMaxEndcaps_
TH2F * h_ele_PinMnPoutVsE_mode
TH1F * h_ele_matchingObjectEta_matched
TProfile * h_ele_fbremVsEta_mode
TH1F * histSclEoEmatchingObjectGolden_barrel
TH1F * h_matchingObjectNum
edm::InputTag matchingObjectCollection_
double sigIetaIetaMinEndcaps_
std::vector< std::string > HLTPathsByName_
TH2F * h_ele_lostHitsVsPhi
TH1F * histSclSigIEtaIEta_endcaps_
TH1F * h_matchingObjectPhi
virtual double py() const
y coordinate of momentum vector
Power< A, B >::type pow(const A &a, const B &b)
TH1F * h_ele_dPhiSc_propVtx
TH2F * h_ele_foundHitsVsEta
TH1F * h_ele_seed_subdet2_
TH1F * h_matchingObjectPt
TH2F * h_ele_PoPmatchingObjectVsPhi_matched
TH1F * h_ele_PhiMnPhimatchingObject2_matched
TH2F * h_ele_dEtaEleClVsPt_propOut