Transient Jet class used by the reconstruction algorithms. More...
#include <ProtoJet.h>
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 Constituents & | getPresortedTowerList () const |
const Constituents & | getTowerList () |
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 LorentzVector & | p4 () 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 |
Transient Jet class used by the reconstruction algorithms.
ProtoJet is a transitent class used by the reconstruction algorithms.
Definition at line 25 of file ProtoJet.h.
Definition at line 27 of file ProtoJet.h.
Definition at line 28 of file ProtoJet.h.
Definition at line 30 of file ProtoJet.h.
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] |
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.
Referenced by CMSMidpointAlgorithm::findStableConesFromMidPoints(), CMSMidpointAlgorithm::iterateCone(), and CMSMidpointAlgorithm::splitAndMerge().
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] |
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().