Logo ROOT  
Reference Guide
Loading...
Searching...
No Matches
RooAdaptiveIntegratorND.h
Go to the documentation of this file.
1/// \cond ROOFIT_INTERNAL
2
3/*****************************************************************************
4 * Project: RooFit *
5 * Package: RooFitCore *
6 * File: $Id$
7 * Authors: *
8 * WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu *
9 * DK, David Kirkby, UC Irvine, dkirkby@uci.edu *
10 * *
11 * Copyright (c) 2000-2005, Regents of the University of California *
12 * and Stanford University. All rights reserved. *
13 * *
14 * Redistribution and use in source and binary forms, *
15 * with or without modification, are permitted according to the terms *
16 * listed in LICENSE (http://roofit.sourceforge.net/license.txt) *
17 *****************************************************************************/
18#ifndef ROO_ADAPTIVE_INTEGRATOR_ND
19#define ROO_ADAPTIVE_INTEGRATOR_ND
20
21#include "RooAbsIntegrator.h"
22#include "RooNumIntConfig.h"
23#include "TString.h"
24
25#include <Math/IFunctionfwd.h>
26
27namespace ROOT {
28namespace Math {
30}
31} // namespace ROOT
32class RooFunctor;
33
34class RooAdaptiveIntegratorND : public RooAbsIntegrator {
35public:
36 // Constructors, assignment etc
37 RooAdaptiveIntegratorND(const RooAbsFunc &function, const RooNumIntConfig &config);
38
39 ~RooAdaptiveIntegratorND() override;
40
41 bool checkLimits() const override;
42 double integral(const double *yvec = nullptr) override;
43
45 bool setLimits(double *xmin, double *xmax) override;
46
47 bool setUseIntegrandLimits(bool flag) override
48 {
49 _useIntegrandLimits = flag;
50 return true;
51 }
52
53protected:
54 RooAdaptiveIntegratorND(const RooAdaptiveIntegratorND &);
55
56 bool _useIntegrandLimits; ///< If true limits of function binding are used
57
58 mutable std::vector<double> _xmin; ///< Lower bound in each dimension
59 mutable std::vector<double> _xmax; ///< Upper bound in each dimension
60 double _epsRel; ///< Relative precision
61 double _epsAbs; ///< Absolute precision
62 Int_t _nmax; ///< Max number of divisions
63 Int_t _nError; ///< Number of error occurrences
64 Int_t _nWarn; ///< Max number of warnings to be issued ;
65 std::unique_ptr<RooFunctor> _rooFunctor; ///<! RooFunctor binding
66 std::unique_ptr<ROOT::Math::IMultiGenFunction> _func; ///<! ROOT::Math multi-parameter function binding
67 ROOT::Math::AdaptiveIntegratorMultiDim *_integrator;
68 TString _intName; ///< Integrand name
69
70 friend class RooNumIntFactory;
71 static void registerIntegrator(RooNumIntFactory &fact);
72};
73
74#endif
75
76/// \endcond
int Int_t
Signed integer 4 bytes (int).
Definition RtypesCore.h:59
float xmin
float xmax
Class for adaptive quadrature integration in multi-dimensions using rectangular regions.
Abstract interface for integrators of real-valued functions that implement the RooAbsFunc interface.
virtual bool setUseIntegrandLimits(bool flag)
Interface function that allows to defer limit definition to integrand definition.
virtual bool checkLimits() const
If true, finite limits are required on the observable range.
virtual double integral(const double *yvec=nullptr)=0
virtual bool setLimits(double *, double *)
Lightweight interface adaptor that exports a RooAbsPdf as a functor.
Definition RooFunctor.h:25