00001 #ifndef JetAlgorithms_ProtoJet_h 00002 #define JetAlgorithms_ProtoJet_h 00003 00018 #include "RecoParticleFlow/PFRootEvent/interface/JetRecoTypes.h" 00019 #include "DataFormats/Candidate/interface/CandidateFwd.h" 00020 #include "DataFormats/Math/interface/LorentzVector.h" 00021 00022 #include <vector> 00023 #include <string> 00024 00025 class ProtoJet { 00026 public: 00027 typedef JetReco::InputItem Constituent; 00028 typedef JetReco::InputCollection Constituents; 00029 00030 typedef math::XYZTLorentzVector LorentzVector; 00032 ProtoJet(); 00033 00034 //**Constructor. Runs off an array of CaloTower* */ 00035 ProtoJet(const Constituents& theConstituents); 00036 00037 //**Full Constructor */ 00038 ProtoJet(const LorentzVector& fP4, const Constituents& fConstituents); 00039 00041 ~ProtoJet() {} 00042 00044 void setJetArea (float fArea); 00046 float jetArea () const; 00047 00049 void setPileup (float fEnergy); 00051 float pileup () const; 00052 00054 void setNPasses (int fPasses); 00056 int nPasses () const; 00057 00058 00059 // The Jet four-vector as a true Lorentz vector 00061 double px() const {return mP4.Px();} 00063 double py() const {return mP4.Py();} 00065 double pz() const {return mP4.Pz();} 00067 double e() const {return mP4.E();} 00069 double energy() const {return e();} 00070 00071 // Standard quantities derived from the Jet Lorentz vector 00073 double p() const {return mP4.P();} 00075 double pt() const {return mP4.Pt();} 00077 double et() const {return mP4.Et();} 00079 double m() const {return mP4.M();} 00081 double phi() const {return mP4.Phi();} 00083 double eta() const {return mP4.Eta();} 00085 double y() const {return p() > 0 ? mP4.Rapidity() : 0;} 00087 int numberOfConstituents() const {return mConstituents.size();}; 00088 00089 00091 const LorentzVector& p4() const {return mP4;} 00092 00093 00095 const Constituents& getTowerList(); 00096 Constituents getTowerList() const; 00097 00099 const Constituents& getPresortedTowerList() const; 00100 00102 void putTowers(const Constituents& towers); 00103 00105 void reorderTowers (); 00106 00108 void calculateLorentzVector() {calculateLorentzVectorERecombination();} 00109 void calculateLorentzVectorERecombination(); 00110 void calculateLorentzVectorEtRecombination(); 00111 00112 00113 00114 00115 private: 00117 LorentzVector mP4; 00119 Constituents mConstituents; 00120 bool mOrdered; 00122 float mJetArea; 00123 float mPileupEnergy; 00124 int mPassNumber; 00125 }; 00126 00127 #endif