ROOT logo
ROOT » MATH » MATHCORE » TRandom2

class TRandom2: public TRandom


 TRandom2

 Random number generator class based on the maximally quidistributed combined
 Tausworthe generator by L'Ecuyer.

 The period of the generator is 2**88 (about 10**26) and it uses only 3 words
 for the state.

 For more information see:
 P. L'Ecuyer, Mathematics of Computation, 65, 213 (1996)
 P. L'Ecuyer, Mathematics of Computation, 68, 225 (1999)

 The publication are available online at
  http://www.iro.umontreal.ca/~lecuyer/myftp/papers/tausme.ps
  http://www.iro.umontreal.ca/~lecuyer/myftp/papers/tausme2.ps

Function Members (Methods)

public:
TRandom2(UInt_t seed = 1)
TRandom2(const TRandom2&)
virtual~TRandom2()
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 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
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)
TRandom2&operator=(const TRandom2&)
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 n, Float_t* array)
virtual voidRndmArray(Int_t n, Double_t* array)
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 = 0)
virtual voidTRandom::SetSeed(UInt_t seed = 65539)
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)
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:
TStringTNamed::fNameobject identifier
UInt_tTRandom::fSeedRandom number generator seed
UInt_tfSeed1Random number generator seed 1
UInt_tfSeed2Random number generator seed 2
TStringTNamed::fTitleobject title

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

TRandom2(UInt_t seed)
default constructor*-*-*-*-
*-*                  ===================
~TRandom2()
default destructor*-*-*-*-
*-*                  ==================
Double_t Rndm(Int_t i = 0)
  TausWorth generator from L'Ecuyer, uses as seed 3x32bits integers
  Use a mask of 0xffffffffUL to make in work on 64 bit machines
  Periodicity of about  10**26
void RndmArray(Int_t n, Float_t *array)
 Return an array of n random numbers uniformly distributed in ]0,1]
void RndmArray(Int_t n, Double_t *array)
 Return an array of n random numbers uniformly distributed in ]0,1]
void SetSeed(UInt_t seed = 0)
 Set the generator seed.
 If the seed given is zero, generate automatically seed values which
 are different every time by using TRandom3  and TUUID
 If a seed is given generate the other two needed for the generator state using
 a linear congruential generator
 The only condition, stated at the end of the 1999 L'Ecuyer paper is that the seeds
 must be greater than 1,7 and 15.
TRandom2(UInt_t seed=1)