CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
CandidateBenchmarkAnalyzer Class Reference

#include <CandidateBenchmarkAnalyzer.h>

Inheritance diagram for CandidateBenchmarkAnalyzer:
BenchmarkAnalyzer CandidateBenchmark one::DQMEDAnalyzer< T > Benchmark one::dqmimplementation::DQMBaseClass< T... >

Public Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
 CandidateBenchmarkAnalyzer (const edm::ParameterSet &parameterSet)
 
- Public Member Functions inherited from BenchmarkAnalyzer
 BenchmarkAnalyzer ()
 Constructors. More...
 
 BenchmarkAnalyzer (const edm::ParameterSet &)
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
 ~BenchmarkAnalyzer () override
 Destructor. More...
 
- Public Member Functions inherited from one::DQMEDAnalyzer< T >
 DQMEDAnalyzer ()=default
 
 DQMEDAnalyzer (DQMEDAnalyzer< T... > const &)=delete
 
 DQMEDAnalyzer (DQMEDAnalyzer< T... > &&)=delete
 
 ~DQMEDAnalyzer () override=default
 
- Public Member Functions inherited from CandidateBenchmark
 CandidateBenchmark (Mode mode)
 
template<class C >
void fill (const C &candidates)
 
void fillOne (const reco::Candidate &candidate)
 fill histograms with a given particle More...
 
void setup (DQMStore::IBooker &b)
 book histograms More...
 
void setup (DQMStore::IBooker &b, const edm::ParameterSet &parameterSet)
 
 ~CandidateBenchmark () override
 
- Public Member Functions inherited from Benchmark
 Benchmark (Mode mode=DEFAULT)
 
bool isInRange (float pt, float eta, float phi) const
 
virtual void setDirectory (TDirectory *dir)
 
void setParameters (Mode mode)
 
void setRange (float ptMin, float ptMax, float etaMin, float etaMax, float phiMin, float phiMax)
 
void write ()
 
virtual ~Benchmark ()(false)
 

Public Attributes

edm::EDGetTokenT< edm::View< reco::Candidate > > myColl_
 

Additional Inherited Members

- Public Types inherited from Benchmark
enum  Mode { DEFAULT, DQMOFFLINE, VALIDATION }
 
- Protected Member Functions inherited from Benchmark
TH1F * book1D (DQMStore::IBooker &b, const char *histname, const char *title, int nbins, float xmin, float xmax)
 book a 1D histogram, either through IBooker or plain root More...
 
TH2F * book2D (DQMStore::IBooker &b, const char *histname, const char *title, int nbinsx, float xmin, float xmax, int nbinsy, float ymin, float ymax)
 book a 2D histogram, either through IBooker or plain root More...
 
TH2F * book2D (DQMStore::IBooker &b, const char *histname, const char *title, int nbinsx, float *xbins, int nbinsy, float ymin, float ymax)
 book a 2D histogram, either through IBooker or plain root More...
 
TProfile * bookProfile (DQMStore::IBooker &b, const char *histname, const char *title, int nbinsx, float xmin, float xmax, float ymin, float ymax, const char *option)
 book a TProfile, either through IBooker or plain root More...
 
TProfile * bookProfile (DQMStore::IBooker &b, const char *histname, const char *title, int nbinsx, float *xbins, float ymin, float ymax, const char *option)
 book a TProfile, either through IBooker or plain root More...
 
- Protected Attributes inherited from BenchmarkAnalyzer
std::string benchmarkLabel_
 benchmark label More...
 
std::string eventInfoFolder_
 
edm::InputTag inputLabel_
 input collection More...
 
std::string outputFile_
 name of the output root file More...
 
std::string subsystemname_
 
- Protected Attributes inherited from CandidateBenchmark
TH1F * charge_
 
TH1F * eta_
 
bool histogramBooked_
 
TH1F * pdgId_
 COLIN add this histo. More...
 
TH1F * phi_
 
TH1F * pt_
 
- Protected Attributes inherited from Benchmark
TDirectory * dir_
 
float etaMax_
 
float etaMin_
 
Mode mode_
 
float phiMax_
 
float phiMin_
 
float ptMax_
 
float ptMin_
 

Detailed Description

Definition at line 11 of file CandidateBenchmarkAnalyzer.h.

Constructor & Destructor Documentation

CandidateBenchmarkAnalyzer::CandidateBenchmarkAnalyzer ( const edm::ParameterSet parameterSet)

Definition at line 17 of file CandidateBenchmarkAnalyzer.cc.

References edm::ParameterSet::getParameter(), BenchmarkAnalyzer::inputLabel_, myColl_, and Benchmark::setRange().

18  : BenchmarkAnalyzer(parameterSet), CandidateBenchmark((Benchmark::Mode)parameterSet.getParameter<int>("mode")) {
19  setRange(parameterSet.getParameter<double>("ptMin"),
20  parameterSet.getParameter<double>("ptMax"),
21  parameterSet.getParameter<double>("etaMin"),
22  parameterSet.getParameter<double>("etaMax"),
23  parameterSet.getParameter<double>("phiMin"),
24  parameterSet.getParameter<double>("phiMax"));
25 
26  myColl_ = consumes<View<Candidate>>(inputLabel_);
27 }
T getParameter(std::string const &) const
edm::EDGetTokenT< edm::View< reco::Candidate > > myColl_
edm::InputTag inputLabel_
input collection
void setRange(float ptMin, float ptMax, float etaMin, float etaMax, float phiMin, float phiMax)
Definition: Benchmark.h:41
BenchmarkAnalyzer()
Constructors.

Member Function Documentation

void CandidateBenchmarkAnalyzer::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
override

Definition at line 36 of file CandidateBenchmarkAnalyzer.cc.

References universalConfigTemplate::collection, CandidateBenchmark::fill(), edm::Event::getByToken(), and myColl_.

36  {
38  iEvent.getByToken(myColl_, collection);
39 
40  fill(*collection);
41 }
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:517
void fill(const C &candidates)
edm::EDGetTokenT< edm::View< reco::Candidate > > myColl_
void CandidateBenchmarkAnalyzer::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  iRun,
edm::EventSetup const &  iSetup 
)
override

Definition at line 29 of file CandidateBenchmarkAnalyzer.cc.

References BenchmarkAnalyzer::bookHistograms(), and CandidateBenchmark::setup().

31  {
32  BenchmarkAnalyzer::bookHistograms(ibooker, iRun, iSetup);
33  setup(ibooker);
34 }
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
void setup(DQMStore::IBooker &b)
book histograms

Member Data Documentation

edm::EDGetTokenT<edm::View<reco::Candidate> > CandidateBenchmarkAnalyzer::myColl_

Definition at line 19 of file CandidateBenchmarkAnalyzer.h.

Referenced by analyze(), and CandidateBenchmarkAnalyzer().