]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TPC/AliTPCtrack.cxx
- cosmetics
[u/mrichter/AliRoot.git] / TPC / AliTPCtrack.cxx
index 2eeea9e91e48cc69f450445d13129e67cfb64a38..a530053aaf55f64da44645c5edabc4d361d3b5f7 100644 (file)
@@ -239,10 +239,21 @@ Bool_t AliTPCtrack::PropagateTo(Double_t xk,Double_t rho,Double_t x0) {
   //  rho - density of the crossed matrial (g/cm^3)
   //  x0  - radiation length of the crossed material (g/cm^2) 
   //-----------------------------------------------------------------
-  Double_t oldX=GetX(), oldY=GetY(), oldZ=GetZ();
-
+  //
   Double_t bz=GetBz();
-  if (!AliExternalTrackParam::PropagateTo(xk,bz)) return kFALSE;
+  Double_t zat=0;
+  if (!GetZAt(xk, bz,zat)) return kFALSE;
+  if (TMath::Abs(zat)>250.){
+    // Don't propagate track outside of the fiducial volume - material budget not proper one
+    //
+    //AliWarning("Propagate outside of fiducial volume");
+    return kFALSE;
+  }
+
+  Double_t oldX=GetX(), oldY=GetY(), oldZ=GetZ();
+  //if (!AliExternalTrackParam::PropagateTo(xk,bz)) return kFALSE;
+  Double_t b[3]; GetBxByBz(b);
+  if (!AliExternalTrackParam::PropagateToBxByBz(xk,b)) return kFALSE;
 
   Double_t d = TMath::Sqrt((GetX()-oldX)*(GetX()-oldX) + 
                            (GetY()-oldY)*(GetY()-oldY) + 
@@ -267,8 +278,10 @@ AliTPCtrack::PropagateToVertex(const AliESDVertex *v,Double_t rho,Double_t x0)
   //-----------------------------------------------------------------
   Double_t oldX=GetX(), oldY=GetY(), oldZ=GetZ();
 
-  Double_t bz=GetBz();
-  if (!PropagateToDCA(v,bz,kVeryBig)) return kFALSE;
+  //Double_t bz=GetBz();
+  //if (!PropagateToDCA(v,bz,kVeryBig)) return kFALSE;
+  Double_t b[3]; GetBxByBz(b);
+  if (!PropagateToDCABxByBz(v,b,kVeryBig)) return kFALSE;
 
   Double_t d = TMath::Sqrt((GetX()-oldX)*(GetX()-oldX) + 
                            (GetY()-oldY)*(GetY()-oldY) +