CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
PFCandidateManagerAnalyzer.cc
Go to the documentation of this file.
2 
7 
10 
13 
14 // #include "DQMServices/Core/interface/MonitorElement.h"
15 // #include <TH1F.h>
16 
17 using namespace reco;
18 using namespace edm;
19 using namespace std;
20 
21 
22 
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 }
38 
39 
40 void
42 {
43 
45  setup();
46 }
47 
48 void
50  const edm::EventSetup& iSetup) {
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 }
62 
64 }
T getParameter(std::string const &) const
A benchmark managing several benchmarks.
virtual void beginJob()=0
abstract base class
Definition: Benchmark.h:20
edm::InputTag inputLabel_
input collection
PFCandidateManagerAnalyzer(const edm::ParameterSet &parameterSet)
int iEvent
Definition: GenABIO.cc:243
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:356
void analyze(const edm::Event &, const edm::EventSetup &)
void setRange(float ptMin, float ptMax, float etaMin, float etaMax, float phiMin, float phiMax)
Definition: Benchmark.h:51
abtract base class for benchmark analyzers
void fill(const reco::PFCandidateCollection &candCollection, const C &matchedCandCollection)
fill histograms with all particle
void setup()
book histograms