ROOT » MATH » UNURAN » TUnuranSampler

class TUnuranSampler: public ROOT::Math::DistSampler

Function Members (Methods)

ROOT::Math::DistSamplerROOT::Math::DistSampler::DistSampler(const ROOT::Math::DistSampler&)
virtual boolROOT::Math::DistSampler::Generate(unsigned int nevt, ROOT::Fit::UnBinData& data)
virtual boolROOT::Math::DistSampler::Generate(unsigned int nevt, const int* nbins, ROOT::Fit::BinData& data, bool extend = true)
boolROOT::Math::DistSampler::Generate(unsigned int nevt, int nbins, double xmin, double xmax, ROOT::Fit::BinData& data, bool extend = true)
virtual TRandom*GetRandom()
virtual boolInit(const char* algo = "")
virtual boolInit(const ROOT::Math::DistSamplerOptions& opt)
unsigned intROOT::Math::DistSampler::NDim() const
TUnuranSampler&operator=(const TUnuranSampler&)
const ROOT::Math::IMultiGenFunction&ROOT::Math::DistSampler::ParentPdf() const
virtual boolSample(double* x)
virtual doubleSample1D()
virtual boolSampleBin(double prob, double& value, double* error = 0)
virtual boolROOT::Math::DistSampler::SampleBins(unsigned int n, const double* prob, double* values, double* errors = 0)
virtual voidSetArea(double area)
virtual voidSetFunction(const ROOT::Math::IGenFunction& func)
voidSetFunction(TF1* pdf)
voidROOT::Math::DistSampler::SetFunction<const ROOT::Math::IBaseFunctionOneDim>(ROOT::Math::const IBaseFunctionOneDim& func, unsigned int dim)
virtual voidSetMode(double mode)
voidSetPrintLevel(int level)
virtual voidSetRandom(TRandom* r)
voidROOT::Math::DistSampler::SetRange(const ROOT::Fit::DataRange& range)
voidROOT::Math::DistSampler::SetRange(const double* xmin, const double* xmax)
voidROOT::Math::DistSampler::SetRange(double xmin, double xmax, int icoord = 0)
virtual voidSetSeed(unsigned int seed)
TUnuranSampler(const TUnuranSampler&)
boolDoInit1D(const char* algo)
boolDoInitDiscrete1D(const char* algo)
boolDoInitND(const char* algo)
virtual voidROOT::Math::DistSampler::DoSetFunction(const ROOT::Math::IMultiGenFunction& func, bool copy)
const ROOT::Fit::DataRange&ROOT::Math::DistSampler::PdfRange() const

Data Members

doublefAreaarea of dist
boolfDiscreteflag to indicate if the function is discrete
const ROOT::Math::IGenFunction*fFunc1D1D function pointer
boolfHasAreaflag to indicate if a area is set
boolfHasModeflag to indicate if a mode is set
intfLeveldebug level
doublefModemode of dist
boolfOneDimflag to indicate if the function is 1 dimension
TUnuran*fUnuranunuran engine class

Class Charts

Inheritance Chart:

Function documentation

bool Init(const char* algo = "")
 initialize unuran classes using the given algorithm
bool Init(const ROOT::Math::DistSamplerOptions& opt)
 default initialization with algorithm name
bool DoInit1D(const char* algo)
 initilize for 1D sampling
 need to create 1D interface from Multidim one
 (to do: use directly 1D functions ??)
bool DoInitDiscrete1D(const char* algo)
 initilize for 1D sampling of discrete distributions
bool DoInitND(const char* algo)
 initilize for 1D sampling
void SetFunction(TF1* pdf)
 set function from a TF1 pointer
void SetRandom(TRandom* r)
 set random generator (must be called before Init to have effect)
void SetSeed(unsigned int seed)
 set random generator seed (must be called before Init to have effect)
TRandom * GetRandom()
 get random generator used
double Sample1D()
 sample 1D distributions
bool Sample(double* x)
 sample multi-dim distributions
bool SampleBin(double prob, double& value, double* error = 0)
 sample a bin according to Poisson statistics
 default constructor
void SetFunction(const ROOT::Math::IGenFunction& func)
 set the parent function distribution to use for random sampling (one dim case)
void SetPrintLevel(int level)
      Set the print level
      (if level=-1 use default)

{fLevel = level;}
void SetMode(double mode)
      set the mode

void SetArea(double area)
     set the area