CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
FixedGridRhoProducerFastjet Class Reference

#include <FixedGridRhoProducerFastjet.h>

Inheritance diagram for FixedGridRhoProducerFastjet:
edm::stream::EDProducer<>

Public Member Functions

 FixedGridRhoProducerFastjet (const edm::ParameterSet &iConfig)
 
 ~FixedGridRhoProducerFastjet () override
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 

Private Member Functions

void produce (edm::Event &, const edm::EventSetup &) override
 

Private Attributes

fastjet::GridMedianBackgroundEstimator bge_
 
edm::EDGetTokenT< edm::View< reco::Candidate > > input_pfcoll_token_
 
edm::InputTag pfCandidatesTag_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 

Detailed Description

Definition at line 11 of file FixedGridRhoProducerFastjet.h.

Constructor & Destructor Documentation

◆ FixedGridRhoProducerFastjet()

FixedGridRhoProducerFastjet::FixedGridRhoProducerFastjet ( const edm::ParameterSet iConfig)
explicit

Definition at line 9 of file FixedGridRhoProducerFastjet.cc.

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 }

References edm::ParameterSet::getParameter(), input_pfcoll_token_, and pfCandidatesTag_.

◆ ~FixedGridRhoProducerFastjet()

FixedGridRhoProducerFastjet::~FixedGridRhoProducerFastjet ( )
override

Definition at line 17 of file FixedGridRhoProducerFastjet.cc.

17 {}

Member Function Documentation

◆ produce()

void FixedGridRhoProducerFastjet::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivate

Definition at line 19 of file FixedGridRhoProducerFastjet.cc.

19  {
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 }

References bge_, mps_fire::i, iEvent, input_pfcoll_token_, and PixelMapPlotter::inputs.

Member Data Documentation

◆ bge_

fastjet::GridMedianBackgroundEstimator FixedGridRhoProducerFastjet::bge_
private

Definition at line 20 of file FixedGridRhoProducerFastjet.h.

Referenced by produce().

◆ input_pfcoll_token_

edm::EDGetTokenT<edm::View<reco::Candidate> > FixedGridRhoProducerFastjet::input_pfcoll_token_
private

Definition at line 22 of file FixedGridRhoProducerFastjet.h.

Referenced by FixedGridRhoProducerFastjet(), and produce().

◆ pfCandidatesTag_

edm::InputTag FixedGridRhoProducerFastjet::pfCandidatesTag_
private

Definition at line 19 of file FixedGridRhoProducerFastjet.h.

Referenced by FixedGridRhoProducerFastjet().

mps_fire.i
i
Definition: mps_fire.py:428
FixedGridRhoProducerFastjet::input_pfcoll_token_
edm::EDGetTokenT< edm::View< reco::Candidate > > input_pfcoll_token_
Definition: FixedGridRhoProducerFastjet.h:22
FixedGridRhoProducerFastjet::bge_
fastjet::GridMedianBackgroundEstimator bge_
Definition: FixedGridRhoProducerFastjet.h:20
edm::Handle
Definition: AssociativeIterator.h:50
FixedGridRhoProducerFastjet::pfCandidatesTag_
edm::InputTag pfCandidatesTag_
Definition: FixedGridRhoProducerFastjet.h:19
iEvent
int iEvent
Definition: GenABIO.cc:224
PixelMapPlotter.inputs
inputs
Definition: PixelMapPlotter.py:490
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
edm::InputTag
Definition: InputTag.h:15