CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Private Types | Private Attributes
PFMultiDepthClusterProducer Class Reference
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
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 

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<>
using CacheTypes = CacheContexts< T...>
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T...>
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::RunSummaryCache
 

Detailed Description

Definition at line 15 of file PFMultiDepthClusterProducer.cc.

Member Typedef Documentation

Definition at line 16 of file PFMultiDepthClusterProducer.cc.

Definition at line 17 of file PFMultiDepthClusterProducer.cc.

Definition at line 18 of file PFMultiDepthClusterProducer.cc.

Constructor & Destructor Documentation

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

Definition at line 50 of file PFMultiDepthClusterProducer.cc.

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

50  {
51  _clustersLabel = consumes<reco::PFClusterCollection>(conf.getParameter<edm::InputTag>("clustersSource"));
52  const edm::ParameterSet& pfcConf = conf.getParameterSet("pfClusterBuilder");
53 
54  edm::ConsumesCollector&& cc = consumesCollector();
55  if (!pfcConf.empty()) {
56  const std::string& pfcName = pfcConf.getParameter<std::string>("algoName");
57  _pfClusterBuilder = PFClusterBuilderFactory::get()->create(pfcName, pfcConf, cc);
58  }
59  // see if new need to apply corrections, setup if there.
60  const edm::ParameterSet& cConf = conf.getParameterSet("energyCorrector");
61  if (!cConf.empty()) {
62  const std::string& cName = cConf.getParameter<std::string>("algoName");
64  }
65 
66  produces<reco::PFClusterCollection>();
67 }
bool empty() const
Definition: ParameterSet.h:201
std::unique_ptr< PFClusterBuilderBase > _pfClusterBuilder
std::unique_ptr< PFClusterEnergyCorrectorBase > _energyCorrector
ParameterSet const & getParameterSet(std::string const &) const
edm::EDGetTokenT< reco::PFClusterCollection > _clustersLabel
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
#define get
PFMultiDepthClusterProducer::~PFMultiDepthClusterProducer ( )
overridedefault

Member Function Documentation

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

Definition at line 69 of file PFMultiDepthClusterProducer.cc.

References _pfClusterBuilder.

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

Definition at line 73 of file PFMultiDepthClusterProducer.cc.

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

73  {
74  _pfClusterBuilder->reset();
75 
77  e.getByToken(_clustersLabel, inputClusters);
78 
79  std::vector<bool> seedable;
80 
81  auto pfClusters = std::make_unique<reco::PFClusterCollection>();
82  _pfClusterBuilder->buildClusters(*inputClusters, seedable, *pfClusters);
83  LOGVERB("PFMultiDepthClusterProducer::produce()") << *_pfClusterBuilder;
84 
85  if (_energyCorrector) {
86  _energyCorrector->correctEnergies(*pfClusters);
87  }
88  e.put(std::move(pfClusters));
89 }
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:133
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:539
std::unique_ptr< PFClusterBuilderBase > _pfClusterBuilder
def move
Definition: eostools.py:511
std::unique_ptr< PFClusterEnergyCorrectorBase > _energyCorrector
edm::EDGetTokenT< reco::PFClusterCollection > _clustersLabel
#define LOGVERB(x)

Member Data Documentation

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

Definition at line 29 of file PFMultiDepthClusterProducer.cc.

Referenced by PFMultiDepthClusterProducer(), and produce().

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

Definition at line 33 of file PFMultiDepthClusterProducer.cc.

Referenced by PFMultiDepthClusterProducer(), and produce().

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