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
PFCandidateManagerAnalyzer Class Reference

#include <PFCandidateManagerAnalyzer.h>

Inheritance diagram for PFCandidateManagerAnalyzer:
BenchmarkAnalyzer PFCandidateManager edm::EDAnalyzer Benchmark

Public Member Functions

void analyze (const edm::Event &, const edm::EventSetup &)
 
void beginJob ()
 
void endJob ()
 
 PFCandidateManagerAnalyzer (const edm::ParameterSet &parameterSet)
 
- Public Member Functions inherited from BenchmarkAnalyzer
 BenchmarkAnalyzer ()
 
 BenchmarkAnalyzer (const edm::ParameterSet &)
 
virtual ~BenchmarkAnalyzer ()
 
- Public Member Functions inherited from edm::EDAnalyzer
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- 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)
 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 ()
 book histograms More...
 
virtual ~PFCandidateManager ()
 
- 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 ()
 

Private Attributes

edm::InputTag matchLabel_
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
typedef WorkerT< EDAnalyzerWorkerType
 
- Public Types inherited from Benchmark
enum  Mode { DEFAULT, DQMOFFLINE, VALIDATION }
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
- Static Public Attributes inherited from Benchmark
static DQMStoreDQM_ = 0
 
- Protected Member Functions inherited from edm::EDAnalyzer
CurrentProcessingContext const * currentContext () const
 
- Protected Member Functions inherited from Benchmark
TH1F * book1D (const char *histname, const char *title, int nbins, float xmin, float xmax)
 book a 1D histogram, either with DQM or plain root. More...
 
TH2F * book2D (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. More...
 
TH2F * book2D (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. More...
 
- Protected Attributes inherited from BenchmarkAnalyzer
std::string benchmarkLabel_
 benchmark label More...
 
edm::InputTag inputLabel_
 input collection More...
 
std::string outputFile_
 name of the output root file More...
 
- 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 11 of file PFCandidateManagerAnalyzer.h.

Constructor & Destructor Documentation

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

Definition at line 23 of file PFCandidateManagerAnalyzer.cc.

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

23  :
24  BenchmarkAnalyzer(parameterSet),
25  PFCandidateManager( parameterSet.getParameter<double>("dRMax"),
26  parameterSet.getParameter<bool>("matchCharge"),
27  (Benchmark::Mode) parameterSet.getParameter<int>("mode") ),
28  matchLabel_( parameterSet.getParameter<InputTag>("MatchCollection") )
29 {
30  setRange( parameterSet.getParameter<double>("ptMin"),
31  parameterSet.getParameter<double>("ptMax"),
32  parameterSet.getParameter<double>("etaMin"),
33  parameterSet.getParameter<double>("etaMax"),
34  parameterSet.getParameter<double>("phiMin"),
35  parameterSet.getParameter<double>("phiMax") );
36 
37 }
T getParameter(std::string const &) const
PFCandidateManager(float dRMax=0.3, bool matchCharge=true, Benchmark::Mode mode=Benchmark::DEFAULT)
void setRange(float ptMin, float ptMax, float etaMin, float etaMax, float phiMin, float phiMax)
Definition: Benchmark.h:51

Member Function Documentation

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

Implements edm::EDAnalyzer.

Definition at line 49 of file PFCandidateManagerAnalyzer.cc.

References runEdmFileComparison::collection, PFCandidateManager::fill(), edm::Event::getByLabel(), BenchmarkAnalyzer::inputLabel_, and matchLabel_.

50  {
51 
52 
53 
55  iEvent.getByLabel( inputLabel_, collection);
56 
57  Handle< View<Candidate> > matchCollection;
58  iEvent.getByLabel( matchLabel_, matchCollection);
59 
60  fill( *collection, *matchCollection );
61 }
edm::InputTag inputLabel_
input collection
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:359
void fill(const reco::PFCandidateCollection &candCollection, const C &matchedCandCollection)
fill histograms with all particle
void PFCandidateManagerAnalyzer::beginJob ( void  )
virtual

Implements BenchmarkAnalyzer.

Definition at line 41 of file PFCandidateManagerAnalyzer.cc.

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

42 {
43 
45  setup();
46 }
virtual void beginJob()=0
void setup()
book histograms
void PFCandidateManagerAnalyzer::endJob ( void  )
virtual

Reimplemented from edm::EDAnalyzer.

Definition at line 63 of file PFCandidateManagerAnalyzer.cc.

63  {
64 }

Member Data Documentation

edm::InputTag PFCandidateManagerAnalyzer::matchLabel_
private

Definition at line 21 of file PFCandidateManagerAnalyzer.h.

Referenced by analyze().