Added check for ppad[1] range
[u/mrichter/AliRoot.git] / TOF / AliTOFv2FHoles.cxx
index 460d926ae1b4b203fd27c6f67155dafbe37f91b0..00a93a2e85a941d9b9f98344bbe4cf09644aaa3e 100644 (file)
@@ -1023,7 +1023,8 @@ void AliTOFv2FHoles::StepManager()
  
     gMC->Gmtod(xm,xpad,1);
     gMC->Gmtod(pm,ppad,2);
-
+    if(ppad[1]>1.) ppad[1]=1.;
+    if(ppad[1]<-1.) ppad[1]=-1.;
     incidenceAngle = TMath::ACos(ppad[1])*kRaddeg;
 
     z = pos[2];