42 #include "CLHEP/Units/GlobalPhysicalConstants.h" 56 beamSpot_(conf.getParameter<
edm::InputTag>(
"beamSpot"))
67 assert (matchingCondition_ ==
"Cone");
115 etamin=pset.getParameter<
double>(
"Etamin");
116 etamax=pset.getParameter<
double>(
"Etamax");
117 phimin=pset.getParameter<
double>(
"Phimin");
118 phimax=pset.getParameter<
double>(
"Phimax");
119 ptmax=pset.getParameter<
double>(
"Ptmax");
120 pmax=pset.getParameter<
double>(
"Pmax");
121 eopmax=pset.getParameter<
double>(
"Eopmax");
122 eopmaxsht=pset.getParameter<
double>(
"Eopmaxsht");
123 detamin=pset.getParameter<
double>(
"Detamin");
124 detamax=pset.getParameter<
double>(
"Detamax");
125 dphimin=pset.getParameter<
double>(
"Dphimin");
126 dphimax=pset.getParameter<
double>(
"Dphimax");
131 fhitsmax=pset.getParameter<
double>(
"Fhitsmax");
132 lhitsmax=pset.getParameter<
double>(
"Lhitsmax");
133 nbineta=pset.getParameter<
int>(
"Nbineta");
134 nbineta2D=pset.getParameter<
int>(
"Nbineta2D");
135 nbinp=pset.getParameter<
int>(
"Nbinp");
136 nbinpt=pset.getParameter<
int>(
"Nbinpt");
137 nbinp2D=pset.getParameter<
int>(
"Nbinp2D");
138 nbinpt2D=pset.getParameter<
int>(
"Nbinpt2D");
139 nbinpteff=pset.getParameter<
int>(
"Nbinpteff");
140 nbinphi=pset.getParameter<
int>(
"Nbinphi");
141 nbinphi2D=pset.getParameter<
int>(
"Nbinphi2D");
142 nbineop=pset.getParameter<
int>(
"Nbineop");
143 nbineop2D=pset.getParameter<
int>(
"Nbineop2D");
144 nbinfhits=pset.getParameter<
int>(
"Nbinfhits");
145 nbinlhits=pset.getParameter<
int>(
"Nbinlhits");
146 nbinxyz=pset.getParameter<
int>(
"Nbinxyz");
147 nbindeta=pset.getParameter<
int>(
"Nbindeta");
148 nbindphi=pset.getParameter<
int>(
"Nbindphi");
153 nbinpoptrue= pset.getParameter<
int>(
"Nbinpoptrue");
154 poptruemin=pset.getParameter<
double>(
"Poptruemin");
155 poptruemax=pset.getParameter<
double>(
"Poptruemax");
156 nbinmee= pset.getParameter<
int>(
"Nbinmee");
157 meemin=pset.getParameter<
double>(
"Meemin");
158 meemax=pset.getParameter<
double>(
"Meemax");
159 nbinhoe= pset.getParameter<
int>(
"Nbinhoe");
160 hoemin=pset.getParameter<
double>(
"Hoemin");
161 hoemax=pset.getParameter<
double>(
"Hoemax");
184 if ( locSC != std::string::npos ) {
185 std::cout <<
"Matching objects are SuperClusters "<< std::endl;
188 std::cout <<
"Didn't recognize input matching objects!! " << std::endl;
192 hlabel=
"h_"+type_+
"Num"; htitle=
"# "+type_+
"s";
197 histNum_=
new TH1F(
"h_recEleNum",
"# rec electrons",20, 0.,20.);
200 hlabel=
"h_"+type_+
"_eta"; htitle=type_+
" #eta";
202 hlabel=
"h_"+type_+
"_abseta"; htitle=type_+
" |#eta|";
204 hlabel=
"h_"+type_+
"_P"; htitle=type_+
" p";
206 hlabel=
"h_"+type_+
"_Pt"; htitle=type_+
" pt";
208 hlabel=
"h_"+type_+
"_phi"; htitle=type_+
" phi";
210 hlabel=
"h_"+type_+
"_z"; htitle=type_+
" z";
234 h_ele_charge =
new TH1F(
"h_ele_charge",
"ele charge", 5,-2.,2.);
259 h_ele_vertexTIP =
new TH1F(
"h_ele_vertexTIP",
"ele transverse impact parameter (wrt bs)", 90,0.,0.15);
295 histSclSigEtaEta_ =
new TH1F(
"h_scl_sigetaeta",
"ele supercluster sigma eta eta",100,0.,0.05);
317 h_ele_lostHits =
new TH1F(
"h_ele_lostHits",
"ele track # lost hits", 5,0.,5.);
321 h_ele_chi2 =
new TH1F(
"h_ele_chi2",
"ele track #chi^{2}", 100,0.,15.);
325 h_ele_PinMnPout =
new TH1F(
"h_ele_PinMnPout",
"ele track inner p - outer p, mean" ,
nbinp,0.,200.);
345 h_ele_EoPVsE =
new TH2F(
"h_ele_EoPVsE",
"ele E/P_{vertex} vs E", 50,0.,
pmax ,50,0.,5.);
349 h_ele_EseedOPVsE =
new TH2F(
"h_ele_EseedOPVsE",
"ele E_{seed}/P_{vertex} vs E", 50,0.,
pmax ,50,0.,5.);
389 h_ele_seed_dphi2_ =
new TH1F(
"h_ele_seedDphi2",
"ele seed dphi 2nd layer", 50,-0.003,+0.003) ;
392 h_ele_seed_drz2_ =
new TH1F(
"h_ele_seedDrz2",
"ele seed dr/dz 2nd layer", 50,-0.03,+0.03) ;
395 h_ele_seed_subdet2_ =
new TH1F(
"h_ele_seedSubdet2",
"ele seed subdet 2nd layer", 10,0.,10.) ;
398 h_ele_classes =
new TH1F(
"h_ele_classes",
"electron classes", 20,0.0,20.);
418 h_ele_tkSumPt_dr03 =
new TH1F(
"h_ele_tkSumPt_dr03",
"tk isolation sum, dR=0.3",100,0.0,20.);
428 h_ele_fbrem =
new TH1F(
"h_ele_fbrem",
"ele brem fraction, mode",100,0.,1.);
433 h_ele_mva =
new TH1F(
"h_ele_mva",
"ele identification mva",100,-1.,1.);
449 h_ele_chi2 -> GetXaxis()-> SetTitle(
"#Chi^{2}");
450 h_ele_chi2 -> GetYaxis()-> SetTitle(
"Events");
453 h_ele_vertexP -> GetXaxis()-> SetTitle(
"p_{vertex} (GeV/c)");
457 h_ele_Et -> GetXaxis()-> SetTitle(
"E_{T} (GeV)");
458 h_ele_Et -> GetYaxis()-> SetTitle(
"Events");
503 h_ele_PinMnPout -> GetXaxis()-> SetTitle(
"P_{vertex} - P_{out} (GeV/c)");
507 h_ele_outerP -> GetXaxis()-> SetTitle(
"P_{out} (GeV/c)");
515 h_ele_EoP -> GetXaxis()-> SetTitle(
"E/P_{vertex}");
516 h_ele_EoP -> GetYaxis()-> SetTitle(
"Events");
517 h_ele_EseedOP -> GetXaxis()-> SetTitle(
"E_{seed}/P_{vertex}");
519 h_ele_EoPout -> GetXaxis()-> SetTitle(
"E_{seed}/P_{out}");
549 h_ele_HoE-> GetXaxis()-> SetTitle(
"H/E") ;
550 h_ele_HoE-> GetYaxis()-> SetTitle(
"Events") ;
553 h_ele_fbrem-> GetXaxis()-> SetTitle(
"P_{in} - P_{out} / P_{in}");
563 h_ele_mee_all-> GetXaxis()-> SetTitle(
"m_{ee} (GeV/c^{2})");
564 h_ele_mee_all-> GetYaxis()-> SetTitle(
"Events");
565 h_ele_mee_os-> GetXaxis()-> SetTitle(
"m_{e^{+}e^{-}} (GeV/c^{2})");
583 histNum_-> GetXaxis()-> SetTitle(
"N_{ele}");
584 histNum_-> GetYaxis()-> SetTitle(
"Events");
594 std::cout <<
"efficiency calculation " << std::endl;
597 h_ele_etaEff->Reset();
599 h_ele_etaEff->Print();
600 h_ele_etaEff->GetXaxis()->SetTitle(
"#eta");
601 h_ele_etaEff->GetYaxis()->SetTitle(
"Efficiency");
608 h_ele_zEff->GetXaxis()->SetTitle(
"z (cm)");
609 h_ele_zEff->GetYaxis()->SetTitle(
"Efficiency");
613 h_ele_absetaEff->Reset();
615 h_ele_absetaEff->GetXaxis()->SetTitle(
"|#eta|");
616 h_ele_absetaEff->GetYaxis()->SetTitle(
"Efficiency");
620 h_ele_ptEff->Reset();
622 h_ele_ptEff->GetXaxis()->SetTitle(
"p_{T} (GeV/c)");
623 h_ele_ptEff->GetYaxis()->SetTitle(
"Efficiency");
627 h_ele_phiEff->Reset();
629 h_ele_phiEff->GetXaxis()->SetTitle(
"#phi (rad)");
630 h_ele_phiEff->GetYaxis()->SetTitle(
"Efficiency");
633 TH1F *h_ele_eta_goldenFrac = (TH1F*)
h_ele_eta_golden->Clone(
"h_ele_eta_goldenFrac");
634 h_ele_eta_goldenFrac->Reset();
636 h_ele_eta_goldenFrac->GetXaxis()->SetTitle(
"|#eta|");
637 h_ele_eta_goldenFrac->GetYaxis()->SetTitle(
"Fraction of electrons");
638 h_ele_eta_goldenFrac->SetTitle(
"fraction of golden electrons vs eta");
639 TH1F *h_ele_eta_bbremFrac = (TH1F*)
h_ele_eta_bbrem->Clone(
"h_ele_eta_bbremFrac");
640 h_ele_eta_bbremFrac->Reset();
642 h_ele_eta_bbremFrac->GetXaxis()->SetTitle(
"|#eta|");
643 h_ele_eta_bbremFrac->GetYaxis()->SetTitle(
"Fraction of electrons");
644 h_ele_eta_bbremFrac->SetTitle(
"fraction of big brem electrons vs eta");
645 TH1F *h_ele_eta_narrowFrac = (TH1F*)
h_ele_eta_narrow->Clone(
"h_ele_eta_narrowFrac");
646 h_ele_eta_narrowFrac->Reset();
648 h_ele_eta_narrowFrac->GetXaxis()->SetTitle(
"|#eta|");
649 h_ele_eta_narrowFrac->GetYaxis()->SetTitle(
"Fraction of electrons");
650 h_ele_eta_narrowFrac->SetTitle(
"fraction of narrow electrons vs eta");
651 TH1F *h_ele_eta_showerFrac = (TH1F*)
h_ele_eta_shower->Clone(
"h_ele_eta_showerFrac");
652 h_ele_eta_showerFrac->Reset();
654 h_ele_eta_showerFrac->GetXaxis()->SetTitle(
"|#eta|");
655 h_ele_eta_showerFrac->GetYaxis()->SetTitle(
"Fraction of electrons");
656 h_ele_eta_showerFrac->SetTitle(
"fraction of showering electrons vs eta");
659 TH1F *h_ele_xOverX0VsEta =
new TH1F(
"h_ele_xOverx0VsEta",
"mean X/X_0 vs eta",
nbineta/2,0.0,2.5);
663 h_ele_xOverX0VsEta->SetBinContent(ibin,xOverX0);
668 p_ele_PoPmatchingObjectVsEta_matched->SetTitle(
"mean ele momentum / matching SC energy vs eta");
669 p_ele_PoPmatchingObjectVsEta_matched->GetXaxis()->SetTitle(
"#eta");
670 p_ele_PoPmatchingObjectVsEta_matched->GetYaxis()->SetTitle(
"<P/E_{matching SC}>");
671 p_ele_PoPmatchingObjectVsEta_matched->Write();
673 p_ele_PoPmatchingObjectVsPhi_matched->SetTitle(
"mean ele momentum / gen momentum vs phi");
674 p_ele_PoPmatchingObjectVsPhi_matched->GetXaxis()->SetTitle(
"#phi (rad)");
675 p_ele_PoPmatchingObjectVsPhi_matched->GetYaxis()->SetTitle(
"<P/E_{matching SC}>");
676 p_ele_PoPmatchingObjectVsPhi_matched->Write();
678 p_ele_EtaMnEtamatchingObjectVsEta_matched->GetXaxis()->SetTitle(
"#eta");
679 p_ele_EtaMnEtamatchingObjectVsEta_matched->GetYaxis()->SetTitle(
"<#eta_{rec} - #eta_{matching SC}>");
680 p_ele_EtaMnEtamatchingObjectVsEta_matched->Write();
682 p_ele_EtaMnEtamatchingObjectVsPhi_matched-> GetXaxis()-> SetTitle(
"#phi");
683 p_ele_EtaMnEtamatchingObjectVsPhi_matched-> GetYaxis()-> SetTitle(
"<#eta_{rec} - #eta_{matching SC}>");
684 p_ele_EtaMnEtamatchingObjectVsPhi_matched->Write();
686 p_ele_PhiMnPhimatchingObjectVsEta_matched-> GetXaxis()-> SetTitle(
"#eta");
687 p_ele_PhiMnPhimatchingObjectVsEta_matched-> GetYaxis()-> SetTitle(
"<#phi_{rec} - #phi_{matching SC}> (rad)");
688 p_ele_PhiMnPhimatchingObjectVsEta_matched->Write();
690 p_ele_PhiMnPhimatchingObjectVsPhi_matched-> GetXaxis()-> SetTitle(
"#phi");
691 p_ele_PhiMnPhimatchingObjectVsPhi_matched-> GetYaxis()-> SetTitle(
"<#phi_{rec} - #phi_{matching SC}> (rad)");
692 p_ele_PhiMnPhimatchingObjectVsPhi_matched->Write();
694 p_ele_vertexPtVsEta->GetXaxis()->SetTitle(
"#eta");
695 p_ele_vertexPtVsEta->GetYaxis()->SetTitle(
"<p_{T}> (GeV/c)");
696 p_ele_vertexPtVsEta->Write();
698 p_ele_vertexPtVsPhi->GetXaxis()->SetTitle(
"#phi (rad)");
699 p_ele_vertexPtVsPhi->GetYaxis()->SetTitle(
"<p_{T}> (GeV/c)");
700 p_ele_vertexPtVsPhi->Write();
702 p_ele_EoPVsEta->GetXaxis()->SetTitle(
"#eta");
703 p_ele_EoPVsEta->GetYaxis()->SetTitle(
"<E/P_{vertex}>");
704 p_ele_EoPVsEta->Write();
706 p_ele_EoPVsPhi->GetXaxis()->SetTitle(
"#phi (rad)");
707 p_ele_EoPVsPhi->GetYaxis()->SetTitle(
"<E/P_{vertex}>");
708 p_ele_EoPVsPhi->Write();
710 p_ele_EoPoutVsEta->GetXaxis()->SetTitle(
"#eta");
711 p_ele_EoPoutVsEta->GetYaxis()->SetTitle(
"<E_{seed}/P_{out}>");
712 p_ele_EoPoutVsEta->Write();
714 p_ele_EoPoutVsPhi->GetXaxis()->SetTitle(
"#phi (rad)");
715 p_ele_EoPoutVsPhi->GetYaxis()->SetTitle(
"<E_{seed}/P_{out}>");
716 p_ele_EoPoutVsPhi->Write();
718 p_ele_EeleOPoutVsEta->SetTitle(
"mean ele Eele/pout vs eta");
719 p_ele_EeleOPoutVsEta->GetXaxis()->SetTitle(
"#eta");
720 p_ele_EeleOPoutVsEta->GetYaxis()->SetTitle(
"<E_{ele}/P_{out}>");
721 p_ele_EeleOPoutVsEta->Write();
723 p_ele_EeleOPoutVsPhi->SetTitle(
"mean ele Eele/pout vs phi");
724 p_ele_EeleOPoutVsPhi->GetXaxis()->SetTitle(
"#phi (rad)");
725 p_ele_EeleOPoutVsPhi->GetYaxis()->SetTitle(
"<E_{ele}/P_{out}>");
726 p_ele_EeleOPoutVsPhi->Write();
728 p_ele_HoEVsEta->GetXaxis()->SetTitle(
"#eta");
729 p_ele_HoEVsEta->GetYaxis()->SetTitle(
"<H/E>");
730 p_ele_HoEVsEta->Write();
732 p_ele_HoEVsPhi->GetXaxis()->SetTitle(
"#phi (rad)");
733 p_ele_HoEVsPhi->GetYaxis()->SetTitle(
"<H/E>");
734 p_ele_HoEVsPhi->Write();
736 p_ele_chi2VsEta->GetXaxis()->SetTitle(
"#eta");
737 p_ele_chi2VsEta->GetYaxis()->SetTitle(
"<#Chi^{2}>");
738 p_ele_chi2VsEta->Write();
740 p_ele_chi2VsPhi->GetXaxis()->SetTitle(
"#phi (rad)");
741 p_ele_chi2VsPhi->GetYaxis()->SetTitle(
"<#Chi^{2}>");
742 p_ele_chi2VsPhi->Write();
744 p_ele_foundHitsVsEta->GetXaxis()->SetTitle(
"#eta");
745 p_ele_foundHitsVsEta->GetYaxis()->SetTitle(
"<N_{hits}>");
746 p_ele_foundHitsVsEta->Write();
748 p_ele_foundHitsVsPhi->GetXaxis()->SetTitle(
"#phi (rad)");
749 p_ele_foundHitsVsPhi->GetYaxis()->SetTitle(
"<N_{hits}>");
750 p_ele_foundHitsVsPhi->Write();
752 p_ele_lostHitsVsEta->GetXaxis()->SetTitle(
"#eta");
753 p_ele_lostHitsVsEta->GetYaxis()->SetTitle(
"<N_{hits}>");
754 p_ele_lostHitsVsEta->Write();
756 p_ele_lostHitsVsPhi->GetXaxis()->SetTitle(
"#phi (rad)");
757 p_ele_lostHitsVsPhi->GetYaxis()->SetTitle(
"<N_{hits}>");
758 p_ele_lostHitsVsPhi->Write();
760 p_ele_vertexTIPVsEta->SetTitle(
"mean tip (wrt gen vtx) vs eta");
761 p_ele_vertexTIPVsEta->GetXaxis()->SetTitle(
"#eta");
762 p_ele_vertexTIPVsEta->GetYaxis()->SetTitle(
"<TIP> (cm)");
763 p_ele_vertexTIPVsEta->Write();
765 p_ele_vertexTIPVsPhi->SetTitle(
"mean tip (wrt gen vtx) vs phi");
766 p_ele_vertexTIPVsPhi->GetXaxis()->SetTitle(
"#phi");
767 p_ele_vertexTIPVsPhi->GetYaxis()->SetTitle(
"<TIP> (cm)");
768 p_ele_vertexTIPVsPhi->Write();
770 p_ele_vertexTIPVsPt->SetTitle(
"mean tip (wrt gen vtx) vs phi");
771 p_ele_vertexTIPVsPt->GetXaxis()->SetTitle(
"p_{T} (GeV/c)");
772 p_ele_vertexTIPVsPt->GetYaxis()->SetTitle(
"<TIP> (cm)");
773 p_ele_vertexTIPVsPt->Write();
954 p_ele_seed_dphi2VsEta_->SetTitle(
"mean ele seed dphi 2nd layer vs eta");
955 p_ele_seed_dphi2VsEta_->GetXaxis()->SetTitle(
"#eta");
956 p_ele_seed_dphi2VsEta_->GetYaxis()->SetTitle(
"<#phi_{pred} - #phi_{hit}, 2nd layer> (rad)");
957 p_ele_seed_dphi2VsEta_->SetMinimum(-0.004);
958 p_ele_seed_dphi2VsEta_->SetMaximum(0.004);
959 p_ele_seed_dphi2VsEta_->Write();
961 p_ele_seed_dphi2VsPt_->SetTitle(
"mean ele seed dphi 2nd layer vs pt");
962 p_ele_seed_dphi2VsPt_->GetXaxis()->SetTitle(
"p_{T} (GeV/c)");
963 p_ele_seed_dphi2VsPt_->GetYaxis()->SetTitle(
"<#phi_{pred} - #phi_{hit}, 2nd layer> (rad)");
964 p_ele_seed_dphi2VsPt_->Write();
965 p_ele_seed_dphi2VsPt_->SetMinimum(-0.004);
966 p_ele_seed_dphi2VsPt_->SetMaximum(0.004);
969 p_ele_seed_drz2VsEta_->SetTitle(
"mean ele seed dr(dz) 2nd layer vs eta");
970 p_ele_seed_drz2VsEta_->GetXaxis()->SetTitle(
"#eta");
971 p_ele_seed_drz2VsEta_->GetYaxis()->SetTitle(
"<r(z)_{pred} - r(z)_{hit}, 2nd layer> (cm)");
972 p_ele_seed_drz2VsEta_->SetMinimum(-0.15);
973 p_ele_seed_drz2VsEta_->SetMaximum(0.15);
974 p_ele_seed_drz2VsEta_->Write();
976 p_ele_seed_drz2VsPt_->SetTitle(
"mean ele seed dr(dz) 2nd layer vs pt");
977 p_ele_seed_drz2VsPt_->GetXaxis()->SetTitle(
"p_{T} (GeV/c)");
978 p_ele_seed_drz2VsPt_->GetYaxis()->SetTitle(
"<r(z)_{pred} - r(z)_{hit}, 2nd layer> (cm)");
979 p_ele_seed_drz2VsPt_->SetMinimum(-0.15);
980 p_ele_seed_drz2VsPt_->SetMaximum(0.15);
981 p_ele_seed_drz2VsPt_->Write();
1007 h_ele_etaEff->Write();
1008 h_ele_zEff->Write();
1009 h_ele_phiEff->Write();
1010 h_ele_absetaEff->Write();
1011 h_ele_ptEff->Write();
1012 h_ele_eta_goldenFrac->Write();
1013 h_ele_eta_bbremFrac->Write();
1014 h_ele_eta_narrowFrac->Write();
1015 h_ele_eta_showerFrac->Write();
1016 h_ele_xOverX0VsEta->Write();
1055 std::cout <<
"analyzing new event " << std::endl;
1061 std::cout <<
"new event passing trigger " << std::endl;
1067 edm::LogInfo(
"")<<
"\n\n =================> Treating event "<<iEvent.
id()<<
" Number of electrons "<<gsfElectrons.
product()->size();
1076 const BeamSpot bs = *recoBeamSpotHandle;
1078 histNum_->Fill((*gsfElectrons).size());
1081 for (reco::GsfElectronCollection::const_iterator gsfIter=gsfElectrons->begin();
1082 gsfIter!=gsfElectrons->end(); gsfIter++){
1085 if (gsfIter->superCluster()->energy()/cosh(gsfIter->superCluster()->eta())<
minEt_)
continue;
1087 if (gsfIter->pt()<
minPt_)
continue;
1089 if (gsfIter->isEB() &&
isEE_)
continue;
1090 if (gsfIter->isEE() &&
isEB_)
continue;
1094 if (gsfIter->trackerDrivenSeed() &&
isEcalDriven_)
continue;
1096 if (gsfIter->isEB() && gsfIter->eSuperClusterOverP() <
eOverPMinBarrel_)
continue;
1097 if (gsfIter->isEB() && gsfIter->eSuperClusterOverP() >
eOverPMaxBarrel_)
continue;
1098 if (gsfIter->isEE() && gsfIter->eSuperClusterOverP() <
eOverPMinEndcaps_)
continue;
1099 if (gsfIter->isEE() && gsfIter->eSuperClusterOverP() >
eOverPMaxEndcaps_)
continue;
1114 if (gsfIter->mva_e_pi() <
mvaMin_)
continue;
1116 double d = (gsfIter->vertex().x()-bs.
position().x())
1117 *(gsfIter->vertex().x()-bs.
position().x())+
1118 (gsfIter->vertex().y()-bs.
position().y())
1119 *(gsfIter->vertex().y()-bs.
position().y());
1124 if (gsfIter->dr03TkSumPt() >
tkIso03Max_)
continue;
1138 h_ele_Et ->
Fill( gsfIter->superCluster()->energy()/cosh( gsfIter->superCluster()->eta()) );
1155 if (!gsfIter->ecalDrivenSeed()&&gsfIter->trackerDrivenSeed()) sclRef = gsfIter->parentSuperCluster();
1157 double R=TMath::Sqrt(sclRef->x()*sclRef->x() + sclRef->y()*sclRef->y() +sclRef->z()*sclRef->z());
1158 double Rt=TMath::Sqrt(sclRef->x()*sclRef->x() + sclRef->y()*sclRef->y());
1199 h_ele_PinMnPout ->
Fill( gsfIter->gsfTrack()->innerMomentum().R() - gsfIter->gsfTrack()->outerMomentum().R() );
1210 h_ele_PinMnPoutVsChi2_mode ->
Fill( gsfIter->gsfTrack()->normalizedChi2(), gsfIter->trackMomentumAtVtx().R() - gsfIter->trackMomentumOut().R() );
1233 h_ele_EoPVsE ->
Fill(gsfIter->caloEnergy(), gsfIter->eSuperClusterOverP() );
1271 if (!gsfIter->isEBEtaGap() && !gsfIter->isEBPhiGap()&& !gsfIter->isEBEEGap() &&
1272 !gsfIter->isEERingGap() && !gsfIter->isEEDeeGap())
h_ele_HoE_fiducial ->
Fill(gsfIter->hadronicOverEm());
1278 int eleClass = gsfIter->classification();
1279 if (gsfIter->isEE()) eleClass+=10;
1289 double fbrem_mean=0.;
1291 fbrem_mean = 1. - gsfIter->gsfTrack()->outerMomentum().R()/gsfIter->gsfTrack()->innerMomentum().R();
1292 double fbrem_mode = gsfIter->fbrem();
1298 if (gsfIter->classification() == GsfElectron::GOLDEN)
h_ele_PinVsPoutGolden_mode ->
Fill(gsfIter->trackMomentumOut().R(), gsfIter->trackMomentumAtVtx().R());
1299 if (gsfIter->classification() == GsfElectron::SHOWERING)
1302 if (gsfIter->classification() == GsfElectron::GOLDEN)
h_ele_PinVsPoutGolden_mean ->
Fill(gsfIter->gsfTrack()->outerMomentum().R(), gsfIter->gsfTrack()->innerMomentum().R());
1304 if (gsfIter->classification() == GsfElectron::SHOWERING)
1306 if (gsfIter->classification() == GsfElectron::GOLDEN)
h_ele_PtinVsPtoutGolden_mode ->
Fill(gsfIter->trackMomentumOut().Rho(), gsfIter->trackMomentumAtVtx().Rho());
1307 if (gsfIter->classification() == GsfElectron::SHOWERING)
1310 if (gsfIter->classification() == GsfElectron::GOLDEN)
h_ele_PtinVsPtoutGolden_mean ->
Fill(gsfIter->gsfTrack()->outerMomentum().Rho(), gsfIter->gsfTrack()->innerMomentum().Rho());
1312 if (gsfIter->classification() == GsfElectron::SHOWERING)
1318 if (gsfIter->trackerDrivenSeed()||gsfIter->ecalDrivenSeed())
h_ele_provenance->Fill(0.);
1319 if (gsfIter->trackerDrivenSeed()&&!gsfIter->ecalDrivenSeed())
h_ele_provenance->Fill(-2.);
1320 if (!gsfIter->trackerDrivenSeed()&&gsfIter->ecalDrivenSeed())
h_ele_provenance->Fill(2.);
1331 float enrj1=gsfIter->superCluster()->energy();
1333 for (reco::GsfElectronCollection::const_iterator gsfIter2=gsfIter+1;
1334 gsfIter2!=gsfElectrons->end(); gsfIter2++){
1337 float mee2 = p12.Dot(p12);
1338 float enrj2=gsfIter2->superCluster()->energy();
1342 if (gsfIter->charge()*gsfIter2->charge()<0.) {
1345 if ((gsfIter->isEB() && gsfIter2->isEE()) || (gsfIter->isEE() && gsfIter2->isEB()))
h_ele_mee_os_ebee ->
Fill(
sqrt(mee2));
1347 if ((gsfIter->classification()==GsfElectron::GOLDEN && gsfIter2->classification()==GsfElectron::GOLDEN) ||
1348 (gsfIter->classification()==GsfElectron::GOLDEN && gsfIter2->classification()==GsfElectron::BIGBREM) ||
1350 (gsfIter->classification()==GsfElectron::BIGBREM && gsfIter2->classification()==GsfElectron::GOLDEN) ||
1351 (gsfIter->classification()==GsfElectron::BIGBREM && gsfIter2->classification()==GsfElectron::BIGBREM)
1358 (gsfIter->classification()==GsfElectron::SHOWERING && gsfIter2->classification()==GsfElectron::SHOWERING) ||
1359 (gsfIter->classification()==GsfElectron::SHOWERING && gsfIter2->isGap()) ||
1360 (gsfIter->isGap() && gsfIter2->classification()==GsfElectron::SHOWERING) ||
1361 (gsfIter->isGap() && gsfIter2->isGap()))
1372 int matchingObjectNum=0;
1374 for ( reco::SuperClusterCollection::const_iterator moIter=recoClusters->begin();
1375 moIter!=recoClusters->end(); moIter++ ) {
1378 matchingObjectNum++;
1395 bool okGsfFound =
false;
1396 double gsfOkRatio = 999999.;
1400 for (reco::GsfElectronCollection::const_iterator gsfIter=gsfElectrons->begin();
1401 gsfIter!=gsfElectrons->end(); gsfIter++){
1405 double dphi = gsfIter->
phi()-moIter->phi();
1407 dphi = dphi < 0? (CLHEP::twopi) + dphi : dphi - CLHEP::twopi;
1412 double tmpGsfRatio = gsfIter->p()/moIter->energy();
1414 gsfOkRatio = tmpGsfRatio;
1415 bestGsfElectron=*gsfIter;
1479 if (triggerResults.
isValid()) {
1485 for (
unsigned int i=0;
i<triggerNames.
size();
i++) {
1491 for (
unsigned int i=0;
i!=
n;
i++) {
1497 n=triggerResults->
size();
1500 for (
unsigned int i=0;
i!=
n;
i++) {
1508 std::cout <<
"HLT trigger paths requested: index, name and valididty:" << std::endl;
1509 for (
unsigned int i=0;
i!=
n;
i++) {
1513 <<
" " << validity << std::endl;
1519 unsigned int fired=0;
1520 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_
TH1F * histSclE2x5max_barrel_
TH2F * h_ele_EtaMnEtamatchingObjectVsEta_matched
TH2F * h_ele_dPhiClVsEta_propOut
TH2F * h_ele_PinMnPoutVsPt_mode
double eta() const final
momentum pseudorapidity
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
TH2F * h_ele_EtaMnEtamatchingObjectVsPhi_matched
TH1F * h_ele_PtoPtmatchingObject_barrel_matched
TH1F * h_ele_matchingObjectAbsEta_matched
TH1F * h_ele_PtoPtmatchingObject_matched
void analyze(const edm::Event &e, const edm::EventSetup &c) override
TH2F * h_ele_dEtaClVsEta_propOut
std::string matchingCondition_
double hcalIso03Depth2MaxEndcaps_
TH2F * h_ele_EeleOPoutVsE
double sigIetaIetaMinBarrel_
TH1F * h_matchingObjectAbsEta
~GsfElectronDataAnalyzer() override
TH2F * h_ele_PinMnPoutVsChi2_mode
TH1F * h_ele_tkSumPt_dr04
bool accept() const
Has at least one path accepted the event?
TH1F * h_ele_EtaMnEtamatchingObject_matched
TH2F * h_ele_outerPtVsPt_mode
TH1F * histSclEoEmatchingObject_barrel_matched
TH2F * h_ele_dEtaEleClVsEta_propOut
double pt() const final
transverse momentum
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
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
unsigned int size() const
Get number of paths stored.
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_
TH1F * histSclEoEmatchingObjectGolden_endcaps
TH2F * h_ele_dPhiScVsPt_propVtx
TH2F * h_ele_dPhiClVsPt_propOut
double p() const final
magnitude of momentum vector
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
double sigIetaIetaMaxBarrel_
TH2F * h_ele_vertexEtaVsPhi
double py() const final
y coordinate of momentum vector
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
SuperClusterRef superCluster() const override
reference to a SuperCluster
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_
double sigIetaIetaMaxEndcaps_
TH2F * h_ele_PinMnPoutVsE_mode
TH1F * h_ele_matchingObjectEta_matched
TProfile * h_ele_fbremVsEta_mode
TH1F * histSclEoEmatchingObjectGolden_barrel
TH1F * h_matchingObjectNum
double phi() const final
momentum azimuthal angle
edm::InputTag matchingObjectCollection_
double sigIetaIetaMinEndcaps_
std::vector< std::string > HLTPathsByName_
TH2F * h_ele_lostHitsVsPhi
TH1F * histSclSigIEtaIEta_endcaps_
edm::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const override
TH1F * h_matchingObjectPhi
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