CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
PFMETMaker Class Reference

#include <PFMETMaker.h>

Public Member Functions

 PFMETMaker (const edm::ParameterSet &, edm::ConsumesCollector)
 
void SetVars (HWW &, const edm::Event &, const edm::EventSetup &)
 

Private Attributes

edm::EDGetTokenT< edm::View
< reco::PFMET > > 
PFMET_
 

Detailed Description

Definition at line 9 of file PFMETMaker.h.

Constructor & Destructor Documentation

PFMETMaker::PFMETMaker ( const edm::ParameterSet iConfig,
edm::ConsumesCollector  iCollector 
)

Definition at line 3 of file PFMETMaker.cc.

References edm::ConsumesCollector::consumes(), edm::ParameterSet::getParameter(), and PFMET_.

3  {
4 
5  PFMET_ = iCollector.consumes<edm::View<reco::PFMET> >(iConfig.getParameter<edm::InputTag>("pfmetInputTag"));
6 
7 }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
T getParameter(std::string const &) const
edm::EDGetTokenT< edm::View< reco::PFMET > > PFMET_
Definition: PFMETMaker.h:18

Member Function Documentation

void PFMETMaker::SetVars ( HWW hww,
const edm::Event iEvent,
const edm::EventSetup iSetup 
)

Definition at line 9 of file PFMETMaker.cc.

References HWW::evt_pfmet(), HWW::evt_pfmetPhi(), edm::Event::getByToken(), HWW::Load_evt_pfmet(), HWW::Load_evt_pfmetPhi(), PFMET_, and phi.

Referenced by HWWAnalyzer::analyze().

9  {
10 
11  hww.Load_evt_pfmet();
12  hww.Load_evt_pfmetPhi();
13 
14  bool validToken;
15 
17  validToken = iEvent.getByToken(PFMET_, met_h);
18  if(!validToken) return;
19 
20  hww.evt_pfmet() = ( met_h->front() ).et();
21  hww.evt_pfmetPhi() = ( met_h->front() ).phi();
22 }
float & evt_pfmetPhi()
Definition: HWW.cc:643
void Load_evt_pfmetPhi()
Definition: HWW.cc:1271
float & evt_pfmet()
Definition: HWW.cc:639
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:457
void Load_evt_pfmet()
Definition: HWW.cc:1268
edm::EDGetTokenT< edm::View< reco::PFMET > > PFMET_
Definition: PFMETMaker.h:18

Member Data Documentation

edm::EDGetTokenT<edm::View<reco::PFMET> > PFMETMaker::PFMET_
private

Definition at line 18 of file PFMETMaker.h.

Referenced by PFMETMaker(), and SetVars().