TRandom Class Reference

#include <TRandom.h>

Inheritance diagram for TRandom:

TNamed TNamed TObject TObject TObject TObject TRandom1 TRandom1 TRandom2 TRandom2 TRandom3 TRandom3 List of all members.

Public Member Functions

 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
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)
 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
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)

Protected Attributes

UInt_t fSeed

Detailed Description

Definition at line 29 of file TRandom.h.


Constructor & Destructor Documentation

TRandom::TRandom ( UInt_t  seed = 65539  ) 

TRandom::~TRandom (  )  [virtual]

Definition at line 147 of file TRandom.cxx.

References gRandom.

TRandom::TRandom ( UInt_t  seed = 65539  ) 

virtual TRandom::~TRandom (  )  [virtual]


Member Function Documentation

Int_t TRandom::Binomial ( Int_t  ntot,
Double_t  prob 
) [virtual]

Definition at line 156 of file TRandom.cxx.

References i, n, and Rndm().

Referenced by testAll(), TestBinomial(), and testRootBinomial().

Double_t TRandom::BreitWigner ( Double_t  mean = 0,
Double_t  gamma = 1 
) [virtual]

Definition at line 179 of file TRandom.cxx.

References TMath::PiOver2(), Rndm(), and TMath::Tan().

Referenced by GenerateEvent(), and TSVDUnfoldExample().

void TRandom::Circle ( Double_t x,
Double_t y,
Double_t  r 
) [virtual]

Definition at line 191 of file TRandom.cxx.

References TMath::Cos(), phi, TMath::Sin(), TMath::TwoPi(), and Uniform().

Double_t TRandom::Exp ( Double_t  tau  )  [virtual]

Definition at line 203 of file TRandom.cxx.

References TMath::Log(), Rndm(), t, and x.

Referenced by VectorTest< Dim >::genData(), MyParticle::GenerateTimeOfDecay(), and testAll().

Double_t TRandom::Gaus ( Double_t  mean = 0,
Double_t  sigma = 1 
) [virtual]

Definition at line 215 of file TRandom.cxx.

References TMath::Abs(), exp(), log(), result(), Rndm(), x, and y.

Referenced by Event::Build(), JetEvent::Build(), ClassImp(), ConfidenceIntervals(), create_3Bumps(), create_circ(), create_ManyVars(), create_multiclassdata(), create_schachbrett(), create_schachbrett_2D(), create_schachbrett_3D(), create_schachbrett_4D(), create_schachbrett_5D(), DetectorEvent(), drawsparse(), exampleTKDE(), fillHisto(), fitLinear2(), TLimit::Fluctuate(), RooRandom::gaussian(), RooGaussian::generateEvent(), RooGamma::generateEvent(), RooGExpModel::generateEvent(), RooGaussModel::generateEvent(), GenerateRecEvent(), handle2(), histobrowser(), hsum(), hsumanim(), hsumTimer(), labels1(), labels2(), line3Dfit(), makeData(), TestBasic303::makeFakeDataXY(), makeFakeDataXY(), TestBasic102::makeTH1(), makeTH1(), makeTree_circ(), TestBasic102::makeTTree(), makeTTree(), mhs(), mhs1(), mhs2(), TTimeHists::NextValues(), Poisson(), PoissonD(), ProofSimple::Process(), RooRandomizeParamMCSModule::processBeforeGen(), TMVA::GeneticRange::Random(), Reconstruct(), rf609_xychi2fit(), seism(), THit::Set(), Event::SetRandomVertex(), stress6(), tclwrite(), testAll(), testCont1D(), testDummy(), testEmpDistr(), testGausFit(), testHisto1DFit(), testStringAPI(), testUnBin1DFit(), testUnBinnedFit(), testUserFunc(), tgaxis3(), th2polyHoneycomb(), timeonaxis(), Track::Track(), tree2aw(), tree2w(), tree3w(), tree4w(), TSVDUnfoldExample(), twoscales(), unuranSimple(), write(), and writeTrack().

virtual UInt_t TRandom::GetSeed (  )  const [inline, virtual]

Definition at line 42 of file TRandom.h.

References fSeed.

Referenced by ClassImp(), THistPainter::PaintScatterPlot(), and THistPainter::PaintTH2PolyScatterPlot().

UInt_t TRandom::Integer ( UInt_t  imax  )  [virtual]

Definition at line 323 of file TRandom.cxx.

References Rndm().

Referenced by add_blobs(), TGuiBldDragManager::CloneEditable(), create_multiclassdata(), TGLSurfacePainter::DrawSectionXOY(), TGLSurfacePainter::DrawSectionXOZ(), TGLSurfacePainter::DrawSectionYOZ(), FillColorsMap(), RooAbsPdf::generateBinned(), glViewerExercise(), glViewerLOD(), TSessionViewer::HandleTimer(), RooStudyPackage::initRandom(), RooRandom::integer(), TMVA::RandomGenerator::operator()(), TASImage::SetImageBuffer(), TMVA::SVWorkingSet::SVWorkingSet(), and TEveBoxSet::Test().

Double_t TRandom::Landau ( Double_t  mean = 0,
Double_t  sigma = 1 
) [virtual]

Definition at line 333 of file TRandom.cxx.

References ROOT::Math::landau_quantile(), Rndm(), and x.

Referenced by RooLandau::generateEvent(), handle2(), hsum(), hsumanim(), hsumTimer(), and testAll().

Int_t TRandom::Poisson ( Double_t  mean  )  [virtual]

Definition at line 348 of file TRandom.cxx.

References TMath::Exp(), TMath::Floor(), g, Gaus(), TMath::LnGamma(), TMath::Log(), n, TMath::Pi(), pi, Rndm(), TMath::Sqrt(), t, TMath::Tan(), and y.

Referenced by ClassImp(), TLimit::ComputeLimit(), TH1::FillRandom(), fillSparse(), fit2DHist(), fit3DHist(), fitSparse2D(), fitSparse3D(), RooAbsPdf::generate(), RooAbsPdf::generateBinned(), RooPoisson::generateEvent(), TMVA::DecisionTree::GetRandomisedVariables(), RooMCStudy::run(), VecTrackD::Set(), ClusterD::Set(), test1DObjects(), test2DObjects(), testAll(), testDisc1D(), testDiscDistr(), testRootPoisson(), testUnfold1(), testUnfold2(), testUnfold4(), and write().

Double_t TRandom::PoissonD ( Double_t  mean  )  [virtual]

Definition at line 406 of file TRandom.cxx.

References TMath::Exp(), TMath::Floor(), g, Gaus(), TMath::LnGamma(), TMath::Log(), n, TMath::Pi(), pi, Rndm(), TMath::Sqrt(), t, TMath::Tan(), and y.

Referenced by TH1::Eval().

void TRandom::Rannor ( Float_t a,
Float_t b 
) [virtual]

Definition at line 456 of file TRandom.cxx.

References TMath::Cos(), TMath::Log(), Rndm(), TMath::Sin(), TMath::Sqrt(), x, and y.

Referenced by Event::Build(), ClassImp(), ConnectToServer(), DynamicSlice(), ApplicationWindow::execute(), FillHisto(), TestDialog::FillHistos(), DNDMainFrame::GetObject(), glViewerLOD(), handle(), handle1(), hclient(), hksimple(), hsimple(), htw(), nucleus(), ProofNtuple::Process(), SpyServ::SpyServ(), stress7(), testAll(), testTreeFit(), Track::Track(), tree1w(), tree4w(), unuranSimple(), and write().

void TRandom::Rannor ( Double_t a,
Double_t b 
) [virtual]

Definition at line 471 of file TRandom.cxx.

References TMath::Cos(), TMath::Log(), Rndm(), TMath::Sin(), TMath::Sqrt(), x, and y.

void TRandom::ReadRandom ( const char *  filename  )  [virtual]

Definition at line 486 of file TRandom.cxx.

References TSystem::ExpandPathName(), Form(), gDirectory, TDirectory::GetFile(), TNamed::GetName(), gROOT, gSystem, TROOT::ProcessLine(), and TDirectory::ReadTObject().

void TRandom::SetSeed ( UInt_t  seed = 0  )  [virtual]

Definition at line 561 of file TRandom.cxx.

References fSeed.

Referenced by ClassImp(), ConnectToServer(), foam_kanwa(), FourBinInstructional(), generate(), glViewerLOD(), handle(), handle1(), handle2(), hclient(), hksimple(), hlabels2(), hsimple(), hsum(), hsumanim(), hsumTimer(), HybridOriginalDemo(), RooStudyPackage::initRandom(), IntervalExamples(), main(), mhs(), mhs1(), mhs2(), THistPainter::PaintScatterPlot(), THistPainter::PaintTH2PolyScatterPlot(), rs401d_FeldmanCousins(), run_foam(), RooFitTestUnit::runTest(), UnuRanDist::SetSeed(), TUnuran::SetSeed(), TRandom3::SetSeed(), TTimeHists::SetupValues(), SpyServ::SpyServ(), stress1(), stress16(), stress4(), stress6(), stress7(), stress8(), stressGraphics(), TApplicationRemote::TApplicationRemote(), unuranDiscrete(), unuranDistr(), unuranMulti2D(), unuranMultiDim(), and write().

Double_t TRandom::Rndm ( Int_t  i = 0  )  [virtual]

Definition at line 502 of file TRandom.cxx.

References fSeed.

Referenced by align(), AnimateCamera(), billtw(), billw(), Binomial(), BreitWigner(), Event::Build(), JetEvent::Build(), TGeoCompositeShape::Capacity(), TGeoChecker::CheckBoundaryErrors(), TGeoChecker::CheckGeometry(), TGeoChecker::CheckGeometryFull(), TGeoChecker::CheckOverlapsBySampling(), ClassImp(), ConfidenceIntervals(), create_lin_Nvar_Arr(), DetectorEvent(), DistTest::DistTest(), drawsparse(), TFormula::EvalParFast(), TFormula::EvalParOld(), ApplicationWindow::execute(), Exp(), TH1::FillRandom(), TH2::FillRandom(), TH3::FillRandom(), findPeaks(), FirstContour(), fit2d(), Gaus(), TGenPhaseSpace::Generate(), GenerateEvent(), GenerateGenEvent(), GenerateRecEvent(), TFoam::GenerCel2(), TGeoBBox::GetPointsOnFacet(), TH1::GetRandom(), TF1::GetRandom(), THnSparse::GetRandom(), TF2::GetRandom2(), TH2::GetRandom2(), TF3::GetRandom3(), TH3::GetRandom3(), TetrisPiece::GetRandomType(), TMVA::Interval::GetRndm(), glViewerLOD(), TProof::GoParallel(), hlabels1(), hlabels2(), hsimple(), Integer(), Landau(), length(), main(), MakeCrazy(), makeData(), TFoam::MakeEvent(), TPolyMarker3D::PaintH3(), THistPainter::PaintScatterPlot(), THistPainter::PaintTH2PolyScatterPlot(), peaks(), Poisson(), PoissonD(), randomColor(), TGeoChecker::RandomPoints(), TGeoChecker::RandomRays(), Rannor(), TMVA::RuleEnsemble::RemoveSimilarRules(), sample_volume(), TAttParticle::SampleMass(), TGeoOverlap::SampleOverlap(), TGeoChecker::SamplePoints(), TMultiLayerPerceptron::Shuffle(), Sphere(), sqlfilldb(), stress16(), stress6(), stress7(), TApplicationRemote::TApplicationRemote(), tclwrite(), TGeoChecker::Test(), testAll(), TestBuild(), Tester::TestByIndex(), Tester::TestByName(), TestConstr(), TestMembers(), TGeoChecker::TestOverlaps(), TestSpeed(), TGeoChecker::TimingPerVolume(), TKDTreeTestBuild(), Track::Track(), tree1w(), tree2aw(), tree2w(), tree3w(), tree4w(), Uniform(), RooRandom::uniform(), unuranSimple(), TGeoChecker::Weight(), and write().

void TRandom::RndmArray ( Int_t  n,
Float_t array 
) [virtual]

Definition at line 545 of file TRandom.cxx.

References fSeed, and i.

Referenced by TFoam::MakeAlpha(), and testAll().

void TRandom::RndmArray ( Int_t  n,
Double_t array 
) [virtual]

Definition at line 532 of file TRandom.cxx.

References fSeed, and i.

void TRandom::Sphere ( Double_t x,
Double_t y,
Double_t z,
Double_t  r 
) [virtual]

Definition at line 583 of file TRandom.cxx.

References a, b, r2, Rndm(), and TMath::Sqrt().

Referenced by VecTrackD::Set(), and ClusterD::Set().

Double_t TRandom::Uniform ( Double_t  x1 = 1  )  [virtual]

Definition at line 606 of file TRandom.cxx.

References ans(), and Rndm().

Referenced by MyEvent::BremsProb(), Circle(), ConfidenceIntervals(), TClSession::Create(), create_lin_Nvar_weighted(), TRobustEstimator::CreateSubset(), MyEvent::Decay(), Viewer::DoButton(), RooStats::DebuggingTestStat::Evaluate(), RooStats::DebuggingSampler::EvaluateTestStatistic(), FillVariableRange(), TMVA::SimulatedAnnealing::FillWithRandomValues(), findPeak2(), findPeaks(), fitLinear2(), RooAbsPdf::generateBinned(), RooGamma::generateEvent(), TMVA::SimulatedAnnealing::GenerateNeighbour(), TF1::GetRandom(), RooStats::DebuggingSampler::GetSamplingDistribution(), line3Dfit(), MakeCrazy(), TMVA::RuleFit::MakeForest(), MakeTrees(), TestBasic102::makeTTree(), makeTTree(), MyEvent::PairProb(), peaks2(), pileup(), RooRandomizeParamMCSModule::processBeforeGen(), quadset_circ(), TMVA::GeneticRange::Random(), random_line(), TMVA::GeneticRange::RandomDiscrete(), TRobustEstimator::RDraw(), TMVA::MCFitter::Run(), MyEvent::ScatterAngle(), TMVA::SimulatedAnnealing::ShouldGoIn(), TrigoFletcherFunction::StartPoints(), TEveBoxSet::Test(), TestNeighbors(), TestRange(), TMVA::MethodCuts::Train(), and write().

Double_t TRandom::Uniform ( Double_t  x1,
Double_t  x2 
) [virtual]

Definition at line 615 of file TRandom.cxx.

References ans(), and Rndm().

void TRandom::WriteRandom ( const char *  filename  )  [virtual]

Definition at line 624 of file TRandom.cxx.

References TSystem::ExpandPathName(), Form(), gDirectory, TDirectory::GetFile(), TNamed::GetName(), gROOT, gSystem, TROOT::ProcessLine(), and TDirectory::WriteTObject().

virtual Int_t TRandom::Binomial ( Int_t  ntot,
Double_t  prob 
) [virtual]

virtual Double_t TRandom::BreitWigner ( Double_t  mean = 0,
Double_t  gamma = 1 
) [virtual]

virtual void TRandom::Circle ( Double_t x,
Double_t y,
Double_t  r 
) [virtual]

virtual Double_t TRandom::Exp ( Double_t  tau  )  [virtual]

virtual Double_t TRandom::Gaus ( Double_t  mean = 0,
Double_t  sigma = 1 
) [virtual]

virtual UInt_t TRandom::GetSeed (  )  const [inline, virtual]

Definition at line 42 of file TRandom.h.

References fSeed.

virtual UInt_t TRandom::Integer ( UInt_t  imax  )  [virtual]

virtual Double_t TRandom::Landau ( Double_t  mean = 0,
Double_t  sigma = 1 
) [virtual]

virtual Int_t TRandom::Poisson ( Double_t  mean  )  [virtual]

virtual Double_t TRandom::PoissonD ( Double_t  mean  )  [virtual]

virtual void TRandom::Rannor ( Float_t a,
Float_t b 
) [virtual]

virtual void TRandom::Rannor ( Double_t a,
Double_t b 
) [virtual]

virtual void TRandom::ReadRandom ( const char *  filename  )  [virtual]

virtual void TRandom::SetSeed ( UInt_t  seed = 0  )  [virtual]

virtual Double_t TRandom::Rndm ( Int_t  i = 0  )  [virtual]

virtual void TRandom::RndmArray ( Int_t  n,
Float_t array 
) [virtual]

virtual void TRandom::RndmArray ( Int_t  n,
Double_t array 
) [virtual]

virtual void TRandom::Sphere ( Double_t x,
Double_t y,
Double_t z,
Double_t  r 
) [virtual]

virtual Double_t TRandom::Uniform ( Double_t  x1 = 1  )  [virtual]

virtual Double_t TRandom::Uniform ( Double_t  x1,
Double_t  x2 
) [virtual]

virtual void TRandom::WriteRandom ( const char *  filename  )  [virtual]


Member Data Documentation

UInt_t TRandom::fSeed [protected]

Definition at line 32 of file TRandom.h.

Referenced by GetSeed(), Rndm(), TRandom2::Rndm(), TRandom2::RndmArray(), RndmArray(), SetSeed(), TRandom2::SetSeed(), TRandom3::SetSeed(), TRandom1::SetSeed2(), TRandom1::SetSeeds(), and TRandom1::TRandom1().


The documentation for this class was generated from the following files:
Generated on Tue Jul 5 16:46:05 2011 for ROOT_528-00b_version by  doxygen 1.5.1