library: libCore
#include "TRandom1.h"

TRandom1


class description - header file - source file - inheritance tree (.pdf)

class TRandom1 : public TRandom

Inheritance Chart:
TObject
<-
TNamed
<-
TRandom
<-
TRandom1

    public:
TRandom1() TRandom1(UInt_t seed, Int_t lux = 3) TRandom1(Int_t rowIndex, Int_t colIndex, Int_t lux) TRandom1(const TRandom1&) virtual ~TRandom1() static TClass* Class() virtual Int_t GetLuxury() const static void GetTableSeeds(UInt_t* seeds, Int_t index) const UInt_t* GetTheSeeds() const virtual TClass* IsA() const virtual Double_t Rndm(Int_t i = 0) virtual void RndmArray(Int_t size, Float_t* vect) virtual void RndmArray(Int_t size, Double_t* vect) virtual void SetSeed(UInt_t seed) virtual void SetSeed2(UInt_t seed, Int_t lux = 3) virtual void SetSeeds(const UInt_t* seeds, Int_t lux = 3) virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b)

Data Members


    protected:
Int_t fNskip Int_t fLuxury Int_t fIlag Int_t fJlag Int_t fCount24 Float_t fFloatSeedTable[24] Float_t fCarry const Int_t fIntModulus static Int_t fgNumEngines static Int_t fgMaxIndex const UInt_t* fTheSeeds const Double_t fMantissaBit24 const Double_t fMantissaBit12

Class Description


 TRandom1

 The Ranlux Random number generator class

 The algorithm for this random engine has been taken from the original
 implementation in FORTRAN by Fred James as part of CLHEP.

 The initialisation is carried out using a Multiplicative Congruential
 generator using formula constants of L'Ecuyer as described in "F.James,
 Comp. Phys. Comm. 60 (1990) 329-344".


TRandom1(UInt_t seed, Int_t lux)
 Luxury level is set in the same way as the original FORTRAN routine.
  level 0  (p=24): equivalent to the original RCARRY of Marsaglia
           and Zaman, very long period, but fails many tests.
  level 1  (p=48): considerable improvement in quality over level 0,
           now passes the gap test, but still fails spectral test.
  level 2  (p=97): passes all known tests, but theoretically still
           defective.
  level 3  (p=223): DEFAULT VALUE.  Any theoretically possible
           correlations have very small chance of being observed.
  level 4  (p=389): highest possible luxury, all 24 bits chaotic.
TRandom1()
default constructor
TRandom1(int rowIndex, int colIndex, int lux)
constructor
~TRandom1()
destructor
void GetTableSeeds(UInt_t* seeds, Int_t index)
static function returning the table of seeds
Double_t Rndm(Int_t)
return a random number in ]0,1]
void RndmArray(const Int_t size, Float_t *vect)
return an array of random numbers in ]0,1]
void RndmArray(const Int_t size, Double_t *vect)
return an array of random numbers in ]0,1]
void SetSeeds(const UInt_t *seeds, int lux)
set seeds
void SetSeed2(UInt_t seed, int lux)
 The initialisation is carried out using a Multiplicative
 Congruential generator using formula constants of L'Ecuyer
 as described in "A review of pseudorandom number generators"
 (Fred James) published in Computer Physics Communications 60 (1990)
 pages 329-344

 modified for the case of seed = 0. In that case a random 64 bits seed based on
 TUUID (using TRandom3(0) ) is generated in order to have a unique seed

void SetSeed(UInt_t seed)
 Set RanLux seed using default luxury level
TRandom1()
Int_t GetLuxury()

Author: Rene Brun from CLHEP & CERNLIB 04/05/2006
Last update: root/base:$Name: $:$Id: TRandom1.cxx,v 1.6 2006/05/30 11:53:50 brun Exp $


ROOT page - Class index - Class Hierarchy - Top of the page

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.