How to fit 2D histogram?

Hi,

I have a 2D histgoram as shown in the attachment is there a way to fit in 2D. Or is there a way to plot a function on top of it so that i can find an emprical fit somehow.

Thanks
Burçin

see example in $ROOTSYS/tutorials/fit/fit2.C

Rene

Hi Rene,

I’m looking to the fit2.C and trying to modify to my needs. I don’t understang the g2 part. What it’s purpose?

Thanks,
Burçin

The function g2 (a gaussian) is called by the function fun2 that amkes the sum of 3 gaussians

Rene