CMS 3D CMS Logo

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

#include <CandidateBenchmarkAnalyzer.h>

Inheritance diagram for CandidateBenchmarkAnalyzer:
BenchmarkAnalyzer CandidateBenchmark DQMEDAnalyzer Benchmark edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >

Public Types

typedef dqm::legacy::DQMStore DQMStore
 
- Public Types inherited from DQMEDAnalyzer
typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::MonitorElement MonitorElement
 
- Public Types inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from Benchmark
typedef dqm::legacy::DQMStore DQMStore
 
enum  Mode { DEFAULT, DQMOFFLINE, VALIDATION }
 

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 &)
 
 ~BenchmarkAnalyzer () override
 Destructor. More...
 
- Public Member Functions inherited from DQMEDAnalyzer
void accumulate (edm::Event const &event, edm::EventSetup const &setup) final
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
void beginStream (edm::StreamID id) final
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer ()
 
void endLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void endRun (edm::Run const &run, edm::EventSetup const &setup) final
 
virtual bool getCanSaveByLumi ()
 
- Public Member Functions inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
 EDProducer ()=default
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
- 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 ()
 write to the TFile, in plain ROOT mode. No need to call this function in DQM mode More...
 
virtual ~Benchmark () noexcept(false)
 

Public Attributes

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

Additional Inherited Members

- Static Public Member Functions inherited from DQMEDAnalyzer
static void globalEndJob (DQMEDAnalyzerGlobalCache const *)
 
static void globalEndLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &setup, LuminosityBlockContext const *context)
 
static void globalEndRunProduce (edm::Run &run, edm::EventSetup const &setup, RunContext const *context)
 
static std::unique_ptr< DQMEDAnalyzerGlobalCacheinitializeGlobalCache (edm::ParameterSet const &)
 
- Protected Member Functions inherited from DQMEDAnalyzer
uint64_t meId () const
 
- 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 with DQM or plain root depending if DQM_ has been initialized in a child analyzer or not. 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 with DQM or plain root depending if DQM_ has been initialized in a child analyzer or not. 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 with DQM or plain root depending if DQM_ has been initialized in a child analyzer or not. 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...
 
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 histogram, either with DQM or plain root depending if DQM_ has been initialized in a child analyzer or not. 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 DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 
unsigned int streamId_
 
- 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.

Member Typedef Documentation

◆ DQMStore

Definition at line 13 of file CandidateBenchmarkAnalyzer.h.

Constructor & Destructor Documentation

◆ CandidateBenchmarkAnalyzer()

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

Definition at line 17 of file CandidateBenchmarkAnalyzer.cc.

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 }

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

Member Function Documentation

◆ analyze()

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

Reimplemented from DQMEDAnalyzer.

Definition at line 36 of file CandidateBenchmarkAnalyzer.cc.

36  {
38  iEvent.getByToken(myColl_, collection);
39 
40  fill(*collection);
41 }

References universalConfigTemplate::collection, CandidateBenchmark::fill(), iEvent, and myColl_.

◆ bookHistograms()

void CandidateBenchmarkAnalyzer::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  iRun,
edm::EventSetup const &  iSetup 
)
overridevirtual

Reimplemented from BenchmarkAnalyzer.

Definition at line 29 of file CandidateBenchmarkAnalyzer.cc.

31  {
32  BenchmarkAnalyzer::bookHistograms(ibooker, iRun, iSetup);
33  setup(ibooker);
34 }

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

Member Data Documentation

◆ myColl_

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

Definition at line 21 of file CandidateBenchmarkAnalyzer.h.

Referenced by analyze(), and CandidateBenchmarkAnalyzer().

CandidateBenchmark::fill
void fill(const C &candidates)
Definition: CandidateBenchmark.h:37
CandidateBenchmark::CandidateBenchmark
CandidateBenchmark(Mode mode)
Definition: CandidateBenchmark.cc:12
BenchmarkAnalyzer::bookHistograms
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Definition: BenchmarkAnalyzer.cc:28
BenchmarkAnalyzer::inputLabel_
edm::InputTag inputLabel_
input collection
Definition: BenchmarkAnalyzer.h:30
Benchmark::setRange
void setRange(float ptMin, float ptMax, float etaMin, float etaMax, float phiMin, float phiMax)
Definition: Benchmark.h:41
edm::Handle
Definition: AssociativeIterator.h:50
CandidateBenchmark::setup
void setup(DQMStore::IBooker &b)
book histograms
Definition: CandidateBenchmark.cc:24
edm::parameterSet
ParameterSet const & parameterSet(StableProvenance const &provenance, ProcessHistory const &history)
Definition: Provenance.cc:11
Benchmark::Mode
Mode
Definition: Benchmark.h:32
iEvent
int iEvent
Definition: GenABIO.cc:224
universalConfigTemplate.collection
collection
Definition: universalConfigTemplate.py:81
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
BenchmarkAnalyzer::BenchmarkAnalyzer
BenchmarkAnalyzer()
Constructors.
CandidateBenchmarkAnalyzer::myColl_
edm::EDGetTokenT< edm::View< reco::Candidate > > myColl_
Definition: CandidateBenchmarkAnalyzer.h:21