I’m fairly new to ROOT and neither a very skilled programmer. For my thesis, I would like to be able to plot the chi-squared surface of fits. The function I fit to my data looks like
where the variable in brackets are fit parameters. I would like to plot the chi^2 surface for two of those parameters, namely A and B in this case, whilst the other are fixed.
I obtain the fit, its parameters and chi-squared with the following (incomplete) code snippet
TGraph* g = new TGraphErrors("data.dat","%lg %lg %lg");
TF1 *func = new TF1("fitf",fitf,xmin,xmax,12);
Chisq/ndf = func->GetChisquare()/func->GetNDF();
where data.dat contains x, y, y-error.
Is there a built-in possibilty of plotting a (2D) histogram of the chi-squared surface and, if so, how would I have to implement it?
Thanks very much for your help,