]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TPC/AliTPCtrack.cxx
Implementing ESD functionality in the NewIO (Yu.Belikov)
[u/mrichter/AliRoot.git] / TPC / AliTPCtrack.cxx
index 94f170f5431a8060976e264345a79d34cbdaf9b9..5cc00a5908c8b253ca1e679026032a23c2709fd0 100644 (file)
@@ -255,6 +255,15 @@ Double_t AliTPCtrack::GetPredictedChi2(const AliCluster *c) const
   return (dy*r00*dy + 2*r01*dy*dz + dz*r11*dz)/det;
 }
 
+Double_t AliTPCtrack::GetYat(Double_t xk) const {
+//-----------------------------------------------------------------
+// This function calculates the Y-coordinate of a track at the plane x=xk.
+//-----------------------------------------------------------------
+    Double_t c1=fP4*fX - fP2, r1=TMath::Sqrt(1.- c1*c1);
+    Double_t c2=fP4*xk - fP2, r2=TMath::Sqrt(1.- c2*c2);
+    return fP0 + (xk-fX)*(c1+c2)/(r1+r2);
+}
+
 //_____________________________________________________________________________
 Int_t AliTPCtrack::PropagateTo(Double_t xk,Double_t x0,Double_t rho) {
   //-----------------------------------------------------------------