Protection in case of zero magnetic field
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 9 May 2007 09:50:52 +0000 (09:50 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 9 May 2007 09:50:52 +0000 (09:50 +0000)
STEER/AliExternalTrackParam.cxx

index c64e0d6..651ae7e 100644 (file)
@@ -381,7 +381,7 @@ Double_t p[3], Double_t bz) const {
   //+++++++++++++++++++++++++++++++++++++++++    
   GetXYZ(x);
     
-  if (TMath::Abs(Get1Pt()) < kAlmost0){ //straight-line tracks
+  if (TMath::Abs(Get1Pt()) < kAlmost0 || TMath::Abs(bz) < kAlmost0Field ){ //straight-line tracks
      Double_t unit[3]; GetDirection(unit);
      x[0]+=unit[0]*len;   
      x[1]+=unit[1]*len;