]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONResponseV0.cxx
Correct x-position of slats in station 5.
[u/mrichter/AliRoot.git] / MUON / AliMUONResponseV0.cxx
index 4a7f347c404aba1d098d486827b0d2c5e17dcf18..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
+
 Revision 1.1.2.1  2000/06/09 21:33:35  morsch
 AliMUONResponse code  from  AliMUONSegResV0.cxx
 
 */
 
 #include "AliMUONResponseV0.h"
-#include "AliMUONSegmentation.h"
+#include "AliSegmentation.h"
 #include <TMath.h>
 #include <TRandom.h>
 
@@ -35,13 +42,15 @@ 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;
 }
 // -------------------------------------------
 
-Float_t AliMUONResponseV0::IntXY(AliMUONSegmentation * segmentation)
+Float_t AliMUONResponseV0::IntXY(AliSegmentation * segmentation)
 {
 // Calculate charge on current pad according to Mathieson distribution
 //