00001
00002 #include "Validation/RecoEgamma/plugins/ElectronMcFakePostValidator.h"
00003 #include "DQMServices/Core/interface/MonitorElement.h"
00004 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00005
00006 ElectronMcFakePostValidator::ElectronMcFakePostValidator( const edm::ParameterSet & conf )
00007 : ElectronDqmAnalyzerBase(conf)
00008 {}
00009
00010 ElectronMcFakePostValidator::~ElectronMcFakePostValidator()
00011 {}
00012
00013 void ElectronMcFakePostValidator::book()
00014 { setBookIndex(-1) ; }
00015
00016 void ElectronMcFakePostValidator::finalize()
00017 {
00018 setBookPrefix("h_ele") ;
00019
00020 edm::LogInfo("ElectronMcFakePostValidator::finalize") << "efficiency calculation " ;
00021 bookH1andDivide("etaEff","matchingObjectEta_matched","matchingObject_eta","#eta","Efficiency");
00022 bookH1andDivide("zEff","matchingObjectZ_matched","matchingObject_z","z (cm)","Efficiency");
00023 bookH1andDivide("absetaEff","matchingObjectAbsEta_matched","matchingObject_abseta","|#eta|","Efficiency");
00024 bookH1andDivide("ptEff","matchingObjectPt_matched","matchingObject_Pt","p_{T} (GeV/c)","Efficiency");
00025 bookH1andDivide("phiEff","matchingObjectPhi_matched","matchingObject_phi","#phi (rad)","Efficiency");
00026
00027
00028
00029
00030
00031
00032
00033
00034 edm::LogInfo("ElectronMcFakePostValidator::finalize") << "all reco electrons " ;
00035 bookH1andDivide("etaEff_all","vertexEta_all","matchingObject_eta","#eta","N_{rec}/N_{gen}");
00036 bookH1andDivide("ptEff_all", "vertexPt_all","matchingObject_Pt","p_{T} (GeV/c)","N_{rec}/N_{gen}");
00037
00038 edm::LogInfo("ElectronMcFakePostValidator::finalize") << "classes" ;
00039 bookH1andDivide("eta_goldenFrac","eta_golden","h_ele_eta","|#eta|","Fraction of electrons","fraction of golden electrons vs eta");
00040 bookH1andDivide("eta_bbremFrac" ,"eta_bbrem", "h_ele_eta","|#eta|","Fraction of electrons","fraction of big brem electrons vs eta");
00041
00042 bookH1andDivide("eta_showerFrac","eta_shower","h_ele_eta","|#eta|","Fraction of electrons","fraction of showering electrons vs eta");
00043
00044
00045 MonitorElement * p1_ele_fbremVsEta_mean = get("fbremvsEtamean") ;
00046 TAxis * etaAxis = p1_ele_fbremVsEta_mean->getTProfile()->GetXaxis() ;
00047 MonitorElement * h1_ele_xOverX0VsEta = bookH1withSumw2("xOverx0VsEta","mean X/X_0 vs eta",etaAxis->GetNbins(),etaAxis->GetXmin(),etaAxis->GetXmax());
00048 for (int ibin=1;ibin<etaAxis->GetNbins()+1;ibin++) {
00049 double xOverX0 = 0.;
00050 if (p1_ele_fbremVsEta_mean->getBinContent(ibin)>0.)
00051 { xOverX0 = -log(p1_ele_fbremVsEta_mean->getBinContent(ibin)) ; }
00052 h1_ele_xOverX0VsEta->setBinContent(ibin,xOverX0) ;
00053 }
00054
00055
00056 profileX("PoPmatchingObjectVsEta","","#eta","<P/P_{gen}>");
00057 profileX("PoPmatchingObjectVsPhi","","#phi (rad)","<P/P_{gen}>");
00058 profileX("EtaMnEtamatchingObjectVsEta","","#eta","<#eta_{rec} - #eta_{gen}>");
00059 profileX("EtaMnEtamatchingObjectVsPhi","","#phi (rad)","<#eta_{rec} - #eta_{gen}>");
00060 profileX("PhiMnPhimatchingObjectVsEta","","#eta","<#phi_{rec} - #phi_{gen}> (rad)");
00061 profileX("PhiMnPhimatchingObjectVsPhi","","#phi (rad)","");
00062 profileX("vertexPtVsEta","mean ele transverse momentum vs eta","#eta","<p_{T}> (GeV/c)");
00063 profileX("vertexPtVsPhi","mean ele transverse momentum vs phi","#phi (rad)","<p_{T}> (GeV/c)");
00064 profileX("EoPVsEta","mean ele E/p vs eta","#eta","<E/P_{vertex}>");
00065 profileX("EoPVsPhi","mean ele E/p vs phi","#phi (rad)","<E/P_{vertex}>");
00066 profileX("EoPoutVsEta","mean ele E/pout vs eta","#eta","<E_{seed}/P_{out}>");
00067 profileX("EoPoutVsPhi","mean ele E/pout vs phi","#phi (rad)","<E_{seed}/P_{out}>");
00068 profileX("EeleOPoutVsEta","mean ele Eele/pout vs eta","#eta","<E_{ele}/P_{out}>");
00069 profileX("EeleOPoutVsPhi","mean ele Eele/pout vs phi","#phi (rad)","<E_{ele}/P_{out}>");
00070 profileX("HoEVsEta","mean ele H/E vs eta","#eta","<H/E>");
00071 profileX("HoEVsPhi","mean ele H/E vs phi","#phi (rad)","<H/E>");
00072 profileX("chi2VsEta","mean ele track chi2 vs eta","#eta","<#Chi^{2}>");
00073 profileX("chi2VsPhi","mean ele track chi2 vs phi","#phi (rad)","<#Chi^{2}>");
00074 profileX("foundHitsVsEta","mean ele track # found hits vs eta","#eta","<N_{hits}>");
00075 profileX("foundHitsVsPhi","mean ele track # found hits vs phi","#phi (rad)","<N_{hits}>");
00076 profileX("lostHitsVsEta","mean ele track # lost hits vs eta","#eta","<N_{hits}>");
00077 profileX("lostHitsVsPhi","mean ele track # lost hits vs phi","#phi (rad)","<N_{hits}>");
00078 profileX("vertexTIPVsEta","mean tip (wrt gen vtx) vs eta","#eta","<TIP> (cm)");
00079 profileX("vertexTIPVsPhi","mean tip (wrt gen vtx) vs phi","#phi","<TIP> (cm)");
00080 profileX("vertexTIPVsPt","mean tip (wrt gen vtx) vs phi","p_{T} (GeV/c)","<TIP> (cm)");
00081 profileX("seedDphi2_VsEta","mean ele seed dphi 2nd layer vs eta","#eta","<#phi_{pred} - #phi_{hit}, 2nd layer> (rad)",-0.004,0.004);
00082 profileX("seedDphi2_VsPt","mean ele seed dphi 2nd layer vs pt","p_{T} (GeV/c)","<#phi_{pred} - #phi_{hit}, 2nd layer> (rad)",-0.004,0.004);
00083 profileX("seedDrz2_VsEta","mean ele seed dr(dz) 2nd layer vs eta","#eta","<r(z)_{pred} - r(z)_{hit}, 2nd layer> (cm)",-0.15,0.15);
00084 profileX("seedDrz2_VsPt","mean ele seed dr(dz) 2nd layer vs pt","p_{T} (GeV/c)","<r(z)_{pred} - r(z)_{hit}, 2nd layer> (cm)",-0.15,0.15);
00085 profileX("seedDphi2Pos_VsEta","mean ele seed dphi 2nd layer positron vs eta","#eta","<#phi_{pred} - #phi_{hit}, 2nd layer> (rad)",-0.004,0.004);
00086 profileX("seedDphi2Pos_VsPt","mean ele seed dphi 2nd layer positron vs pt","p_{T} (GeV/c)","<#phi_{pred} - #phi_{hit}, 2nd layer> (rad)",-0.004,0.004);
00087 profileX("seedDrz2Pos_VsEta","mean ele seed dr(dz) 2nd layer positron vs eta","#eta","<r(z)_{pred} - r(z)_{hit}, 2nd layer> (cm)",-0.15,0.15);
00088 profileX("seedDrz2Pos_VsPt","mean ele seed dr(dz) 2nd layer positron vs pt","p_{T} (GeV/c)","<r(z)_{pred} - r(z)_{hit}, 2nd layer> (cm)",-0.15,0.15);
00089 }
00090
00091