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
RhoMaker Class Reference

#include <RhoMaker.h>

Public Member Functions

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

Private Attributes

edm::EDGetTokenT< double > Rho_
 
edm::EDGetTokenT< double > RhoForEGIso_
 
edm::EDGetTokenT< double > wwRho_
 
edm::EDGetTokenT< double > wwRhoVor_
 

Detailed Description

Definition at line 8 of file RhoMaker.h.

Constructor & Destructor Documentation

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

Definition at line 3 of file RhoMaker.cc.

References edm::ConsumesCollector::consumes(), edm::ParameterSet::getParameter(), Rho_, RhoForEGIso_, wwRho_, and wwRhoVor_.

3  {
4 
5  Rho_ = iCollector.consumes<double>(iConfig.getParameter<edm::InputTag>("rhoInputTag"));
6  wwRho_ = iCollector.consumes<double>(iConfig.getParameter<edm::InputTag>("wwrhoInputTag"));
7  wwRhoVor_ = iCollector.consumes<double>(iConfig.getParameter<edm::InputTag>("wwrhovorInputTag"));
8  RhoForEGIso_ = iCollector.consumes<double>(iConfig.getParameter<edm::InputTag>("forEGIsoInputTag"));
9 
10 }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
T getParameter(std::string const &) const
edm::EDGetTokenT< double > wwRhoVor_
Definition: RhoMaker.h:19
edm::EDGetTokenT< double > Rho_
Definition: RhoMaker.h:17
edm::EDGetTokenT< double > wwRho_
Definition: RhoMaker.h:18
edm::EDGetTokenT< double > RhoForEGIso_
Definition: RhoMaker.h:20

Member Function Documentation

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

Definition at line 12 of file RhoMaker.cc.

References HWW::evt_kt6pf_foregiso_rho(), HWW::evt_rho(), HWW::evt_ww_rho(), HWW::evt_ww_rho_vor(), edm::Event::getByToken(), HWW::Load_evt_kt6pf_foregiso_rho(), HWW::Load_evt_rho(), HWW::Load_evt_ww_rho(), HWW::Load_evt_ww_rho_vor(), Rho_, RhoForEGIso_, wwRho_, and wwRhoVor_.

Referenced by HWWAnalyzer::analyze().

12  {
13 
14  hww.Load_evt_rho();
15  hww.Load_evt_ww_rho();
16  hww.Load_evt_ww_rho_vor();
18 
20  edm::Handle<double> ww_rhoH;
21  edm::Handle<double> ww_rho_vorH;
22  edm::Handle<double> kt6pf_foregiso_rhoH;
23 
24  bool validToken;
25 
26  validToken = iEvent.getByToken( Rho_, rhoH);
27  if(!validToken) return;
28  hww.evt_rho() = *rhoH;
29 
30  validToken = iEvent.getByToken( wwRho_, ww_rhoH);
31  if(!validToken) return;
32  hww.evt_ww_rho() = *ww_rhoH;
33 
34  validToken = iEvent.getByToken( wwRhoVor_ , ww_rho_vorH);
35  if(!validToken) return;
36  hww.evt_ww_rho_vor() = *ww_rho_vorH;
37 
38  validToken = iEvent.getByToken( RhoForEGIso_ , kt6pf_foregiso_rhoH);
39  if(!validToken) return;
40  hww.evt_kt6pf_foregiso_rho() = *kt6pf_foregiso_rhoH;
41 }
edm::EDGetTokenT< double > wwRhoVor_
Definition: RhoMaker.h:19
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:449
edm::EDGetTokenT< double > Rho_
Definition: RhoMaker.h:17
float & evt_ww_rho_vor()
Definition: HWW.cc:623
void Load_evt_ww_rho_vor()
Definition: HWW.cc:1256
edm::EDGetTokenT< double > wwRho_
Definition: RhoMaker.h:18
void Load_evt_ww_rho()
Definition: HWW.cc:1259
void Load_evt_rho()
Definition: HWW.cc:1262
edm::EDGetTokenT< double > RhoForEGIso_
Definition: RhoMaker.h:20
float & evt_rho()
Definition: HWW.cc:631
float & evt_kt6pf_foregiso_rho()
Definition: HWW.cc:635
float & evt_ww_rho()
Definition: HWW.cc:627
void Load_evt_kt6pf_foregiso_rho()
Definition: HWW.cc:1265

Member Data Documentation

edm::EDGetTokenT<double> RhoMaker::Rho_
private

Definition at line 17 of file RhoMaker.h.

Referenced by RhoMaker(), and SetVars().

edm::EDGetTokenT<double> RhoMaker::RhoForEGIso_
private

Definition at line 20 of file RhoMaker.h.

Referenced by RhoMaker(), and SetVars().

edm::EDGetTokenT<double> RhoMaker::wwRho_
private

Definition at line 18 of file RhoMaker.h.

Referenced by RhoMaker(), and SetVars().

edm::EDGetTokenT<double> RhoMaker::wwRhoVor_
private

Definition at line 19 of file RhoMaker.h.

Referenced by RhoMaker(), and SetVars().