-
Notifications
You must be signed in to change notification settings - Fork 1.5k
RooStats::HypoTestInverterResult::FindIndex fails if xvalue == 1 #8641
Copy link
Copy link
Closed
Description
- Checked for duplicates
Describe the bug
In RooStats::HypoTestInverterResult::FindIndex( x ), if x == 1 then the return value is always -1 rather than the index of that xvalue. The problem is on L571-573 (in current master) of HypoTestInverterResult.cxx where the following if statement is used:
if ( (std::abs(xvalue) > 1 && TMath::AreEqualRel( xvalue, xpoint, tol) ) ||
(std::abs(xvalue) < 1 && TMath::AreEqualAbs( xvalue, xpoint, tol) ) )
return i;
Please change the first piece of one of these two statements to include xvalue==1 (i.e. from > to ≥ or < to ≤). I don't think it matters which is changed.
Expected behavior
FindIndex should return the index of requested xvalue in the internal results array.
To Reproduce
Setup
I am using ROOT 6.22/00 from LCG_98python3 but this is still in issue in the master branch (per online documentation).
Additional context
Reactions are currently unavailable