Hello! I am performing an NBD fit to a charged hadron multiplicity curve. I define a fit function:
// Fitting function
TF1 *fist = new TF1("fist", "[0]*ROOT::Math::negative_binomial_pdf([1],[2],x)", 0, 60);
And then perform the fit with initial guesses for the variables.
// Input fit params
fist->SetParameter(0,1); // normalisation parameter
fist->SetParameter(1,15); // k - shape parameter
fist->SetParameter(2,0.5); // p - probability parameter
// Perform fitting
hist->Fit("fist", "R0");
My doubts:
1 - As I understand the documentation, the negative_binomial_pdf accepts (k,p,n) respectively. Initially, I kept n as a parameter (by setting it to [3]). However, this did not work. After tweaking, I observed that setting n as x solves the issue. But I do not understand why?
2 - Is there a way to improve the fit further? Provided the plot below for reference.
… while using [0]*ROOT::Math::negative_binomial_pdf([1],[2],x) solves the issue?
As per the literature, using k,n as parameters for nCh curves is best. However, the only definition that works for me in ROOT requires n as an independent variable and k,p to be set.