CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
cms::PFClusterMETProducer Class Reference

#include <PFClusterMETProducer.h>

Inheritance diagram for cms::PFClusterMETProducer:
edm::stream::EDProducer<>

Public Member Functions

 PFClusterMETProducer (const edm::ParameterSet &)
 
void produce (edm::Event &, const edm::EventSetup &) override
 
 ~PFClusterMETProducer () override
 
- 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 Attributes

double globalThreshold_
 
edm::EDGetTokenT< edm::View< reco::Candidate > > inputToken_
 

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 33 of file PFClusterMETProducer.h.

Constructor & Destructor Documentation

◆ PFClusterMETProducer()

PFClusterMETProducer::PFClusterMETProducer ( const edm::ParameterSet iConfig)
explicit

Definition at line 32 of file PFClusterMETProducer.cc.

References isoTrack_cff::alias, edm::ParameterSet::exists(), edm::ParameterSet::getParameter(), and AlCaHLTBitMon_QueryRunRegistry::string.

34  globalThreshold_(iConfig.getParameter<double>("globalThreshold")) {
35  std::string alias = iConfig.exists("alias") ? iConfig.getParameter<std::string>("alias") : "";
36  produces<reco::PFClusterMETCollection>().setBranchAlias(alias);
37  }
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
bool exists(std::string const &parameterName) const
checks if a parameter exists
edm::EDGetTokenT< edm::View< reco::Candidate > > inputToken_

◆ ~PFClusterMETProducer()

cms::PFClusterMETProducer::~PFClusterMETProducer ( )
inlineoverride

Definition at line 36 of file PFClusterMETProducer.h.

36 {}

Member Function Documentation

◆ produce()

void PFClusterMETProducer::produce ( edm::Event event,
const edm::EventSetup setup 
)
override

Definition at line 40 of file PFClusterMETProducer.cc.

References globalThreshold_, input, inputToken_, eostools::move(), and gctpf::pfcluster().

40  {
42  event.getByToken(inputToken_, input);
43 
44  METAlgo algo;
45  CommonMETData commonMETdata = algo.run(*input.product(), globalThreshold_);
46 
48  auto pfclustermetcoll = std::make_unique<reco::PFClusterMETCollection>();
49 
50  pfclustermetcoll->push_back(pfcluster.addInfo(input, commonMETdata));
51  event.put(std::move(pfclustermetcoll));
52  }
static std::string const input
Definition: EdmProvDump.cc:50
Structure containing data common to all types of MET.
Definition: CommonMETData.h:12
PFcluster_t pfcluster(float temporary[nTowerEtaSLR][nTowerPhiSLR], int etaoffset, int phioffset)
def move(src, dest)
Definition: eostools.py:511
edm::EDGetTokenT< edm::View< reco::Candidate > > inputToken_

Member Data Documentation

◆ globalThreshold_

double cms::PFClusterMETProducer::globalThreshold_
private

Definition at line 42 of file PFClusterMETProducer.h.

Referenced by produce().

◆ inputToken_

edm::EDGetTokenT<edm::View<reco::Candidate> > cms::PFClusterMETProducer::inputToken_
private

Definition at line 40 of file PFClusterMETProducer.h.

Referenced by produce().