Computes the integral over a binned distribution by summing the bin contents of all bins.
Definition at line 24 of file RooBinIntegrator.h.
Public Member Functions | |
RooBinIntegrator (const RooAbsFunc &function, const RooNumIntConfig &config) | |
Construct integrator on given function binding binding. | |
RooBinIntegrator (const RooAbsFunc &function, int numBins=100) | |
Construct integrator on given function binding binding. | |
bool | checkLimits () const override |
Check that our integration range is finite and otherwise return false. | |
double | integral (const double *yvec=nullptr) override |
Calculate numeric integral at given set of function binding parameters. | |
virtual bool | setLimits (double *, double *) |
bool | setLimits (double *xmin, double *xmax) override |
Change our integration limits. | |
virtual bool | setLimits (double xmin, double xmax) |
Interface to set limits on integration. | |
bool | setUseIntegrandLimits (bool flag) override |
Interface function that allows to defer limit definition to integrand definition. | |
Public Member Functions inherited from RooAbsIntegrator | |
RooAbsIntegrator () | |
RooAbsIntegrator (const RooAbsFunc &function, bool printEvalCounter=false) | |
Copy constructor. | |
virtual | ~RooAbsIntegrator ()=default |
double | calculate (const double *yvec=nullptr) |
Calculate integral value with given array of parameter values. | |
const RooAbsFunc * | integrand () const |
Return integrand function binding. | |
double | integrand (const double x[]) const |
Return value of integrand at given observable values. | |
bool | isValid () const |
Is integrator in valid state. | |
bool | printEvalCounter () const |
void | setPrintEvalCounter (bool value) |
Protected Member Functions | |
RooBinIntegrator (const RooBinIntegrator &) | |
double * | xvec (double xx) |
double * | xvec (double xx, double yy) |
double * | xvec (double xx, double yy, double zz) |
Static Protected Member Functions | |
static void | registerIntegrator (RooNumIntFactory &fact) |
Register RooBinIntegrator, is parameters and capabilities with RooNumIntFactory. | |
Protected Attributes | |
std::vector< std::vector< double > > | _binb |
! list of bin boundaries | |
Int_t | _numBins = 0 |
! Size of integration range | |
bool | _useIntegrandLimits = false |
If true limits of function binding are ued. | |
std::vector< double > | _x |
! do not persist | |
std::vector< double > | _xmax |
! Upper integration bound | |
std::vector< double > | _xmin |
! Lower integration bound | |
Protected Attributes inherited from RooAbsIntegrator | |
const RooAbsFunc * | _function = nullptr |
Pointer to function binding of integrand. | |
bool | _printEvalCounter = false |
If true print number of function evaluation required for integration. | |
bool | _valid = false |
Is integrator in valid state? | |
Friends | |
class | RooNumIntFactory |
RooBinIntegrator::RooBinIntegrator | ( | const RooAbsFunc & | function, |
int | numBins = 100 |
||
) |
Construct integrator on given function binding binding.
Definition at line 73 of file RooBinIntegrator.cxx.
RooBinIntegrator::RooBinIntegrator | ( | const RooAbsFunc & | function, |
const RooNumIntConfig & | config | ||
) |
Construct integrator on given function binding binding.
Definition at line 110 of file RooBinIntegrator.cxx.
|
protected |
|
overridevirtual |
Check that our integration range is finite and otherwise return false.
Update the limits from the integrand if requested.
Reimplemented from RooAbsIntegrator.
Definition at line 137 of file RooBinIntegrator.cxx.
Calculate numeric integral at given set of function binding parameters.
Implements RooAbsIntegrator.
Definition at line 164 of file RooBinIntegrator.cxx.
|
staticprotected |
Register RooBinIntegrator, is parameters and capabilities with RooNumIntFactory.
Definition at line 50 of file RooBinIntegrator.cxx.
Reimplemented from RooAbsIntegrator.
Definition at line 54 of file RooAbsIntegrator.h.
Change our integration limits.
Return true if the new limits are ok, or otherwise false. Always returns false and does nothing if this object was constructed to always use our integrand's limits.
Reimplemented from RooAbsIntegrator.
Definition at line 121 of file RooBinIntegrator.cxx.
Interface to set limits on integration.
Reimplemented from RooAbsIntegrator.
Definition at line 55 of file RooAbsIntegrator.cxx.
Interface function that allows to defer limit definition to integrand definition.
Reimplemented from RooAbsIntegrator.
Definition at line 36 of file RooBinIntegrator.h.
Definition at line 55 of file RooBinIntegrator.h.
Definition at line 60 of file RooBinIntegrator.h.
Definition at line 66 of file RooBinIntegrator.h.
|
friend |
Definition at line 43 of file RooBinIntegrator.h.
|
protected |
! list of bin boundaries
Definition at line 50 of file RooBinIntegrator.h.
|
mutableprotected |
! Size of integration range
Definition at line 51 of file RooBinIntegrator.h.
|
protected |
If true limits of function binding are ued.
Definition at line 53 of file RooBinIntegrator.h.
|
protected |
! do not persist
Definition at line 74 of file RooBinIntegrator.h.
|
mutableprotected |
! Upper integration bound
Definition at line 49 of file RooBinIntegrator.h.
|
mutableprotected |
! Lower integration bound
Definition at line 48 of file RooBinIntegrator.h.