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 }
Handle.h
Benchmark
abstract base class
Definition: Benchmark.h:19
electrons_cff.bool
bool
Definition: electrons_cff.py:393
PFCandidate.h
edm::Run
Definition: Run.h:45
edm
HLT enums.
Definition: AlignableModifier.h:19
BenchmarkAnalyzer::bookHistograms
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Definition: BenchmarkAnalyzer.cc:28
DQMStore.h
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:45
BenchmarkAnalyzer::inputLabel_
edm::InputTag inputLabel_
input collection
Definition: BenchmarkAnalyzer.h:30
Benchmark::setRange
void setRange(float ptMin, float ptMax, float etaMin, float etaMax, float phiMin, float phiMax)
Definition: Benchmark.h:41
edm::Handle
Definition: AssociativeIterator.h:50
BenchmarkAnalyzer
abtract base class for benchmark analyzers
Definition: BenchmarkAnalyzer.h:14
PFCandidateManagerAnalyzer::myMatchColl_
edm::EDGetTokenT< edm::View< reco::Candidate > > myMatchColl_
Definition: PFCandidateManagerAnalyzer.h:23
Service.h
PFCandidateManager::fill
void fill(const reco::PFCandidateCollection &candCollection, const C &matchedCandCollection)
fill histograms with all particle
Definition: PFCandidateManager.h:63
PFCandidateManagerAnalyzer::matchLabel_
edm::InputTag matchLabel_
Definition: PFCandidateManagerAnalyzer.h:24
edm::ParameterSet
Definition: ParameterSet.h:47
Event.h
Benchmark::Mode
Mode
Definition: Benchmark.h:32
PFCandidateManagerAnalyzer::myColl_
edm::EDGetTokenT< reco::PFCandidateCollection > myColl_
Definition: PFCandidateManagerAnalyzer.h:22
PFCandidateManager
A benchmark managing several benchmarks.
Definition: PFCandidateManager.h:26
createfilelist.int
int
Definition: createfilelist.py:10
iEvent
int iEvent
Definition: GenABIO.cc:224
universalConfigTemplate.collection
collection
Definition: universalConfigTemplate.py:81
PFCandidateManagerAnalyzer::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition: PFCandidateManagerAnalyzer.cc:42
edm::EventSetup
Definition: EventSetup.h:57
PFCandidateManagerAnalyzer::PFCandidateManagerAnalyzer
PFCandidateManagerAnalyzer(const edm::ParameterSet &parameterSet)
Definition: PFCandidateManagerAnalyzer.cc:18
InputTag.h
std
Definition: JetResolutionObject.h:76
PFCandidateManagerAnalyzer.h
PFCandidateManagerAnalyzer::bookHistograms
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Definition: PFCandidateManagerAnalyzer.cc:35
edm::parameterSet
ParameterSet const & parameterSet(Provenance const &provenance, ProcessHistory const &history)
Definition: Provenance.cc:11
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
dqm::implementation::IBooker
Definition: DQMStore.h:43
ParameterSet.h
edm::Event
Definition: Event.h:73
edm::InputTag
Definition: InputTag.h:15
PFCandidateManager::setup
void setup(DQMStore::IBooker &b)
book histograms
Definition: PFCandidateManager.cc:34
PFCandidateFwd.h