Non-linear 3D fitting and wrapping

Dear ROOTers,

I would like to receive some tips or suggestions how to code a non-linear fitting algorithm, starting from the exampleFit3D.C. I have developed a modified version of former that is working properly with n (more than 20) parameters, but when I put one those inside any functions (i.e. inducing a non linear fitting), the program fails before fitting. I am sure I am doing something wrong, but I do not understand where is the problem:

is the TF3 class not supposed to deal with functions with non lineat parameters (like the following examole)?

 TF3 * f3 = new TF3("f3","[0] * sin(x) + [1] * cos(y) + [2] * z",0,10,0,10,0,10);

is the wrapping in TF1?

 ROOT::Math::WrappedMultiTF1 wf(*f3,3);

or should I just change the type of minimizer from Minuit to some non-linear one, in order to make the

fitter.SetFunction(wf);

able to understand and store my parameters?

I have another question: is the TFormula Class somehow involved in the interpretation of my parameters? If yes how?

Thank you for your patience.

Best regards,

Giammarco Nalin

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