CMS 3D CMS Logo

PFCandidateManagerAnalyzer.cc
Go to the documentation of this file.
2 
7 
10 
13 
14 using namespace reco;
15 using namespace edm;
16 using namespace std;
17 
20  PFCandidateManager(parameterSet.getParameter<double>("dRMax"),
21  parameterSet.getParameter<bool>("matchCharge"),
22  (Benchmark::Mode)parameterSet.getParameter<int>("mode")),
23  matchLabel_(parameterSet.getParameter<InputTag>("MatchCollection")) {
24  setRange(parameterSet.getParameter<double>("ptMin"),
25  parameterSet.getParameter<double>("ptMax"),
26  parameterSet.getParameter<double>("etaMin"),
27  parameterSet.getParameter<double>("etaMax"),
28  parameterSet.getParameter<double>("phiMin"),
29  parameterSet.getParameter<double>("phiMax"));
30 
31  myColl_ = consumes<PFCandidateCollection>(inputLabel_);
32  myMatchColl_ = consumes<View<Candidate>>(matchLabel_);
33 }
34 
36  edm::Run const &iRun,
37  edm::EventSetup const &iSetup) {
38  BenchmarkAnalyzer::bookHistograms(ibooker, iRun, iSetup);
39  setup(ibooker);
40 }
41 
44  iEvent.getByToken(myColl_, collection);
45 
46  Handle<View<Candidate>> matchCollection;
47  iEvent.getByToken(myMatchColl_, matchCollection);
48 
49  fill(*collection, *matchCollection);
50 }
A benchmark managing several benchmarks.
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
edm::EDGetTokenT< edm::View< reco::Candidate > > myMatchColl_
abstract base class
Definition: Benchmark.h:19
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
ParameterSet const & parameterSet(StableProvenance const &provenance, ProcessHistory const &history)
Definition: Provenance.cc:11
edm::InputTag inputLabel_
input collection
PFCandidateManagerAnalyzer(const edm::ParameterSet &parameterSet)
int iEvent
Definition: GenABIO.cc:224
void analyze(const edm::Event &, const edm::EventSetup &) override
edm::EDGetTokenT< reco::PFCandidateCollection > myColl_
void setup(DQMStore::IBooker &b)
book histograms
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
void setRange(float ptMin, float ptMax, float etaMin, float etaMax, float phiMin, float phiMax)
Definition: Benchmark.h:41
fixed size matrix
HLT enums.
abtract base class for benchmark analyzers
void fill(const reco::PFCandidateCollection &candCollection, const C &matchedCandCollection)
fill histograms with all particle
Definition: Run.h:45