CMS 3D CMS Logo

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

#include <ElseMETProducer.h>

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

Public Member Functions

 ElseMETProducer (const edm::ParameterSet &)
 
void produce (edm::Event &, const edm::EventSetup &) override
 
 ~ElseMETProducer () override
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () 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 ElseMETProducer.h.

Constructor & Destructor Documentation

◆ ElseMETProducer()

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

Definition at line 33 of file ElseMETProducer.cc.

35  globalThreshold_(iConfig.getParameter<double>("globalThreshold")) {
36  std::string alias = iConfig.exists("alias") ? iConfig.getParameter<std::string>("alias") : "";
37 
38  produces<reco::METCollection>().setBranchAlias(alias);
39  }

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

◆ ~ElseMETProducer()

cms::ElseMETProducer::~ElseMETProducer ( )
inlineoverride

Definition at line 36 of file ElseMETProducer.h.

36 {}

Member Function Documentation

◆ produce()

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

Definition at line 42 of file ElseMETProducer.cc.

42  {
44  event.getByToken(inputToken_, input);
45 
46  METAlgo algo;
47  CommonMETData commonMETdata = algo.run(*input.product(), globalThreshold_);
48 
49  math::XYZTLorentzVector p4(commonMETdata.mex, commonMETdata.mey, 0.0, commonMETdata.met);
50  math::XYZPoint vtx(0, 0, 0);
51  reco::MET met(commonMETdata.sumet, p4, vtx);
52  auto metcoll = std::make_unique<reco::METCollection>();
53  metcoll->push_back(met);
54  event.put(std::move(metcoll));
55  }

References globalThreshold_, input, inputToken_, CommonMETData::met, BTaggingMonitor_cfi::met, CommonMETData::mex, CommonMETData::mey, eostools::move(), p4, CommonMETData::sumet, and badGlobalMuonTaggersAOD_cff::vtx.

Member Data Documentation

◆ globalThreshold_

double cms::ElseMETProducer::globalThreshold_
private

Definition at line 42 of file ElseMETProducer.h.

Referenced by produce().

◆ inputToken_

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

Definition at line 40 of file ElseMETProducer.h.

Referenced by produce().

CommonMETData::met
double met
Definition: CommonMETData.h:14
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
BTaggingMonitor_cfi.met
met
Definition: BTaggingMonitor_cfi.py:84
cmsdt::algo
algo
Definition: constants.h:164
reco::MET
Definition: MET.h:41
CommonMETData::mex
double mex
Definition: CommonMETData.h:15
badGlobalMuonTaggersAOD_cff.vtx
vtx
Definition: badGlobalMuonTaggersAOD_cff.py:5
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
CommonMETData::sumet
double sumet
Definition: CommonMETData.h:18
edm::ParameterSet::exists
bool exists(std::string const &parameterName) const
checks if a parameter exists
Definition: ParameterSet.cc:674
edm::View
Definition: CaloClusterFwd.h:14
math::XYZPoint
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
p4
double p4[4]
Definition: TauolaWrapper.h:92
cms::ElseMETProducer::inputToken_
edm::EDGetTokenT< edm::View< reco::Candidate > > inputToken_
Definition: ElseMETProducer.h:40
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
eostools.move
def move(src, dest)
Definition: eostools.py:511
math::XYZTLorentzVector
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
SiStripOfflineCRack_cfg.alias
alias
Definition: SiStripOfflineCRack_cfg.py:129
CommonMETData::mey
double mey
Definition: CommonMETData.h:16
edm::InputTag
Definition: InputTag.h:15
cms::ElseMETProducer::globalThreshold_
double globalThreshold_
Definition: ElseMETProducer.h:42