-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Check also first element in lumi for is_fonllb #30
Conversation
Codecov Report
@@ Coverage Diff @@
## main #30 +/- ##
=======================================
Coverage 40.86% 40.86%
=======================================
Files 15 15
Lines 531 531
=======================================
Hits 217 217
Misses 314 314
Flags with carried forward coverage won't be shown. Click here to find out more.
|
@@ -52,7 +53,7 @@ def test_contains_ren(): | |||
|
|||
def test_is_fonll_b(): | |||
fns = "FONLL-B" | |||
lumi = [[(1, 11, 3, 4), (3, 11, 5, 6)], [(9, 11, 0, 3), (8, 11, -2, -1)]] | |||
lumi = [[(1, 11, 3, 4), (3, 11, 5, 6)], [(9, 11, 0, 3), (-12, 3, -2, -1)]] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Being this an "insane" example I would add instead to sane ones: one in which the first object is a proton, and another one in which it is the second. The one here is simply an invalid luminosity.
@@ -84,7 +84,7 @@ def is_fonll_b(fns, lumi): | |||
""" | |||
for lists in lumi: | |||
for el in lists: | |||
if not (10 < abs(el[1]) < 17): | |||
if (not (10 < abs(el[0]) < 17)) and (not (10 < abs(el[1]) < 17)): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since I'm writing on this PR in any case: instead of repeating twice the condition, make a brief is_lepton
function (even in this function scope, or top level in the file, as you wish).
@andreab1997 I know this PR has already been merged, but it was more convenient to write here, since it is next to the code. |
Yes, sorry to have merged it without waiting you: I thought it was trivial :) |
we want that
check.is_fonllb
checks also the first entry in eachgrid.lumi
element.Solve #26