62 RooRealVar nSample(
"nSample",
"Number of samples per cell",200,0,1e6) ;
63 RooRealVar nCell1D(
"nCell1D",
"Number of cells for 1-dim generation",30,0,1e6) ;
64 RooRealVar nCell2D(
"nCell2D",
"Number of cells for 2-dim generation",500,0,1e6) ;
65 RooRealVar nCell3D(
"nCell3D",
"Number of cells for 3-dim generation",5000,0,1e6) ;
66 RooRealVar nCellND(
"nCellND",
"Number of cells for N-dim generation",10000,0,1e6) ;
67 RooRealVar chatLevel(
"chatLevel",
"TFOAM 'chat level' (verbosity)",0,0,2) ;
83 _tfoam = std::make_unique<TFoam>(
"TFOAM") ;
104 auto var =
static_cast<const RooRealVar*
>(arg);
106 _range[i] = var->getMax() - var->getMin() ;
119 if(event->size() == 1)
return event;
135 static const std::string
name =
"RooFoamGenerator";
double getRealValue(const char *name, double defVal=0.0, bool verbose=false) const
Get value of a RooAbsReal stored in set with given name.
Storage_t const & get() const
Const access to the underlying stl container.
Storage_t::size_type size() const
Class RooAbsNumGenerator is the abstract base class for MC event generator implementations like RooAc...
RooArgSet _realVars
Set of real valued observabeles.
RooAbsReal * _funcClone
Pointer to top level node of cloned function.
std::unique_ptr< RooDataSet > _cache
Dataset holding generared values of observables.
virtual double getMin(const char *name=nullptr) const
Get minimum of currently defined range.
Abstract base class for objects that represent a real value and implements functionality common to al...
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Class RooFoamGenerator is a generic toy monte carlo generator that implement the TFOAM sampling techn...
const RooArgSet * generateEvent(UInt_t remaining, double &resampleRatio) override
are we actually generating anything? (the cache always contains at least our function value)
std::vector< double > _xmin
Lower bound of observables to be generated ;.
RooFoamGenerator()=default
~RooFoamGenerator() override
std::vector< double > _range
Range of observables to be generated ;.
std::unique_ptr< TFoam > _tfoam
Instance of TFOAM generator.
std::string const & generatorName() const override
Return unique name of generator implementation.
std::unique_ptr< RooTFoamBinding > _binding
Binding of RooAbsReal to TFoam function interface.
std::vector< double > _vec
Transfer array for FOAM output.
static void registerSampler(RooNumGenFactory &fact)
Register RooIntegrator1D, is parameters and capabilities with RooNumIntFactory.
RooNumGenConfig holds the configuration parameters of the various numeric integrators used by RooReal...
const RooArgSet & getConfigSection(const char *name) const
Retrieve configuration information specific to integrator with given name.
RooNumGenFactory is a factory to instantiate numeric integrators from a given function binding and a ...
bool storeProtoSampler(RooAbsNumGenerator *proto, const RooArgSet &defConfig)
Method accepting registration of a prototype numeric integrator along with a RooArgSet of its default...
static TRandom * randomGenerator()
Return a pointer to a singleton random-number generator implementation.
Variable that can be changed from the outside.
void setVal(double value) override
Set value of variable to 'value'.