Logo ROOT  
Reference Guide
RooAdaptiveIntegratorND.h
Go to the documentation of this file.
1/*****************************************************************************
2 * Project: RooFit *
3 * Package: RooFitCore *
4 * File: $Id$
5 * Authors: *
6 * WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu *
7 * DK, David Kirkby, UC Irvine, dkirkby@uci.edu *
8 * *
9 * Copyright (c) 2000-2005, Regents of the University of California *
10 * and Stanford University. All rights reserved. *
11 * *
12 * Redistribution and use in source and binary forms, *
13 * with or without modification, are permitted according to the terms *
14 * listed in LICENSE (http://roofit.sourceforge.net/license.txt) *
15 *****************************************************************************/
16#ifndef ROO_ADAPTIVE_INTEGRATOR_ND
17#define ROO_ADAPTIVE_INTEGRATOR_ND
18
19#include "RooAbsIntegrator.h"
20#include "RooNumIntConfig.h"
21#include "TString.h"
22
23namespace ROOT { namespace Math { class AdaptiveIntegratorMultiDim ; } }
25
27public:
28
29 // Constructors, assignment etc
32
33 RooAbsIntegrator* clone(const RooAbsFunc& function, const RooNumIntConfig& config) const override ;
34 ~RooAdaptiveIntegratorND() override;
35
36 bool checkLimits() const override;
37 double integral(const double *yvec=0) override ;
38
40 bool setLimits(double* xmin, double* xmax) override;
41
42 bool canIntegrate1D() const override { return false ; }
43 bool canIntegrate2D() const override { return true ; }
44 bool canIntegrateND() const override { return true ; }
45 bool canIntegrateOpenEnded() const override { return false ; }
46
47 bool setUseIntegrandLimits(bool flag) override {_useIntegrandLimits = flag ; return true ; }
48
49protected:
50
52
53 bool _useIntegrandLimits; ///< If true limits of function binding are used
54
55 mutable double* _xmin ; ///< Lower bound in each dimension
56 mutable double* _xmax ; ///< Upper bound in each dimension
57 double _epsRel ; ///< Relative precision
58 double _epsAbs ; ///< Absolute precision
59 Int_t _nmax ; ///< Max number of divisions
60 Int_t _nError ; ///< Number of error occurrences
61 Int_t _nWarn ; ///< Max number of warnings to be issued ;
62 RooMultiGenFunction* _func ; ///<! ROOT::Math multi-parameter function binding
64 TString _intName ; ///< Integrand name
65
66 friend class RooNumIntFactory ;
67 static void registerIntegrator(RooNumIntFactory& fact) ;
68
69 ClassDefOverride(RooAdaptiveIntegratorND,0) // N-dimensional adaptive integration (interface to MathCore integrator)
70};
71
72#endif
#define ClassDefOverride(name, id)
Definition: Rtypes.h:339
float xmin
Definition: THbookFile.cxx:95
float xmax
Definition: THbookFile.cxx:95
Class for adaptive quadrature integration in multi-dimensions using rectangular regions.
Abstract interface for evaluating a real-valued function of one real variable and performing numerica...
Definition: RooAbsFunc.h:27
RooAbsIntegrator is the abstract interface for integrators of real-valued functions that implement th...
virtual bool setLimits(double *, double *)
RooAdaptiveIntegratorND implements an adaptive one-dimensional numerical integration algorithm.
Int_t _nmax
Max number of divisions.
bool checkLimits() const override
Check that our integration range is finite and otherwise return false.
bool canIntegrate2D() const override
bool setUseIntegrandLimits(bool flag) override
Interface function that allows to defer limit definition to integrand definition.
double integral(const double *yvec=0) override
Evaluate integral at given function binding parameter values.
bool _useIntegrandLimits
If true limits of function binding are used.
RooAbsIntegrator * clone(const RooAbsFunc &function, const RooNumIntConfig &config) const override
Virtual constructor with given function and configuration. Needed by RooNumIntFactory.
bool setLimits(double *xmin, double *xmax) override
Change our integration limits.
double * _xmax
Upper bound in each dimension.
double * _xmin
Lower bound in each dimension.
bool canIntegrate1D() const override
double _epsRel
Relative precision.
double _epsAbs
Absolute precision.
TString _intName
Integrand name.
~RooAdaptiveIntegratorND() override
Destructor.
bool canIntegrateND() const override
RooAdaptiveIntegratorND(const RooAdaptiveIntegratorND &)
static void registerIntegrator(RooNumIntFactory &fact)
Register RooAdaptiveIntegratorND, its parameters, dependencies and capabilities with RooNumIntFactory...
RooMultiGenFunction * _func
! ROOT::Math multi-parameter function binding
Int_t _nError
Number of error occurrences.
ROOT::Math::AdaptiveIntegratorMultiDim * _integrator
Int_t _nWarn
Max number of warnings to be issued ;.
bool canIntegrateOpenEnded() const override
Lightweight interface adaptor that exports a RooAbsReal as a ROOT::Math::IMultiGenFunction.
RooNumIntConfig holds the configuration parameters of the various numeric integrators used by RooReal...
RooNumIntFactory is a factory to instantiate numeric integrators from a given function binding and a ...
Basic string class.
Definition: TString.h:136
Namespace for new Math classes and functions.
void function(const Char_t *name_, T fun, const Char_t *docstring=0)
Definition: RExports.h:167
This file contains a specialised ROOT message handler to test for diagnostic in unit tests.