I’m trying to create a model with 13 parameters to fit a histogram.
I have found this strage error: this model has 13 parameters (you can check the definition of the function in fit.h) However when I try to set the 13 parameters in macro function.cpp I have the following error:
Processing function.cpp... In file included from input_line_8:1: /home/commodo98/programmi/Exercises/root/fit/function.cpp:10:5: error: no matching member function for call to 'SetParameters' f->SetParameters(16.39,14.01,5286,0.15,0.18,2038,1.29e4,15.28,2.48e4,5050,1.0e-6,1,1); ~~~^~~~~~~~~~~~~ /home/commodo98/root/builddir/include/TF1.h:649:21: note: candidate function not viable: requires at most 11 arguments, but 13 were provided virtual void SetParameters(Double_t p0, Double_t p1, Double_t p2 = 0, Double_t p3 = 0, Double_t p4 = 0, ^ /home/commodo98/root/builddir/include/TF1.h:644:21: note: candidate function not viable: requires single argument 'params', but 13 arguments were provided virtual void SetParameters(const Double_t *params)
Do you have an idea of this strange behaviour?
**Something that is really strange, is that if I define the function with only 11 parameters, without changing the definition is fit.h, the program is working, something unreasonable.