Skip to content

Valencia jets revisited 🍊#217

Merged
graeme-a-stewart merged 10 commits intoJuliaHEP:mainfrom
graeme-a-stewart:vlc-squash
Jan 21, 2026
Merged

Valencia jets revisited 🍊#217
graeme-a-stewart merged 10 commits intoJuliaHEP:mainfrom
graeme-a-stewart:vlc-squash

Conversation

@graeme-a-stewart
Copy link
Member

@graeme-a-stewart graeme-a-stewart commented Dec 12, 2025

This is a rebased and updated version of the Valencia jets implementation from @mattleblanc and @EthanLynn916.

Compared to the original in #202 there is:

  • rebase to current head of main, incorporating changes to the default preprocessor from Add E-scheme preprocessor fixing cluster history indices #211
  • some internal simplification (e.g., invR2 is now mandatory at the internal _ee_genkt_algorithm! level, and β is handled at the user API, ee_genkt_algorithm)
  • unnecessary checks in hot functions are removed to speed things up
  • --algorithm=Valencia is now supported in the reconstruction examples jetreco.jl and instrumented-jetreco.jl; --beta is supported as an alias for --power for use with this algorithm

There is still a slight performance regression compared to the previous implantation of the algorithm when running Durham or EEKt, but this is now O(5%), which is considered acceptable. Options that improved even that small difference had too much of an impact on the sustainability of the code because they required a lot of code duplication.

Further internal optimisation could still be looked in to.

As noted in #202 this implementation follows the description in 1404.4294, and so depends on several parameters:

R: The jet radius parameter.
β: Corresponds to the existing power p of the algorithm.
γ: The angular exponent parameter used in the Valencia beam distance.

@graeme-a-stewart
Copy link
Member Author

N.B. Documentation still needs to be updated, so I will mark this as draft for now. However, the implementation is ready for review.

@codecov
Copy link

codecov bot commented Dec 12, 2025

Codecov Report

❌ Patch coverage is 98.40000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.56%. Comparing base (d38efc7) to head (840450b).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/EEAlgorithm.jl 98.34% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #217      +/-   ##
==========================================
+ Coverage   80.34%   81.56%   +1.22%     
==========================================
  Files          21       21              
  Lines        1338     1405      +67     
==========================================
+ Hits         1075     1146      +71     
+ Misses        263      259       -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@graeme-a-stewart
Copy link
Member Author

Documentation is updated, good to go...

@graeme-a-stewart graeme-a-stewart marked this pull request as ready for review December 12, 2025 16:45
@graeme-a-stewart graeme-a-stewart marked this pull request as draft December 15, 2025 13:44
@graeme-a-stewart graeme-a-stewart marked this pull request as ready for review December 15, 2025 13:53
mattleblanc and others added 9 commits December 16, 2025 09:03
Add the Valencia algorithm to the general Durham/EEKt implementation.
Uses internal algorithm switching at key points inside the distance
and update functions to add different Valencia calculations.
Add --gamma to the reconstruction examples and pass it
through to the underlying algorithms correctly.
Add Valencia test to benchmark script
No need to check that algorithm is the correct type this deep in the
reconstruction. This is also a hot function, so unnecessary checks
are costly.
Add information on the Valencia algorithm to the documentation.

Update the reference to latest (CHEP 2024) paper.

Minor documentation tweaks.
Minor fixes to docstrings
These will now be handled in a separate PR
@graeme-a-stewart
Copy link
Member Author

OK, all review comments were addressed, so should be good enough to merge now! Many thanks to @mattleblanc for the lion's share of this work.

@graeme-a-stewart graeme-a-stewart merged commit 10c2d7b into JuliaHEP:main Jan 21, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants