ROOT logo
// @(#)root/mathcore:$Id$
// Author: Rene Brun   15/12/95

/*************************************************************************
 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

#ifndef ROOT_TRandom
#define ROOT_TRandom



//////////////////////////////////////////////////////////////////////////
//                                                                      //
// TRandom                                                              //
//                                                                      //
// Simple prototype random number generator class (periodicity = 10**9) //
//                                                                      //
//////////////////////////////////////////////////////////////////////////

#ifndef ROOT_TNamed
#include "TNamed.h"
#endif

class TRandom : public TNamed {

protected:
   UInt_t   fSeed;  //Random number generator seed

public:
   TRandom(UInt_t seed=65539);
   virtual ~TRandom();
   virtual  Int_t    Binomial(Int_t ntot, Double_t prob);
   virtual  Double_t BreitWigner(Double_t mean=0, Double_t gamma=1);
   virtual  void     Circle(Double_t &x, Double_t &y, Double_t r);
   virtual  Double_t Exp(Double_t tau);
   virtual  Double_t Gaus(Double_t mean=0, Double_t sigma=1);
   virtual  UInt_t   GetSeed() const {return fSeed;}
   virtual  UInt_t   Integer(UInt_t imax);
   virtual  Double_t Landau(Double_t mean=0, Double_t sigma=1);
   virtual  Int_t    Poisson(Double_t mean);
   virtual  Double_t PoissonD(Double_t mean);
   virtual  void     Rannor(Float_t &a, Float_t &b);
   virtual  void     Rannor(Double_t &a, Double_t &b);
   virtual  void     ReadRandom(const char *filename);
   virtual  void     SetSeed(UInt_t seed=0);
   virtual  Double_t Rndm(Int_t i=0);
   virtual  void     RndmArray(Int_t n, Float_t *array);
   virtual  void     RndmArray(Int_t n, Double_t *array);
   virtual  void     Sphere(Double_t &x, Double_t &y, Double_t &z, Double_t r);
   virtual  Double_t Uniform(Double_t x1=1);
   virtual  Double_t Uniform(Double_t x1, Double_t x2);
   virtual  void     WriteRandom(const char *filename);

   ClassDef(TRandom,1)  //Simple Random number generator (periodicity = 10**9)
};

R__EXTERN TRandom *gRandom;

#endif
 TRandom.h:1
 TRandom.h:2
 TRandom.h:3
 TRandom.h:4
 TRandom.h:5
 TRandom.h:6
 TRandom.h:7
 TRandom.h:8
 TRandom.h:9
 TRandom.h:10
 TRandom.h:11
 TRandom.h:12
 TRandom.h:13
 TRandom.h:14
 TRandom.h:15
 TRandom.h:16
 TRandom.h:17
 TRandom.h:18
 TRandom.h:19
 TRandom.h:20
 TRandom.h:21
 TRandom.h:22
 TRandom.h:23
 TRandom.h:24
 TRandom.h:25
 TRandom.h:26
 TRandom.h:27
 TRandom.h:28
 TRandom.h:29
 TRandom.h:30
 TRandom.h:31
 TRandom.h:32
 TRandom.h:33
 TRandom.h:34
 TRandom.h:35
 TRandom.h:36
 TRandom.h:37
 TRandom.h:38
 TRandom.h:39
 TRandom.h:40
 TRandom.h:41
 TRandom.h:42
 TRandom.h:43
 TRandom.h:44
 TRandom.h:45
 TRandom.h:46
 TRandom.h:47
 TRandom.h:48
 TRandom.h:49
 TRandom.h:50
 TRandom.h:51
 TRandom.h:52
 TRandom.h:53
 TRandom.h:54
 TRandom.h:55
 TRandom.h:56
 TRandom.h:57
 TRandom.h:58
 TRandom.h:59
 TRandom.h:60
 TRandom.h:61
 TRandom.h:62
 TRandom.h:63
 TRandom.h:64