RooAbsOptTestStatistic: ERROR minimum of FUNC observable X is smaller than that of X in the dataset

Hi,
I know it’s late but the code is exactly what I am looking for. It does everything I want. But now I also want to fit a pdf to the shifted histogram. This gives me the following error message:

[#1] INFO:DataHandling – RooDataHist::adjustBinning(Values): fit range of variable Mass expanded to nearest bin boundaries: [825,1800] → [825,1801]

[#1] INFO:DataHandling – RooDataHist::adjustBinning(Valuescontroll): fit range of variable Mass expanded to nearest bin boundaries: [825,1801] → [824,1804]

[#1] INFO:DataHandling – RooDataHist::adjustBinning(Sim1405): fit range of variable Mass expanded to nearest bin boundaries: [824,1804] → [820,1820]

[#1] INFO:Minimization – p.d.f. provides expected number of events, including extended term in likelihood.

[#1] INFO:Eval – RooRealVar::setRange(Mass) new range named ‘fit’ created with bounds [1050,1580]

[#0] ERROR:InputArguments – RooAbsOptTestStatistic: ERROR minimum of FUNC observable Mass(820) is smaller than that of Mass in the dataset (825)

Note: Mass is my observable (what is usually called x)
I do not understand what the problem is. When I change the “Mass” (eg mass(“Mass”,“Mass”,800,1800)) I get the same error, just with different numbers. Maybe someone has had this problem in the meantime too.
Thanks,
Emil

I have solved the problem now. The Code changed the TAxis, which I did not see. Therefore the bins are different and this leads to a problem. As I only wanted to shift the bins, it was simpler to fill a new histogram with the data (and shifted x Axis). Afterwards no problems occurred. Thus I can not recommend scaling only one histogram with the code and afterwards fitting to different data. This leads to errors.
Greetings,
Emil

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