CMS 3D CMS Logo

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

#include <ElectronOfflineClient.h>

Inheritance diagram for ElectronOfflineClient:
ElectronDqmAnalyzerBase edm::EDAnalyzer

Public Member Functions

 ElectronOfflineClient (const edm::ParameterSet &)
 
virtual void finalize ()
 
virtual ~ElectronOfflineClient ()
 
- Public Member Functions inherited from edm::EDAnalyzer
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 

Private Attributes

std::string effHistoTitle_
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
typedef WorkerT< EDAnalyzerWorkerType
 
- 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 ()
 
virtual void book ()
 
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="")
 
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="")
 
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::EDAnalyzer
CurrentProcessingContext const * currentContext () const
 

Detailed Description

Definition at line 6 of file ElectronOfflineClient.h.

Constructor & Destructor Documentation

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

Definition at line 8 of file ElectronOfflineClient.cc.

References effHistoTitle_, and edm::ParameterSet::getParameter().

10  {
11  effHistoTitle_ = conf.getParameter<std::string>("EffHistoTitle") ;
12  }
T getParameter(std::string const &) const
ElectronDqmAnalyzerBase(const edm::ParameterSet &conf)
ElectronOfflineClient::~ElectronOfflineClient ( )
virtual

Definition at line 14 of file ElectronOfflineClient.cc.

15  {}

Member Function Documentation

void ElectronOfflineClient::finalize ( void  )
virtual

Reimplemented from ElectronDqmAnalyzerBase.

Definition at line 17 of file ElectronOfflineClient.cc.

References ElectronDqmAnalyzerBase::bookH1andDivide(), effHistoTitle_, and ElectronDqmAnalyzerBase::setBookIndex().

18  {
19 // MonitorElement * h1_matchedEle_eta = get("matchedEle_eta");
20 // MonitorElement * h1_matchedEle_eta_golden = get("matchedEle_eta_golden");
21 // MonitorElement * h1_matchedEle_eta_shower = get("matchedEle_eta_shower");
22 // //MonitorElement * h1_matchedEle_eta_bbrem = get("matchedEle_eta_bbrem");
23 // //MonitorElement * h1_matchedEle_eta_narrow = get("matchedEle_eta_narrow");
24 // MonitorElement * h1_matchedEle_eta_goldenFrac = cloneH1("matchedEle_eta_goldenFrac","matchedEle_eta","fraction of golden electrons") ;
25 // MonitorElement * h1_matchedEle_eta_showerFrac = cloneH1("matchedEle_eta_showerFrac","matchedEle_eta","fraction of showering electrons") ;
26 // //MonitorElement * h1_matchedEle_eta_bbremFrac = cloneH1("matchedEle_eta_bbremFrac","matchedEle_eta","fraction of bbrem electrons") ;
27 // //MonitorElement * h1_matchedEle_eta_narrowFrac = cloneH1("matchedEle_eta_narrowFrac","matchedEle_eta","fraction of narrow electrons") ;
28 // int nb, nbins=h_matchedEle_eta->getNbinsX() ;
29 // for ( nb=0 ; nb<nbins ; ++nb )
30 // {
31 // float content = h1_matchedEle_eta->getBinContent(nb) ;
32 // if (content==0.) continue ;
33 // float contgold =( h1_matchedEle_eta_golden->getBinContent(nb))/content ;
34 // float contshower =( h1_matchedEle_eta_shower->getBinContent(nb))/content ;
35 // //float contbbrem =( h1_matchedEle_eta_bbrem->getBinContent(nb))/content ;
36 // //float contnarrow =( h1_matchedEle_eta_narrow->getBinContent(nb))/content ;
37 // h1_matchedEle_eta_goldenFrac ->setBinContent(nb,contgold) ;
38 // h1_matchedEle_eta_showerFrac ->setBinContent(nb,contshower) ;
39 // //h1_matchedEle_eta_bbremFrac ->setBinContent(nb,contbbrem) ;
40 // //h1_matchedEle_eta_narrowFrac ->setBinContent(nb,contnarrow) ;
41 // }
42 // remove("matchedEle_eta") ;
43 // remove("matchedEle_eta_golden") ;
44 // remove("matchedEle_eta_shower") ;
45 // //remove("matchedEle_eta_bbrem") ;
46 // //remove("matchedEle_eta_narrow") ;
47 
48  setBookIndex(100) ;
49  if (effHistoTitle_=="")
50  {
51  bookH1andDivide("ptEff","matchedObject_Pt","matchingObject_Pt","p_{T} (GeV/c)","Efficiency","efficiency vs p_{T}") ;
52  bookH1andDivide("etaEff","matchedObject_Eta","matchingObject_Eta","#eta","Efficiency","efficiency vs #eta") ;
53  // bookH1andDivide("absEtaEff","matchedObject_AbsEta","matchingObject_AbsEta","|#eta|","Efficiency","efficiency vs |#eta|") ;
54  bookH1andDivide("phiEff","matchedObject_Phi","matchingObject_Phi","#phi (rad)","Efficiency","efficiency vs #phi") ;
55 // bookH1andDivide("zEff","matchedObject_Z","matchingObject_Z","z (cm)","Efficiency","efficiency vs z") ;
56  }
57  else
58  {
59  bookH1andDivide("ptEff","matchedObject_Pt","matchingObject_Pt","p_{T} (GeV/c)","Efficiency",effHistoTitle_) ;
60  bookH1andDivide("etaEff","matchedObject_Eta","matchingObject_Eta","#eta","Efficiency",effHistoTitle_) ;
61  // bookH1andDivide("absEtaEff","matchedObject_AbsEta","matchingObject_AbsEta","|#eta|","Efficiency",effHistoTitle_) ;
62  bookH1andDivide("phiEff","matchedObject_Phi","matchingObject_Phi","#phi (rad)","Efficiency",effHistoTitle_) ;
63 // bookH1andDivide("zEff","matchedObject_Z","matchingObject_Z","z (cm)","Efficiency",effHistoTitle_) ;
64  }
65 
66  remove("matchedObject_Pt") ;
67  remove("matchedObject_Eta") ;
68 // remove("matchedObject_AbsEta") ;
69  remove("matchedObject_Phi") ;
70 // remove("matchedObject_Z") ;
71 
72  remove("matchingObject_Pt") ;
73  remove("matchingObject_Eta") ;
74 // remove("matchingObject_AbsEta") ;
75  remove("matchingObject_Phi") ;
76 // remove("matchingObject_Z") ;
77  }
MonitorElement * bookH1andDivide(const std::string &name, MonitorElement *num, MonitorElement *denom, const std::string &titleX, const std::string &titleY, const std::string &title="")

Member Data Documentation

std::string ElectronOfflineClient::effHistoTitle_
private

Definition at line 17 of file ElectronOfflineClient.h.

Referenced by ElectronOfflineClient(), and finalize().