CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Private Attributes
ProtoJet Class Reference

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 ConstituentsgetPresortedTowerList () const
 
const ConstituentsgetTowerList ()
 
Constituents getTowerList () const
 
float jetArea () const
 Jet area as calculated by algorithm. More...
 
double m () const
 
int nPasses () const
 number of passes taken by algorithm More...
 
int numberOfConstituents () const
 
double p () const
 
const LorentzVectorp4 () const
 
double phi () const
 
float pileup () const
 pileup energy contribution as calculated by algorithm More...
 
 ProtoJet ()
 
 ProtoJet (const Constituents &theConstituents)
 
 ProtoJet (const LorentzVector &fP4, const Constituents &fConstituents)
 
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. More...
 
void setNPasses (int fPasses)
 Set number of passes taken by algorithm. More...
 
void setPileup (float fEnergy)
 Set pileup energy contribution as calculated by algorithm. More...
 
double y () const
 
 ~ProtoJet ()
 

Private Attributes

Constituents mConstituents
 
float mJetArea
 Parameters returning from algorithms. More...
 
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.

49  : mOrdered (false),
50  mJetArea (0),
51  mPileupEnergy (0),
52  mPassNumber (0)
53 {}
float mPileupEnergy
Definition: ProtoJet.h:123
bool mOrdered
Definition: ProtoJet.h:120
int mPassNumber
Definition: ProtoJet.h:124
float mJetArea
Parameters returning from algorithms.
Definition: ProtoJet.h:122
ProtoJet::ProtoJet ( const Constituents theConstituents)

Definition at line 55 of file ProtoJet.cc.

References calculateLorentzVector().

56  : mConstituents (fConstituents),
57  mOrdered (false),
58  mJetArea (0),
59  mPileupEnergy (0),
60  mPassNumber (0)
61 {
63 }
float mPileupEnergy
Definition: ProtoJet.h:123
bool mOrdered
Definition: ProtoJet.h:120
int mPassNumber
Definition: ProtoJet.h:124
Constituents mConstituents
Definition: ProtoJet.h:119
float mJetArea
Parameters returning from algorithms.
Definition: ProtoJet.h:122
void calculateLorentzVector()
Definition: ProtoJet.h:108
ProtoJet::ProtoJet ( const LorentzVector fP4,
const Constituents fConstituents 
)

Definition at line 65 of file ProtoJet.cc.

66  : mP4 (fP4),
67  mConstituents (fConstituents),
68  mOrdered (false),
69  mJetArea (0),
70  mPileupEnergy (0),
71  mPassNumber (0)
72 
73 {}
float mPileupEnergy
Definition: ProtoJet.h:123
bool mOrdered
Definition: ProtoJet.h:120
int mPassNumber
Definition: ProtoJet.h:124
Constituents mConstituents
Definition: ProtoJet.h:119
float mJetArea
Parameters returning from algorithms.
Definition: ProtoJet.h:122
LorentzVector mP4
Definition: ProtoJet.h:117
ProtoJet::~ProtoJet ( )
inline

Destructor

Definition at line 41 of file ProtoJet.h.

41 {}

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 calculateLorentzVectorERecombination()
Definition: ProtoJet.cc:112
void ProtoJet::calculateLorentzVectorERecombination ( )

Definition at line 112 of file ProtoJet.cc.

References trackerHits::c, i, mConstituents, mP4, and reco::Candidate::p4().

Referenced by calculateLorentzVector().

112  {
113  mP4 = LorentzVector (0,0,0,0);
114  for(Constituents::const_iterator i = mConstituents.begin(); i != mConstituents.end(); ++i) {
115  const Constituent c = *i;
116  mP4 += c->p4();
117  } //end of loop over the jet constituents
118 }
int i
Definition: DBlmapReader.cc:9
JetReco::InputItem Constituent
Definition: ProtoJet.h:27
Constituents mConstituents
Definition: ProtoJet.h:119
LorentzVector mP4
Definition: ProtoJet.h:117
math::XYZTLorentzVector LorentzVector
Definition: ProtoJet.h:30
void ProtoJet::calculateLorentzVectorEtRecombination ( )

Definition at line 120 of file ProtoJet.cc.

References mConstituents, and mP4.

120  {
121  mP4 = calculateLorentzVectorRecombination <EtRecombination> (mConstituents);
122 }
Constituents mConstituents
Definition: ProtoJet.h:119
LorentzVector mP4
Definition: ProtoJet.h:117
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().

67 {return mP4.E();}
LorentzVector mP4
Definition: ProtoJet.h:117
double ProtoJet::energy ( void  ) const
inline

Returns the total energy of the jet

Definition at line 69 of file ProtoJet.h.

References e().

69 {return e();}
double e() const
Definition: ProtoJet.h:67
double ProtoJet::et ( ) const
inline

Returns the transverse energy of the jet

Definition at line 77 of file ProtoJet.h.

References mP4.

77 {return mP4.Et();}
LorentzVector mP4
Definition: ProtoJet.h:117
double ProtoJet::eta ( void  ) const
inline

Returns the pseudorapidity of the jet

Definition at line 83 of file ProtoJet.h.

References mP4.

83 {return mP4.Eta();}
LorentzVector mP4
Definition: ProtoJet.h:117
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 dtNoiseDBValidation_cfg::cerr, mConstituents, and mOrdered.

94  {
95  if (!mOrdered) std::cerr << "ProtoJet::getPresortedTowerList-> ERROR: constituents are not sorted." << std::endl;
96  return mConstituents;
97 }
bool mOrdered
Definition: ProtoJet.h:120
Constituents mConstituents
Definition: ProtoJet.h:119
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().

82  {
83  reorderTowers ();
84  return mConstituents;
85 }
void reorderTowers()
Definition: ProtoJet.cc:105
Constituents mConstituents
Definition: ProtoJet.h:119
ProtoJet::Constituents ProtoJet::getTowerList ( ) const

Definition at line 87 of file ProtoJet.cc.

References mConstituents, mOrdered, and query::result.

87  {
88  if (mOrdered) return mConstituents;
90  sortByEtRef (&result);
91  return result;
92 }
JetReco::InputCollection Constituents
Definition: ProtoJet.h:28
bool mOrdered
Definition: ProtoJet.h:120
Constituents mConstituents
Definition: ProtoJet.h:119
tuple result
Definition: query.py:137
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().

76 {return mJetArea;}
float mJetArea
Parameters returning from algorithms.
Definition: ProtoJet.h:122
double ProtoJet::m ( ) const
inline

Returns the jet mass of the jet

Definition at line 79 of file ProtoJet.h.

References mP4.

79 {return mP4.M();}
LorentzVector mP4
Definition: ProtoJet.h:117
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().

80 {return mPassNumber;}
int mPassNumber
Definition: ProtoJet.h:124
int ProtoJet::numberOfConstituents ( ) const
inline

Returns the number of constituents of the Jet

Definition at line 87 of file ProtoJet.h.

References mConstituents.

87 {return mConstituents.size();};
Constituents mConstituents
Definition: ProtoJet.h:119
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().

73 {return mP4.P();}
LorentzVector mP4
Definition: ProtoJet.h:117
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().

91 {return mP4;}
LorentzVector mP4
Definition: ProtoJet.h:117
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().

81 {return mP4.Phi();}
LorentzVector mP4
Definition: ProtoJet.h:117
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().

78 {return mPileupEnergy;}
float mPileupEnergy
Definition: ProtoJet.h:123
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().

75 {return mP4.Pt();}
LorentzVector mP4
Definition: ProtoJet.h:117
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().

99  {
100  mConstituents = towers;
101  mOrdered = false;
103 }
bool mOrdered
Definition: ProtoJet.h:120
Constituents mConstituents
Definition: ProtoJet.h:119
void calculateLorentzVector()
Definition: ProtoJet.h:108
double ProtoJet::px ( ) const
inline

Returns the jet momentum component along the x axis

Definition at line 61 of file ProtoJet.h.

References mP4.

61 {return mP4.Px();}
LorentzVector mP4
Definition: ProtoJet.h:117
double ProtoJet::py ( ) const
inline

Returns the jet momentum component along the y axis

Definition at line 63 of file ProtoJet.h.

References mP4.

63 {return mP4.Py();}
LorentzVector mP4
Definition: ProtoJet.h:117
double ProtoJet::pz ( ) const
inline

Returns the jet momentum component along the z axis

Definition at line 65 of file ProtoJet.h.

References mP4.

65 {return mP4.Pz();}
LorentzVector mP4
Definition: ProtoJet.h:117
void ProtoJet::reorderTowers ( )

Reorder towers by eT

Definition at line 105 of file ProtoJet.cc.

References mConstituents, and mOrdered.

Referenced by getTowerList().

105  {
106  if (!mOrdered) {
107  sortByEtRef (&mConstituents);
108  mOrdered = true;
109  }
110 }
bool mOrdered
Definition: ProtoJet.h:120
Constituents mConstituents
Definition: ProtoJet.h:119
void ProtoJet::setJetArea ( float  fArea)

Set Jet area as calculated by algorithm.

Definition at line 75 of file ProtoJet.cc.

References mJetArea.

75 {mJetArea = fArea;}
float mJetArea
Parameters returning from algorithms.
Definition: ProtoJet.h:122
void ProtoJet::setNPasses ( int  fPasses)

Set number of passes taken by algorithm.

Definition at line 79 of file ProtoJet.cc.

References mPassNumber.

79 {mPassNumber = fPasses;}
int mPassNumber
Definition: ProtoJet.h:124
void ProtoJet::setPileup ( float  fEnergy)

Set pileup energy contribution as calculated by algorithm.

Definition at line 77 of file ProtoJet.cc.

References mPileupEnergy.

77 {mPileupEnergy = fEnergy;}
float mPileupEnergy
Definition: ProtoJet.h:123
double ProtoJet::y ( ) const
inline

Member Data Documentation

Constituents ProtoJet::mConstituents
private
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().