Skip to content

Commit

Permalink
Merge pull request #319 from cms-analysis/fix-limit-grid-gc
Browse files Browse the repository at this point in the history
Correct counting of toys for F-C in LimitGrid.py
  • Loading branch information
ajgilbert authored Mar 19, 2024
2 parents 9866c7b + cb4620a commit 3c82e73
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion CombineTools/python/combine/LimitGrids.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,11 @@ def ValidateHypoTest(self, hyp_res, min_toys, max_toys, contours, signif, cl, ou

if hyp_res is not None:
# We will take the number of toys thrown as the minimum of the number of b-only or s+b toys
ntoys = min(hyp_res.GetNullDistribution().GetSize(), hyp_res.GetAltDistribution().GetSize())
if feldman_cousins:
# For F-C we expect only s+b toys
ntoys = hyp_res.GetAltDistribution().GetSize()
else:
ntoys = min(hyp_res.GetNullDistribution().GetSize(), hyp_res.GetAltDistribution().GetSize())
print('>>> Number of b toys %i' %(hyp_res.GetNullDistribution().GetSize()))
print('>>> Number of s+b toys %i'%(hyp_res.GetAltDistribution().GetSize()))

Expand Down

0 comments on commit 3c82e73

Please sign in to comment.