StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StJetTrack.h
1 // -*- mode: c++ -*-
2 
3 //
4 // Pibero Djawotho <pibero@tamu.edu>
5 // Texas A&M University
6 // 31 August 2009
7 //
8 
9 #ifndef ST_JET_TRACK_H
10 #define ST_JET_TRACK_H
11 
12 #include "TMath.h"
13 #include "StJetElement.h"
14 
15 class StJetTrack : public StJetElement {
16 public:
17  StJetTrack()
18  : StJetElement()
19  , mFlag(0)
20  , mCharge(0)
21  , mNHits(0)
22  , mNHitsFit(0)
23  , mNHitsPoss(0)
24  , mNHitsDedx(0)
25  , mDedx(0)
26  , mExitTowerId(0)
27  , mExitDetectorId(0)
28  , mChi2(0)
29  , mChi2Prob(0)
30  , mBeta(0)
31  , mNSigmaPion(0)
32  , mNSigmaKaon(0)
33  , mNSigmaProton(0)
34  , mNSigmaElectron(0)
35  , mBTofTrayId(0)
36  , mNSigmaTofPion(0)
37  , mNSigmaTofKaon(0)
38  , mNSigmaTofProton(0)
39  , mNSigmaTofElectron(0)
40  , mIdTruth(0)
41  , mQaTruth(0)
42  {
43  }
44 
45  friend class StjeJetEventTreeWriter;
46  friend class StJetMaker2009;
47  friend class StUEMaker2009;
48 
49  short flag() const { return mFlag; }
50  short charge() const { return mCharge; }
51  short nHits() const { return mNHits; }
52  short nHitsFit() const { return mNHitsFit; }
53  short nHitsPoss() const { return mNHitsPoss; }
54  short nHitsDedx() const { return mNHitsDedx; }
55  float dEdx() const { return mDedx; }
56  const TVector3& exitPoint() const { return mExitPoint; }
57  short exitTowerId() const { return mExitTowerId; }
58  short exitDetectorId() const { return mExitDetectorId; }
59  const TVector3& dca() const { return mDca; }
60  float dcaD() const { return mDcaD; }
61  float dcaXY() const { return dcaD(); }
62  float dcaZ() const { return dca().z(); }
63  float chi2() const { return mChi2; }
64  float chi2prob() const { return mChi2Prob; }
65  float beta() const { return mBeta; }
66  const TVector3& firstPoint() const { return mFirstPoint; }
67  const TVector3& lastPoint() const { return mLastPoint; }
68  float nSigmaPion() const { return mNSigmaPion; }
69  float nSigmaKaon() const { return mNSigmaKaon; }
70  float nSigmaProton() const { return mNSigmaProton; }
71  float nSigmaElectron() const { return mNSigmaElectron; }
72  int idTruth() const { return mIdTruth; }
73  int qaTruth() const { return mQaTruth; }
74  float m() const { return (beta() > 0 && beta() < 1) ? momentum().Mag()*TMath::Sqrt(1/(beta()*beta())-1) : -999; }
75 
76  int btofTrayId() const { return mBTofTrayId; }
77  double nSigmaTofPion() const { return mNSigmaTofPion; }
78  double nSigmaTofKaon() const { return mNSigmaTofKaon; }
79  double nSigmaTofProton() const { return mNSigmaTofProton; }
80  double nSigmaTofElectron() const { return mNSigmaTofElectron; }
81 
82 private:
83  short mFlag;
84  short mCharge;
85  short mNHits;
86  short mNHitsFit;
87  short mNHitsPoss;
88  short mNHitsDedx;
89  float mDedx;
90  TVector3 mExitPoint;
91  short mExitTowerId;
92  short mExitDetectorId;
93  TVector3 mDca;
94  float mDcaD;
95  float mChi2;
96  float mChi2Prob;
97  float mBeta;
98  TVector3 mFirstPoint;
99  TVector3 mLastPoint;
100  float mNSigmaPion;
101  float mNSigmaKaon;
102  float mNSigmaProton;
103  float mNSigmaElectron;
104 
105  int mBTofTrayId;
106  double mNSigmaTofPion;
107  double mNSigmaTofKaon;
108  double mNSigmaTofProton;
109  double mNSigmaTofElectron;
110 
111  int mIdTruth;
112  int mQaTruth;
113 
114  ClassDef(StJetTrack, 7);
115 };
116 
117 #endif // ST_JET_TRACK_H