Numerical limits for IntegratorMultiDim?

Hello,

Does anyone know the limits to the precision of integrating with ROOT::Math::IntegratorMultiDim? Relative and absolute tolerances can be specified upon the construction of the object, but at what point is a specified tolerance unrealizable? This integrator is integrating over 2 dimensions with the VEGAS algorithm.

For context, I am trying to use this in a fitting routine that employs MIGRAD and HESSE. The routine fails to converge when it approaches the minimum even when I have specified that the absolute tolerance is 1.0e-10 and the relative tolerance 1.0e-13. In addition, I have set the working precision on the Minuit2Minimizer to 1.0e-10 using the SetPrecision(double) method. The precision of the integrator is by far the most suspicious piece of the fitter.

Thank you in advance,
Jeromy

Am I misunderstanding the meaning of the tolerance parameters in the ROOT::Math::IntegratorMultiDim constructor? Are they adjustments to specify the desired precision of the integration or are they related to something else?

I have generated a simple test program to hopefully answer the above question. What I have found is that the rel and abs tolerance arguments in the constructor seem to have no effect on the results of the integration. No matter what values I specify, the integrator always produces a value that is uncertain in the 4th decimal place. I have attached my sample code to this post if anyone wants to try it themselves.

Any thoughts would be appreciated.

Thank you,
Jeromy

See below for some sample outputs.

the output for integrating a generic 2d function of [sin(x) * y]^2 between x [-1,0] and y [1, 5] i get the following

--------------------------------------
Trial #1
rel tolerance = 0.1
abs tolerance = 0.001

Output:
   0       11.270572801008685
   1       11.270750122949824
   2       11.270623877386404
   3       11.270470459528932
   4       11.270726173586386
   5       11.270761904314838
   6       11.270538070405271
   7       11.270680297349379
   8       11.270573086043015
   9       11.270533634949359
--------------------------------------
Trial #2
abs tolerance = 1e-8
rel tolerance  = 1e-10

Output
   0       11.270572801008685
   1       11.270750122949824
   2       11.270623877386404
   3       11.270470459528932
   4       11.270726173586386
   5       11.270761904314838
   6       11.270538070405271
   7       11.270680297349379
   8       11.270573086043015
   9       11.270533634949359

--------------------------------------

test_integrator_limits.cpp (1.57 KB)

Hi Jeromy,

It is true the value of abs and rel tolerance are not used in case of MC integration. This should be documented in the integrator class. Thank you for reporting this issue.
What is used in this case is the number of function calls used for computing the integral. By increasing this number you will reduce the integral error. Note you can also retrieve the error from the integral using the Error() member function of the Integrator class.

For using this class inside the minimization, you would need a very large number of function calls to get a decent precision. If you have two dimensions, I would suggest you to use a numerical adaptive algorithm (the default algorithm in the IntegratorMultiDim class). In this case the tolerances should be used by the algorithm. If the precision is not reached you might need to increase the maximum number of function calls used to a larger value than the default one of 100000.

You can increase the number of function calls (for both MC and adaptive algorithm) by doing:

ROOT::Math::IntegratorMultiDimOptions::SetDefaultNCalls( n );

or you pass this value in the constructor of ROOT::Math::IntegratorMultiDim.

Best Regards

Lorenzo