Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-30 08:04:15

0001 # Copyright Spack Project Developers. See COPYRIGHT file for details.
0002 #
0003 # SPDX-License-Identifier: (Apache-2.0 OR MIT)
0004 
0005 from spack.package import *
0006 
0007 try:
0008     from spack_repo.builtin.packages.fjcontrib.package import Fjcontrib as BuiltinFjcontrib
0009 except ImportError:
0010     from spack.pkg.builtin.fjcontrib import Fjcontrib as BuiltinFjcontrib
0011 
0012 
0013 class Fjcontrib(BuiltinFjcontrib):
0014     __doc__ = BuiltinFjcontrib.__doc__
0015 
0016     # The patched Centauro test suite does not pass with the modified NNH->NNFJN2Plain
0017     # interface; disable checks until the patch is accepted upstream.
0018     def check(self):
0019         pass
0020 
0021     # Replace O(N^2) trigonometric inner loop in the Centauro jet algorithm
0022     # with precomputed 2D Cartesian coordinates and switch NNH -> NNFJN2Plain,
0023     # giving a ~5x speedup for typical ePIC jet multiplicities (30-50 particles).
0024     # Benchmarked on pythia8 NC DIS events (10x100 GeV) with 8 events,
0025     # GeneratedParticlesCentauroJets: 4.84 s (NNH) -> 0.94 s (NNFJN2Plain).
0026     patch(
0027         "centauro-euclidean-distance.patch",
0028         sha256="47bd95927136dcffa306061b2fafb4497ada17e68a3dfbd431b37e615fa9c604",
0029         working_dir="Centauro",
0030         level=0,
0031         when="@1.045:",
0032     )