Implementation of non-relativistic and relativistic BW fit in ROOFIT

I want to perform relativistic BW fit. Here I attach my fit implementation.
RooMyPDF_BW.C (1.8 KB)
RooMyPDF_BW.h (1.3 KB)
Let me know if this is a correct way of implementing the fit.

Here I explicitly provide the evaluate function I used in my fit.
double RooMyPDF_BW::evaluate() const
{
Double_t arg= x - mean;
return 1. / (arg * arg + 0.25 * width * width);
double pi = TMath::Pi();
double y = sqrt(mean * mean * (mean * mean + gamma * gamma));
double num = ((2 * sqrt(2)/pi) * mean * gamma * y );
double k = (num/ (sqrt(mean * mean+y)) );

double bw = (k/( pow((x * x - mean * mean),2) + mean * mean * gamma * gamma) ); 
return bw;

}
While for normalising the pdf I let ROOT use the numerical integration by specifying getAnalyticIntegral return zero.

Additionally, I am confused the way non-relativistic BW fit is implemented in ROOFIT. The function for defining BW is
double arg = (x-mean)
bw = gamma / (arg * arg + 0.25 * gamma * gamma)
return bw/(2 * Pi());

While in roofit , we ignore gamma, and define the function as
double arg = (x-mean)
bw = 1. / (arg * arg + 0.25* width* width)

Is there any specific reason to avoid the gamma parameter in defining BW in roofit. Do any such logic also applies when I want to determine relativistic BW fit.

Thank you in advance!

Dear @nrawal ,

Thank for reaching out to the forum! Your question seems quite convoluted, maybe @jonas could help here.

Cheers,
Vincenzo

Hi ,

Let me know if something is not clear.

I want to verify that my implementation of Relativistic BW is correct, and I am not missing anything?

Further, I am confused why for the definition of the non-relativistic BW fit implement in ROOFIT, why we ignore the gamma factor in numerator for defining BW function ?

Best
Neha