1 #ifndef __StarRandom_h__
2 #define __StarRandom_h__
5 #include "Math/GSLRndmEngines.h"
40 static void set( ROOT::Math::GSLRandomEngine *engine );
50 static void seed( UInt_t s );
56 static void seed( UShort_t seed1, UShort_t seed2 );
61 Double_t
operator()(
const Double_t mn,
const Double_t mx )
const;
64 Double_t
operator()( Int_t *idummy ){
return (*
this)(); }
68 Double_t
flat()
const;
70 Double_t
flat(
const Double_t mn,
const Double_t mx )
const;
73 Double_t
expo(
const Double_t mu )
const;
77 Double_t
gauss(
const Double_t sigma )
const ;
79 TVector2
gauss2d(
const Double_t sx,
const Double_t sy,
const Double_t rho )
const;
83 UInt_t
poisson(
const Double_t mu )
const;
89 static ROOT::Math::GSLRandomEngine *mEngine;
Double_t operator()() const
Return a random number uniformly distributed between 0 and 1.
Double_t expo(const Double_t mu) const
Return a random number distribted according to exp(-mu)
Double_t gauss(const Double_t sigma) const
Return a random number distributed according to a gaussian with specified sigma.
Double_t landau() const
Return a random number distributed according to a landau.
static StarRandom & Instance()
Obtain the single instance of the random number generator.
UInt_t poisson(const Double_t mu) const
A class for providing random number generation.
Double_t flat() const
Return a random number uniformly distributed between 0 and 1.
static void set(ROOT::Math::GSLRandomEngine *engine)
Set the random number generator engine.
static void seed(UInt_t s)
TVector2 gauss2d(const Double_t sx, const Double_t sy, const Double_t rho) const
Returns a pair of random numbers generated according to a 2D gaussian.
static void capture()
Capture gRandom random number generator.