RecoJets
JetProducers
plugins
FixedGridRhoProducerFastjet.cc
Go to the documentation of this file.
1
#include "
RecoJets/JetProducers/plugins/FixedGridRhoProducerFastjet.h
"
2
#include "
FWCore/Framework/interface/Event.h
"
3
#include "
DataFormats/Common/interface/View.h
"
4
#include "
FWCore/Framework/interface/MakerMacros.h
"
5
#include "
DataFormats/ParticleFlowCandidate/interface/PFCandidate.h
"
6
7
using namespace
std
;
8
9
FixedGridRhoProducerFastjet::FixedGridRhoProducerFastjet
(
const
edm::ParameterSet
& iConfig)
10
: bge_(iConfig.getParameter<double>(
"maxRapidity"
), iConfig.getParameter<double>(
"gridSpacing"
)) {
11
pfCandidatesTag_
= iConfig.
getParameter
<
edm::InputTag
>(
"pfCandidatesTag"
);
12
produces<double>();
13
14
input_pfcoll_token_
= consumes<edm::View<reco::Candidate> >(
pfCandidatesTag_
);
15
}
16
17
FixedGridRhoProducerFastjet::~FixedGridRhoProducerFastjet
() {}
18
19
void
FixedGridRhoProducerFastjet::produce
(
edm::Event
&
iEvent
,
const
edm::EventSetup
& iSetup) {
20
edm::Handle<edm::View<reco::Candidate>
> pfColl;
21
iEvent
.getByToken(
input_pfcoll_token_
, pfColl);
22
std::vector<fastjet::PseudoJet>
inputs
;
23
for
(
edm::View<reco::Candidate>::const_iterator
ibegin = pfColl->begin(), iend = pfColl->end(),
i
= ibegin;
i
!= iend;
24
++
i
) {
25
inputs
.push_back(fastjet::PseudoJet(
i
->px(),
i
->py(),
i
->pz(),
i
->energy()));
26
}
27
bge_
.set_particles(
inputs
);
28
iEvent
.put(std::make_unique<double>(
bge_
.rho()));
29
}
30
31
DEFINE_FWK_MODULE
(
FixedGridRhoProducerFastjet
);
mps_fire.i
i
Definition:
mps_fire.py:428
PFCandidate.h
FixedGridRhoProducerFastjet::input_pfcoll_token_
edm::EDGetTokenT< edm::View< reco::Candidate > > input_pfcoll_token_
Definition:
FixedGridRhoProducerFastjet.h:22
FixedGridRhoProducerFastjet::~FixedGridRhoProducerFastjet
~FixedGridRhoProducerFastjet() override
Definition:
FixedGridRhoProducerFastjet.cc:17
FixedGridRhoProducerFastjet::bge_
fastjet::GridMedianBackgroundEstimator bge_
Definition:
FixedGridRhoProducerFastjet.h:20
edm::Handle
Definition:
AssociativeIterator.h:50
MakerMacros.h
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition:
MakerMacros.h:16
FixedGridRhoProducerFastjet
Definition:
FixedGridRhoProducerFastjet.h:11
FixedGridRhoProducerFastjet::pfCandidatesTag_
edm::InputTag pfCandidatesTag_
Definition:
FixedGridRhoProducerFastjet.h:19
edm::ParameterSet
Definition:
ParameterSet.h:47
Event.h
iEvent
int iEvent
Definition:
GenABIO.cc:224
FixedGridRhoProducerFastjet::produce
void produce(edm::Event &, const edm::EventSetup &) override
Definition:
FixedGridRhoProducerFastjet.cc:19
PixelMapPlotter.inputs
inputs
Definition:
PixelMapPlotter.py:490
edm::EventSetup
Definition:
EventSetup.h:58
FixedGridRhoProducerFastjet::FixedGridRhoProducerFastjet
FixedGridRhoProducerFastjet(const edm::ParameterSet &iConfig)
Definition:
FixedGridRhoProducerFastjet.cc:9
std
Definition:
JetResolutionObject.h:76
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition:
ParameterSet.h:303
edm::View::const_iterator
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
Definition:
View.h:86
View.h
FixedGridRhoProducerFastjet.h
edm::Event
Definition:
Event.h:73
edm::InputTag
Definition:
InputTag.h:15
Generated for CMSSW Reference Manual by
1.8.16