Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RooImproperIntegrator1D Class Reference

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 RooAbsFuncintegrand () 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
 

#include </home/sftnight/build/workspace/root-makedoc-master/rootspi/rdoc/src/master/roofit/roofitcore/src/RooImproperIntegrator1D.h>

Inheritance diagram for RooImproperIntegrator1D:
[legend]

Member Enumeration Documentation

◆ LimitsCase

Enumerator
Invalid 
ClosedBothEnds 
OpenBothEnds 
OpenBelowSpansZero 
OpenBelow 
OpenAboveSpansZero 
OpenAbove 

Definition at line 47 of file RooImproperIntegrator1D.h.

Constructor & Destructor Documentation

◆ RooImproperIntegrator1D() [1/3]

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() [2/3]

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() [3/3]

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.

Member Function Documentation

◆ checkLimits()

bool RooImproperIntegrator1D::checkLimits ( ) const
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.

◆ initialize()

void RooImproperIntegrator1D::initialize ( const RooAbsFunc function = nullptr)
protected

Initialize the integrator, construct and initialize subintegrators.

Definition at line 109 of file RooImproperIntegrator1D.cxx.

◆ integral()

double RooImproperIntegrator1D::integral ( const double yvec = nullptr)
overridevirtual

Calculate the integral at the given parameter values of the function binding.

Implements RooAbsIntegrator.

Definition at line 288 of file RooImproperIntegrator1D.cxx.

◆ limitsCase()

RooImproperIntegrator1D::LimitsCase RooImproperIntegrator1D::limitsCase ( ) const
protected

Classify the type of limits we have: OpenBothEnds,ClosedBothEnds,OpenBelow or OpenAbove.

Definition at line 245 of file RooImproperIntegrator1D.cxx.

◆ registerIntegrator()

void RooImproperIntegrator1D::registerIntegrator ( RooNumIntFactory fact)
staticprotected

Register RooImproperIntegrator1D, its parameters and capabilities with RooNumIntFactory.

Definition at line 46 of file RooImproperIntegrator1D.cxx.

◆ setLimits() [1/3]

virtual bool RooAbsIntegrator::setLimits ( double ,
double  
)
inlinevirtual

Reimplemented from RooAbsIntegrator.

Definition at line 54 of file RooAbsIntegrator.h.

◆ setLimits() [2/3]

bool RooImproperIntegrator1D::setLimits ( double xmin,
double xmax 
)
overridevirtual

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.

◆ setLimits() [3/3]

bool RooAbsIntegrator::setLimits ( double  xmin,
double  xmax 
)
virtual

Interface to set limits on integration.

Reimplemented from RooAbsIntegrator.

Definition at line 55 of file RooAbsIntegrator.cxx.

◆ setUseIntegrandLimits()

bool RooImproperIntegrator1D::setUseIntegrandLimits ( bool  flag)
inlineoverridevirtual

Interface function that allows to defer limit definition to integrand definition.

Reimplemented from RooAbsIntegrator.

Definition at line 34 of file RooImproperIntegrator1D.h.

Friends And Related Symbol Documentation

◆ RooNumIntFactory

friend class RooNumIntFactory
friend

Definition at line 42 of file RooImproperIntegrator1D.h.

Member Data Documentation

◆ _case

LimitsCase RooImproperIntegrator1D::_case
protected

Configuration of limits.

Definition at line 57 of file RooImproperIntegrator1D.h.

◆ _config

RooNumIntConfig RooImproperIntegrator1D::_config
protected

Configuration object.

Definition at line 63 of file RooImproperIntegrator1D.h.

◆ _function

std::unique_ptr<RooInvTransform> RooImproperIntegrator1D::_function
protected

Binding with inverse of function.

Definition at line 62 of file RooImproperIntegrator1D.h.

◆ _integrator1

std::unique_ptr<RooRombergIntegrator> RooImproperIntegrator1D::_integrator1
mutableprotected

Piece integrator 1.

Definition at line 64 of file RooImproperIntegrator1D.h.

◆ _integrator2

std::unique_ptr<RooRombergIntegrator> RooImproperIntegrator1D::_integrator2
mutableprotected

Piece integrator 2.

Definition at line 65 of file RooImproperIntegrator1D.h.

◆ _integrator3

std::unique_ptr<RooRombergIntegrator> RooImproperIntegrator1D::_integrator3
mutableprotected

Piece integrator 3.

Definition at line 66 of file RooImproperIntegrator1D.h.

◆ _origFunc

RooAbsFunc* RooImproperIntegrator1D::_origFunc = nullptr
protected

Original function binding.

Definition at line 61 of file RooImproperIntegrator1D.h.

◆ _useIntegrandLimits

bool RooImproperIntegrator1D::_useIntegrandLimits
protected

Use limits in function binding?

Definition at line 59 of file RooImproperIntegrator1D.h.

◆ _xmax

double RooImproperIntegrator1D::_xmax
protected

Value of limits.

Definition at line 58 of file RooImproperIntegrator1D.h.

◆ _xmin

double RooImproperIntegrator1D::_xmin
mutableprotected

Definition at line 58 of file RooImproperIntegrator1D.h.

  • roofit/roofitcore/src/RooImproperIntegrator1D.h
  • roofit/roofitcore/src/RooImproperIntegrator1D.cxx