Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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
23#include <Math/IFunctionfwd.h>
24
25namespace ROOT {
26namespace Math {
27class AdaptiveIntegratorMultiDim;
28}
29} // namespace ROOT
30class RooFunctor;
31
33public:
34 // Constructors, assignment etc
35 RooAdaptiveIntegratorND(const RooAbsFunc &function, const RooNumIntConfig &config);
36
37 ~RooAdaptiveIntegratorND() override;
38
39 bool checkLimits() const override;
40 double integral(const double *yvec = nullptr) override;
41
43 bool setLimits(double *xmin, double *xmax) override;
44
45 bool setUseIntegrandLimits(bool flag) override
46 {
48 return true;
49 }
50
51protected:
53
54 bool _useIntegrandLimits; ///< If true limits of function binding are used
55
56 mutable std::vector<double> _xmin; ///< Lower bound in each dimension
57 mutable std::vector<double> _xmax; ///< Upper bound in each dimension
58 double _epsRel; ///< Relative precision
59 double _epsAbs; ///< Absolute precision
60 Int_t _nmax; ///< Max number of divisions
61 Int_t _nError; ///< Number of error occurrences
62 Int_t _nWarn; ///< Max number of warnings to be issued ;
63 std::unique_ptr<RooFunctor> _rooFunctor; ///<! RooFunctor binding
64 std::unique_ptr<ROOT::Math::IMultiGenFunction> _func; ///<! ROOT::Math multi-parameter function binding
66 TString _intName; ///< Integrand name
67
68 friend class RooNumIntFactory;
69 static void registerIntegrator(RooNumIntFactory &fact);
70};
71
72#endif
float xmin
float xmax
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
Abstract interface for integrators of real-valued functions that implement the RooAbsFunc interface.
virtual bool setLimits(double *, double *)
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 setUseIntegrandLimits(bool flag) override
Interface function that allows to defer limit definition to integrand definition.
bool _useIntegrandLimits
If true limits of function binding are used.
double integral(const double *yvec=nullptr) override
Evaluate integral at given function binding parameter values.
std::unique_ptr< RooFunctor > _rooFunctor
! RooFunctor binding
bool setLimits(double *xmin, double *xmax) override
Change our integration limits.
std::vector< double > _xmin
Lower bound in each dimension.
double _epsRel
Relative precision.
double _epsAbs
Absolute precision.
TString _intName
Integrand name.
~RooAdaptiveIntegratorND() override
Destructor.
RooAdaptiveIntegratorND(const RooAdaptiveIntegratorND &)
static void registerIntegrator(RooNumIntFactory &fact)
Register RooAdaptiveIntegratorND, its parameters, dependencies and capabilities with RooNumIntFactory...
Int_t _nError
Number of error occurrences.
std::unique_ptr< ROOT::Math::IMultiGenFunction > _func
! ROOT::Math multi-parameter function binding
ROOT::Math::AdaptiveIntegratorMultiDim * _integrator
std::vector< double > _xmax
Upper bound in each dimension.
Int_t _nWarn
Max number of warnings to be issued ;.
Lightweight interface adaptor that exports a RooAbsPdf as a functor.
Definition RooFunctor.h:25
Holds the configuration parameters of the various numeric integrators used by RooRealIntegral.
Factory to instantiate numeric integrators from a given function binding and a given configuration.
Basic string class.
Definition TString.h:139
Namespace for new Math classes and functions.
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...