Integral of a RooBreitWigner

Hi guys!

I am trying to use Roofit to integrate a RooBreitWigner. When I try to integrate it, I get an error and there are no obvious examples of integrating Breit Wigners in the manual or on the internet that I can see, which seems a bit weird. The code I’m using to declare the RooRealVar as well as the mean and width of the distribution, then fit a Breit Wigner and work out its integral is

RooRealVar mKpi("mKpi","m_{K#pi} (MeV)",630.,1800.);//Defining a variable - the distribution which is to be fitted
RooBreitWigner kstarP("kstarP","K*(894)", mKpi, kstarPmean, kstarPwidth); //Creating the Breit-Wigner distribution
kstarPmean.setRange("signalP", minmass, maxmass);
RooAbsReal* intkstarP = kstarP.createIntegral(mKpi,NormSet(mKpi), Range("signalP"));
cout << "area under bit of p wave = " << intkstarP << endl;

Is this the correct way to integrate a RooBreitWigner? And if not, what is the correct syntax?

Thanks in advance!