hello, I’m looking for a way to fit 4 gaussian, wich represent 15 parameters including the background.
However the TF1 allows only 10, so 3 gaussians and all with the same sigma (and the fit is awful).
Does anyone have a solution ?
hello, I’m looking for a way to fit 4 gaussian, wich represent 15 parameters including the background.
However the TF1 allows only 10, so 3 gaussians and all with the same sigma (and the fit is awful).
Does anyone have a solution ?
ok someone in my lab give me an answer, I post it anyway in case you have the same problem and are reading this topic !
It’s SetParameters that is limited to 10 parameters, so after that, you must specify each added parameter with SetParameter (without “s”).
in my case :
fitFunc->SetParameters(1,1,1,50,Mean_Peak,Sigma,50,Mean_Peak2,Sigma);
fitFunc->SetParameter(9,50);
fitFunc->SetParameter(10,Mean_Peak3);
fitFunc->SetParameter(11,Sigma);
fitFunc->SetParameter(12,50);
fitFunc->SetParameter(13,Mean_Peak4);
fitFunc->SetParameter(14,Sigma);