Hello,
I have two questions about how to fit histograms:
1.- It is possible to add a function to the fitpanel using "+"
e.g. xy->Fit(“Voigt”,“V+”,“ep”);
However this will start a fit. Is there a way to add a function to the
list without any preliminary fit??
2.- I am writing a gui to fit some data and I do not know in advance
how many peaks will be present in the histogram and hence how many parameters
the fit will need.
A user function is declared like:
double Func_To_Fit::Evaluate(Double_t *x, Double_t *par),
the problem that I have is to get the size of par ??
e.g:
for (Int_t p=0;p<???;p++) {
Double_t norm = par[3p+2];
Double_t mean = par[3p+3];
Double_t sigma = par[3p+4];
result += normTMath::Gaus(x[0],mean,sigma);
}
Thank you in advance,
Bertrand Roessli