StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StJetParticle.h
1 // -*- mode: c++ -*-
2 //
3 // Pibero Djawotho <pibero@tamu.edu>
4 // Texas A&M University
5 // 8 Dec 2009
6 //
7 
8 #ifndef ST_JET_PARTICLE_H
9 #define ST_JET_PARTICLE_H
10 
11 #include "TLorentzVector.h"
12 #include "TParticlePDG.h"
13 #include "TDatabasePDG.h"
14 
15 #include "StJetElement.h"
16 
17 class StJetParticle : public StJetElement {
18 public:
19  float m() const { return mM; }
20  float e() const { return mE; }
21  int pdg() const { return mPdg; }
22  int status() const { return mStatus; }
23  int firstMother() const { return mFirstMother; }
24  int lastMother() const { return mLastMother; }
25  int firstDaughter() const { return mFirstDaughter; }
26  int lastDaughter() const { return mLastDaughter; }
27 
28  TLorentzVector fourMomentum() const
29  {
30  TLorentzVector p;
31  p.SetPtEtaPhiE(mPt,mEta,mPhi,mE);
32  return p;
33  }
34 
35  const char* name() const
36  {
37  static const char* noname = "???";
38  const TParticlePDG* ap = TDatabasePDG::Instance()->GetParticle(mPdg);
39  return ap ? ap->GetName() : noname;
40  }
41 
42 private:
43  friend class StjeJetEventTreeWriter;
44  friend class StJetMaker2009;
45  friend class StUEMaker2009;
46 
47  float mM;
48  float mE;
49  int mPdg;
50  int mStatus;
51  int mFirstMother;
52  int mLastMother;
53  int mFirstDaughter;
54  int mLastDaughter;
55 
56  ClassDef(StJetParticle,2);
57 };
58 
59 #endif // ST_JET_PARTICLE_H