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 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 ( const edm::ParameterSet iConfig)
explicit

Definition at line 32 of file PFClusterMETProducer.cc.

References HLT_FULL_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  }
bool exists(std::string const &parameterName) const
checks if a parameter exists
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
edm::EDGetTokenT< edm::View< reco::Candidate > > inputToken_
cms::PFClusterMETProducer::~PFClusterMETProducer ( )
inlineoverride

Definition at line 36 of file PFClusterMETProducer.h.

36 {}

Member Function Documentation

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

Definition at line 40 of file PFClusterMETProducer.cc.

References PFClusterSpecificAlgo::addInfo(), globalThreshold_, input, inputToken_, eostools::move(), edm::Handle< T >::product(), and METAlgo::run().

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  }
reco::PFClusterMET addInfo(edm::Handle< edm::View< reco::Candidate > > PFClusterCandidates, const CommonMETData &met)
static std::string const input
Definition: EdmProvDump.cc:47
def move
Definition: eostools.py:511
Structure containing data common to all types of MET.
Definition: CommonMETData.h:12
T const * product() const
Definition: Handle.h:70
CommonMETData run(const edm::View< reco::Candidate > &candidates, double globalThreshold=0.0, edm::ValueMap< float > const *weights=nullptr)
Definition: METAlgo.cc:16
edm::EDGetTokenT< edm::View< reco::Candidate > > inputToken_

Member Data Documentation

double cms::PFClusterMETProducer::globalThreshold_
private

Definition at line 42 of file PFClusterMETProducer.h.

Referenced by produce().

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

Definition at line 40 of file PFClusterMETProducer.h.

Referenced by produce().