MpdTrack.h 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. // Author: Emelyanov D.
  2. // Update: Oleg Rogachevsky 2009-09-17 17:42:25+0400
  3. // Copyright: 2009 (C) Oleg Rogachevsky
  4. #ifndef ROOT_MpdTrack
  5. #define ROOT_MpdTrack
  6. #ifndef ROOT_TObject
  7. #include "TObject.h"
  8. #endif
  9. #include "MpdHelix.h"
  10. class MpdTrack : public TObject {
  11. private:
  12. Int_t fID; // Track number from reconstruction
  13. Int_t fNofHits; // Number of track hits
  14. Int_t fNofHitsPossTpc; //
  15. Int_t fNofHitsFitTpc; //
  16. Float_t fPidProbElectron; // [combined] probability
  17. Float_t fPidProbPion; // [combined] probability
  18. Float_t fPidProbKaon; // [combined] probability
  19. Float_t fPidProbProton; // [combined] probability
  20. Float_t fPidTPCProbElectron; // [tpc] probability
  21. Float_t fPidTPCProbPion; // [tpc] probability
  22. Float_t fPidTPCProbKaon; // [tpc] probability
  23. Float_t fPidTPCProbProton; // [tpc] probability
  24. Float_t fPidTOFProbElectron; // [tof] probability
  25. Float_t fPidTOFProbPion; // [tof] probability
  26. Float_t fPidTOFProbKaon; // [tof] probability
  27. Float_t fPidTOFProbProton; // [tof] probability
  28. Float_t fTofBeta; // [tof] beta
  29. Float_t fTofMass2; // [tof] identified m^2, can be >0, <0 and Nan!
  30. Float_t fdEdXTPC; // [tof]
  31. Int_t fTofHitIndex; // [tof]
  32. Int_t fTofFlag; // [tof] it is set if tof identification exists
  33. Float_t fNSigmaElectron; //
  34. Float_t fNSigmaPion; //
  35. Float_t fNSigmaKaon; //
  36. Float_t fNSigmaProton; //
  37. Float_t fChi2; // Track Chi2
  38. Float_t fPt; // Signed Transverce momentum
  39. Float_t fTheta; // Theta angle (from beam line)
  40. Float_t fPhi; // Phi angle
  41. Float_t fPtError; // Pt error
  42. Float_t fThetaError; // Theta error
  43. Float_t fPhiError; // Phi error
  44. Float_t fDCAX; //
  45. Float_t fDCAY; //
  46. Float_t fDCAZ; //
  47. Float_t fDCAGlobalX; //
  48. Float_t fDCAGlobalY; //
  49. Float_t fDCAGlobalZ; //
  50. Float_t fFirstPointX; // point closest to beam line
  51. Float_t fFirstPointY; // point closest to beam line
  52. Float_t fFirstPointZ; // point closest to beam line
  53. Float_t fLastPointX; //
  54. Float_t fLastPointY; //
  55. Float_t fLastPointZ; //
  56. Short_t fHelixQ; //
  57. Bool_t fEdgeCut; // kTRUE if number of hits closer to boundaries than 1.5 cm divided by nHits is larger than 50% (else: kFALSE)
  58. ULong64_t fHitMap; // n-th bit is 1 if there is hit in layer, 0 otherwise
  59. ULong64_t fSharedHitMap;// n-th bit if bit if hit in given layer shared with any other track
  60. public:
  61. MpdTrack(); // Default constructor
  62. virtual ~MpdTrack() {} // Destructor
  63. void SetID( Int_t n ) {fID=n;}
  64. void SetNofHits( Int_t n ) {fNofHits=n;}
  65. void SetNofHitsPossTpc( Int_t n ) {fNofHitsPossTpc=n;}
  66. void SetNofHitsFitTpc( Int_t n ) {fNofHitsFitTpc=n;}
  67. void SetPidProbElectron( Float_t n ) {fPidProbElectron=n;}
  68. void SetPidProbPion( Float_t n ) {fPidProbPion=n;}
  69. void SetPidProbKaon( Float_t n ) {fPidProbKaon=n;}
  70. void SetPidProbProton( Float_t n ) {fPidProbProton=n;}
  71. void SetTOFpidProb( Float_t n1, Float_t n2, Float_t n3, Float_t n4, Int_t flag ) {
  72. fPidTOFProbElectron=n1; fPidTOFProbPion=n2; fPidTOFProbKaon=n3; fPidTOFProbProton=n4; SetTofFlag(flag);}
  73. void SetTPCpidProb( Float_t n1, Float_t n2, Float_t n3, Float_t n4, Int_t flag) {
  74. fPidTPCProbElectron=n1; fPidTPCProbPion=n2; fPidTPCProbKaon=n3; fPidTPCProbProton=n4; SetTofFlag(flag);}
  75. void SetCombPidProb( Float_t n1, Float_t n2, Float_t n3, Float_t n4) {
  76. fPidProbElectron=n1; fPidProbPion=n2; fPidProbKaon=n3; fPidProbProton=n4;}
  77. void SetTofBeta(Float_t n) {fTofBeta=n;}
  78. void SetTofMass2(Float_t n) {fTofMass2=n;}
  79. void SetdEdXTPC(Float_t n) {fdEdXTPC=n;}
  80. void SetTofHitIndex(Int_t n) {fTofHitIndex=n;}
  81. void SetTofFlag(Int_t n) {fTofFlag = fTofFlag | n;}
  82. void SetNSigmaElectron( Float_t n ) {fNSigmaElectron=n;}
  83. void SetNSigmaPion( Float_t n ) {fNSigmaPion=n;}
  84. void SetNSigmaKaon( Float_t n ) {fNSigmaKaon=n;}
  85. void SetNSigmaProton( Float_t n ) {fNSigmaProton=n;}
  86. void SetChi2( Float_t n ) {fChi2=n;}
  87. void SetPt( Float_t n ) {fPt=n;}
  88. void SetTheta( Float_t n ) {fTheta=n;}
  89. void SetPhi( Float_t n ) {fPhi=n;}
  90. void SetPtError( Float_t n ) {fPtError=n;}
  91. void SetThetaError( Float_t n ) {fThetaError=n;}
  92. void SetPhiError( Float_t n ) {fPhiError=n;}
  93. void SetDCAX( Float_t n ) {fDCAX=n;}
  94. void SetDCAY( Float_t n ) {fDCAY=n;}
  95. void SetDCAZ( Float_t n ) {fDCAZ=n;}
  96. void SetDCAGlobalX( Float_t n ) {fDCAGlobalX=n;}
  97. void SetDCAGlobalY( Float_t n ) {fDCAGlobalY=n;}
  98. void SetDCAGlobalZ( Float_t n ) {fDCAGlobalZ=n;}
  99. void SetFirstPointX( Float_t n ) {fFirstPointX=n;}
  100. void SetFirstPointY( Float_t n ) {fFirstPointY=n;}
  101. void SetFirstPointZ( Float_t n ) {fFirstPointZ=n;}
  102. void SetLastPointX( Float_t n ) {fLastPointX=n;}
  103. void SetLastPointY( Float_t n ) {fLastPointY=n;}
  104. void SetLastPointZ( Float_t n ) {fLastPointZ=n;}
  105. void SetHelixQ( Short_t n ) {fHelixQ=n;}
  106. void SetEdgeCut( Bool_t n ) {fEdgeCut=n;}
  107. void SetLayerHitMap(ULong64_t map){fHitMap = map;};
  108. void SetSharedHitMap(ULong64_t map){fSharedHitMap = map;}
  109. Int_t GetID()const {return fID;}
  110. Int_t GetNofHits()const {return fNofHits;}
  111. Int_t GetNofHitsPossTpc()const {return fNofHitsPossTpc;}
  112. Int_t GetNofHitsFitTpc()const {return fNofHitsFitTpc;}
  113. Float_t GetTPCPidProbElectron()const {return fPidTPCProbElectron;}
  114. Float_t GetTPCPidProbPion()const {return fPidTPCProbPion;}
  115. Float_t GetTPCPidProbKaon()const {return fPidTPCProbKaon;}
  116. Float_t GetTPCPidProbProton()const {return fPidTPCProbProton;}
  117. Float_t GetTOFPidProbElectron()const {return fPidTOFProbElectron;}
  118. Float_t GetTOFPidProbPion()const {return fPidTOFProbPion;}
  119. Float_t GetTOFPidProbKaon()const {return fPidTOFProbKaon;}
  120. Float_t GetTOFPidProbProton()const {return fPidTOFProbProton;}
  121. Float_t GetPidProbElectron()const {return fPidProbElectron;}
  122. Float_t GetPidProbPion()const {return fPidProbPion;}
  123. Float_t GetPidProbKaon()const {return fPidProbKaon;}
  124. Float_t GetPidProbProton()const {return fPidProbProton;}
  125. Float_t GetTofBeta() const{return fTofBeta;}
  126. Float_t GetTofMass2() const{return fTofMass2;}
  127. Float_t GetdEdXTPC() const{return fdEdXTPC;}
  128. Int_t GetTofHitIndex() const{return fTofHitIndex;};
  129. Int_t GetTofFlag() const{return fTofFlag;}
  130. Float_t GetNSigmaElectron() const{return fNSigmaElectron;}
  131. Float_t GetNSigmaPion() const{return fNSigmaPion;}
  132. Float_t GetNSigmaKaon() const{return fNSigmaKaon;}
  133. Float_t GetNSigmaProton() const{return fNSigmaProton;}
  134. Float_t GetChi2() {return fChi2;}
  135. Float_t GetPt() const{return fPt;}
  136. Float_t GetTheta() const{return fTheta;}
  137. Float_t GetPhi() const{return fPhi;}
  138. Float_t GetPtError() const {return fPtError;}
  139. Float_t GetThetaError()const {return fThetaError;}
  140. Float_t GetPhiError() const{return fPhiError;}
  141. Float_t GetPx() const;
  142. Float_t GetPy() const;
  143. Float_t GetPz() const;
  144. Float_t GetEta() const;
  145. Float_t GetDCAX() const{return fDCAX;}
  146. Float_t GetDCAY() const {return fDCAY;}
  147. Float_t GetDCAZ() const {return fDCAZ;}
  148. Float_t GetDCAGlobalX() const{return fDCAGlobalX;}
  149. Float_t GetDCAGlobalY() const {return fDCAGlobalY;}
  150. Float_t GetDCAGlobalZ() const{return fDCAGlobalZ;}
  151. Float_t GetFirstPointX() const {return fFirstPointX;}
  152. Float_t GetFirstPointY() const {return fFirstPointY;}
  153. Float_t GetFirstPointZ() const {return fFirstPointZ;}
  154. Float_t GetLastPointX() const {return fLastPointX;}
  155. Float_t GetLastPointY() const{return fLastPointY;}
  156. Float_t GetLastPointZ() const{return fLastPointZ;}
  157. Float_t GetCharge() const{return -TMath::Sign(1.0,GetPt());}
  158. Short_t GetHelixQ() const{return fHelixQ;}
  159. Bool_t GetEdgeCut() {return fEdgeCut;}
  160. ULong64_t GetLayerHitMap()const{return fHitMap;};
  161. ULong64_t GetSharedHitMap()const{return fSharedHitMap;};
  162. Int_t GetNSharedTpcHits()const;
  163. MpdHelix GetHelix()const;
  164. ClassDef(MpdTrack,4)
  165. };
  166. #endif