CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions
ElectronMcFakePostValidator Class Reference

#include <ElectronMcFakePostValidator.h>

Inheritance diagram for ElectronMcFakePostValidator:
ElectronDqmAnalyzerBase edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

virtual void book ()
 
 ElectronMcFakePostValidator (const edm::ParameterSet &conf)
 
virtual void finalize ()
 
virtual ~ElectronMcFakePostValidator ()
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from ElectronDqmAnalyzerBase
virtual void analyze (const edm::Event &e, const edm::EventSetup &c)
 
void beginJob ()
 
MonitorElementbookH1 (const std::string &name, const std::string &title, int nchX, double lowX, double highX, const std::string &titleX="", const std::string &titleY="Events", Option_t *option="E1 P")
 
MonitorElementbookH1andDivide (const std::string &name, MonitorElement *num, MonitorElement *denom, const std::string &titleX, const std::string &titleY, const std::string &title="", const std::string &setEfficiencyFlag="")
 
MonitorElementbookH1andDivide (const std::string &name, const std::string &num, const std::string &denom, const std::string &titleX, const std::string &titleY, const std::string &title="", const std::string &setEfficiencyFlag="")
 
MonitorElementbookH1withSumw2 (const std::string &name, const std::string &title, int nchX, double lowX, double highX, const std::string &titleX="", const std::string &titleY="Events", Option_t *option="E1 P")
 
MonitorElementbookH2 (const std::string &name, const std::string &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const std::string &titleX="", const std::string &titleY="", Option_t *option="COLZ")
 
MonitorElementbookH2andDivide (const std::string &name, MonitorElement *num, MonitorElement *denom, const std::string &titleX, const std::string &titleY, const std::string &title="")
 
MonitorElementbookH2andDivide (const std::string &name, const std::string &num, const std::string &denom, const std::string &titleX, const std::string &titleY, const std::string &title="")
 
MonitorElementbookH2withSumw2 (const std::string &name, const std::string &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const std::string &titleX="", const std::string &titleY="", Option_t *option="COLZ")
 
MonitorElementbookP1 (const std::string &name, const std::string &title, int nchX, double lowX, double highX, double lowY, double highY, const std::string &titleX="", const std::string &titleY="", Option_t *option="E1 P")
 
MonitorElementcloneH1 (const std::string &name, MonitorElement *original, const std::string &title="")
 
MonitorElementcloneH1 (const std::string &name, const std::string &original, const std::string &title="")
 
 ElectronDqmAnalyzerBase (const edm::ParameterSet &conf)
 
virtual void endJob ()
 
virtual void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &)
 
virtual void endRun (edm::Run const &, edm::EventSetup const &)
 
bool finalStepDone ()
 
MonitorElementget (const std::string &name)
 
MonitorElementprofileX (MonitorElement *me2d, const std::string &title="", const std::string &titleX="", const std::string &titleY="", Double_t minimum=-1111, Double_t maximum=-1111)
 
MonitorElementprofileX (const std::string &me2d, const std::string &title="", const std::string &titleX="", const std::string &titleY="", Double_t minimum=-1111, Double_t maximum=-1111)
 
MonitorElementprofileY (MonitorElement *me2d, const std::string &title="", const std::string &titleX="", const std::string &titleY="", Double_t minimum=-1111, Double_t maximum=-1111)
 
MonitorElementprofileY (const std::string &me2d, const std::string &title="", const std::string &titleX="", const std::string &titleY="", Double_t minimum=-1111, Double_t maximum=-1111)
 
void remove (const std::string &name)
 
void remove_other_dirs ()
 
void setBookIndex (short)
 
void setBookPrefix (const std::string &)
 
int verbosity ()
 
virtual ~ElectronDqmAnalyzerBase ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

Definition at line 7 of file ElectronMcFakePostValidator.h.

Constructor & Destructor Documentation

ElectronMcFakePostValidator::ElectronMcFakePostValidator ( const edm::ParameterSet conf)
explicit

Definition at line 6 of file ElectronMcFakePostValidator.cc.

8  {}
ElectronDqmAnalyzerBase(const edm::ParameterSet &conf)
ElectronMcFakePostValidator::~ElectronMcFakePostValidator ( )
virtual

Definition at line 10 of file ElectronMcFakePostValidator.cc.

11  {}

Member Function Documentation

void ElectronMcFakePostValidator::book ( )
virtual

Reimplemented from ElectronDqmAnalyzerBase.

Definition at line 13 of file ElectronMcFakePostValidator.cc.

References ElectronDqmAnalyzerBase::setBookIndex().

14  { setBookIndex(-1) ; }
void ElectronMcFakePostValidator::finalize ( void  )
virtual

Reimplemented from ElectronDqmAnalyzerBase.

Definition at line 16 of file ElectronMcFakePostValidator.cc.

References ElectronDqmAnalyzerBase::bookH1andDivide(), ElectronDqmAnalyzerBase::bookH1withSumw2(), MonitorElement::getBinContent(), MonitorElement::getTProfile(), fff_deleter::log, ElectronDqmAnalyzerBase::profileX(), MonitorElement::setBinContent(), and ElectronDqmAnalyzerBase::setBookPrefix().

17  {
18  setBookPrefix("h_ele") ;
19 
20  edm::LogInfo("ElectronMcFakePostValidator::finalize") << "efficiency calculation " ;
21  bookH1andDivide("etaEff","matchingObjectEta_matched","matchingObject_eta","#eta","Efficiency","", "true");
22  bookH1andDivide("zEff","matchingObjectZ_matched","matchingObject_z","z (cm)","Efficiency","", "true");
23  bookH1andDivide("absetaEff","matchingObjectAbsEta_matched","matchingObject_abseta","|#eta|","Efficiency","", "true");
24  bookH1andDivide("ptEff","matchingObjectPt_matched","matchingObject_Pt","p_{T} (GeV/c)","Efficiency","", "true");
25  bookH1andDivide("phiEff","matchingObjectPhi_matched","matchingObject_phi","#phi (rad)","Efficiency","", "true");
26 // bookH2andDivide("ptEtaEff","matchingObjectPtEta_matched","matchingObjectPtEta","#eta","p_{T} (GeV/c)","");
27 //
28 // std::cout << "[ElectronMcFakePostValidator] q-misid calculation " << std::endl;
29 // bookH1andDivide("etaQmisid","matchingObjectEta_matched_qmisid","h_simEta","#eta","q misId","","");
30 // bookH1andDivide("zQmisid","matchingObjectZ_matched_qmisid","h_simZ","z (cm)","q misId","","");
31 // bookH1andDivide("absetaQmisid","matchingObjectAbsEta_matched_qmisid","h_simAbsEta","|#eta|","q misId","","");
32 // bookH1andDivide("ptQmisid","matchingObjectPt_matched_qmisid","h_simPt","p_{T} (GeV/c)","q misId","","");
33 
34  edm::LogInfo("ElectronMcFakePostValidator::finalize") << "all reco electrons " ;
35  bookH1andDivide("etaEff_all","vertexEta_all","matchingObject_eta","#eta","N_{rec}/N_{gen}","","");
36  bookH1andDivide("ptEff_all", "vertexPt_all","matchingObject_Pt","p_{T} (GeV/c)","N_{rec}/N_{gen}","","");
37 
38  edm::LogInfo("ElectronMcFakePostValidator::finalize") << "classes" ;
39  bookH1andDivide("eta_goldenFrac","eta_golden","h_ele_eta","|#eta|","Fraction of electrons","fraction of golden electrons vs eta","");
40  bookH1andDivide("eta_bbremFrac" ,"eta_bbrem", "h_ele_eta","|#eta|","Fraction of electrons","fraction of big brem electrons vs eta","");
41 // bookH1andDivide("eta_narrowFrac","eta_narrow","h_ele_eta","|#eta|","Fraction of electrons","fraction of narrow electrons vs eta","");
42  bookH1andDivide("eta_showerFrac","eta_shower","h_ele_eta","|#eta|","Fraction of electrons","fraction of showering electrons vs eta","");
43 
44  // fbrem
45  MonitorElement * p1_ele_fbremVsEta_mean = get("fbremvsEtamean") ;
46  if( p1_ele_fbremVsEta_mean ) {
47  TAxis * etaAxis = p1_ele_fbremVsEta_mean->getTProfile()->GetXaxis() ;
48  MonitorElement * h1_ele_xOverX0VsEta = bookH1withSumw2("xOverx0VsEta","mean X/X_0 vs eta",etaAxis->GetNbins(),etaAxis->GetXmin(),etaAxis->GetXmax());
49  for (int ibin=1;ibin<etaAxis->GetNbins()+1;ibin++) {
50  double xOverX0 = 0.;
51  if (p1_ele_fbremVsEta_mean->getBinContent(ibin)>0.)
52  { xOverX0 = -log(p1_ele_fbremVsEta_mean->getBinContent(ibin)) ; }
53  h1_ele_xOverX0VsEta->setBinContent(ibin,xOverX0) ;
54  }
55  }
56 
57  // profiles from 2D histos
58  profileX("PoPmatchingObjectVsEta","","#eta","<P/P_{gen}>");
59  profileX("PoPmatchingObjectVsPhi","","#phi (rad)","<P/P_{gen}>");
60  profileX("EtaMnEtamatchingObjectVsEta","","#eta","<#eta_{rec} - #eta_{gen}>");
61  profileX("EtaMnEtamatchingObjectVsPhi","","#phi (rad)","<#eta_{rec} - #eta_{gen}>");
62  profileX("PhiMnPhimatchingObjectVsEta","","#eta","<#phi_{rec} - #phi_{gen}> (rad)");
63  profileX("PhiMnPhimatchingObjectVsPhi","","#phi (rad)","");
64  profileX("vertexPtVsEta","mean ele transverse momentum vs eta","#eta","<p_{T}> (GeV/c)");
65  profileX("vertexPtVsPhi","mean ele transverse momentum vs phi","#phi (rad)","<p_{T}> (GeV/c)");
66  profileX("EoPVsEta","mean ele E/p vs eta","#eta","<E/P_{vertex}>");
67  profileX("EoPVsPhi","mean ele E/p vs phi","#phi (rad)","<E/P_{vertex}>");
68  profileX("EoPoutVsEta","mean ele E/pout vs eta","#eta","<E_{seed}/P_{out}>");
69  profileX("EoPoutVsPhi","mean ele E/pout vs phi","#phi (rad)","<E_{seed}/P_{out}>");
70  profileX("EeleOPoutVsEta","mean ele Eele/pout vs eta","#eta","<E_{ele}/P_{out}>");
71  profileX("EeleOPoutVsPhi","mean ele Eele/pout vs phi","#phi (rad)","<E_{ele}/P_{out}>");
72  profileX("HoEVsEta","mean ele H/E vs eta","#eta","<H/E>");
73  profileX("HoEVsPhi","mean ele H/E vs phi","#phi (rad)","<H/E>");
74  profileX("chi2VsEta","mean ele track chi2 vs eta","#eta","<#Chi^{2}>");
75  profileX("chi2VsPhi","mean ele track chi2 vs phi","#phi (rad)","<#Chi^{2}>");
76  profileX("foundHitsVsEta","mean ele track # found hits vs eta","#eta","<N_{hits}>");
77  profileX("foundHitsVsPhi","mean ele track # found hits vs phi","#phi (rad)","<N_{hits}>");
78  profileX("lostHitsVsEta","mean ele track # lost hits vs eta","#eta","<N_{hits}>");
79  profileX("lostHitsVsPhi","mean ele track # lost hits vs phi","#phi (rad)","<N_{hits}>");
80  profileX("vertexTIPVsEta","mean tip (wrt gen vtx) vs eta","#eta","<TIP> (cm)");
81  profileX("vertexTIPVsPhi","mean tip (wrt gen vtx) vs phi","#phi","<TIP> (cm)");
82  profileX("vertexTIPVsPt","mean tip (wrt gen vtx) vs phi","p_{T} (GeV/c)","<TIP> (cm)");
83  profileX("seedDphi2_VsEta","mean ele seed dphi 2nd layer vs eta","#eta","<#phi_{pred} - #phi_{hit}, 2nd layer> (rad)",-0.004,0.004);
84  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);
85  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);
86  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);
87  profileX("seedDphi2Pos_VsEta","mean ele seed dphi 2nd layer positron vs eta","#eta","<#phi_{pred} - #phi_{hit}, 2nd layer> (rad)",-0.004,0.004);
88  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);
89  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);
90  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);
91  }
void setBinContent(int binx, double content)
set content of bin (1-D)
MonitorElement * bookH1withSumw2(const std::string &name, const std::string &title, int nchX, double lowX, double highX, const std::string &titleX="", const std::string &titleY="Events", Option_t *option="E1 P")
MonitorElement * profileX(MonitorElement *me2d, const std::string &title="", const std::string &titleX="", const std::string &titleY="", Double_t minimum=-1111, Double_t maximum=-1111)
void setBookPrefix(const std::string &)
MonitorElement * bookH1andDivide(const std::string &name, MonitorElement *num, MonitorElement *denom, const std::string &titleX, const std::string &titleY, const std::string &title="", const std::string &setEfficiencyFlag="")
double getBinContent(int binx) const
get content of bin (1-D)
TProfile * getTProfile(void) const