CMS 3D CMS Logo

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 beginRun (const edm::Run &, 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
 
bool cutsFromDB
 
edm::ESGetToken< HcalPFCuts, HcalPFCutsRcdhcalCutsToken_
 
HcalPFCuts const * paramPF = nullptr
 

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 17 of file PFMultiDepthClusterProducer.cc.

Member Typedef Documentation

◆ ICSB

Definition at line 18 of file PFMultiDepthClusterProducer.cc.

◆ PFCBB

Definition at line 19 of file PFMultiDepthClusterProducer.cc.

◆ PosCalc

Definition at line 20 of file PFMultiDepthClusterProducer.cc.

Constructor & Destructor Documentation

◆ PFMultiDepthClusterProducer()

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

Definition at line 55 of file PFMultiDepthClusterProducer.cc.

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

55  {
56  _clustersLabel = consumes<reco::PFClusterCollection>(conf.getParameter<edm::InputTag>("clustersSource"));
57  cutsFromDB = conf.getParameter<bool>("usePFThresholdsFromDB");
58  const edm::ParameterSet& pfcConf = conf.getParameterSet("pfClusterBuilder");
59 
60  edm::ConsumesCollector&& cc = consumesCollector();
61 
62  if (cutsFromDB) {
63  hcalCutsToken_ = esConsumes<HcalPFCuts, HcalPFCutsRcd, edm::Transition::BeginRun>(edm::ESInputTag("", "withTopo"));
64  }
65 
66  if (!pfcConf.empty()) {
67  const std::string& pfcName = pfcConf.getParameter<std::string>("algoName");
68  _pfClusterBuilder = PFClusterBuilderFactory::get()->create(pfcName, pfcConf, cc);
69  }
70  // see if new need to apply corrections, setup if there.
71  const edm::ParameterSet& cConf = conf.getParameterSet("energyCorrector");
72  if (!cConf.empty()) {
73  const std::string& cName = cConf.getParameter<std::string>("algoName");
75  }
76 
77  produces<reco::PFClusterCollection>();
78 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
uint32_t cc[maxCellsPerHit]
Definition: gpuFishbone.h:49
ParameterSet const & getParameterSet(std::string const &) const
std::unique_ptr< PFClusterBuilderBase > _pfClusterBuilder
bool empty() const
Definition: ParameterSet.h:202
std::unique_ptr< PFClusterEnergyCorrectorBase > _energyCorrector
edm::ESGetToken< HcalPFCuts, HcalPFCutsRcd > hcalCutsToken_
edm::EDGetTokenT< reco::PFClusterCollection > _clustersLabel
#define get

◆ ~PFMultiDepthClusterProducer()

PFMultiDepthClusterProducer::~PFMultiDepthClusterProducer ( )
overridedefault

Member Function Documentation

◆ beginRun()

void PFMultiDepthClusterProducer::beginRun ( const edm::Run run,
const edm::EventSetup es 
)
override

Definition at line 80 of file PFMultiDepthClusterProducer.cc.

References _pfClusterBuilder, cutsFromDB, edm::EventSetup::getData(), hcalCutsToken_, and paramPF.

80  {
81  if (cutsFromDB) {
83  }
84  _pfClusterBuilder->update(es);
85 }
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
Definition: EventSetup.h:119
std::unique_ptr< PFClusterBuilderBase > _pfClusterBuilder
edm::ESGetToken< HcalPFCuts, HcalPFCutsRcd > hcalCutsToken_

◆ produce()

void PFMultiDepthClusterProducer::produce ( edm::Event e,
const edm::EventSetup es 
)
override

Definition at line 87 of file PFMultiDepthClusterProducer.cc.

References _clustersLabel, _energyCorrector, _pfClusterBuilder, MillePedeFileConverter_cfg::e, HLT_FULL_cff::inputClusters, LOGVERB, eostools::move(), and paramPF.

87  {
88  _pfClusterBuilder->reset();
89 
91  e.getByToken(_clustersLabel, inputClusters);
92 
93  std::vector<bool> seedable;
94 
95  auto pfClusters = std::make_unique<reco::PFClusterCollection>();
96  _pfClusterBuilder->buildClusters(*inputClusters, seedable, *pfClusters, paramPF);
97  LOGVERB("PFMultiDepthClusterProducer::produce()") << *_pfClusterBuilder;
98 
99  if (_energyCorrector) {
100  _energyCorrector->correctEnergies(*pfClusters);
101  }
102  e.put(std::move(pfClusters));
103 }
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

◆ _clustersLabel

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

Definition at line 31 of file PFMultiDepthClusterProducer.cc.

Referenced by PFMultiDepthClusterProducer(), and produce().

◆ _energyCorrector

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

Definition at line 36 of file PFMultiDepthClusterProducer.cc.

Referenced by PFMultiDepthClusterProducer(), and produce().

◆ _pfClusterBuilder

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

Definition at line 35 of file PFMultiDepthClusterProducer.cc.

Referenced by beginRun(), PFMultiDepthClusterProducer(), and produce().

◆ cutsFromDB

bool PFMultiDepthClusterProducer::cutsFromDB
private

Definition at line 37 of file PFMultiDepthClusterProducer.cc.

Referenced by beginRun(), and PFMultiDepthClusterProducer().

◆ hcalCutsToken_

edm::ESGetToken<HcalPFCuts, HcalPFCutsRcd> PFMultiDepthClusterProducer::hcalCutsToken_
private

Definition at line 32 of file PFMultiDepthClusterProducer.cc.

Referenced by beginRun(), and PFMultiDepthClusterProducer().

◆ paramPF

HcalPFCuts const* PFMultiDepthClusterProducer::paramPF = nullptr
private

Definition at line 38 of file PFMultiDepthClusterProducer.cc.

Referenced by beginRun(), and produce().