CMS 3D CMS Logo

Public Member Functions | Private Attributes | Friends

PFJetAlgorithm::Jet Class Reference

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

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

Definition at line 25 of file PFJetAlgorithm.h.

References Add().

                                                          : fAllVecs(allvecs) {
      Add(i);
    }
PFJetAlgorithm::Jet::~Jet ( ) [inline]

Definition at line 28 of file PFJetAlgorithm.h.

{}

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

                    {
      fVecIndexes.push_back(i);      
      fMomentum += (*fAllVecs)[i];
    }
void PFJetAlgorithm::Jet::Clear ( ) [inline]

Definition at line 35 of file PFJetAlgorithm.h.

References fMomentum, and fVecIndexes.

Referenced by PFJetAlgorithm::Update().

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

Definition at line 44 of file PFJetAlgorithm.h.

References fVecIndexes.

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

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

Definition at line 37 of file PFJetAlgorithm.h.

References fMomentum, and fVecIndexes.

                                      {
      fVecIndexes.insert( fVecIndexes.begin(), other.fVecIndexes.begin(), other.fVecIndexes.end());
      fMomentum += other.fMomentum;
      return *this;
    }

Friends And Related Function Documentation

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

Definition at line 9 of file PFJetAlgorithm.cc.

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

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