]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - RICH/AliRICHHelix.h
Fix to avoid infinite loop
[u/mrichter/AliRoot.git] / RICH / AliRICHHelix.h
index 70cee5948066a2d4c5805345924c06da6bc83d0c..09737df25284949a552e46488eabcca62be2106e 100644 (file)
@@ -67,7 +67,7 @@ Bool_t AliRICHHelix::Intersection(TVector3 planePoint,TVector3 planeNorm)
   while(TMath::Abs(dist)>0.0001){
     Propagate(s);                        //calculates helix at the distance s from x0 ALONG the helix
     dist=(fX-planePoint)*planeNorm;      //distance between current helix position and plane
-    if(TMath::Abs(dist) > TMath::Abs(distPrev)) { return kFALSE;}
+    if(TMath::Abs(dist) >= TMath::Abs(distPrev)) { return kFALSE;}
     distPrev=dist;
     s-=dist;
   }