Hello guys,
In the process of combined fit, I try to understand the meaning of below code.
I am appreciate if you can explain the below code in detail.
ROOT::Fit::Chi2Function chi2_B(dataB, wfB);
ROOT::Fit::Chi2Function chi2_SB(dataSB, wfSB);
GlobalChi2 globalChi2(chi2_B, chi2_SB);
My understanding:
ROOT::Fit::Chi2Function chi2_B(dataB, wfB);
is to fit dataB using wfB function using least-square fit.
And:
ROOT::Fit::Chi2Function chi2_SB(dataSB, wfSB);
is to fit dataSB using wfSB function using least-square fit.
And:
GlobalChi2 globalChi2(chi2_B, chi2_SB);
To choose best one comined the last two fit.
But why the fit again like below?
fitter.FitFCN(6,globalChi2,par0,dataB.Size()+dataSB.Size());
Thans lot.
Yao