Class RooFoamGenerator is a generic toy monte carlo generator that implement the TFOAM sampling technique on any positively valued function.
The RooFoamGenerator generator is used by the various generator context classes to take care of generation of observables for which p.d.fs do not define internal methods.
The foam generator reacts to the following config options:
Definition at line 31 of file RooFoamGenerator.h.
Public Member Functions | |
RooFoamGenerator () | |
RooFoamGenerator (const RooAbsReal &func, const RooArgSet &genVars, const RooNumGenConfig &config, bool verbose=false, const RooAbsReal *maxFuncVal=nullptr) | |
~RooFoamGenerator () override | |
Destructor. | |
bool | canSampleCategories () const override |
bool | canSampleConditional () const override |
RooAbsNumGenerator * | clone (const RooAbsReal &func, const RooArgSet &genVars, const RooArgSet &, const RooNumGenConfig &config, bool verbose=false, const RooAbsReal *maxFuncVal=nullptr) const override |
TFoam & | engine () |
const RooArgSet * | generateEvent (UInt_t remaining, double &resampleRatio) override |
are we actually generating anything? (the cache always contains at least our function value) | |
std::string const & | generatorName () const override |
Return unique name of generator implementation. | |
Public Member Functions inherited from RooAbsNumGenerator | |
RooAbsNumGenerator () | |
RooAbsNumGenerator (const RooAbsReal &func, const RooArgSet &genVars, bool verbose=false, const RooAbsReal *maxFuncVal=nullptr) | |
Initialize an accept-reject generator for the specified distribution function, which must be non-negative but does not need to be normalized over the variables to be generated, genVars. | |
virtual | ~RooAbsNumGenerator () |
Destructor. | |
void | attachParameters (const RooArgSet &vars) |
Reattach original parameters to function clone. | |
virtual double | getFuncMax () |
bool | isValid () const |
bool | isVerbose () const |
void | setVerbose (bool verbose=true) |
Static Protected Member Functions | |
static void | registerSampler (RooNumGenFactory &fact) |
Register RooIntegrator1D, is parameters and capabilities with RooNumIntFactory. | |
Protected Attributes | |
RooTFoamBinding * | _binding |
Binding of RooAbsReal to TFoam function interface. | |
double * | _range |
Range of observables to be generated ;. | |
TFoam * | _tfoam |
Instance of TFOAM generator. | |
double * | _vec |
Transfer array for FOAM output. | |
double * | _xmin |
Lower bound of observables to be generated ;. | |
Protected Attributes inherited from RooAbsNumGenerator | |
RooDataSet * | _cache |
Dataset holding generared values of observables. | |
RooArgSet | _catVars |
RooArgSet * | _cloneSet |
Set owning clone of input function. | |
RooAbsReal * | _funcClone |
Pointer to top level node of cloned function. | |
const RooAbsReal * | _funcMaxVal |
Container for maximum function value. | |
RooRealVar * | _funcValPtr |
RRVs storing function value in context and in output dataset. | |
RooRealVar * | _funcValStore |
bool | _isValid |
Verbose and valid flag. | |
RooArgSet | _realVars |
Sets of discrete and real valued observabeles. | |
bool | _verbose |
Friends | |
class | RooNumGenFactory |
|
inline |
Definition at line 33 of file RooFoamGenerator.h.
RooFoamGenerator::RooFoamGenerator | ( | const RooAbsReal & | func, |
const RooArgSet & | genVars, | ||
const RooNumGenConfig & | config, | ||
bool | verbose = false , |
||
const RooAbsReal * | maxFuncVal = nullptr |
||
) |
Definition at line 81 of file RooFoamGenerator.cxx.
|
override |
Destructor.
Definition at line 118 of file RooFoamGenerator.cxx.
|
inlineoverridevirtual |
Reimplemented from RooAbsNumGenerator.
Definition at line 46 of file RooFoamGenerator.h.
|
inlineoverridevirtual |
Reimplemented from RooAbsNumGenerator.
Definition at line 45 of file RooFoamGenerator.h.
|
inlineoverridevirtual |
Implements RooAbsNumGenerator.
Definition at line 35 of file RooFoamGenerator.h.
|
inline |
Definition at line 43 of file RooFoamGenerator.h.
|
overridevirtual |
are we actually generating anything? (the cache always contains at least our function value)
Implements RooAbsNumGenerator.
Definition at line 132 of file RooFoamGenerator.cxx.
|
overridevirtual |
Return unique name of generator implementation.
Implements RooAbsNumGenerator.
Definition at line 150 of file RooFoamGenerator.cxx.
|
staticprotected |
Register RooIntegrator1D, is parameters and capabilities with RooNumIntFactory.
Definition at line 62 of file RooFoamGenerator.cxx.
|
friend |
Definition at line 52 of file RooFoamGenerator.h.
|
protected |
Binding of RooAbsReal to TFoam function interface.
Definition at line 55 of file RooFoamGenerator.h.
|
protected |
Range of observables to be generated ;.
Definition at line 58 of file RooFoamGenerator.h.
|
protected |
Instance of TFOAM generator.
Definition at line 56 of file RooFoamGenerator.h.
|
protected |
Transfer array for FOAM output.
Definition at line 59 of file RooFoamGenerator.h.
|
protected |
Lower bound of observables to be generated ;.
Definition at line 57 of file RooFoamGenerator.h.