# The integral of a Roofit curve

Hi,

I am trying to compute the integral of a fit function generated by Roofit. the relevant lines of code are `RooRealVar mKpi("mKpi","m_{K#pi} (MeV)",630.,1800.);//Defining a variable - the distribution which is to be fitted ` ``` // Getting the integral of mKpi mKpi.setRange("signal", minmass,maxmass); RooAbsReal* intkstar = kstarP.createIntegral(mKpi,NormSet(mKpi), Range("signal")); cout << "area under bit of total signal = " << intkstar << endl; ```

This is the standard syntax used. However the result I get is a memory allocation. If I replace the () with a (&) the result I get is 0. This seems strange, as a () is used to read the value of a pointer while a (&) is used to get the memory allocation in C++. What is the correct syntax to find the area under the fit function?