# How to do 2D integration with ROOT::Math::IntegratorMultiDim

**URL:** <https://root-forum.cern.ch/t/how-to-do-2d-integration-with-root-math-integratormultidim/22023>\
**Category:** ROOT\
**Created:** [October 11, 2016, 10:06am UTC](https://root-forum.cern.ch/t/how-to-do-2d-integration-with-root-math-integratormultidim/22023 "2016-10-11T10:06:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![libalk](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/l/7993a0/32.png) [@libalk](https://root-forum.cern.ch/u/libalk)\
**Post date:** [October 11, 2016, 10:06am UTC](https://root-forum.cern.ch/t/how-to-do-2d-integration-with-root-math-integratormultidim/22023/1 "2016-10-11T10:06:17Z")

</div>

I want to integrate a 2D function with parameters. I have defined it so that I can construct a TF2, but the Integral method of TF2 is not working to my satisfaction. I have found the ROOT::Math::IntegratorMultiDim class, but cannot figure out how to pass my function so that it works.

Note 1: this is a follow-up question for [Why is my integral zero?](https://root-forum.cern.ch/t/why-is-my-integral-zero/21999/1) where also my function is attached

Note 2: the problem is probably my subpar programming skills, so any “dumbing it down” will be greatly appreciated!

Edit: I think I got it now!
