CMS 3D CMS Logo

Public Types | Public Member Functions | Private Attributes

ProtoJet Class Reference

Transient Jet class used by the reconstruction algorithms. More...

#include <ProtoJet.h>

List of all members.

Public Types

typedef JetReco::InputItem Constituent
typedef JetReco::InputCollection Constituents
typedef math::XYZTLorentzVector LorentzVector

Public Member Functions

void calculateLorentzVector ()
void calculateLorentzVectorERecombination ()
void calculateLorentzVectorEtRecombination ()
double e () const
double energy () const
double et () const
double eta () const
const ConstituentsgetPresortedTowerList () const
const ConstituentsgetTowerList ()
Constituents getTowerList () const
float jetArea () const
 Jet area as calculated by algorithm.
double m () const
int nPasses () const
 number of passes taken by algorithm
int numberOfConstituents () const
double p () const
const LorentzVectorp4 () const
double phi () const
float pileup () const
 pileup energy contribution as calculated by algorithm
 ProtoJet (const Constituents &theConstituents)
 ProtoJet (const LorentzVector &fP4, const Constituents &fConstituents)
 ProtoJet ()
double pt () const
void putTowers (const Constituents &towers)
double px () const
double py () const
double pz () const
void reorderTowers ()
void setJetArea (float fArea)
 Set Jet area as calculated by algorithm.
void setNPasses (int fPasses)
 Set number of passes taken by algorithm.
void setPileup (float fEnergy)
 Set pileup energy contribution as calculated by algorithm.
double y () const
 ~ProtoJet ()

Private Attributes

Constituents mConstituents
float mJetArea
 Parameters returning from algorithms.
bool mOrdered
LorentzVector mP4
int mPassNumber
float mPileupEnergy

Detailed Description

Transient Jet class used by the reconstruction algorithms.

ProtoJet is a transitent class used by the reconstruction algorithms.

Author:
Fernando Varela Rodriguez, Boston University
Version:
1st Version April 22, 2005.
2nd Version Oct 19, 2005, R. Harris, modified to work with real CaloTowers from Jeremy Mans.
3rd Version Mar 8, 2006, F.Ratnikov, use Candidate approach

Definition at line 25 of file ProtoJet.h.


Member Typedef Documentation

Definition at line 27 of file ProtoJet.h.

Definition at line 28 of file ProtoJet.h.

Definition at line 30 of file ProtoJet.h.


Constructor & Destructor Documentation

ProtoJet::ProtoJet ( )

Default Constructor

Definition at line 48 of file ProtoJet.cc.

  : mOrdered (false), 
    mJetArea (0), 
    mPileupEnergy (0), 
    mPassNumber (0) 
{}
ProtoJet::ProtoJet ( const Constituents theConstituents)

Definition at line 55 of file ProtoJet.cc.

References calculateLorentzVector().

  : mConstituents (fConstituents),
    mOrdered (false), 
    mJetArea (0), 
    mPileupEnergy (0), 
    mPassNumber (0) 
{
  calculateLorentzVector(); 
}
ProtoJet::ProtoJet ( const LorentzVector fP4,
const Constituents fConstituents 
)

Definition at line 65 of file ProtoJet.cc.

  : mP4 (fP4), 
    mConstituents (fConstituents),
    mOrdered (false), 
    mJetArea (0), 
    mPileupEnergy (0), 
    mPassNumber (0) 

{}
ProtoJet::~ProtoJet ( ) [inline]

Destructor

Definition at line 41 of file ProtoJet.h.

{}

Member Function Documentation

void ProtoJet::calculateLorentzVector ( ) [inline]

Make kinematics from constituents

Definition at line 108 of file ProtoJet.h.

References calculateLorentzVectorERecombination().

Referenced by ProtoJet(), and putTowers().

void ProtoJet::calculateLorentzVectorERecombination ( )

Definition at line 112 of file ProtoJet.cc.

References trackerHits::c, i, mConstituents, and mP4.

Referenced by calculateLorentzVector().

                                                    {
  mP4 = LorentzVector (0,0,0,0);
  for(Constituents::const_iterator i = mConstituents.begin(); i !=  mConstituents.end(); ++i) {
    const Constituent c = *i;
    mP4 += c->p4();
  } //end of loop over the jet constituents
}
void ProtoJet::calculateLorentzVectorEtRecombination ( )

Definition at line 120 of file ProtoJet.cc.

References mConstituents, and mP4.

                                                     {
  mP4 = calculateLorentzVectorRecombination <EtRecombination> (mConstituents);
}
double ProtoJet::e ( ) const [inline]

Returns the total energy of the jet

Definition at line 67 of file ProtoJet.h.

References mP4.

Referenced by energy(), and CMSMidpointAlgorithm::iterateCone().

{return mP4.E();}
double ProtoJet::energy ( void  ) const [inline]

Returns the total energy of the jet

Definition at line 69 of file ProtoJet.h.

References e().

{return e();}
double ProtoJet::et ( ) const [inline]

Returns the transverse energy of the jet

Definition at line 77 of file ProtoJet.h.

References mP4.

{return mP4.Et();}
double ProtoJet::eta ( void  ) const [inline]

Returns the pseudorapidity of the jet

Definition at line 83 of file ProtoJet.h.

References mP4.

{return mP4.Eta();}
const ProtoJet::Constituents & ProtoJet::getPresortedTowerList ( ) const

Returns the list of presorted towers in a particular protojet

Definition at line 94 of file ProtoJet.cc.

References ExpressReco_HICollisions_FallBack::cerr, mConstituents, and mOrdered.

                                                                  {
  if (!mOrdered) std::cerr << "ProtoJet::getPresortedTowerList-> ERROR: constituents are not sorted." << std::endl;
  return mConstituents;
}
ProtoJet::Constituents ProtoJet::getTowerList ( ) const

Definition at line 87 of file ProtoJet.cc.

References mConstituents, mOrdered, and query::result.

                                                  {
  if (mOrdered) return mConstituents;
  ProtoJet::Constituents result (mConstituents);
  sortByEtRef (&result);
  return result;
}
const ProtoJet::Constituents & ProtoJet::getTowerList ( )

Returns the list of towers in a particular protojet

Definition at line 82 of file ProtoJet.cc.

References mConstituents, and reorderTowers().

Referenced by CMSMidpointAlgorithm::iterateCone(), PFRootEventManager::reconstructGenJets(), PFRootEventManager::reconstructPFJets(), and CMSMidpointAlgorithm::splitAndMerge().

                                                   {
  reorderTowers ();
  return mConstituents;
}
float ProtoJet::jetArea ( ) const

Jet area as calculated by algorithm.

Definition at line 76 of file ProtoJet.cc.

References mJetArea.

Referenced by PFRootEventManager::reconstructGenJets(), and PFRootEventManager::reconstructPFJets().

{return mJetArea;}
double ProtoJet::m ( ) const [inline]

Returns the jet mass of the jet

Definition at line 79 of file ProtoJet.h.

References mP4.

{return mP4.M();}
int ProtoJet::nPasses ( ) const

number of passes taken by algorithm

Definition at line 80 of file ProtoJet.cc.

References mPassNumber.

Referenced by PFRootEventManager::reconstructGenJets(), and PFRootEventManager::reconstructPFJets().

{return mPassNumber;}
int ProtoJet::numberOfConstituents ( ) const [inline]

Returns the number of constituents of the Jet

Definition at line 87 of file ProtoJet.h.

References mConstituents.

{return mConstituents.size();};
double ProtoJet::p ( ) const [inline]

Returns the modulus of the momentum of the jet

Definition at line 73 of file ProtoJet.h.

References mP4.

Referenced by y().

{return mP4.P();}
const LorentzVector& ProtoJet::p4 ( ) const [inline]

Returns a Lorentz vector from the four-momentum components

Definition at line 91 of file ProtoJet.h.

References mP4.

Referenced by CMSMidpointAlgorithm::iterateCone(), PFRootEventManager::reconstructGenJets(), PFRootEventManager::reconstructPFJets(), and CMSMidpointAlgorithm::splitAndMerge().

{return mP4;}
double ProtoJet::phi ( void  ) const [inline]

Returns the azimuthal angle of the jet, Phi

Definition at line 81 of file ProtoJet.h.

References mP4.

Referenced by CMSMidpointAlgorithm::findStableConesFromMidPoints(), CMSMidpointAlgorithm::iterateCone(), and CMSMidpointAlgorithm::splitAndMerge().

{return mP4.Phi();}
float ProtoJet::pileup ( ) const

pileup energy contribution as calculated by algorithm

Definition at line 78 of file ProtoJet.cc.

References mPileupEnergy.

Referenced by PFRootEventManager::reconstructGenJets(), and PFRootEventManager::reconstructPFJets().

{return mPileupEnergy;}
double ProtoJet::pt ( ) const [inline]

Returns the transverse momentum of the jet

Definition at line 75 of file ProtoJet.h.

References mP4.

Referenced by CMSMidpointAlgorithm::iterateCone(), ProtoJetPtGreater::operator()(), PFRootEventManager::reconstructCaloJets(), and CMSMidpointAlgorithm::splitAndMerge().

{return mP4.Pt();}
void ProtoJet::putTowers ( const Constituents towers)

Sets the list of towers in a protojet

Definition at line 99 of file ProtoJet.cc.

References calculateLorentzVector(), mConstituents, and mOrdered.

Referenced by CMSMidpointAlgorithm::iterateCone(), and CMSMidpointAlgorithm::splitAndMerge().

                                                   {
  mConstituents = towers; 
  mOrdered = false;
  calculateLorentzVector();
}
double ProtoJet::px ( ) const [inline]

Returns the jet momentum component along the x axis

Definition at line 61 of file ProtoJet.h.

References mP4.

{return mP4.Px();}
double ProtoJet::py ( ) const [inline]

Returns the jet momentum component along the y axis

Definition at line 63 of file ProtoJet.h.

References mP4.

{return mP4.Py();}
double ProtoJet::pz ( ) const [inline]

Returns the jet momentum component along the z axis

Definition at line 65 of file ProtoJet.h.

References mP4.

{return mP4.Pz();}
void ProtoJet::reorderTowers ( )

Reorder towers by eT

Definition at line 105 of file ProtoJet.cc.

References mConstituents, and mOrdered.

Referenced by getTowerList().

                              {
  if (!mOrdered) {
    sortByEtRef (&mConstituents);
    mOrdered = true;
  }
}
void ProtoJet::setJetArea ( float  fArea)

Set Jet area as calculated by algorithm.

Definition at line 75 of file ProtoJet.cc.

References mJetArea.

{mJetArea = fArea;}
void ProtoJet::setNPasses ( int  fPasses)

Set number of passes taken by algorithm.

Definition at line 79 of file ProtoJet.cc.

References mPassNumber.

{mPassNumber = fPasses;}
void ProtoJet::setPileup ( float  fEnergy)

Set pileup energy contribution as calculated by algorithm.

Definition at line 77 of file ProtoJet.cc.

References mPileupEnergy.

{mPileupEnergy = fEnergy;}
double ProtoJet::y ( ) const [inline]

Returns the rapidity of the jet

Definition at line 85 of file ProtoJet.h.

References mP4, and p().

Referenced by CMSMidpointAlgorithm::findStableConesFromMidPoints(), CMSMidpointAlgorithm::iterateCone(), and CMSMidpointAlgorithm::splitAndMerge().

{return p() > 0 ? mP4.Rapidity() : 0;}

Member Data Documentation

float ProtoJet::mJetArea [private]

Parameters returning from algorithms.

Definition at line 122 of file ProtoJet.h.

Referenced by jetArea(), and setJetArea().

bool ProtoJet::mOrdered [private]

Definition at line 120 of file ProtoJet.h.

Referenced by getPresortedTowerList(), getTowerList(), putTowers(), and reorderTowers().

Jet kinematics

Definition at line 117 of file ProtoJet.h.

Referenced by calculateLorentzVectorERecombination(), calculateLorentzVectorEtRecombination(), e(), et(), eta(), m(), p(), p4(), phi(), pt(), px(), py(), pz(), and y().

int ProtoJet::mPassNumber [private]

Definition at line 124 of file ProtoJet.h.

Referenced by nPasses(), and setNPasses().

float ProtoJet::mPileupEnergy [private]

Definition at line 123 of file ProtoJet.h.

Referenced by pileup(), and setPileup().