]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TPC/AliTPCtrack.h
Tracking in non-uniform nmagnetic field (Yu.Belikov)
[u/mrichter/AliRoot.git] / TPC / AliTPCtrack.h
index a99cdaddc97e470b3cdb3154129e174a7aca17f6..3fff581633d2fbda3e00f3c5bb45c80ab4c300ed 100644 (file)
@@ -50,8 +50,9 @@ public:
   Double_t GetY()   const {return fP0;}
   Double_t GetZ()   const {return fP1;}
   Double_t GetSnp() const {return fX*fP4 - fP2;}
-  Double_t 
-    Get1Pt() const { return (1e-9*TMath::Abs(fP4)/fP4 + fP4)*GetConvConst(); }
+  Double_t Get1Pt() const {
+    return (TMath::Sign(1e-9,fP4) + fP4)*GetLocalConvConst();
+  }
   Double_t GetTgl() const {return fP3;}
 
   Double_t GetSigmaY2() const {return fC00;}
@@ -113,6 +114,8 @@ public:
   Int_t   GetV0Index(Int_t i) const{ return fV0Indexes[i];}
   Int_t*  GetV0Indexes() { return fV0Indexes;}
 protected: 
+  void GetXYZ(Float_t r[3]) const;
+
   Double_t fX;              // X-coordinate of this track (reference plane)
   Double_t fAlpha;          // Rotation angle the local (TPC sector)
                             // coordinate system and the global ALICE one.
@@ -161,5 +164,14 @@ void AliTPCtrack::GetExternalParameters(Double_t& xr, Double_t x[5]) const {
      x[0]=GetY(); x[1]=GetZ(); x[2]=GetSnp(); x[3]=GetTgl(); x[4]=Get1Pt();
 }
 
+inline void AliTPCtrack::GetXYZ(Float_t r[3]) const {
+  //---------------------------------------------------------------------
+  // Returns the position of the track in the global coord. system 
+  //---------------------------------------------------------------------
+  Double_t cs=TMath::Cos(fAlpha), sn=TMath::Sin(fAlpha);
+  r[0]=fX*cs - fP0*sn; r[1]=fX*sn + fP0*cs; r[2]=fP1;
+}
+
+
 #endif