From d8cbc12625342bf062ad45d8c2ab918b071989d0 Mon Sep 17 00:00:00 2001
From: Lorenzo Moneta <Lorenzo.Moneta@cern.ch>
Date: Fri, 19 Nov 2010 10:11:01 +0000
Subject: [PATCH] set also minpts in Tf1::IntegralMultiple

git-svn-id: http://root.cern.ch/svn/root/trunk@36765 27541ba8-7e3a-0410-8455-c3a389f83636
---
 hist/hist/src/TF1.cxx | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/hist/hist/src/TF1.cxx b/hist/hist/src/TF1.cxx
index 4e17b8a1bde..e73dca291fc 100644
--- a/hist/hist/src/TF1.cxx
+++ b/hist/hist/src/TF1.cxx
@@ -30,6 +30,7 @@
 #include "Math/BrentRootFinder.h"
 #include "Math/BrentMinimizer1D.h"
 #include "Math/BrentMethods.h"
+#include "Math/Integrator.h"
 #include "Math/GaussIntegrator.h"
 #include "Math/GaussLegendreIntegrator.h"
 #include "Math/AdaptiveIntegratorMultiDim.h"
@@ -2506,8 +2507,10 @@ Double_t TF1::Integral(Double_t a, Double_t b, const Double_t *params, Double_t
    TF1_EvalWrapper wf1( this, params, fgAbsValue ); 
 
    ROOT::Math::GaussIntegrator giod;
+   //ROOT::Math::Integrator giod;
    giod.SetFunction(wf1);
    giod.SetRelTolerance(epsilon);
+   //giod.SetAbsTolerance(epsilon);
 
    return giod.Integral(a, b);
 }
@@ -2642,7 +2645,7 @@ Double_t TF1::IntegralMultiple(Int_t n, const Double_t *a, const Double_t *b, Do
 
 
 //______________________________________________________________________________
-Double_t TF1::IntegralMultiple(Int_t n, const Double_t *a, const Double_t *b, Int_t /*minpts*/, Int_t maxpts, Double_t eps, Double_t &relerr,Int_t &nfnevl, Int_t &ifail)
+Double_t TF1::IntegralMultiple(Int_t n, const Double_t *a, const Double_t *b, Int_t minpts, Int_t maxpts, Double_t eps, Double_t &relerr,Int_t &nfnevl, Int_t &ifail)
 {
    //  Adaptive Quadrature for Multiple Integrals over N-Dimensional
    //  Rectangular Regions
@@ -2710,6 +2713,7 @@ Double_t TF1::IntegralMultiple(Int_t n, const Double_t *a, const Double_t *b, In
    ROOT::Math::WrappedMultiFunction<TF1&> wf1(*this, n);
 
    ROOT::Math::AdaptiveIntegratorMultiDim aimd(wf1, eps, eps, maxpts);
+   aimd.SetMinPts(minpts);
    double result = aimd.Integral(a,b);
    relerr = aimd.RelError();
    nfnevl = aimd.NEval();
-- 
GitLab