Fast Jet Finding in Julia

\firstname Graeme Andrew \lastname Stewart \fnsep, \firstname Sanmay \lastname Ganguly, \firstname Sattwamo \lastname Ghosh, \firstname Philippe \lastname Gras \fnsep, \firstname Atell \lastname Krasnopolski · 2025

Read Fast Jet Finding in Julia by \firstname Graeme Andrew \lastname Stewart \fnsep, \firstname Sanmay \lastname Ganguly, \firstname Sattwamo \lastname Ghosh, \firstname Philippe \lastname Gras \fnsep, \firstname Atell \lastname Krasnopolski (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2503-08146.txt.

Introduction

Graeme Andrew Stewart, Sanmay Ganguly, Sattwamo Ghosh, Philippe Gras, and Atell Krasnopolski wrote a 2025 software paper on JetReconstruction, a Julia package for rebuilding jets in particle physics. Jets, sprays of particles from high energy collisions, must be reconstructed before any physics analysis. The standard tool is written in C++ and is decades old.

Their package runs the sequential algorithms used at the LHC, plus variants for a future electron positron collider. Thanks to the Julia compiler and compact data layouts, the core algorithms run faster than the standard C++ implementation on typical events. The full clustering history is exposed, so users can pull inclusive or exclusive jets as needed. Visualization and substructure tools are built in. The package joins a growing Julia ecosystem for the field.

Catalog record

CREATOR\firstname Graeme Andrew \lastname Stewart \fnsep, \firstname Sanmay \lastname Ganguly, \firstname Sattwamo \lastname Ghosh, \firstname Philippe \lastname Gras \fnsep, \firstname Atell \lastname Krasnopolski
YEAR2025
COLLECTIONPAPERS
FORMATTXT
FILE SIZE18 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2503-08146

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

Fast Jet Finding in Julia \firstname Graeme Andrew \lastname Stewart \fnsep, \firstname Sanmay \lastname Ganguly, \firstname Sattwamo \lastname Ghosh, \firstname Philippe \lastname Gras \fnsep, \firstname Atell \lastname Krasnopolski Abstract Jet reconstruction remains a critical task in the analysis of data from HEP colliders. We describe in this paper a new, highly performant, Julia package for jet reconstruction, JetReconstruction.jl , which integrates into the growing ecosystem of Julia packages for HEP. With this package users can run sequential reconstruction algorithms for jets. In particular, for LHC events, the Anti- k T {k}_{\text{T}} , Cambridge/Aachen and Inclusive- k T {k}_{\text{T}} algorithms can be used. For FCCee studies the use of alternative algorithms such as the Generalised k T {k}_{\text{T}} for e + ​ e − e^{+}e^{-} and Durham are also supported. The performance of the core algorithms is better than Fastjet’s C++ implementation, for typical LHC and FCCee events, thanks to the Julia compiler’s exploitation of single-instruction-multiple-data (SIMD), as well as ergonomic compact data layouts. The full reconstruction history is made available, allowing inclusive and exclusive jets to be retrieved. The package also provides the means to visualise the reconstruction. Substructure algorithms have been added that allow advanced analysis techniques to be employed. The package can read event data from EDM4hep files and reconstruct jets from these directly, opening the door to FCCee and other future collider studies in Julia. 1 Introduction High energy physics (HEP) software is inherently multi-lingual pivarski2022 . Across the field actively used codes exist in many different languages. For the code that is used in mainline HEP workflows two languages have dominated in the last few decades: C++ and Python. C++ saw adoption at the BaBar experiment at SLAC and, subsequently, at the Large Hadron Collider (LHC) experiments. Python has grown enormously in popularity in recent years, becoming almost ubiquitous across the field. These languages have different strengths, with C++ excelling at runtime performance, used heavily for simulation and reconstruction; and Python shining in the areas of rapid turnaround, prototyping and steering, being then particularly strong in the analysis domain. The current status of C++ and Python, with these languages having rather different paradigms, leads to friction and potentially awkward interfaces. Code developed in Python may not run efficiently at scale, leading to inefficient use of computing resources, even necessitating a rewrite in C++. The current generation of physicists is generally far more comfortable in Python and there is a loss of skills in C++, which is a challenge for the experiments. An alternative option, which is attracting increasing interest, is to use a language that can bring the runtime advantages of C++, but the ergonomic advantages of Python. The Julia Programming Language bib:julia_freshapproach ; 10.1145/3276490 was designed specifically to do this efficiently and effectively, and has been adopted by many scientific communities perkel-julia-science . In HEP, explorations of Julia have been promising Stanitzki:2020bnx ; eschle2023potential . In particular, a recent comparison of Julia, Python and C++ for the task of sequential jet finding polyglot-jets-chep23 found that Julia performed as well as, or better, than C++, with improved code ergonomics. In this paper we report on the developments that have happened in the Julia code presented in polyglot-jets-chep23 , in particular the improvements that have resulted in the recent release of the production Julia package, JetReconstruction.jl jetreconstruction-jl-github . The package has been made more accessible to users, with comprehensive documentation and consistent interfaces. New algorithms have been introduced targeting jet reconstruction at e^{+}e^{-} experiments, including reading data from Key4HEP’s EDM4hep Gaede:2022leb data format files. Support for jet substructure analysis at pp colliders has been introduced. We also give the latest benchmarking results, that continue to demonstrate better performance than Fastjet Cacciari:2011ma for almost all parameters. 2 Production Release of Julia Jet Reconstruction Details of the algorithms and strategies used for pp events in the Julia version of jet finding have been described in polyglot-jets-chep23 . However, due to the different development history of how the two strategies, N2Plain and N2Tiled , were implemented, the original return values from the reconstruction were different. In the N2Plain case an implicit p_{T} cut, selecting inclusive jets, was made; whereas in the N2Tiled strategy a dedicated object that encapsulates the reconstruction sequence was returned that contains a record of all jet merging steps, with parents and metric distance ( d_{ij} ) parameter, allowing the complete graph of the process to be obtained. This structure, a ClusterSequence object, is much more useful as this information is required for further jet processing. This object is now used in all sequential reconstruction algorithms (but always through accessors, to hide internal implementation details). This choice then allowed the implementation of the other core jet selection, viz. inclusive jets . An interface was added where the same method can be used to make a selection on either the number of final jets, or on the maximum value of the metric distance ( d_{ij} ) – this takes advantage of the fact that in Julia method parameters can be named, providing a clearer interface than the type based method selection in C++ (e.g., inclusive_jets(cs::ClusterSequence; ptmin=5.0) for a p_{T} cut). In addition to the jet selection, another algorithm for pp jet reconstruction was added, the generalised {k}_{\text{T}} algorithm. This algorithm uses as a momentum metric k^{2p}_{\text{T}} , where the power value p is arbitrary (and for specific integer powers of -1 , 0 and 1 , maps to the well known anti- {k}_{\text{T}} , Cambridge/Aachen, and inclusive- {k}_{\text{T}} algorithms, respectively Cacciari:2005hq ; Matteo_Cacciari_2008 ; fastjetmanual ). Support for the visualisation of jet reconstruction, through the Julia visualisation package Makie Danisch2021 , has been improved. As Makie is a heavy dependency, we take advantage of the extensions feature of the Julia packaging system, where the visualisation extensions to JetReconstruction.jl are only loaded if Makie already exists in the current user environment. An example of the output from the visualisation extension is shown in Figure 1 . Taking advantage of the fact that all reconstruction steps are captured by the ClusterSequence a new visualisation option was added, which animates the reconstruction process jetrecoAnimationCHEP2024 . Figure 1 : Visualisation of a typical pp collision jet reconstruction, using anti- {k}_{\text{T}} with R=2 , in the y-\phi (rapidity, azimuthal angle) plane. The height of each bar indicates the original cluster energy and the colour represents the final jet clustering, i.e., all clusters with the same colour are clustered together. Of the two core strategies, N2Tiled scales better to higher initial cluster densities, as found in typical LHC pp events. However, there is an overhead for this tiling, which makes the N2Plain strategy better at low cluster densities. It is highly desirable that the user would not have to manually select a strategy, so a heuristic performance scan was made, indicating that the performance of each strategy is about the same for 80 input clusters. So a third strategy, Best was introduced, which selects N2Plain for <=80 clusters, otherwise N2Tiled . Before a useful release of the software could be made, documentation for the package had to be written. This was done using the standard Julia documentation support package, Documenter.jl documenter-jl , which has the great advantage of using the inline code docstrings to

Read the complete text