Hello everyone,
I am trying to fit a curve on the histogram which has more than 11 parameters. However, I noticed that the SetParameters()
allows only 11 entries. So, my code is giving an error.
I just want to fit the histogram and in output chi2 minimized parameters. Any suggestion would be a great help. Following is the snippet of the code.
TF1 *fit2 = new TF1("fit2", my_func, 1, 6., 12);
fit2->SetParameters(4.96478e+00,
2.31372e-01,
2.13283e+02,
4.71709e-01,
5.16176e+00,
8.75612e-02,
1.22796e+04,
1.25758e+00,
4.24852e+00,
1.34468e-01,
1.36518e+02,
1.);
fit2->SetLineColor(kRed);
fit2->SetLineWidth(4);
h2->Fit(fit2, "R+");