]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Corrected calculation of the step size
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 4 Apr 2006 12:42:40 +0000 (12:42 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 4 Apr 2006 12:42:40 +0000 (12:42 +0000)
TRD/AliTRDv1.cxx

index ed68793f59090be188852333576684d7b5b1fc18..44c2ed2dd740c08fadb368668217c121c69332d9 100644 (file)
@@ -675,9 +675,11 @@ void AliTRDv1::StepManagerGeant()
                                                pp = kPrim * kPlateau;
           }
 
-          stepSize = 1./gRandom->Poisson(pp);
-                                       gMC->SetMaxStep(stepSize);
-                               }
+         Int_t nsteps = 0;
+         do {nsteps = gRandom->Poisson(pp);} while(!nsteps);
+          stepSize = 1./nsteps;
+         gMC->SetMaxStep(stepSize);
+       }
       }
     }
   }