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<>

Public Member Functions

void beginLuminosityBlock (const edm::LuminosityBlock &, const edm::EventSetup &) override
 
 PFMultiDepthClusterProducer (const edm::ParameterSet &)
 
void produce (edm::Event &, const edm::EventSetup &) override
 
 ~PFMultiDepthClusterProducer () override=default
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () const final
 

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
 

Detailed Description

Definition at line 20 of file PFMultiDepthClusterProducer.h.

Member Typedef Documentation

Definition at line 21 of file PFMultiDepthClusterProducer.h.

Definition at line 22 of file PFMultiDepthClusterProducer.h.

Definition at line 23 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(), timingPdfMaker::get, edm::ParameterSet::getParameter(), edm::ParameterSet::getParameterSet(), and AlCaHLTBitMon_QueryRunRegistry::string.

15  {
16  _clustersLabel = consumes<reco::PFClusterCollection>(conf.getParameter<edm::InputTag>("clustersSource"));
17  const edm::ParameterSet& pfcConf = conf.getParameterSet("pfClusterBuilder");
18  if (!pfcConf.empty()) {
19  const std::string& pfcName = pfcConf.getParameter<std::string>("algoName");
20  _pfClusterBuilder = PFClusterBuilderFactory::get()->create(pfcName, pfcConf);
21  }
22  // see if new need to apply corrections, setup if there.
23  const edm::ParameterSet& cConf = conf.getParameterSet("energyCorrector");
24  if (!cConf.empty()) {
25  const std::string& cName = cConf.getParameter<std::string>("algoName");
27  }
28 
29  produces<reco::PFClusterCollection>();
30 }
T getParameter(std::string const &) const
bool empty() const
Definition: ParameterSet.h:190
std::unique_ptr< PFClusterBuilderBase > _pfClusterBuilder
std::unique_ptr< PFClusterEnergyCorrectorBase > _energyCorrector
ParameterSet const & getParameterSet(std::string const &) const
edm::EDGetTokenT< reco::PFClusterCollection > _clustersLabel
PFMultiDepthClusterProducer::~PFMultiDepthClusterProducer ( )
overridedefault

Member Function Documentation

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

Definition at line 32 of file PFMultiDepthClusterProducer.cc.

References _pfClusterBuilder.

32  {
33  _pfClusterBuilder->update(es);
34 }
std::unique_ptr< PFClusterBuilderBase > _pfClusterBuilder
void PFMultiDepthClusterProducer::produce ( edm::Event e,
const edm::EventSetup es 
)
override

Definition at line 36 of file PFMultiDepthClusterProducer.cc.

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

36  {
37  _pfClusterBuilder->reset();
38 
40  e.getByToken(_clustersLabel, inputClusters);
41 
42  std::vector<bool> seedable;
43 
44  auto pfClusters = std::make_unique<reco::PFClusterCollection>();
45  _pfClusterBuilder->buildClusters(*inputClusters, seedable, *pfClusters);
46  LOGVERB("PFMultiDepthClusterProducer::produce()") << *_pfClusterBuilder;
47 
48  if (_energyCorrector) {
49  _energyCorrector->correctEnergies(*pfClusters);
50  }
51  e.put(std::move(pfClusters));
52 }
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:131
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:525
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:511

Member Data Documentation

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

Definition at line 34 of file PFMultiDepthClusterProducer.h.

Referenced by PFMultiDepthClusterProducer(), and produce().

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

Definition at line 38 of file PFMultiDepthClusterProducer.h.

Referenced by PFMultiDepthClusterProducer(), and produce().

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