I defined a TF2 function with 12 parameters, which I want to use in a histogram fit, but I cannot set the parameters using the ->SetParameters(…) method.
I used the following to define the function:
TF2 *fit_back_ridge = new TF2(“fit_back_ridge”, gauss2d_back_ridge, 1330, 1390, 1330, 1390, 12);
Then,
fit_back_ridge->SetParameters(2, 5, 1362, 4, 5, 1362, 4, 80, 1362, 4, 1362, 4);
but I get
Error: Can’t call TF2::SetParameters(2,5,1362,4,5,1362,4,80,1362,4,1362,4) in current scope (tmpfile):1:
Possible candidates are…
(in TF2)
(in TF1)
(in TFormula)
/opt/root/lib/libHist.so -1:-1 0 public: virtual void TFormula::SetParameters(const Double_t* params);
/opt/root/lib/libHist.so -1:-1 0 public: virtual void TFormula::SetParameters(Double_t p0,Double_t p1,Double_t p2=0,Double_t p3=0,Double_t p4=0,Double_t p5=0,Double_t p6=0,Double_t p7=0,Double_t p8=0,Double_t p9=0,Double_t p10=0); //MENU
*** Interpreter error recovered ***
Is there a limit for parameters? I do not understand what causes the error.