ROOT   Reference Guide
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 *
11 * *
12 * Redistribution and use in source and binary forms, *
13 * with or without modification, are permitted according to the terms *
15 *****************************************************************************/
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 ;
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
70};
71
72#endif
#define ClassDefOverride(name, id)
Definition: Rtypes.h:339
float xmin
Definition: THbookFile.cxx:95
float xmax
Definition: THbookFile.cxx:95
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 *)
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.
Destructor.
bool canIntegrateND() const override
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.