ROOT » ROOFIT » ROOFITCORE » RooRandom

class RooRandom



This class provides a static interface for generating random numbers. By default a private copy of TRandom3 is used to generate all random numbers.

Function Members (Methods)

public:
virtual~RooRandom()
static TClass*Class()
static Double_tgaussian(TRandom* generator = randomGenerator())
static UInt_tinteger(UInt_t max, TRandom* generator = randomGenerator())
virtual TClass*IsA() const
RooRandom&operator=(const RooRandom&)
static Bool_tquasi(UInt_t dimension, Double_t[] vector, RooQuasiRandomGenerator* generator = quasiGenerator())
static RooQuasiRandomGenerator*quasiGenerator()
static TRandom*randomGenerator()
RooRandom(const RooRandom&)
static voidsetRandomGenerator(TRandom* gen)
virtual voidShowMembers(TMemberInspector& insp) const
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b)
static Double_tuniform(TRandom* generator = randomGenerator())
static voiduniform(UInt_t dimension, Double_t[] vector, TRandom* generator = randomGenerator())
private:
RooRandom()

Data Members

private:
static TRandom*_theGeneratorrandom number generator
static RooQuasiRandomGenerator*_theQuasiGeneratorquasi random number sequence generator
static struct Guardguard

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

TRandom * randomGenerator()
 Return a pointer to a singleton random-number generator
 implementation. Creates the object the first time it is called.
void setRandomGenerator(TRandom* gen)
 set the random number generator; takes ownership of the object passed as parameter
RooQuasiRandomGenerator * quasiGenerator()
 Return a pointer to a singleton quasi-random generator
 implementation. Creates the object the first time it is called.
Double_t uniform(TRandom* generator = randomGenerator())
 Return a number uniformly distributed from (0,1)
void uniform(UInt_t dimension, Double_t[] vector, TRandom* generator = randomGenerator())
 Fill the vector provided with random numbers uniformly distributed from (0,1)
UInt_t integer(UInt_t max, TRandom* generator = randomGenerator())
 Return an integer uniformly distributed from [0,n-1]
Double_t gaussian(TRandom* generator = randomGenerator())
 Return a Gaussian random variable with mean 0 and variance 1.
Bool_t quasi(UInt_t dimension, Double_t[] vector, RooQuasiRandomGenerator* generator = quasiGenerator())
 Return a quasi-random number in the range (0,1) using the
 Niederreiter base 2 generator described in Bratley, Fox, Niederreiter,
 ACM Trans. Model. Comp. Sim. 2, 195 (1992).
virtual ~RooRandom()
{}
RooRandom()