CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
PFCandidateManagerAnalyzer Class Reference

#include <PFCandidateManagerAnalyzer.h>

Inheritance diagram for PFCandidateManagerAnalyzer:
BenchmarkAnalyzer PFCandidateManager 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
 
 PFCandidateManagerAnalyzer (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 PFCandidateManager
template<class C >
void fill (const reco::PFCandidateCollection &candCollection, const C &matchedCandCollection)
 fill histograms with all particle More...
 
 PFCandidateManager (float dRMax=0.3, bool matchCharge=true, Benchmark::Mode mode=Benchmark::DEFAULT)
 
void setDirectory (TDirectory *dir) override
 set directory (to use in ROOT) More...
 
void setParameters (float dRMax=0.3, bool matchCharge=true, Benchmark::Mode mode=Benchmark::DEFAULT)
 set the benchmark parameters More...
 
void setup (DQMStore::IBooker &b)
 book histograms More...
 
 ~PFCandidateManager () override
 
- Public Member Functions inherited from Benchmark
 Benchmark (Mode mode=DEFAULT)
 
bool isInRange (float pt, float eta, float phi) const
 
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 ()(false)
 

Private Attributes

edm::InputTag matchLabel_
 
edm::EDGetTokenT< reco::PFCandidateCollectionmyColl_
 
edm::EDGetTokenT< edm::View< reco::Candidate > > myMatchColl_
 

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 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...
 
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...
 
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...
 
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 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 PFCandidateManager
CandidateBenchmark candBench_
 
float dRMax_
 
MatchCandidateBenchmark matchCandBench_
 
bool matchCharge_
 
PFCandidateBenchmark pfCandBench_
 
- 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 12 of file PFCandidateManagerAnalyzer.h.

Constructor & Destructor Documentation

PFCandidateManagerAnalyzer::PFCandidateManagerAnalyzer ( const edm::ParameterSet parameterSet)

Definition at line 21 of file PFCandidateManagerAnalyzer.cc.

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

21  :
22  BenchmarkAnalyzer(parameterSet),
23  PFCandidateManager( parameterSet.getParameter<double>("dRMax"),
24  parameterSet.getParameter<bool>("matchCharge"),
25  (Benchmark::Mode) parameterSet.getParameter<int>("mode") ),
26  matchLabel_( parameterSet.getParameter<InputTag>("MatchCollection") )
27 {
28  setRange( parameterSet.getParameter<double>("ptMin"),
29  parameterSet.getParameter<double>("ptMax"),
30  parameterSet.getParameter<double>("etaMin"),
31  parameterSet.getParameter<double>("etaMax"),
32  parameterSet.getParameter<double>("phiMin"),
33  parameterSet.getParameter<double>("phiMax") );
34 
35  myColl_ = consumes< PFCandidateCollection >(inputLabel_);
36  myMatchColl_ = consumes< View<Candidate> >(matchLabel_);
37 
38 }
T getParameter(std::string const &) const
edm::InputTag inputLabel_
input collection
PFCandidateManager(float dRMax=0.3, bool matchCharge=true, Benchmark::Mode mode=Benchmark::DEFAULT)
edm::EDGetTokenT< reco::PFCandidateCollection > myColl_
edm::EDGetTokenT< edm::View< reco::Candidate > > myMatchColl_
void setRange(float ptMin, float ptMax, float etaMin, float etaMax, float phiMin, float phiMax)
Definition: Benchmark.h:51
BenchmarkAnalyzer()
Constructors.

Member Function Documentation

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

Definition at line 50 of file PFCandidateManagerAnalyzer.cc.

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

51  {
52 
54  iEvent.getByToken(myColl_, collection);
55 
56  Handle< View<Candidate> > matchCollection;
57  iEvent.getByToken(myMatchColl_, matchCollection);
58 
59  fill( *collection, *matchCollection );
60 }
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:579
edm::EDGetTokenT< reco::PFCandidateCollection > myColl_
edm::EDGetTokenT< edm::View< reco::Candidate > > myMatchColl_
void fill(const reco::PFCandidateCollection &candCollection, const C &matchedCandCollection)
fill histograms with all particle
void PFCandidateManagerAnalyzer::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  iRun,
edm::EventSetup const &  iSetup 
)
override

Definition at line 41 of file PFCandidateManagerAnalyzer.cc.

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

44 {
45  BenchmarkAnalyzer::bookHistograms(ibooker, iRun, iSetup);
46  setup(ibooker);
47 }
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
void setup(DQMStore::IBooker &b)
book histograms

Member Data Documentation

edm::InputTag PFCandidateManagerAnalyzer::matchLabel_
private

Definition at line 24 of file PFCandidateManagerAnalyzer.h.

Referenced by PFCandidateManagerAnalyzer().

edm::EDGetTokenT< reco::PFCandidateCollection > PFCandidateManagerAnalyzer::myColl_
private

Definition at line 22 of file PFCandidateManagerAnalyzer.h.

Referenced by analyze(), and PFCandidateManagerAnalyzer().

edm::EDGetTokenT< edm::View<reco::Candidate> > PFCandidateManagerAnalyzer::myMatchColl_
private

Definition at line 23 of file PFCandidateManagerAnalyzer.h.

Referenced by analyze(), and PFCandidateManagerAnalyzer().