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));
329 intgrl_sq = intgrl * intgrl;
347 cum_int += (intgrl - cum_int) / (it + 1.0);
351 <<
" Cumulative : I = " << cum_int <<
" +/- " << cum_sig <<
"( chi2 = " <<
_chisq 365 if(absError) *absError = cum_sig;
static RooNumIntConfig & defaultConfig()
Return reference to instance of default numeric integrator configuration object.
UInt_t getDimension() const
RooAbsIntegrator is the abstract interface for integrators of real-valued functions that implement th...
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 RealTime()
Stop the stopwatch (if it is running) and return the realtime (in seconds) passed between the start a...
RooNumIntConfig holds the configuration parameters of the various numeric integrators used by RooReal...
void Start(Bool_t reset=kTRUE)
Start the stopwatch.
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...
virtual Bool_t setIndex(Int_t index, Bool_t printError=kTRUE)
Set value by specifying the index code of the desired state.
RooNumIntFactory is a factory to instantiate numeric integrators from a given function binding and a ...
virtual void Print(Option_t *options=0) const
This method must be overridden when a class wants to print itself.
const RooArgSet & getConfigSection(const char *name) const
Retrieve configuration information specific to integrator with given name.
void box(Int_t pat, Double_t x1, Double_t y1, Double_t x2, Double_t y2)
RooMCIntegrator()
Default constructor.
LongDouble_t Power(LongDouble_t x, LongDouble_t y)
virtual Bool_t setLabel(const char *label, Bool_t printError=kTRUE)
Set value by specifying the name of the desired state If printError is set, a message will be printed...
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...
UInt_t * createIndexVector() const
RooMCIntegrator implements an adaptive multi-dimensional Monte Carlo numerical integration, following the VEGAS algorithm originally described in G.
void function(const Char_t *name_, T fun, const Char_t *docstring=0)
Double_t * createPoint() const
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 ...
void setNBoxes(UInt_t boxes)
RooRealVar represents a fundamental (non-derived) real valued object.
void firstBox(UInt_t box[]) const
Reset the specified array of box indices to refer to the first box in the standard traversal order...
const RooAbsFunc * _function
static void registerIntegrator(RooNumIntFactory &fact)
This function registers class RooMCIntegrator, its configuration options and its capabilities with Ro...
RooCategory represents a fundamental (non-derived) discrete value object.
const RooAbsFunc * integrand() const
void refine(Double_t alpha=1.5)
Refine the grid using the values that have been accumulated so far.
virtual ~RooMCIntegrator()
Destructor.
Bool_t initialize(const RooAbsFunc &function)
Calculate and store the grid dimensions and volume using the specified function, and initialize the g...
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...
Mother of all ROOT objects.
void resetValues()
Reset the values associated with each grid cell.
Double_t getVolume() const
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...
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.
Bool_t defineType(const char *label)
Define a state with given name, the lowest available positive integer is assigned as index...
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 Bool_t checkLimits() const
Check if we can integrate over the current domain.
virtual const char * GetName() const
Returns name of object.
void resize(UInt_t bins)
Adjust the subdivision of each axis to give the specified number of bins, using an algorithm that pre...
Abstract interface for evaluating a real-valued function of one real variable and performing numerica...
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...