CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 

Private Attributes

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

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

Constructor & Destructor Documentation

◆ PFClusterMETProducer()

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

Definition at line 32 of file PFClusterMETProducer.cc.

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  }

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

◆ ~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.

40  {
42  event.getByToken(inputToken_, input);
43 
44  METAlgo algo;
45  CommonMETData commonMETdata = algo.run(*input.product(), globalThreshold_);
46 
47  PFClusterSpecificAlgo pfcluster;
48  auto pfclustermetcoll = std::make_unique<reco::PFClusterMETCollection>();
49 
50  pfclustermetcoll->push_back(pfcluster.addInfo(input, commonMETdata));
51  event.put(std::move(pfclustermetcoll));
52  }

References PFClusterSpecificAlgo::addInfo(), globalThreshold_, input, inputToken_, and eostools::move().

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().

PFClusterSpecificAlgo::addInfo
reco::PFClusterMET addInfo(edm::Handle< edm::View< reco::Candidate > > PFClusterCandidates, const CommonMETData &met)
Definition: PFClusterSpecificAlgo.cc:15
METAlgo
Definition: METAlgo.h:29
input
static const std::string input
Definition: EdmProvDump.cc:48
CommonMETData
Structure containing data common to all types of MET.
Definition: CommonMETData.h:12
edm::Handle
Definition: AssociativeIterator.h:50
cmsdt::algo
algo
Definition: constants.h:165
cms::PFClusterMETProducer::inputToken_
edm::EDGetTokenT< edm::View< reco::Candidate > > inputToken_
Definition: PFClusterMETProducer.h:40
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ParameterSet::exists
bool exists(std::string const &parameterName) const
checks if a parameter exists
Definition: ParameterSet.cc:681
edm::View
Definition: CaloClusterFwd.h:14
cms::PFClusterMETProducer::globalThreshold_
double globalThreshold_
Definition: PFClusterMETProducer.h:42
eostools.move
def move(src, dest)
Definition: eostools.py:511
PFClusterSpecificAlgo
Definition: PFClusterSpecificAlgo.h:30
SiStripOfflineCRack_cfg.alias
alias
Definition: SiStripOfflineCRack_cfg.py:128
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
edm::InputTag
Definition: InputTag.h:15