Home | News | Documentation | Download

Fitting and finding the parameters of a pol7 fit on a histogram with c++ code


Hello! I’d like to fit a lot of histograms with a pol7 fit and then somehow get the fitting parameters ( f(0), f(1), f(2)… ) that were automatically chosen by root. I need to do this for more than 8000 histograms, so basically it cannot be done through TBrowser, it has to be c++ code. Anyone knows how this could be done?

_ROOT Version: v5.34.38
_Platform: Ubuntu 14
_Compiler: g++



you can for example get back a result ptr from your fit:

auto rp = myhisto->Fit("pol7","S");
auto &params = rp->Parameters();
for (auto param : params)  cout << param << endl;



This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.