I want to use TMinuit to fit several different data pairs. They use the same fit function. Each time the fcn is called, it will try to fit different data.
Is the second argument the data to fit? So it can specify what data input.
for example, if I write
void fcn (int &npar, double *gin, double &f, double *par, int iflag)
{
f = TMath::Power(((par[0]*gin[0]+par[1])-gin[2])/gin[3],2)
}
Then can I input data to gin in the main function
Hi,
The FCN is function to be minimized by Minuit (for example a least square sum or a negative log likelihood in case of a fit). This interface reflects exactly the Fortran version API,
see wwwasdoc.web.cern.ch/wwwasdoc/minuit/node14.html
[quote=“moneta”]Hi,
The FCN is function to be minimized by Minuit (for example a least square sum or a negative log likelihood in case of a fit). This interface reflects exactly the Fortran version API,
see wwwasdoc.web.cern.ch/wwwasdoc/minuit/node14.html