ROOT logo
ROOT » MATH » MATHCORE » TRandom1

class TRandom1: public TRandom


 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".


Function Members (Methods)

public:
TRandom1()
TRandom1(const TRandom1&)
TRandom1(UInt_t seed, Int_t lux = 3)
TRandom1(Int_t rowIndex, Int_t colIndex, Int_t lux)
virtual~TRandom1()
voidTObject::AbstractMethod(const char* method) const
virtual voidTObject::AppendPad(Option_t* option = "")
virtual Int_tTRandom::Binomial(Int_t ntot, Double_t prob)
virtual Double_tTRandom::BreitWigner(Double_t mean = 0, Double_t gamma = 1)
virtual voidTObject::Browse(TBrowser* b)
virtual voidTRandom::Circle(Double_t& x, Double_t& y, Double_t r)
static TClass*Class()
static TClass*TRandom::Class()
static TClass*TNamed::Class()
static TClass*TObject::Class()
virtual const char*TObject::ClassName() const
virtual voidTNamed::Clear(Option_t* option = "")
virtual voidTObject::Clear(Option_t* = "")
virtual TObject*TNamed::Clone(const char* newname = "") const
virtual TObject*TObject::Clone(const char* newname = "") const
virtual Int_tTNamed::Compare(const TObject* obj) const
virtual Int_tTObject::Compare(const TObject* obj) const
virtual voidTNamed::Copy(TObject& named) const
virtual voidTObject::Copy(TObject& object) const
virtual voidTObject::Delete(Option_t* option = "")MENU
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidTObject::Draw(Option_t* option = "")
virtual voidTObject::DrawClass() constMENU
virtual TObject*TObject::DrawClone(Option_t* option = "") constMENU
virtual voidTObject::Dump() constMENU
virtual voidTObject::Error(const char* method, const char* msgfmt) const
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidTObject::ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual Double_tTRandom::Exp(Double_t tau)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
virtual voidTNamed::FillBuffer(char*& buffer)
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
virtual Double_tTRandom::Gaus(Double_t mean = 0, Double_t sigma = 1)
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
virtual const char*TObject::GetIconName() const
virtual Int_tGetLuxury() const
virtual const char*TNamed::GetName() const
virtual const char*TObject::GetName() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
virtual UInt_tTRandom::GetSeed() const
static voidGetTableSeeds(UInt_t* seeds, Int_t index)
const UInt_t*GetTheSeeds() const
virtual const char*TNamed::GetTitle() const
virtual const char*TObject::GetTitle() const
virtual UInt_tTObject::GetUniqueID() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTNamed::Hash() const
virtual ULong_tTObject::Hash() const
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
virtual voidTObject::Inspect() constMENU
virtual UInt_tTRandom::Integer(UInt_t imax)
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
virtual TClass*TRandom::IsA() const
virtual TClass*TNamed::IsA() const
virtual TClass*TObject::IsA() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
Bool_tTObject::IsOnHeap() const
virtual Bool_tTNamed::IsSortable() const
virtual Bool_tTObject::IsSortable() const
Bool_tTObject::IsZombie() const
virtual Double_tTRandom::Landau(Double_t mean = 0, Double_t sigma = 1)
virtual voidTNamed::ls(Option_t* option = "") const
virtual voidTObject::ls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
virtual Bool_tTObject::Notify()
static voidTObject::operator delete(void* ptr)
static voidTObject::operator delete(void* ptr, void* vp)
static voidTObject::operator delete[](void* ptr)
static voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
TRandom&TRandom::operator=(const TRandom&)
TNamed&TNamed::operator=(const TNamed& rhs)
TObject&TObject::operator=(const TObject& rhs)
virtual voidTObject::Paint(Option_t* option = "")
virtual Int_tTRandom::Poisson(Double_t mean)
virtual Double_tTRandom::PoissonD(Double_t mean)
virtual voidTObject::Pop()
virtual voidTNamed::Print(Option_t* option = "") const
virtual voidTObject::Print(Option_t* option = "") const
virtual voidTRandom::Rannor(Float_t& a, Float_t& b)
virtual voidTRandom::Rannor(Double_t& a, Double_t& b)
virtual Int_tTObject::Read(const char* name)
virtual voidTRandom::ReadRandom(const char* filename)
virtual voidTObject::RecursiveRemove(TObject* obj)
voidTObject::ResetBit(UInt_t f)
virtual Double_tRndm(Int_t i = 0)
virtual Double_tTRandom::Rndm(Int_t i = 0)
virtual voidRndmArray(Int_t size, Float_t* vect)
virtual voidRndmArray(Int_t size, Double_t* vect)
virtual voidTRandom::RndmArray(Int_t n, Float_t* array)
virtual voidTRandom::RndmArray(Int_t n, Double_t* array)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTObject::SavePrimitive(basic_ostream<char,char_traits<char> >& out, Option_t* option = "")
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
virtual voidTNamed::SetName(const char* name)MENU
virtual voidTNamed::SetNameTitle(const char* name, const char* title)
static voidTObject::SetObjectStat(Bool_t stat)
virtual voidSetSeed(UInt_t seed)
virtual voidTRandom::SetSeed(UInt_t seed = 65539)
virtual voidSetSeed2(UInt_t seed, Int_t lux = 3)
virtual voidSetSeeds(const UInt_t* seeds, Int_t lux = 3)
virtual voidTNamed::SetTitle(const char* title = "")MENU
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidShowMembers(TMemberInspector& insp, char* parent)
virtual voidTRandom::ShowMembers(TMemberInspector& insp, char* parent)
virtual voidTNamed::ShowMembers(TMemberInspector& insp, char* parent)
virtual voidTObject::ShowMembers(TMemberInspector& insp, char* parent)
virtual Int_tTNamed::Sizeof() const
virtual voidTRandom::Sphere(Double_t& x, Double_t& y, Double_t& z, Double_t r)
virtual voidStreamer(TBuffer& b)
virtual voidTRandom::Streamer(TBuffer& b)
virtual voidTNamed::Streamer(TBuffer& b)
virtual voidTObject::Streamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)
voidTRandom::StreamerNVirtual(TBuffer& b)
voidTNamed::StreamerNVirtual(TBuffer& b)
voidTObject::StreamerNVirtual(TBuffer& b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
virtual Double_tTRandom::Uniform(Double_t x1 = 1)
virtual Double_tTRandom::Uniform(Double_t x1, Double_t x2)
virtual voidTObject::UseCurrentStyle()
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const
virtual voidTRandom::WriteRandom(const char* filename)
protected:
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
voidTObject::MakeZombie()

Data Members

protected:
Float_tfCarry
Int_tfCount24
Float_tfFloatSeedTable[24]
Int_tfIlag
const Int_tfIntModulus
Int_tfJlag
Int_tfLuxury
const Double_tfMantissaBit12
const Double_tfMantissaBit24
TStringTNamed::fNameobject identifier
Int_tfNskip
UInt_tTRandom::fSeedRandom number generator seed
const UInt_t*fTheSeeds
TStringTNamed::fTitleobject title
static Int_tfgMaxIndex
static Int_tfgNumEngines

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

TRandom1(UInt_t seed, Int_t lux = 3)
 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_t rowIndex, Int_t colIndex, Int_t lux)
constructor
~TRandom1()
destructor
void GetTableSeeds(UInt_t* seeds, Int_t index)
static function returning the table of seeds
Double_t Rndm(Int_t i = 0)
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_t lux = 3)
set seeds
void SetSeed2(UInt_t seed, Int_t lux = 3)
 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() const
 Gets the current seed.
{return fLuxury;}
const UInt_t * GetTheSeeds() const
 Gets the current array of seeds.
{return fTheSeeds;}