TGraphErrors::Fit ignores parameter limits

Dear experts,

I have a similar problem as described in


except I’m performing the fit on TGraphErrors. To give a short summary: I have an own defined function with parameters which I would like to fit to a TGraphErrors. For the fit I then do:

fitfunction->SetParLimits(0,4.0,5.0);
fitRes = data->Fit(fitfunction,"VN BRS EX0");

in the verbose Output I then see my parameters with the correct initial values but no limits set.

PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 p0           4.28743e+00  2.80394e+00     no limits
     2 p1           1.00000e+00  2.35160e-01     no limits
     3 p2           1.00000e-01  6.62425e-02     no limits

Performing the fit then of course returns the same value as without the paramter limits set which is outside the defined range.

Is there an issue with the other options I’m using? I also tried to remove all options except “B” because this is needed for the limit setting I think.

Thank you for your help,
Kira


ROOT Version: 6.18/04
Platform: CENTOS7
Compiler: gcc8


This is strange It should work fine setting the parameter limits. I would need your full code to see what is wrong

Lorenzo

I found an issue with a different part of my code which interacted with the fitting and now it’s working. Thank you for your help anyways.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.