CMS 3D CMS Logo

PFJetAlgorithm::Jet Class Reference

#include <RecoParticleFlow/PFRootEvent/interface/PFJetAlgorithm.h>

List of all members.

Public Member Functions

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

Private Attributes

const std::vector
< TLorentzVector > * 
fAllVecs
TLorentzVector fMomentum
std::vector< intfVecIndexes

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.

00024 : fAllVecs(0) {}

PFJetAlgorithm::Jet::Jet ( int  i,
const std::vector< TLorentzVector > *  allvecs 
) [inline]

Definition at line 25 of file PFJetAlgorithm.h.

References Add().

00025                                                           : fAllVecs(allvecs) {
00026       Add(i);
00027     }

PFJetAlgorithm::Jet::~Jet (  )  [inline]

Definition at line 28 of file PFJetAlgorithm.h.

00028 {}


Member Function Documentation

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

Definition at line 30 of file PFJetAlgorithm.h.

References fMomentum, and fVecIndexes.

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

00030                     {
00031       fVecIndexes.push_back(i);      
00032       fMomentum += (*fAllVecs)[i];
00033     }

void PFJetAlgorithm::Jet::Clear (  )  [inline]

Definition at line 35 of file PFJetAlgorithm.h.

References fMomentum, and fVecIndexes.

Referenced by PFJetAlgorithm::Update().

00035 { fVecIndexes.clear(); fMomentum *= 0;} 

const std::vector<int>& PFJetAlgorithm::Jet::GetIndexes (  )  const [inline]

Definition at line 44 of file PFJetAlgorithm.h.

References fVecIndexes.

00044 {return fVecIndexes;}

const TLorentzVector& PFJetAlgorithm::Jet::GetMomentum (  )  const [inline]

Definition at line 43 of file PFJetAlgorithm.h.

References fMomentum.

Referenced by PFJetAlgorithm::Update().

00043 {return fMomentum;}

Jet& PFJetAlgorithm::Jet::operator+= ( const Jet other  )  [inline]

Definition at line 37 of file PFJetAlgorithm.h.

References fMomentum, and fVecIndexes.

00037                                       {
00038       fVecIndexes.insert( fVecIndexes.begin(), other.fVecIndexes.begin(), other.fVecIndexes.end());
00039       fMomentum += other.fMomentum;
00040       return *this;
00041     }


Friends And Related Function Documentation

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

Definition at line 9 of file PFJetAlgorithm.cc.

00009                                                                 {
00010   if(!out) return out;
00011   cout<<"jet "<<jet.fVecIndexes.size()<<" particles, E_T = "<<jet.fMomentum.Et()<<" eta/phi "
00012       <<jet.fMomentum.Eta()<<" "<<jet.fMomentum.Phi();
00013   return out;
00014 }


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<<().


The documentation for this class was generated from the following file:
Generated on Tue Jun 9 18:29:43 2009 for CMSSW by  doxygen 1.5.4