Dear experts,
I am trying to fit some data according to 2 MC templates. The approach doesn’t seem to work for certain input of data sets. The MC templates are shifted in a certain range and the fit experiences jumps. This range changes in dependence of the binning used. The data sets for which the method works, has a fine binning, so that I rebinned the histograms in such a way that the fit was performed in the entire range. In contrast, the data sets with coarse binning can not rebinned since the results lose significance.
auto _objArr = new TObjArray(3);
_objArr->Add(_h1PriDCA);
_objArr->Add(_h1SecDCA);
_FractionFitter = new TFractionFitter(_h1DataDCA, _objArr, "Q");
}
// constrain fraction values
_FractionFitter->Constrain(0, 0.5, 1.0); // pri
_FractionFitter->Constrain(1, 0.0, 0.5); // sec
// Setting additional parameter values
auto _Fitter = _FractionFitter->GetFitter();
_Fitter->Config().ParSettings(0).Set(...);
_Fitter->Config().ParSettings(1).Set(...);
// perform fit
_FractionFitter->ReleaseRangeX();
_FractionFitter->ReleaseRangeY();
_FitStatus = _FractionFitter->Fit();
It would be great to understand why this happens and whether there is a solution. Attached you will find the code (the relevant function is called MakeTemplateFits()) and two examples of results,
Examples.pdf (31.3 KB)
SecondarySacling.cpp (30.6 KB)
one that works fine and one that doesn’t. Please let me know if you need more information. Thank you in advance
Please read tips for efficient and successful posting and posting code
_ROOT Version:6.22/02
_Platform: Ubuntu
Compiler: Not Provided