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

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 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 Member Functions

 RooBinIntegrator (const RooBinIntegrator &)
 
doublexvec (double xx)
 
doublexvec (double xx, double yy)
 
doublexvec (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
 

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

Inheritance diagram for RooBinIntegrator:
[legend]

Constructor & Destructor Documentation

◆ RooBinIntegrator() [1/3]

RooBinIntegrator::RooBinIntegrator ( const RooAbsFunc function,
int  numBins = 100 
)

Construct integrator on given function binding binding.

Definition at line 73 of file RooBinIntegrator.cxx.

◆ RooBinIntegrator() [2/3]

RooBinIntegrator::RooBinIntegrator ( const RooAbsFunc function,
const RooNumIntConfig config 
)

Construct integrator on given function binding binding.

Definition at line 110 of file RooBinIntegrator.cxx.

◆ RooBinIntegrator() [3/3]

RooBinIntegrator::RooBinIntegrator ( const RooBinIntegrator )
protected

Member Function Documentation

◆ checkLimits()

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

◆ integral()

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

Calculate numeric integral at given set of function binding parameters.

Implements RooAbsIntegrator.

Definition at line 164 of file RooBinIntegrator.cxx.

◆ registerIntegrator()

void RooBinIntegrator::registerIntegrator ( RooNumIntFactory fact)
staticprotected

Register RooBinIntegrator, is parameters and capabilities with RooNumIntFactory.

Definition at line 50 of file RooBinIntegrator.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 RooBinIntegrator::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 121 of file RooBinIntegrator.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 RooBinIntegrator::setUseIntegrandLimits ( bool  flag)
inlineoverridevirtual

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

Reimplemented from RooAbsIntegrator.

Definition at line 36 of file RooBinIntegrator.h.

◆ xvec() [1/3]

double * RooBinIntegrator::xvec ( double  xx)
inlineprotected

Definition at line 55 of file RooBinIntegrator.h.

◆ xvec() [2/3]

double * RooBinIntegrator::xvec ( double  xx,
double  yy 
)
inlineprotected

Definition at line 60 of file RooBinIntegrator.h.

◆ xvec() [3/3]

double * RooBinIntegrator::xvec ( double  xx,
double  yy,
double  zz 
)
inlineprotected

Definition at line 66 of file RooBinIntegrator.h.

Friends And Related Symbol Documentation

◆ RooNumIntFactory

friend class RooNumIntFactory
friend

Definition at line 43 of file RooBinIntegrator.h.

Member Data Documentation

◆ _binb

std::vector<std::vector<double> > RooBinIntegrator::_binb
protected

! list of bin boundaries

Definition at line 50 of file RooBinIntegrator.h.

◆ _numBins

Int_t RooBinIntegrator::_numBins = 0
mutableprotected

! Size of integration range

Definition at line 51 of file RooBinIntegrator.h.

◆ _useIntegrandLimits

bool RooBinIntegrator::_useIntegrandLimits = false
protected

If true limits of function binding are ued.

Definition at line 53 of file RooBinIntegrator.h.

◆ _x

std::vector<double> RooBinIntegrator::_x
protected

! do not persist

Definition at line 74 of file RooBinIntegrator.h.

◆ _xmax

std::vector<double> RooBinIntegrator::_xmax
mutableprotected

! Upper integration bound

Definition at line 49 of file RooBinIntegrator.h.

◆ _xmin

std::vector<double> RooBinIntegrator::_xmin
mutableprotected

! Lower integration bound

Definition at line 48 of file RooBinIntegrator.h.

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