CMS 3D CMS Logo

FixedGridRhoProducerFastjet.cc
Go to the documentation of this file.
6 
7 using namespace std;
8 
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 
18 
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 
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