CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
RhoMaker.cc
Go to the documentation of this file.
2 
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 }
11 
12 void RhoMaker::SetVars(HWW& hww, const edm::Event& iEvent, const edm::EventSetup& iSetup) {
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 }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
T getParameter(std::string const &) const
edm::EDGetTokenT< double > wwRhoVor_
Definition: RhoMaker.h:19
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:446
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
int iEvent
Definition: GenABIO.cc:230
edm::EDGetTokenT< double > wwRho_
Definition: RhoMaker.h:18
Definition: HWW.h:12
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
RhoMaker(const edm::ParameterSet &, edm::ConsumesCollector)
Definition: RhoMaker.cc:3
float & evt_rho()
Definition: HWW.cc:631
float & evt_kt6pf_foregiso_rho()
Definition: HWW.cc:635
void SetVars(HWW &, const edm::Event &, const edm::EventSetup &)
Definition: RhoMaker.cc:12
float & evt_ww_rho()
Definition: HWW.cc:627
void Load_evt_kt6pf_foregiso_rho()
Definition: HWW.cc:1265