ROOT
6.07/01
Reference Guide
|
This class provides a static interface for generating random numbers.
By default a private copy of TRandom3 is used to generate all random numbers.
Definition at line 24 of file RooRandom.h.
Classes | |
struct | Guard |
Public Member Functions | |
virtual | ~RooRandom () |
Static Public Member Functions | |
static TRandom * | randomGenerator () |
Return a pointer to a singleton random-number generator implementation. More... | |
static void | setRandomGenerator (TRandom *gen) |
set the random number generator; takes ownership of the object passed as parameter More... | |
static Double_t | uniform (TRandom *generator=randomGenerator()) |
Return a number uniformly distributed from (0,1) More... | |
static void | uniform (UInt_t dimension, Double_t vector[], TRandom *generator=randomGenerator()) |
Fill the vector provided with random numbers uniformly distributed from (0,1) More... | |
static UInt_t | integer (UInt_t max, TRandom *generator=randomGenerator()) |
Return an integer uniformly distributed from [0,n-1]. More... | |
static Double_t | gaussian (TRandom *generator=randomGenerator()) |
Return a Gaussian random variable with mean 0 and variance 1. More... | |
static RooQuasiRandomGenerator * | quasiGenerator () |
Return a pointer to a singleton quasi-random generator implementation. More... | |
static 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. More... | |
Private Member Functions | |
RooRandom () | |
Static Private Attributes | |
static TRandom * | _theGenerator = 0 |
static RooQuasiRandomGenerator * | _theQuasiGenerator = 0 |
static struct Guard | guard |
Friends | |
struct | RooRandom::Guard |
#include <RooRandom.h>
|
inlinevirtual |
Definition at line 27 of file RooRandom.h.
|
private |
|
static |
Return a Gaussian random variable with mean 0 and variance 1.
Definition at line 111 of file RooRandom.cxx.
Referenced by ClassImp(), RooMultiVarGaussian::generateEvent(), and RooFitResult::randomizePars().
|
static |
Return an integer uniformly distributed from [0,n-1].
Definition at line 102 of file RooRandom.cxx.
Referenced by RooStats::HypoTestCalculatorGeneric::GetHypoTest(), RooAbsCategoryLValue::randomize(), RooAbsPdf::randomizeProtoOrder(), and RooStats::HypoTestCalculatorGeneric::UseSameAltToys().
|
static |
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).
Definition at line 122 of file RooRandom.cxx.
Referenced by RooGrid::generatePoint().
|
static |
Return a pointer to a singleton quasi-random generator implementation.
Creates the object the first time it is called.
Definition at line 74 of file RooRandom.cxx.
|
static |
Return a pointer to a singleton random-number generator implementation.
Creates the object the first time it is called.
Definition at line 54 of file RooRandom.cxx.
Referenced by ClassImp(), RooStats::ToyMCStudy::execute(), FourBinInstructional(), RooAbsGenContext::generate(), RooBinnedGenContext::generate(), RooAbsPdf::generateBinned(), RooPoisson::generateEvent(), RooLognormal::generateEvent(), RooLandau::generateEvent(), RooGamma::generateEvent(), RooGaussian::generateEvent(), RooGaussModel::generateEvent(), RooGExpModel::generateEvent(), RooStats::HypoTestCalculatorGeneric::GetHypoTest(), HybridOriginalDemo(), RooStats::ToyMCStudy::initialize(), RooStudyPackage::initRandom(), IntervalExamples(), RooRandomizeParamMCSModule::processBeforeGen(), RooFoamGenerator::RooFoamGenerator(), rs401d_FeldmanCousins(), RooMCStudy::run(), and RooUnitTest::runTest().
set the random number generator; takes ownership of the object passed as parameter
Definition at line 64 of file RooRandom.cxx.
|
static |
Return a number uniformly distributed from (0,1)
Definition at line 84 of file RooRandom.cxx.
Referenced by ClassImp(), RooSimSplitGenContext::generate(), RooEffGenContext::generateEvent(), RooDecay::generateEvent(), RooSimGenContext::generateEvent(), RooBMixDecay::generateEvent(), RooBCPEffDecay::generateEvent(), RooBCPGenDecay::generateEvent(), RooAddGenContext::generateEvent(), RooBDecay::generateEvent(), RooGExpModel::generateEvent(), RooNonCPEigenDecay::generateEvent(), RooGrid::generatePoint(), RooAcceptReject::nextAcceptedEvent(), RooAbsRealLValue::randomize(), RooStats::HypoTestInverter::RunLimit(), and RooStats::MetropolisHastings::ShouldTakeStep().
|
static |
Fill the vector provided with random numbers uniformly distributed from (0,1)
Definition at line 93 of file RooRandom.cxx.
|
friend |
Definition at line 49 of file RooRandom.h.
|
staticprivate |
Definition at line 43 of file RooRandom.h.
Referenced by RooRandom::Guard::~Guard().
|
staticprivate |
Definition at line 44 of file RooRandom.h.
Referenced by RooRandom::Guard::~Guard().
|
staticprivate |
Definition at line 48 of file RooRandom.h.