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

#include <PFJetMaker.h>

Public Member Functions

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

Private Attributes

edm::EDGetTokenT
< reco::JetFloatAssociation::Container
BJetTags_
 
edm::EDGetTokenT< edm::View
< reco::Jet > > 
PFJetCollection_
 

Detailed Description

Definition at line 10 of file PFJetMaker.h.

Constructor & Destructor Documentation

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

Definition at line 6 of file PFJetMaker.cc.

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

6  {
7 
8  PFJetCollection_ = iCollector.consumes<edm::View<reco::Jet> >(iConfig.getParameter<edm::InputTag>("pfJetsInputTag"));
9  BJetTags_ = iCollector.consumes<reco::JetFloatAssociation::Container>(iConfig.getParameter<edm::InputTag>("trackCountingHighEffBJetTags"));
10 
11 }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
T getParameter(std::string const &) const
edm::EDGetTokenT< reco::JetFloatAssociation::Container > BJetTags_
Definition: PFJetMaker.h:20
edm::EDGetTokenT< edm::View< reco::Jet > > PFJetCollection_
Definition: PFJetMaker.h:19

Member Function Documentation

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

Definition at line 13 of file PFJetMaker.cc.

References BJetTags_, edm::Event::getByToken(), customizeTrackingMonitorSeedNumber::idx, HWW::Load_pfjets_area(), HWW::Load_pfjets_p4(), HWW::Load_pfjets_trackCountingHighEffBJetTag(), PFJetCollection_, HWW::pfjets_area(), HWW::pfjets_p4(), HWW::pfjets_trackCountingHighEffBJetTag(), and trackCountingHighEffBJetTags_cfi::trackCountingHighEffBJetTags.

Referenced by HWWAnalyzer::analyze().

13  {
14 
15  hww.Load_pfjets_p4();
16  hww.Load_pfjets_area();
18 
19  bool validToken;
20 
21  edm::Handle<edm::View<reco::Jet> > pfjetsHandle;
22  validToken = iEvent.getByToken(PFJetCollection_, pfjetsHandle );
23  if(!validToken) return;
24 
26  validToken = iEvent.getByToken(BJetTags_, trackCountingHighEffBJetTags);
27  if(!validToken) return;
28 
29  for(edm::View<reco::Jet>::const_iterator jet_it = pfjetsHandle->begin(); jet_it != pfjetsHandle->end(); jet_it++) {
30 
31  if(jet_it->pt() <= 0.0 ) continue;
32 
33  hww.pfjets_p4() .push_back( LorentzVector( jet_it->p4() ) );
34  hww.pfjets_area() .push_back(jet_it->jetArea() );
35 
36  unsigned int idx = jet_it-pfjetsHandle->begin();
37  edm::RefToBase<reco::Jet> jetRef = pfjetsHandle->refAt(idx);
38 
39  hww.pfjets_trackCountingHighEffBJetTag().push_back( (*trackCountingHighEffBJetTags)[jetRef] );
40 
41  }
42 
43 }
void Load_pfjets_p4()
Definition: HWW.cc:1364
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:449
void Load_pfjets_trackCountingHighEffBJetTag()
Definition: HWW.cc:1379
void Load_pfjets_area()
Definition: HWW.cc:1370
edm::EDGetTokenT< reco::JetFloatAssociation::Container > BJetTags_
Definition: PFJetMaker.h:20
edm::EDGetTokenT< edm::View< reco::Jet > > PFJetCollection_
Definition: PFJetMaker.h:19
tuple idx
DEBUGGING if hasattr(process,&quot;trackMonIterativeTracking2012&quot;): print &quot;trackMonIterativeTracking2012 D...
std::vector< float > & pfjets_trackCountingHighEffBJetTag()
Definition: HWW.cc:789
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
Definition: View.h:81
std::vector< LorentzVector > & pfjets_p4()
Definition: HWW.cc:769
std::vector< float > & pfjets_area()
Definition: HWW.cc:777
math::PtEtaPhiELorentzVectorF LorentzVector

Member Data Documentation

Definition at line 20 of file PFJetMaker.h.

Referenced by PFJetMaker(), and SetVars().

edm::EDGetTokenT<edm::View<reco::Jet> > PFJetMaker::PFJetCollection_
private

Definition at line 19 of file PFJetMaker.h.

Referenced by PFJetMaker(), and SetVars().