]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
IntPH(..): Protec Log against random numbers equal to 0.
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 25 Oct 2000 10:41:52 +0000 (10:41 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 25 Oct 2000 10:41:52 +0000 (10:41 +0000)
MUON/AliMUONResponseV0.cxx

index a4d8bc48e72cc39c30a514d1c7ad2972d3dca15e..244901f688c955ae181a9de9d839f9c6e5f87f48 100644 (file)
 
 /*
 $Log$
+Revision 1.3  2000/07/03 11:54:57  morsch
+AliMUONSegmentation and AliMUONHitMap have been replaced by AliSegmentation and AliHitMap in STEER
+The methods GetPadIxy and GetPadXxy of AliMUONSegmentation have changed name to GetPadI and GetPadC.
+
 Revision 1.2  2000/06/15 07:58:48  morsch
 Code from MUON-dev joined
 
@@ -38,7 +42,9 @@ Float_t AliMUONResponseV0::IntPH(Float_t eloss)
   Float_t charge=0;
   if (nel == 0) nel=1;
   for (Int_t i=1;i<=nel;i++) {
-    charge -= fChargeSlope*TMath::Log(gRandom->Rndm());    
+      Float_t arg=0.;
+      while(!arg) arg = gRandom->Rndm();
+      charge -= fChargeSlope*TMath::Log(arg);    
   }
   return charge;
 }