60 RooCategory samplingMode(
"samplingMode",
"Sampling Mode") ;
76 RooRealVar alpha(
"alpha",
"Grid structure constant",1.5) ;
77 RooRealVar nRefineIter(
"nRefineIter",
"Number of refining iterations",5) ;
78 RooRealVar nRefinePerDim(
"nRefinePerDim",
"Number of refining samples (per dimension)",1000) ;
79 RooRealVar nIntPerDim(
"nIntPerDim",
"Number of integration samples (per dimension)",5000) ;
114 _alpha(1.5), _mode(mode), _genType(genType),
115 _nRefineIter(5),_nRefinePerDim(1000),_nIntegratePerDim(5000)
236 bins= boxes/box_per_bin;
238 boxes = box_per_bin * bins;
240 << box_per_bin <<
" boxes/bin" << endl;
244 << boxes <<
" boxes" << endl;
273 for (
UInt_t it = 0; it < iterations; it++) {
295 q+=
d *
d * (k / (k + 1.0));
308 std::size_t index = 0;
309 std::size_t sizeOfDim = 1;
312 index +=
box[i] * sizeOfDim;
337 intgrl_sq = intgrl * intgrl;
355 cum_int += (intgrl - cum_int) / (it + 1.0);
359 <<
" Cumulative : I = " << cum_int <<
" +/- " << cum_sig <<
"( chi2 = " <<
_chisq
373 if(absError) *absError = cum_sig;
double pow(double, double)
Int_t getCatIndex(const char *name, Int_t defVal=0, Bool_t verbose=kFALSE) const
Get index value of a RooAbsCategory stored in set with given name.
Double_t getRealValue(const char *name, Double_t defVal=0, Bool_t verbose=kFALSE) const
Get value of a RooAbsReal stored in set with given name.
Abstract interface for evaluating a real-valued function of one real variable and performing numerica...
RooAbsIntegrator is the abstract interface for integrators of real-valued functions that implement th...
const RooAbsFunc * _function
const RooAbsFunc * integrand() const
RooArgSet is a container object that can hold multiple RooAbsArg objects.
RooCategory is an object to represent discrete states.
bool defineType(const std::string &label)
Define a state with given name.
virtual Bool_t setLabel(const char *label, bool printError=true) override
Set value by specifying the name of the desired state.
virtual Bool_t setIndex(Int_t index, bool printError=true) override
Set value by specifying the index code of the desired state.
UInt_t getDimension() const
Bool_t initialize(const RooAbsFunc &function)
Calculate and store the grid dimensions and volume using the specified function, and initialize the g...
UInt_t * createIndexVector() const
void refine(Double_t alpha=1.5)
Refine the grid using the values that have been accumulated so far.
void resetValues()
Reset the values associated with each grid cell.
virtual void Print(Option_t *options=0) const
This method must be overridden when a class wants to print itself.
Double_t * createPoint() const
Double_t getVolume() const
void resize(UInt_t bins)
Adjust the subdivision of each axis to give the specified number of bins, using an algorithm that pre...
void generatePoint(const UInt_t box[], Double_t x[], UInt_t bin[], Double_t &vol, Bool_t useQuasiRandom=kTRUE) const
Generate a random vector in the specified box and and store its coordinates in the x[] array provided...
void setNBoxes(UInt_t boxes)
void accumulate(const UInt_t bin[], Double_t amount)
Add the specified amount to bin[j] of the 1D histograms associated with each axis j.
void firstBox(UInt_t box[]) const
Reset the specified array of box indices to refer to the first box in the standard traversal order.
Bool_t nextBox(UInt_t box[]) const
Update the specified array of box indices to refer to the next box in the standard traversal order an...
RooMCIntegrator implements an adaptive multi-dimensional Monte Carlo numerical integration,...
RooMCIntegrator()
Default constructor.
static void registerIntegrator(RooNumIntFactory &fact)
This function registers class RooMCIntegrator, its configuration options and its capabilities with Ro...
virtual Double_t integral(const Double_t *yvec=0)
Evaluate the integral using a fixed number of calls to evaluate the integrand equal to about 10k per ...
virtual ~RooMCIntegrator()
Destructor.
Double_t vegas(Stage stage, UInt_t calls, UInt_t iterations, Double_t *absError=0)
Perform one step of Monte Carlo integration using the specified number of iterations with (approximat...
virtual RooAbsIntegrator * clone(const RooAbsFunc &function, const RooNumIntConfig &config) const
Return clone of this generator operating on given function with given configuration Needed to support...
virtual Bool_t checkLimits() const
Check if we can integrate over the current domain.
RooNumIntConfig 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.
static RooNumIntConfig & defaultConfig()
Return reference to instance of default numeric integrator configuration object.
RooNumIntFactory is a factory to instantiate numeric integrators from a given function binding and a ...
Bool_t storeProtoIntegrator(RooAbsIntegrator *proto, const RooArgSet &defConfig, const char *depName="")
Method accepting registration of a prototype numeric integrator along with a RooArgSet of its default...
RooRealVar represents a variable that can be changed from the outside.
Mother of all ROOT objects.
virtual const char * GetName() const
Returns name of object.
Double_t RealTime()
Stop the stopwatch (if it is running) and return the realtime (in seconds) passed between the start a...
void Start(Bool_t reset=kTRUE)
Start the stopwatch.
void box(Int_t pat, Double_t x1, Double_t y1, Double_t x2, Double_t y2)
void function(const Char_t *name_, T fun, const Char_t *docstring=0)
LongDouble_t Power(LongDouble_t x, LongDouble_t y)