-
Notifications
You must be signed in to change notification settings - Fork 6
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
fix GenKt not recognized as pp algorithm #119
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #119 +/- ##
==========================================
+ Coverage 73.49% 73.86% +0.36%
==========================================
Files 18 18
Lines 1249 1251 +2
==========================================
+ Hits 918 924 +6
+ Misses 331 327 -4 ☔ View full report in Codecov by Sentry. |
Currently JetReconstruction.jl/src/ClusterSequence.jl Lines 323 to 327 in 96bde1b
JetReconstruction.jl/src/ClusterSequence.jl Lines 380 to 384 in 96bde1b
|
Yes, the merging has to favour small energy depositions first for the exclusive jets selection to make sense. So it should be valid for |
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.
Just a small additional improvement suggested
Hi @m-fila - there's a logic flaw now that prevents GenKt with p >= 0 from running exclusive selections. I also realised that the same argument applied to EEKt - it should be tested for p >= 0. So the logic should be more like: # Check that an algorithm was used that makes sense for exclusive jets
if (clusterseq.algorithm ∈ (JetAlgorithm.GenKt, JetAlgorithm.EEKt)) && clusterseq.power < 0
throw(ArgumentError("Algorithm $(clusterseq.algorithm) requires power >= 0 (power=$(clusterseq.power))"))
elseif clusterseq.algorithm ∉
(JetAlgorithm.CA, JetAlgorithm.Kt, JetAlgorithm.Durham, JetAlgorithm.GenKt, JetAlgorithm.EEKt)
throw(ArgumentError("Algorithm used is not suitable for exclusive jets ($(clusterseq.algorithm))"))
end |
It might be useful to write a few tests against the wrong setup, checking exceptions are thrown correctly (would help codecov!). |
Thanks, fixed message and logic. Added standalone file with tests - I didn't like splitting them and putting in existing pp and ee tests |
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.
Just one tiny little snag - the comment at the top of the test-selection file. Otherwise LGTM!
@@ -0,0 +1,46 @@ | |||
# File: test/test_test-selection.jl |
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.
Filename is wrong.
The comment should describe better the aim of these tests of exclusive jet selection
GenKt wasn't recognized as a pp algorithm and
jet_reconstruction
was failing to resolve which algorithm function to use in that case.The tests for GenKt seemed to be missing
Reference file
jet-collections-fastjet-inclusive-genkt-p1.5.json.gz
was using different capitalization than files for the algorithms. I couldn't find anything relaying on the filename being spelled this way so renamed for consistencyThere is also
do_test_compare_to_fastjet
function that seems to be unused in the current tests and is probably a relic from #73JetReconstruction.jl/test/runtests.jl
Line 66 in 96bde1b