12#ifndef ROOT_TFoamSampler
13#define ROOT_TFoamSampler
60 using DistSampler::SetFunction;
65 SetFunction<const ROOT::Math::IGenFunction>(func, 1);
75 bool Init(
const char * =
"");
93 void SetSeed(
unsigned int seed);
114 bool SampleBin(
double prob,
double & value,
double *error = 0);
DistSampler options class.
Interface class for generic sampling of a distribution, i.e.
const double * Sample()
sample one event and rerturning array x with coordinates
Interface (abstract class) for generic functions objects of one-dimension Provides a method to evalua...
TFoamSampler class class implementing the ROOT::Math::DistSampler interface using FOAM for sampling a...
const ROOT::Math::IGenFunction * fFunc1D
void SetSeed(unsigned int seed)
Set the random seed for the TRandom instances used by the sampler classes Needs to be called before I...
TFoamSampler()
default constructor
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 ...
void SetRandom(TRandom *r)
Set the random engine to be used Needs to be called before Init to have effect.
TFoamIntegrand * fFoamDist
bool Init(const char *="")
initialize the generators with the default options
virtual ~TFoamSampler()
virtual destructor
void SetFunction(const ROOT::Math::IGenFunction &func)
set the parent function distribution to use for random sampling (one dim case)
TRandom * GetRandom()
Get the random engine used by the sampler.
This is the base class for the ROOT Random number generators.
TFitResultPtr Fit(FitObject *h1, TF1 *f1, Foption_t &option, const ROOT::Math::MinimizerOptions &moption, const char *goption, ROOT::Fit::DataRange &range)
Namespace for new Math classes and functions.
Namespace for new ROOT classes and functions.