9 #ifndef ST_JET_CANDIDATE_H
10 #define ST_JET_CANDIDATE_H
16 #include "TLorentzVector.h"
18 #include "TRefArray.h"
40 StJetCandidate(
const TVector3&
vertex,
const TLorentzVector& fourMomentum,
float area = 0,
float area_error = 0);
42 TLorentzVector fourMomentum()
const;
43 TVector3 momentum()
const;
45 float pt ()
const {
return mPt ; }
46 float eta()
const {
return mEta; }
47 float phi()
const {
return mPhi; }
48 float E ()
const {
return mE ; }
49 float area()
const{
return mArea; }
50 float areaError()
const{
return mAreaError; }
51 float px ()
const {
return momentum().Px(); }
52 float py ()
const {
return momentum().Py(); }
53 float pz ()
const {
return momentum().Pz(); }
54 float detEta()
const {
return mDetEta; }
55 float detEta(
const TVector3& vertex)
const;
56 bool getBarrelDetectorEta(
const TVector3& vertex,
float& detEta)
const;
57 bool getEndcapDetectorEta(
const TVector3& vertex,
float& detEta)
const;
58 float sumTrackPt()
const;
59 float sumTrackPt(
float radius)
const;
60 float sumTowerPt()
const;
61 float sumTowerPt(
float radius)
const;
62 float sumPt()
const {
return sumTrackPt() + sumTowerPt(); }
63 float sumPt(
float radius)
const {
return sumTrackPt(radius)+sumTowerPt(radius); }
64 float profile(
float radius)
const {
return sumPt(radius)/sumPt(); }
65 float psi(
float radius)
const {
return profile(radius); }
66 float rt()
const {
return mRt; }
67 float neutralFraction()
const {
return rt(); }
68 float chargedFraction()
const {
return 1 - neutralFraction(); }
70 float deltaPhi(
const StJetCandidate* jet)
const {
return momentum().DeltaPhi(jet->momentum()); }
71 float deltaR(
const StJetCandidate* jet)
const {
return momentum().DeltaR(jet->momentum()); }
74 int numberOfTracks()
const {
return mTracks.GetEntriesFast(); }
75 int numberOfTowers()
const {
return mTowers.GetEntriesFast(); }
76 int numberOfParticles()
const {
return mParticles.GetEntriesFast(); }
86 const TRefArray& tracks()
const {
return mTracks; }
87 const TRefArray& towers()
const {
return mTowers; }
88 const TRefArray& particles()
const {
return mParticles; }
91 static float getJetPatchPhi(
int jetPatch);
92 static bool getBarrelJetPatchEtaPhi(
int id,
float& eta,
float& phi);
93 static bool getEndcapJetPatchEtaPhi(
int id,
float& eta,
float& phi);
94 static bool getOverlapJetPatchEtaPhi(
int id,
float& eta,
float& phi);
96 static bool getBarrelJetPatchId(
float eta,
float phi,
int&
id);
97 static bool getEndcapJetPatchId(
float eta,
float phi,
int&
id);
98 static bool getOverlapJetPatchId(
float eta,
float phi,
int&
id);
100 void setPtEtaPhiE(
float pt,
float eta,
float phi,
float E);
101 void setPxPyPzE(
float px,
float py,
float pz,
float E);
102 void setVertex(
const StJetVertex* vertex) { mVertex = (TObject*)vertex; }
104 void setUeDensity(
const char* name,
float density){
string str(name); mUeDensity[str] = density; }
105 map<string, float> ueDensity()
const {
return mUeDensity; }
123 map<string, float> mUeDensity;
128 TRefArray mParticles;
133 inline TLorentzVector StJetCandidate::fourMomentum()
const
135 TLorentzVector fourMom;
136 fourMom.SetPtEtaPhiE(mPt, mEta, mPhi, mE);
140 inline TVector3 StJetCandidate::momentum()
const
143 mom.SetPtEtaPhi(mPt, mEta, mPhi);
147 inline void StJetCandidate::setPtEtaPhiE(
float pt,
float eta,
float phi,
float E)
155 inline void StJetCandidate::setPxPyPzE(
float px,
float py,
float pz,
float E)
157 TVector3 mom(px, py, pz);
164 #endif // ST_JET_CANDIDATE_H