Special numeric integrator that can handle integrals over open domains.
To this end the range is cut in up three pieces: [-inf,-1],[-1,+1] and [+1,inf] and the outer two pieces, if required are calculated using a 1/x transform
Definition at line 25 of file RooImproperIntegrator1D.h.
Public Member Functions | |
RooImproperIntegrator1D (const RooAbsFunc &function) | |
Constructor with function binding. | |
RooImproperIntegrator1D (const RooAbsFunc &function, const RooNumIntConfig &config) | |
Constructor with function binding and configuration object. | |
RooImproperIntegrator1D (const RooAbsFunc &function, double xmin, double xmax, const RooNumIntConfig &config) | |
Constructor with function binding, definition of integration range and configuration object. | |
bool | checkLimits () const override |
Check if the limits are valid. | |
double | integral (const double *yvec=nullptr) override |
Calculate the integral at the given parameter values of the function binding. | |
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 Types | |
enum | LimitsCase { Invalid , ClosedBothEnds , OpenBothEnds , OpenBelowSpansZero , OpenBelow , OpenAboveSpansZero , OpenAbove } |
Protected Member Functions | |
void | initialize (const RooAbsFunc *function=nullptr) |
Initialize the integrator, construct and initialize subintegrators. | |
LimitsCase | limitsCase () const |
Classify the type of limits we have: OpenBothEnds,ClosedBothEnds,OpenBelow or OpenAbove. | |
Static Protected Member Functions | |
static void | registerIntegrator (RooNumIntFactory &fact) |
Register RooImproperIntegrator1D, its parameters and capabilities with RooNumIntFactory. | |
Protected Attributes | |
LimitsCase | _case |
Configuration of limits. | |
RooNumIntConfig | _config |
Configuration object. | |
std::unique_ptr< RooInvTransform > | _function |
Binding with inverse of function. | |
std::unique_ptr< RooRombergIntegrator > | _integrator1 |
Piece integrator 1. | |
std::unique_ptr< RooRombergIntegrator > | _integrator2 |
Piece integrator 2. | |
std::unique_ptr< RooRombergIntegrator > | _integrator3 |
Piece integrator 3. | |
RooAbsFunc * | _origFunc = nullptr |
Original function binding. | |
bool | _useIntegrandLimits |
Use limits in function binding? | |
double | _xmax |
Value of limits. | |
double | _xmin |
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 |
|
protected |
Enumerator | |
---|---|
Invalid | |
ClosedBothEnds | |
OpenBothEnds | |
OpenBelowSpansZero | |
OpenBelow | |
OpenAboveSpansZero | |
OpenAbove |
Definition at line 47 of file RooImproperIntegrator1D.h.
RooImproperIntegrator1D::RooImproperIntegrator1D | ( | const RooAbsFunc & | function | ) |
Constructor with function binding.
The integration range is taken from the definition in the function binding
Definition at line 65 of file RooImproperIntegrator1D.cxx.
RooImproperIntegrator1D::RooImproperIntegrator1D | ( | const RooAbsFunc & | function, |
const RooNumIntConfig & | config | ||
) |
Constructor with function binding and configuration object.
The integration range is taken from the definition in the function binding
Definition at line 79 of file RooImproperIntegrator1D.cxx.
RooImproperIntegrator1D::RooImproperIntegrator1D | ( | const RooAbsFunc & | function, |
double | xmin, | ||
double | xmax, | ||
const RooNumIntConfig & | config | ||
) |
Constructor with function binding, definition of integration range and configuration object.
Definition at line 93 of file RooImproperIntegrator1D.cxx.
|
overridevirtual |
Check if the limits are valid.
For this integrator all limit configurations are valid, but if the limits change between two calculate() calls it may be necessary to reconfigure (e.g. if an open ended range becomes a closed range
Reimplemented from RooAbsIntegrator.
Definition at line 199 of file RooImproperIntegrator1D.cxx.
|
protected |
Initialize the integrator, construct and initialize subintegrators.
Definition at line 109 of file RooImproperIntegrator1D.cxx.
Calculate the integral at the given parameter values of the function binding.
Implements RooAbsIntegrator.
Definition at line 288 of file RooImproperIntegrator1D.cxx.
|
protected |
Classify the type of limits we have: OpenBothEnds,ClosedBothEnds,OpenBelow or OpenAbove.
Definition at line 245 of file RooImproperIntegrator1D.cxx.
|
staticprotected |
Register RooImproperIntegrator1D, its parameters and capabilities with RooNumIntFactory.
Definition at line 46 of file RooImproperIntegrator1D.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 180 of file RooImproperIntegrator1D.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 34 of file RooImproperIntegrator1D.h.
|
friend |
Definition at line 42 of file RooImproperIntegrator1D.h.
|
protected |
Configuration of limits.
Definition at line 57 of file RooImproperIntegrator1D.h.
|
protected |
Configuration object.
Definition at line 63 of file RooImproperIntegrator1D.h.
|
protected |
Binding with inverse of function.
Definition at line 62 of file RooImproperIntegrator1D.h.
|
mutableprotected |
Piece integrator 1.
Definition at line 64 of file RooImproperIntegrator1D.h.
|
mutableprotected |
Piece integrator 2.
Definition at line 65 of file RooImproperIntegrator1D.h.
|
mutableprotected |
Piece integrator 3.
Definition at line 66 of file RooImproperIntegrator1D.h.
|
protected |
Original function binding.
Definition at line 61 of file RooImproperIntegrator1D.h.
|
protected |
Use limits in function binding?
Definition at line 59 of file RooImproperIntegrator1D.h.
|
protected |
Value of limits.
Definition at line 58 of file RooImproperIntegrator1D.h.
|
mutableprotected |
Definition at line 58 of file RooImproperIntegrator1D.h.