CMS 3D CMS Logo

ProtoJet Class Reference

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

#include <RecoJets/JetAlgorithms/interface/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 ()
 Make kinematics from constituents.
void calculateLorentzVectorERecombination ()
void calculateLorentzVectorEtRecombination ()
double e () const
 Returns the total energy of the jet.
double energy () const
 Returns the total energy of the jet.
double et () const
 Returns the transverse energy of the jet.
double eta () const
 Returns the pseudorapidity of the jet.
const ConstituentsgetPresortedTowerList () const
 Returns the list of presorted towers in a particular protojet.
Constituents getTowerList () const
const ConstituentsgetTowerList ()
 Returns the list of towers in a particular protojet.
float jetArea () const
 Jet area as calculated by algorithm.
double m () const
 Returns the jet mass of the jet.
int nPasses () const
 number of passes taken by algorithm
int numberOfConstituents () const
 Returns the number of constituents of the Jet.
double p () const
 Returns the modulus of the momentum of the jet.
const LorentzVectorp4 () const
 Returns a Lorentz vector from the four-momentum components.
double phi () const
 Returns the azimuthal angle of the jet, Phi.
float pileup () const
 pileup energy contribution as calculated by algorithm
 ProtoJet (const LorentzVector &fP4, const Constituents &fConstituents)
 ProtoJet (const Constituents &theConstituents)
 ProtoJet ()
 Default Constructor.
double pt () const
 Returns the transverse momentum of the jet.
void putTowers (const Constituents &towers)
 Sets the list of towers in a protojet.
double px () const
 Returns the jet momentum component along the x axis.
double py () const
 Returns the jet momentum component along the y axis.
double pz () const
 Returns the jet momentum component along the z axis.
void reorderTowers ()
 Reorder towers by eT.
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
 Returns the rapidity of the jet.
 ~ProtoJet ()
 Destructor.

Private Attributes

Constituents mConstituents
 Jet constituents.
float mJetArea
 Parameters returning from algorithms.
bool mOrdered
LorentzVector mP4
 Jet kinematics.
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

typedef JetReco::InputItem ProtoJet::Constituent

Definition at line 27 of file ProtoJet.h.

typedef JetReco::InputCollection ProtoJet::Constituents

Definition at line 28 of file ProtoJet.h.

typedef math::XYZTLorentzVector ProtoJet::LorentzVector

Definition at line 30 of file ProtoJet.h.


Constructor & Destructor Documentation

ProtoJet::ProtoJet (  ) 

Default Constructor.

Definition at line 48 of file ProtoJet.cc.

00049   : mOrdered (false), 
00050     mJetArea (0), 
00051     mPileupEnergy (0), 
00052     mPassNumber (0) 
00053 {}

ProtoJet::ProtoJet ( const Constituents theConstituents  ) 

Definition at line 55 of file ProtoJet.cc.

References calculateLorentzVector().

00056   : mConstituents (fConstituents),
00057     mOrdered (false), 
00058     mJetArea (0), 
00059     mPileupEnergy (0), 
00060     mPassNumber (0) 
00061 {
00062   calculateLorentzVector(); 
00063 }

ProtoJet::ProtoJet ( const LorentzVector fP4,
const Constituents fConstituents 
)

Definition at line 65 of file ProtoJet.cc.

00066   : mP4 (fP4), 
00067     mConstituents (fConstituents),
00068     mOrdered (false), 
00069     mJetArea (0), 
00070     mPileupEnergy (0), 
00071     mPassNumber (0) 
00072 
00073 {}

ProtoJet::~ProtoJet (  )  [inline]

Destructor.

Definition at line 41 of file ProtoJet.h.

00041 {}


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 c, i, mConstituents, and mP4.

Referenced by calculateLorentzVector().

00112                                                     {
00113   mP4 = LorentzVector (0,0,0,0);
00114   for(Constituents::const_iterator i = mConstituents.begin(); i !=  mConstituents.end(); ++i) {
00115     const Constituent c = *i;
00116     mP4 += c->p4();
00117   } //end of loop over the jet constituents
00118 }

void ProtoJet::calculateLorentzVectorEtRecombination (  ) 

Definition at line 120 of file ProtoJet.cc.

References mConstituents, and mP4.

00120                                                      {
00121   mP4 = calculateLorentzVectorRecombination <EtRecombination> (mConstituents);
00122 }

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

00067 {return mP4.E();}

double ProtoJet::energy (  )  const [inline]

Returns the total energy of the jet.

Definition at line 69 of file ProtoJet.h.

References e().

00069 {return e();}

double ProtoJet::et (  )  const [inline]

Returns the transverse energy of the jet.

Definition at line 77 of file ProtoJet.h.

References mP4.

00077 {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.

00083 {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 TestMuL1L2Filter_cff::cerr, lat::endl(), mConstituents, and mOrdered.

00094                                                                   {
00095   if (!mOrdered) std::cerr << "ProtoJet::getPresortedTowerList-> ERROR: constituents are not sorted." << std::endl;
00096   return mConstituents;
00097 }

ProtoJet::Constituents ProtoJet::getTowerList (  )  const

Definition at line 87 of file ProtoJet.cc.

References mConstituents, mOrdered, HLT_VtxMuL3::result, and sortByEtRef().

00087                                                   {
00088   if (mOrdered) return mConstituents;
00089   ProtoJet::Constituents result (mConstituents);
00090   sortByEtRef (&result);
00091   return result;
00092 }

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(), cms::BasePilupSubtractionJetProducer::produce(), cms::BaseJetProducer::produce(), PFRootEventManager::reconstructGenJets(), PFRootEventManager::reconstructPFJets(), and CMSMidpointAlgorithm::splitAndMerge().

00082                                                    {
00083   reorderTowers ();
00084   return mConstituents;
00085 }

float ProtoJet::jetArea (  )  const

Jet area as calculated by algorithm.

Definition at line 76 of file ProtoJet.cc.

References mJetArea.

Referenced by copyVariables(), cms::BasePilupSubtractionJetProducer::produce(), PFRootEventManager::reconstructGenJets(), and PFRootEventManager::reconstructPFJets().

00076 {return mJetArea;}

double ProtoJet::m (  )  const [inline]

Returns the jet mass of the jet.

Definition at line 79 of file ProtoJet.h.

References mP4.

00079 {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 copyVariables(), cms::BasePilupSubtractionJetProducer::produce(), PFRootEventManager::reconstructGenJets(), and PFRootEventManager::reconstructPFJets().

00080 {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.

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

00073 {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(), cms::BasePilupSubtractionJetProducer::produce(), cms::BaseJetProducer::produce(), PFRootEventManager::reconstructGenJets(), PFRootEventManager::reconstructPFJets(), and CMSMidpointAlgorithm::splitAndMerge().

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

00081 {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 copyVariables(), cms::BasePilupSubtractionJetProducer::produce(), PFRootEventManager::reconstructGenJets(), and PFRootEventManager::reconstructPFJets().

00078 {return mPileupEnergy;}

double ProtoJet::pt ( void   )  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().

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

00099                                                    {
00100   mConstituents = towers; 
00101   mOrdered = false;
00102   calculateLorentzVector();
00103 }

double ProtoJet::px (  )  const [inline]

Returns the jet momentum component along the x axis.

Definition at line 61 of file ProtoJet.h.

References mP4.

00061 {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.

00063 {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.

00065 {return mP4.Pz();}

void ProtoJet::reorderTowers (  ) 

Reorder towers by eT.

Definition at line 105 of file ProtoJet.cc.

References mConstituents, mOrdered, and sortByEtRef().

Referenced by getTowerList().

00105                               {
00106   if (!mOrdered) {
00107     sortByEtRef (&mConstituents);
00108     mOrdered = true;
00109   }
00110 }

void ProtoJet::setJetArea ( float  fArea  ) 

Set Jet area as calculated by algorithm.

Definition at line 75 of file ProtoJet.cc.

References mJetArea.

00075 {mJetArea = fArea;}

void ProtoJet::setNPasses ( int  fPasses  ) 

Set number of passes taken by algorithm.

Definition at line 79 of file ProtoJet.cc.

References mPassNumber.

00079 {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.

00077 {mPileupEnergy = fEnergy;}

double ProtoJet::y ( void   )  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().

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


Member Data Documentation

Constituents ProtoJet::mConstituents [private]

Jet constituents.

Definition at line 119 of file ProtoJet.h.

Referenced by calculateLorentzVectorERecombination(), calculateLorentzVectorEtRecombination(), getPresortedTowerList(), getTowerList(), numberOfConstituents(), putTowers(), and reorderTowers().

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

LorentzVector ProtoJet::mP4 [private]

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


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:30:20 2009 for CMSSW by  doxygen 1.5.4