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 hasAbilityToProduceInLumis () const final
 
bool hasAbilityToProduceInRuns () 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 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, electrons_cff::eCorr, edm::ParameterSet::empty(), reco::get(), edm::ParameterSet::getParameter(), edm::ParameterSet::getParameterSet(), and AlCaHLTBitMon_QueryRunRegistry::string.

16 {
17  _clustersLabel = consumes<reco::PFClusterCollection>(conf.getParameter<edm::InputTag>("clustersSource"));
18  _pfClusterBuilder.reset(nullptr);
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:217
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 ( )
overridedefault

Member Function Documentation

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

Definition at line 37 of file PFMultiDepthClusterProducer.cc.

References _pfClusterBuilder.

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

Definition at line 43 of file PFMultiDepthClusterProducer.cc.

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

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:137
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:579
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 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