Hi everyone,
I have used the code
TF1 *f1 = new TF1("f1", "gaus", -.5, .5);
hist->Fit("f1", "R");
to fit a gaussian to my histogram, with the fit parameters showing the in terminal.
I have also used the code
ofstream outFitNumbers;
outFitNumbers.open("FitNumbers.txt");
outFitNumbers << "Histogram Name = " << histName << endl;
etc to write different variables into a .txt file.
However I have tried
and it isn’t working like I would like it to, just gives me zero. Anyone have any ideas how this can be done?
Cheers
Jason