Fit Integral

Hello
i have a 2 dimensional fit graph
TF2 *g2= new TF2(“g2”,G2,ax,ay,bx,by,5)
that i use to fit a beam spot in x and y directions.
i set the range and provided the needed parameters (5) and everything works.
what i need is how to integrate the number of events ( entries) within the 2 sigma / 3 sigma of that fit function
thanks

Once you have the fit parameters compute xmin,xmax,ymin,ymax and call
g2->Integral(xmin,xmax,ymin,ymax)

Rene