12 #ifndef ROOT_TUnuranSampler
13 #define ROOT_TUnuranSampler
16 #ifndef ROOT_Math_DistSampler
63 using DistSampler::SetFunction;
68 SetFunction<const ROOT::Math::IGenFunction>(
func, 1);
79 bool Init(
const char * algo =
"");
99 void SetSeed(
unsigned int seed);
virtual ~TUnuranSampler()
virtual destructor
bool DoInitDiscrete1D(const char *algo)
Interface (abstract class) for generic functions objects of one-dimension Provides a method to evalua...
TRandom * GetRandom()
Get the random engine used by the sampler.
Namespace for new ROOT classes and functions.
void SetArea(double area)
set the normalization area of distribution implemented by derived classes if needed ...
bool DoInit1D(const char *algo)
const double * Sample()
sample one event and rerturning array x with coordinates
bool Init(const char *algo="")
initialize the generators with the given algorithm If no algorithm is passed used the default one for...
void SetPrintLevel(int level)
Set the print level (if level=-1 use default)
TUnuranSampler()
default constructor
double Sample1D()
sample one event in one dimension better implementation could be provided by the derived classes ...
void SetFunction(const ROOT::Math::IGenFunction &func)
set the parent function distribution to use for random sampling (one dim case)
This is the base class for the ROOT Random number generators.
DistSampler options class.
void SetSeed(unsigned int seed)
Set the random seed for the TRandom instances used by the sampler classes Needs to be called before I...
bool SampleBin(double prob, double &value, double *error=0)
sample one bin given an estimated of the pdf in the bin (this can be function value at the center or ...
Interface class for generic sampling of a distribution, i.e.
bool DoInitND(const char *algo)
TFitResultPtr Fit(FitObject *h1, TF1 *f1, Foption_t &option, const ROOT::Math::MinimizerOptions &moption, const char *goption, ROOT::Fit::DataRange &range)
double func(double *x, double *p)
Namespace for new Math classes and functions.
void SetRandom(TRandom *r)
Set the random engine to be used Needs to be called before Init to have effect.
TUnuranSampler class class implementing the ROOT::Math::DistSampler interface using the UNU...
const ROOT::Math::IGenFunction * fFunc1D
void SetMode(double mode)
set the mode of the distribution (could be useful to some methods) implemented by derived classes if ...