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 | Friends
PFJetAlgorithm::Jet Class Reference

#include <PFJetAlgorithm.h>

Public Member Functions

void Add (int i)
 
void Clear ()
 
const std::vector< int > & GetIndexes () const
 
const TLorentzVector & GetMomentum () const
 
 Jet ()
 
 Jet (int i, const std::vector< TLorentzVector > *allvecs)
 
Jetoperator+= (const Jet &other)
 
 ~Jet ()
 

Private Attributes

const std::vector
< TLorentzVector > * 
fAllVecs
 
TLorentzVector fMomentum
 
std::vector< int > fVecIndexes
 

Friends

ostream & operator<< (ostream &out, const PFJetAlgorithm::Jet &jet)
 

Detailed Description

Definition at line 15 of file PFJetAlgorithm.h.

Constructor & Destructor Documentation

PFJetAlgorithm::Jet::Jet ( )
inline

Definition at line 24 of file PFJetAlgorithm.h.

24 : fAllVecs(0) {}
const std::vector< TLorentzVector > * fAllVecs
PFJetAlgorithm::Jet::Jet ( int  i,
const std::vector< TLorentzVector > *  allvecs 
)
inline

Definition at line 25 of file PFJetAlgorithm.h.

References Add().

25  : fAllVecs(allvecs) {
26  Add(i);
27  }
int i
Definition: DBlmapReader.cc:9
const std::vector< TLorentzVector > * fAllVecs
PFJetAlgorithm::Jet::~Jet ( )
inline

Definition at line 28 of file PFJetAlgorithm.h.

28 {}

Member Function Documentation

void PFJetAlgorithm::Jet::Add ( int  i)
inline

Definition at line 30 of file PFJetAlgorithm.h.

References fMomentum, fVecIndexes, and i.

Referenced by PFJetAlgorithm::FindJets(), Jet(), and PFJetAlgorithm::Update().

30  {
31  fVecIndexes.push_back(i);
32  fMomentum += (*fAllVecs)[i];
33  }
int i
Definition: DBlmapReader.cc:9
std::vector< int > fVecIndexes
TLorentzVector fMomentum
void PFJetAlgorithm::Jet::Clear ( )
inline

Definition at line 35 of file PFJetAlgorithm.h.

References fMomentum, and fVecIndexes.

Referenced by PFJetAlgorithm::Update().

35 { fVecIndexes.clear(); fMomentum *= 0;}
std::vector< int > fVecIndexes
TLorentzVector fMomentum
const std::vector<int>& PFJetAlgorithm::Jet::GetIndexes ( ) const
inline

Definition at line 44 of file PFJetAlgorithm.h.

References fVecIndexes.

44 {return fVecIndexes;}
std::vector< int > fVecIndexes
const TLorentzVector& PFJetAlgorithm::Jet::GetMomentum ( ) const
inline

Definition at line 43 of file PFJetAlgorithm.h.

References fMomentum.

Referenced by PFJetAlgorithm::FindJets(), and PFJetAlgorithm::Update().

43 {return fMomentum;}
TLorentzVector fMomentum
Jet& PFJetAlgorithm::Jet::operator+= ( const Jet other)
inline

Definition at line 37 of file PFJetAlgorithm.h.

References fMomentum, and fVecIndexes.

37  {
38  fVecIndexes.insert( fVecIndexes.begin(), other.fVecIndexes.begin(), other.fVecIndexes.end());
39  fMomentum += other.fMomentum;
40  return *this;
41  }
std::vector< int > fVecIndexes
TLorentzVector fMomentum

Friends And Related Function Documentation

ostream& operator<< ( ostream &  out,
const PFJetAlgorithm::Jet jet 
)
friend

Definition at line 9 of file PFJetAlgorithm.cc.

9  {
10  if(!out) return out;
11  cout<<"jet "<<jet.fVecIndexes.size()<<" particles, E_T = "<<jet.fMomentum.Et()<<" eta/phi "
12  <<jet.fMomentum.Eta()<<" "<<jet.fMomentum.Phi();
13  return out;
14 }
tuple out
Definition: dbtoconf.py:99
std::vector< int > fVecIndexes
tuple cout
Definition: gather_cfg.py:41
TLorentzVector fMomentum

Member Data Documentation

const std::vector<TLorentzVector>* PFJetAlgorithm::Jet::fAllVecs
private

Definition at line 18 of file PFJetAlgorithm.h.

TLorentzVector PFJetAlgorithm::Jet::fMomentum
private

Definition at line 20 of file PFJetAlgorithm.h.

Referenced by Add(), Clear(), GetMomentum(), operator+=(), and operator<<().

std::vector<int> PFJetAlgorithm::Jet::fVecIndexes
private

Definition at line 21 of file PFJetAlgorithm.h.

Referenced by Add(), Clear(), GetIndexes(), operator+=(), and operator<<().