I encountered a visualization problem calculating limits with HypoTestInverter.
These are the numbers I get using UpperLimit() and GetExpectedUpperLimit() methods, belonging to HypoTestInverterResult class:
When I call the method GetExpectedUpperLimit(-1) and GetExpectedUpperLimit(1) I get values different from the ones I can deduce from HypoTestInverterPlots bands.
Is this a known issue?
I could not upload the root file, which exceed 10 Mb.
Hi,
There could be a problem in the algorithm computing the intersection. Could you not send me the ROOT file containing the HypoTestInverterResult object ?
[quote]The computed upper limit is: 5.35789e-07 +/- 0
Expected upper limits, using the B (alternate) model :
expected limit (median) 5.35789e-07
expected limit (-1 sig) 5.35789e-07
expected limit (+1 sig) 1.06158e-06
expected limit (-2 sig) 5.35789e-07
expected limit (+2 sig) 1.58737e-06[/quote]
as you can see my poi is at very low values also. Might this be a (numerical) problem for the algorithm? The plot looks perfectly fine from what I can judge:
Here’s the corresponding HypoTestInverterResult in a root file:
thanks for taking the time to look into this. It’s kind of frustrating to have to read out point from a graphical plot
The file was produced with (py)ROOT 6.04.02. I just downloaded it from this Forum and could open it in ipython without any problems.
In [1]: import ROOT
In [2]: f = ROOT.TFile("Asym_CLs_grid_ts3_workspace.root")
Loading individual ROOT style from ~/.rootlogon.C
RooFit v3.60 -- Developed by Wouter Verkerke and David Kirkby
Copyright (C) 2000-2013 NIKHEF, University of California & Stanford University
All rights reserved, please read http://roofit.sourceforge.net/license.txt
In [3]: f.ls()
TFile** Asym_CLs_grid_ts3_workspace.root
TFile* Asym_CLs_grid_ts3_workspace.root
KEY: RooStats::HypoTestInverterResult result_xs;1 HypoTestInverter Result For xs
KEY: TProcessID ProcessID0;1 99d5041a-468b-11e5-9717-50bc348dbeef
In [4]: r = f.Get("result_xs")
In [5]: r.UpperLimit()
Out[5]: 5.357894736842104e-07
In [6]: for i in range(-2,3):
...: print i, r.GetExpectedUpperLimit(i)
...:
-2 5.35789473684e-07
-1 5.35789473684e-07
0 5.35789473684e-07
1 1.06157894737e-06
2 1.58736842105e-06
lease tell me if you need the file made with another ROOT version.
Thanks,
Sorry for this. There was a problem in the current ROOT master in reading the file. It is now fixed, thanks to your example.
The limit calculation problem is caused by the very small POI values. This patch should fixed it. If you have access to the source you can try applying it
Great, thank you very much. I’ll try to fix this in my ROOT version. If I don’t write again, everything is working fine
Unfortunately, as I am not the thread starter, I cannot mark this topic as “solved” …
Update:
I compiled ROOT with the fix added manually and it solved the problem perfectly! Fantastic!