CMS 3D CMS Logo

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

#include <FixedGridRhoProducer.h>

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

Public Member Functions

 FixedGridRhoProducer (const edm::ParameterSet &iConfig)
 
 ~FixedGridRhoProducer () 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

FixedGridEnergyDensityalgo
 
edm::EDGetTokenT< reco::PFCandidateCollectioninput_pfcoll_token_
 
FixedGridEnergyDensity::EtaRegion myEtaRegion
 
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 9 of file FixedGridRhoProducer.h.

Constructor & Destructor Documentation

◆ FixedGridRhoProducer()

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

Definition at line 7 of file FixedGridRhoProducer.cc.

7  {
8  pfCandidatesTag_ = iConfig.getParameter<edm::InputTag>("pfCandidatesTag");
9  string etaRegion = iConfig.getParameter<string>("EtaRegion");
10  if (etaRegion == "Central")
12  else if (etaRegion == "Forward")
14  else if (etaRegion == "All")
16  else {
17  edm::LogWarning("FixedGridRhoProducer")
18  << "Wrong EtaRegion parameter: " << etaRegion << ". Using EtaRegion = Central";
20  }
21  produces<double>();
22 
23  input_pfcoll_token_ = consumes<reco::PFCandidateCollection>(pfCandidatesTag_);
24 }

References FixedGridEnergyDensity::All, FixedGridEnergyDensity::Central, FixedGridEnergyDensity::Forward, and edm::ParameterSet::getParameter().

◆ ~FixedGridRhoProducer()

FixedGridRhoProducer::~FixedGridRhoProducer ( )
override

Definition at line 26 of file FixedGridRhoProducer.cc.

26 {}

Member Function Documentation

◆ produce()

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

Definition at line 28 of file FixedGridRhoProducer.cc.

28  {
30  iEvent.getByToken(input_pfcoll_token_, pfColl);
31 
32  algo = new FixedGridEnergyDensity(pfColl.product());
33 
35  iEvent.put(std::make_unique<double>(result));
36 
37  delete algo;
38 }

References iEvent, edm::Handle< T >::product(), and mps_fire::result.

Member Data Documentation

◆ algo

FixedGridEnergyDensity* FixedGridRhoProducer::algo
private

Definition at line 19 of file FixedGridRhoProducer.h.

◆ input_pfcoll_token_

edm::EDGetTokenT<reco::PFCandidateCollection> FixedGridRhoProducer::input_pfcoll_token_
private

Definition at line 21 of file FixedGridRhoProducer.h.

◆ myEtaRegion

FixedGridEnergyDensity::EtaRegion FixedGridRhoProducer::myEtaRegion
private

Definition at line 18 of file FixedGridRhoProducer.h.

◆ pfCandidatesTag_

edm::InputTag FixedGridRhoProducer::pfCandidatesTag_
private

Definition at line 17 of file FixedGridRhoProducer.h.

edm::Handle::product
T const * product() const
Definition: Handle.h:70
FixedGridEnergyDensity::All
Definition: FixedGridEnergyDensity.h:10
FixedGridEnergyDensity
Definition: FixedGridEnergyDensity.h:6
FixedGridRhoProducer::input_pfcoll_token_
edm::EDGetTokenT< reco::PFCandidateCollection > input_pfcoll_token_
Definition: FixedGridRhoProducer.h:21
edm::Handle
Definition: AssociativeIterator.h:50
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
FixedGridEnergyDensity::Forward
Definition: FixedGridEnergyDensity.h:10
FixedGridRhoProducer::pfCandidatesTag_
edm::InputTag pfCandidatesTag_
Definition: FixedGridRhoProducer.h:17
dyt_utils::etaRegion
etaRegion
Definition: DynamicTruncation.h:44
iEvent
int iEvent
Definition: GenABIO.cc:224
FixedGridEnergyDensity::Central
Definition: FixedGridEnergyDensity.h:10
FixedGridRhoProducer::myEtaRegion
FixedGridEnergyDensity::EtaRegion myEtaRegion
Definition: FixedGridRhoProducer.h:18
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
mps_fire.result
result
Definition: mps_fire.py:311
FixedGridEnergyDensity::fixedGridRho
float fixedGridRho(EtaRegion etaRegion=Central)
Definition: FixedGridEnergyDensity.cc:11
FixedGridRhoProducer::algo
FixedGridEnergyDensity * algo
Definition: FixedGridRhoProducer.h:19
edm::InputTag
Definition: InputTag.h:15