Index: trunk/Mars/mbase/MMath.cc
===================================================================
--- trunk/Mars/mbase/MMath.cc	(revision 19630)
+++ trunk/Mars/mbase/MMath.cc	(revision 19639)
@@ -901,12 +901,27 @@
 }
 
+// --------------------------------------------------------------------------
+//
+// Returns an exponential distribution
+//
+// -tau*log(x)  with x=[0;1[ and y=[0;1[
+//
 Double_t MMath::RndmExp(Double_t tau)
 {
-    // returns an exponential deviate.
-    //
-    //          exp( -t/tau )
-
     const Double_t x = gRandom->Rndm(); // uniform on ] 0, 1 ]
 
     return -tau * TMath::Log(x);       // convert to exponential distribution
 }
+
+// --------------------------------------------------------------------------
+//
+// Returns a distribution according to
+//
+//  atanh((y+1)/x*sigma) with x and y [-1;1] and x^2+y^2=1
+//
+Double_t MMath::RndmPSF(Double_t sigma)
+{
+    double x, y;
+    gRandom->Circle(x, y, 1);
+    return TMath::ATanH((y+1)/x*sigma);
+}
Index: trunk/Mars/mbase/MMath.h
===================================================================
--- trunk/Mars/mbase/MMath.h	(revision 19630)
+++ trunk/Mars/mbase/MMath.h	(revision 19639)
@@ -91,4 +91,5 @@
 
     Double_t RndmExp(Double_t tau);
+    Double_t RndmPSF(Double_t sigma=1);
 }
 
