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<> edm::stream::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 FixedGridRhoProducerFastjet (const edm::ParameterSet &iConfig)
 
virtual ~FixedGridRhoProducerFastjet ()
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
- Public Member Functions inherited from edm::stream::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDProducerBase ()
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, std::unordered_multimap< std::string, edm::ProductResolverIndex > const &iIndicies, std::string const &moduleLabel)
 
virtual ~ProducerBase () noexcept(false)
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Member Functions

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

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
 
- Public Types inherited from edm::stream::EDProducerBase
typedef EDProducerAdaptorBase ModuleType
 
- Public Types inherited from edm::ProducerBase
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::stream::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

Definition at line 12 of file FixedGridRhoProducerFastjet.h.

Constructor & Destructor Documentation

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

Definition at line 9 of file FixedGridRhoProducerFastjet.cc.

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

9  :
10  bge_( iConfig.getParameter<double>("maxRapidity"),
11  iConfig.getParameter<double>("gridSpacing") )
12 {
13  pfCandidatesTag_ = iConfig.getParameter<edm::InputTag>("pfCandidatesTag");
14  produces<double>();
15 
16  input_pfcoll_token_ = consumes<edm::View<reco::Candidate> >(pfCandidatesTag_);
17 
18 }
T getParameter(std::string const &) const
edm::EDGetTokenT< edm::View< reco::Candidate > > input_pfcoll_token_
fastjet::GridMedianBackgroundEstimator bge_
FixedGridRhoProducerFastjet::~FixedGridRhoProducerFastjet ( )
virtual

Definition at line 20 of file FixedGridRhoProducerFastjet.cc.

20 {}

Member Function Documentation

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

Definition at line 22 of file FixedGridRhoProducerFastjet.cc.

References bge_, DEFINE_FWK_MODULE, edm::Event::getByToken(), mps_fire::i, input_pfcoll_token_, PatBasicFWLiteJetAnalyzer_Selector_cfg::inputs, and edm::Event::put().

22  {
23 
25  iEvent.getByToken(input_pfcoll_token_, pfColl);
26  std::vector<fastjet::PseudoJet> inputs;
27  for ( edm::View<reco::Candidate>::const_iterator ibegin = pfColl->begin(),
28  iend = pfColl->end(), i = ibegin; i != iend; ++i ){
29  inputs.push_back( fastjet::PseudoJet(i->px(), i->py(), i->pz(), i->energy()) );
30  }
31  bge_.set_particles(inputs);
32  iEvent.put(std::make_unique<double>(bge_.rho()));
33 }
edm::EDGetTokenT< edm::View< reco::Candidate > > input_pfcoll_token_
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:122
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:460
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
Definition: View.h:86
fastjet::GridMedianBackgroundEstimator bge_

Member Data Documentation

fastjet::GridMedianBackgroundEstimator FixedGridRhoProducerFastjet::bge_
private

Definition at line 22 of file FixedGridRhoProducerFastjet.h.

Referenced by produce().

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

Definition at line 24 of file FixedGridRhoProducerFastjet.h.

Referenced by FixedGridRhoProducerFastjet(), and produce().

edm::InputTag FixedGridRhoProducerFastjet::pfCandidatesTag_
private

Definition at line 21 of file FixedGridRhoProducerFastjet.h.

Referenced by FixedGridRhoProducerFastjet().