Numerically stable formula in GetXYZAt(...)
authorbelikov <belikov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 8 Aug 2006 12:55:11 +0000 (12:55 +0000)
committerbelikov <belikov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 8 Aug 2006 12:55:11 +0000 (12:55 +0000)
STEER/AliExternalTrackParam.cxx

index 85f0738..d1c6f36 100644 (file)
@@ -791,7 +791,7 @@ AliExternalTrackParam::GetXYZAt(Double_t x, Double_t b, Double_t *r) const {
   Double_t r1=TMath::Sqrt(1.- f1*f1), r2=TMath::Sqrt(1.- f2*f2);
   r[0] = x;
   r[1] = fP[0] + dx*(f1+f2)/(r1+r2);
-  r[2] = fP[1] + dx*(f1+f2)/(f1*r2 + f2*r1)*fP[3];
+  r[2] = fP[1] + dx*(r2 + f2*(f1+f2)/(r1+r2))*fP[3];//Many thanks to P.Hristov !
   return Local2GlobalPosition(r,fAlpha);
 }