TGraph2DErrors fit problems

Thanks for implementing it.

I’ve found three problems when trying to use my own “fitting function” (the “U” fit option).

  1. In my “fitting function”, I try to retrieve the actual “fit options” using:
    Foption_t foption = TVirtualFitter::GetFitter()->GetFitOption();
    but “foption” contains simply zeros, regardless of which “fit options” are really used.

  2. When I try “UW”, I always get “NDf = 0” in the output, but I get 115 when I then try:
    ((TF2*)(TVirtualFitter::GetFitter()->GetUserFunc()))->GetNDF()

  3. I should actually get 116, which is properly returned by “W”. I have 120 data points and my function has 5 parameters, but one of them is “fixed”, so “NDf = 116”. I think “UW” improperly subtracts the number of all parameters, while it should take the “free” ones only.