CMS 3D CMS Logo

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

#include <PFMultiDepthClusterProducer.h>

Inheritance diagram for PFMultiDepthClusterProducer:
edm::stream::EDProducer<> edm::stream::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

virtual void beginLuminosityBlock (const edm::LuminosityBlock &, const edm::EventSetup &)
 
 PFMultiDepthClusterProducer (const edm::ParameterSet &)
 
virtual void produce (edm::Event &, const edm::EventSetup &)
 
 ~PFMultiDepthClusterProducer ()
 
- 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
 
 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 & itemsToGetFromEvent () 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 Types

typedef InitialClusteringStepBase ICSB
 
typedef PFClusterBuilderBase PFCBB
 
typedef PFCPositionCalculatorBase PosCalc
 

Private Attributes

edm::EDGetTokenT< reco::PFClusterCollection_clustersLabel
 
std::unique_ptr< PFClusterEnergyCorrectorBase_energyCorrector
 
std::unique_ptr< PFClusterBuilderBase_pfClusterBuilder
 

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 21 of file PFMultiDepthClusterProducer.h.

Member Typedef Documentation

Definition at line 22 of file PFMultiDepthClusterProducer.h.

Definition at line 23 of file PFMultiDepthClusterProducer.h.

Definition at line 24 of file PFMultiDepthClusterProducer.h.

Constructor & Destructor Documentation

PFMultiDepthClusterProducer::PFMultiDepthClusterProducer ( const edm::ParameterSet conf)

Definition at line 15 of file PFMultiDepthClusterProducer.cc.

References _clustersLabel, _energyCorrector, _pfClusterBuilder, edm::ParameterSet::empty(), reco::get(), edm::ParameterSet::getParameter(), edm::ParameterSet::getParameterSet(), NULL, and AlCaHLTBitMon_QueryRunRegistry::string.

16 {
17  _clustersLabel = consumes<reco::PFClusterCollection>(conf.getParameter<edm::InputTag>("clustersSource"));
18  _pfClusterBuilder.reset(NULL);
19  const edm::ParameterSet& pfcConf = conf.getParameterSet("pfClusterBuilder");
20  if( !pfcConf.empty() ) {
21  const std::string& pfcName = pfcConf.getParameter<std::string>("algoName");
22  PFCBB* pfcb = PFClusterBuilderFactory::get()->create(pfcName,pfcConf);
23  _pfClusterBuilder.reset(pfcb);
24  }
25  // see if new need to apply corrections, setup if there.
26  const edm::ParameterSet& cConf = conf.getParameterSet("energyCorrector");
27  if( !cConf.empty() ) {
28  const std::string& cName = cConf.getParameter<std::string>("algoName");
30  PFClusterEnergyCorrectorFactory::get()->create(cName,cConf);
31  _energyCorrector.reset(eCorr);
32  }
33 
34  produces<reco::PFClusterCollection>();
35 }
T getParameter(std::string const &) const
bool empty() const
Definition: ParameterSet.h:218
#define NULL
Definition: scimark2.h:8
std::unique_ptr< PFClusterBuilderBase > _pfClusterBuilder
std::unique_ptr< PFClusterEnergyCorrectorBase > _energyCorrector
ParameterSet const & getParameterSet(std::string const &) const
edm::EDGetTokenT< reco::PFClusterCollection > _clustersLabel
T get(const Candidate &c)
Definition: component.h:55
PFMultiDepthClusterProducer::~PFMultiDepthClusterProducer ( )
inline

Definition at line 27 of file PFMultiDepthClusterProducer.h.

References beginLuminosityBlock(), and produce().

27 { }

Member Function Documentation

void PFMultiDepthClusterProducer::beginLuminosityBlock ( const edm::LuminosityBlock lumi,
const edm::EventSetup es 
)
virtual

Definition at line 37 of file PFMultiDepthClusterProducer.cc.

References _pfClusterBuilder.

Referenced by ~PFMultiDepthClusterProducer().

38  {
39  _pfClusterBuilder->update(es);
40 
41 }
std::unique_ptr< PFClusterBuilderBase > _pfClusterBuilder
void PFMultiDepthClusterProducer::produce ( edm::Event e,
const edm::EventSetup es 
)
virtual

Definition at line 43 of file PFMultiDepthClusterProducer.cc.

References _clustersLabel, _energyCorrector, _pfClusterBuilder, edm::Event::getByToken(), LOGVERB, eostools::move(), and edm::Event::put().

Referenced by ~PFMultiDepthClusterProducer().

43  {
44  _pfClusterBuilder->reset();
45 
47  e.getByToken(_clustersLabel,inputClusters);
48 
49  std::vector<bool> seedable;
50 
51  auto pfClusters = std::make_unique<reco::PFClusterCollection>();
52  _pfClusterBuilder->buildClusters(*inputClusters, seedable, *pfClusters);
53  LOGVERB("PFMultiDepthClusterProducer::produce()") << *_pfClusterBuilder;
54 
55  if( _energyCorrector ) {
56  _energyCorrector->correctEnergies(*pfClusters);
57  }
58  e.put(std::move(pfClusters));
59 
60 }
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:457
std::unique_ptr< PFClusterBuilderBase > _pfClusterBuilder
std::unique_ptr< PFClusterEnergyCorrectorBase > _energyCorrector
edm::EDGetTokenT< reco::PFClusterCollection > _clustersLabel
#define LOGVERB(x)
def move(src, dest)
Definition: eostools.py:510

Member Data Documentation

edm::EDGetTokenT<reco::PFClusterCollection> PFMultiDepthClusterProducer::_clustersLabel
private

Definition at line 35 of file PFMultiDepthClusterProducer.h.

Referenced by PFMultiDepthClusterProducer(), and produce().

std::unique_ptr<PFClusterEnergyCorrectorBase> PFMultiDepthClusterProducer::_energyCorrector
private

Definition at line 39 of file PFMultiDepthClusterProducer.h.

Referenced by PFMultiDepthClusterProducer(), and produce().

std::unique_ptr<PFClusterBuilderBase> PFMultiDepthClusterProducer::_pfClusterBuilder
private