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 
15 using namespace reco;
16 using namespace edm;
17 using namespace std;
18 
19 
20 
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 }
39 
40 
42  edm::Run const & iRun,
43  edm::EventSetup const & iSetup )
44 {
45  BenchmarkAnalyzer::bookHistograms(ibooker, iRun, iSetup);
46  setup(ibooker);
47 }
48 
49 void
51  const edm::EventSetup& iSetup) {
52 
54  iEvent.getByToken(myColl_, collection);
55 
56  Handle< View<Candidate> > matchCollection;
57  iEvent.getByToken(myMatchColl_, matchCollection);
58 
59  fill( *collection, *matchCollection );
60 }
61 
T getParameter(std::string const &) const
A benchmark managing several benchmarks.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:457
abstract base class
Definition: Benchmark.h:22
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
edm::InputTag inputLabel_
input collection
PFCandidateManagerAnalyzer(const edm::ParameterSet &parameterSet)
int iEvent
Definition: GenABIO.cc:230
void setup(DQMStore::IBooker &b)
book histograms
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
edm::EDGetTokenT< reco::PFCandidateCollection > myColl_
void analyze(const edm::Event &, const edm::EventSetup &)
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
abtract base class for benchmark analyzers
void fill(const reco::PFCandidateCollection &candCollection, const C &matchedCandCollection)
fill histograms with all particle
ParameterSet const & parameterSet(Provenance const &provenance)
Definition: Provenance.cc:11
Definition: Run.h:41