Divide by zero error fix in function F. Sigma difusion = 0 now set to same
[u/mrichter/AliRoot.git] / ITS / AliITSsimulationSSD.cxx
index 27650cf59b8108016670cdcd76761d5d730dcfc8..39ce24c1bfb9397a93db7150cae6cf74db5965bd 100644 (file)
@@ -226,7 +226,9 @@ void AliITSsimulationSSD::HitToDigit(Int_t & hitNo,Int_t idtrack,
         dsN    = Get2Strip(0,stripN,xI, zI); // Between 0-1
 
         sP = sigmaP * sqrt(300. * i / (fSteps));
+       if(sP<=0.0) sP = sigmaP*sqrt(300.);
         sN = sigmaN * sqrt(300. * i /(fSteps-i));
+       if(sN<=0.0) sN = sigmaN*sqrt(300.);
 
 
         sP = (i<2        && dsP>0.3 && dsP<0.7)? 20. : sP;  // square of (microns)