From ec3de881def7a6e25104dd04158baf0031090293 Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Sun, 23 Aug 2026 09:47:03 -0500 Subject: [PATCH 1/6] hotfix: allow deprecated-declarations in Acts v46 --- .github/workflows/linux-eic-shell.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/linux-eic-shell.yml b/.github/workflows/linux-eic-shell.yml index 6a91cd78ed..5529c6bf15 100644 --- a/.github/workflows/linux-eic-shell.yml +++ b/.github/workflows/linux-eic-shell.yml @@ -97,10 +97,12 @@ jobs: release: nightly include: - CXX: g++ + # -Wno-error=deprecated-declarations for deprecated seeding data model in Acts v46 # -Wno-error=maybe-uninitialized for GCC only as it has issues with /usr/include/c++/12/bits/std_function.h - CXXFLAGS: -Werror -Wall -Wextra -Wundef -Wno-error=maybe-uninitialized + CXXFLAGS: -Werror -Wall -Wextra -Wundef -Wno-error=deprecated-declarations -Wno-error=maybe-uninitialized - CXX: clang++ - CXXFLAGS: -Werror -Wall -Wextra -Wundef + # -Wno-error=deprecated-declarations for deprecated seeding data model in Acts v46 + CXXFLAGS: -Werror -Wall -Wextra -Wundef -Wno-error=deprecated-declarations # include clang++ Debug with profile CXXFLAGS - CXX: clang++ CMAKE_BUILD_TYPE: Debug From 1702a77e5c3c83f19a0231d3d923b83a82ce9c04 Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Sun, 23 Aug 2026 09:55:03 -0500 Subject: [PATCH 2/6] fix: add TODO tracking comment Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- .github/workflows/linux-eic-shell.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/linux-eic-shell.yml b/.github/workflows/linux-eic-shell.yml index 5529c6bf15..ae8cf9e434 100644 --- a/.github/workflows/linux-eic-shell.yml +++ b/.github/workflows/linux-eic-shell.yml @@ -97,11 +97,11 @@ jobs: release: nightly include: - CXX: g++ - # -Wno-error=deprecated-declarations for deprecated seeding data model in Acts v46 + # TODO(#2524): remove -Wno-error=deprecated-declarations once seeding migrates to Acts Seeding2 (Acts v46 deprecations) # -Wno-error=maybe-uninitialized for GCC only as it has issues with /usr/include/c++/12/bits/std_function.h CXXFLAGS: -Werror -Wall -Wextra -Wundef -Wno-error=deprecated-declarations -Wno-error=maybe-uninitialized - CXX: clang++ - # -Wno-error=deprecated-declarations for deprecated seeding data model in Acts v46 + # TODO(#2524): remove -Wno-error=deprecated-declarations once seeding migrates to Acts Seeding2 (Acts v46 deprecations) CXXFLAGS: -Werror -Wall -Wextra -Wundef -Wno-error=deprecated-declarations # include clang++ Debug with profile CXXFLAGS - CXX: clang++ From e1c4e52ef600d886722fb584358a008adf2fa871 Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Mon, 24 Aug 2026 08:34:12 -0500 Subject: [PATCH 3/6] fix: prevent unphysical boost in UndoAfterBurner when only one beam found (#2891) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Fix MCParticlesHeadOnFrameNoBeamFX overflow for particle gun events **Stacked on:** #2887 (acts-event-data-seed-deprecated-declarations) ### Problem Single-electron gun events with secondary neutrons produce extreme momentum values (~10³⁰⁸ GeV) in `MCParticlesHeadOnFrameNoBeamFX`, causing CI failures in capybara histogram generation: - https://github.com/eic/EICrecon/actions/runs/32655851820/job/97236980632?pr=2887 ### Root Cause The fallback logic (lines 67-75) incorrectly treats **secondary hadrons** from particle gun events as beam particles: 1. Electron gun event produces secondary neutron (E=0.94 GeV) from showering 2. Fallback finds neutron → sets `hasBeamHadron=true`, leaves `hasBeamLepton=false` 3. Old check `if (!hasBeamHadron && !hasBeamLepton)` only returns if **BOTH** are false 4. Code proceeds with: - `e_beam = (0,0,0,0)` (uninitialized) - `h_beam = (0.024, 0, 0.94, 0.94)` (from secondary neutron) 5. Boost calculation: β = (-0.024/0.94, 0, -0.94/0.94) = (-0.026, 0, **-1.0**) 6. **β² = 1.0006 > 1** → unphysical (faster than light) → extreme Lorentz factors → 10³⁰⁸ GeV ### Solution **One-character fix:** Change `&&` to `||` on line 98. ```cpp // Old (buggy): if (!hasBeamHadron && !hasBeamLepton) { // Only returns if BOTH false return; } // New (correct): if (!hasBeamHadron || !hasBeamLepton) { // Returns if EITHER false return; } ``` This is consistent with the check at line 62 and prevents unphysical boost calculations. ### Effect - **Particle gun events** (with or without secondary hadrons): `MCParticlesHeadOnFrameNoBeamFX` will be **empty** (no valid collision frame) - **DIS events** (both beams present): Boost transformation applied correctly as before ### Testing Verified with `rec_e_1GeV_20GeV_craterlake.edm4eic.root`: - **Before fix:** Events 7, 11, 61, 95 have momentum ~10³⁰⁸ GeV or NaN - **Input MCParticles:** Normal momentum ~1.4 GeV - **Expected after fix:** No extreme values (empty output collection for gun events) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- src/algorithms/reco/UndoAfterBurner.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/algorithms/reco/UndoAfterBurner.cc b/src/algorithms/reco/UndoAfterBurner.cc index 450b8124af..f1615b4724 100644 --- a/src/algorithms/reco/UndoAfterBurner.cc +++ b/src/algorithms/reco/UndoAfterBurner.cc @@ -93,8 +93,8 @@ void eicrecon::UndoAfterBurner::process(const UndoAfterBurner::Input& input, } } - // Bail out if still no beam particles, since this leads to division by zero - if (!hasBeamHadron && !hasBeamLepton) { + // Bail out if either beam is missing, since this leads to division by zero or unphysical boosts + if (!hasBeamHadron || !hasBeamLepton) { return; } From 5a23accfa770dc0d50f520d7f8fe96a3bd6a815e Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Mon, 24 Aug 2026 08:35:08 -0500 Subject: [PATCH 4/6] fix: continue-on-error for 2DStrip (#2889) ### Briefly, what does this PR introduce? Please link to any relevant presentations or discussions. This pull request updates the workflow configuration in `.github/workflows/linux-eic-shell.yml` to improve control over job error handling in the `eicrecon-dis` job. The main changes introduce a `continue-on-error` setting to the job matrix, allowing certain job runs (2DStrip in particular) to proceed even if errors occur. Workflow configuration improvements: * Added a `continue-on-error` parameter to the `eicrecon-dis` job, making it configurable per matrix entry. * Updated the job matrix to include `continue-on-error: [false]` by default, and set `continue-on-error: true` for the configuration using `sanitizer: ASAN`, allowing that job to continue on error. [[1]](diffhunk://#diff-1979202099e4ebc6d02b6dbd6ade89a6d9895896cd610bb3829b3b84f5239b38R1149-R1157) [[2]](diffhunk://#diff-1979202099e4ebc6d02b6dbd6ade89a6d9895896cd610bb3829b3b84f5239b38R1191) ### What is the urgency of this PR? - [x] High (please describe reason below) - [ ] Medium - [ ] Low In Acts v46, the 2DStrip geometry is not compatible with the existing non-2DStrip material map anymore (I.e. it probably never was compatible but now it's a hard failure). ### What kind of change does this PR introduce? - [x] Bug fix (issue #__) - [ ] New feature (issue #__) - [ ] Optimization (issue #__) - [ ] Updated parameters, constants (issue #__) - [ ] Updated documentation - [ ] other: __ ### Please check if any of the following apply - [ ] This PR requires changes to geometry (epic PR: __) - [ ] This PR requires changes to EDM4eic (EDM PR: __) - [ ] This PR introduces breaking changes. Please describe changes users need to make below. - [ ] This PR changes default behavior. Please describe changes below. - [ ] AI was used in preparing this PR. Please describe usage below. --------- Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- .github/workflows/linux-eic-shell.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/linux-eic-shell.yml b/.github/workflows/linux-eic-shell.yml index ae8cf9e434..0461cc9768 100644 --- a/.github/workflows/linux-eic-shell.yml +++ b/.github/workflows/linux-eic-shell.yml @@ -1146,6 +1146,7 @@ jobs: eicrecon-dis: runs-on: ubuntu-24.04 + continue-on-error: ${{ matrix['continue-on-error'] || false }} needs: - build - npsim-dis @@ -1186,6 +1187,7 @@ jobs: minq2: 100 detector_config: craterlake_tracking_2DStrip sanitizer: ASAN + continue-on-error: true - CXX: clang++ beam: 10x130 minq2: 1 From 9e72d14f67f364a3b679d918d78743fe3102cbfd Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Sun, 23 Aug 2026 12:26:03 -0500 Subject: [PATCH 5/6] fix: Make Acts geometry errors fatal at loading time Remove deferred exception handling in ActsSvc initialization to ensure geometry conversion errors cause immediate application failure during service initialization rather than being deferred until event processing. This makes debugging easier and ensures CI catches geometry issues early. Fixes failures with 2DStrip geometry when upgrading to Acts 46.8.1. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- src/algorithms/interfaces/ActsSvc.h | 6 ------ src/services/algorithms_init/AlgorithmsInit_service.h | 6 +----- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/src/algorithms/interfaces/ActsSvc.h b/src/algorithms/interfaces/ActsSvc.h index 34de7a1b14..c2cbd9b036 100644 --- a/src/algorithms/interfaces/ActsSvc.h +++ b/src/algorithms/interfaces/ActsSvc.h @@ -16,18 +16,12 @@ class ActsSvc : public Service { m_acts_geometry_provider = provider; }; - void init(std::exception_ptr&& _failure) { failure = std::move(_failure); } - std::shared_ptr acts_geometry_provider() const { - if (failure) { - std::rethrow_exception(failure); - } return m_acts_geometry_provider; } protected: std::shared_ptr m_acts_geometry_provider{nullptr}; - std::exception_ptr failure; ALGORITHMS_DEFINE_SERVICE(ActsSvc) }; diff --git a/src/services/algorithms_init/AlgorithmsInit_service.h b/src/services/algorithms_init/AlgorithmsInit_service.h index b6ca44694a..978aa8bbe1 100644 --- a/src/services/algorithms_init/AlgorithmsInit_service.h +++ b/src/services/algorithms_init/AlgorithmsInit_service.h @@ -49,11 +49,7 @@ class AlgorithmsInit_service : public JService { [[maybe_unused]] auto& actsSvc = algorithms::ActsSvc::instance(); serviceSvc.setInit([this](auto&& g) { this->m_log->debug("Initializing algorithms::ActsSvc"); - try { - g.init(this->m_actsgeo_service->actsGeoProvider()); - } catch (...) { - g.init(std::move(std::current_exception())); - } + g.init(this->m_actsgeo_service->actsGeoProvider()); }); // Register Log_service as algorithms::LogSvc From de71442ac412e324df83dce5be87a3c2f6885248 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 23 Aug 2026 17:45:16 +0000 Subject: [PATCH 6/6] fix: address copilot review comments on ActsSvc Co-authored-by: wdconinc <4656391+wdconinc@users.noreply.github.com> --- src/algorithms/interfaces/ActsSvc.h | 6 ++++++ src/services/algorithms_init/AlgorithmsInit_service.h | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/algorithms/interfaces/ActsSvc.h b/src/algorithms/interfaces/ActsSvc.h index c2cbd9b036..036fc66ef0 100644 --- a/src/algorithms/interfaces/ActsSvc.h +++ b/src/algorithms/interfaces/ActsSvc.h @@ -5,6 +5,7 @@ #include #include +#include class ActsGeometryProvider; @@ -17,6 +18,11 @@ class ActsSvc : public Service { }; std::shared_ptr acts_geometry_provider() const { + if (!m_acts_geometry_provider) { + throw std::runtime_error( + "ActsSvc: geometry provider is null; ensure AlgorithmsInit_service is loaded and Acts " + "geometry was successfully initialized"); + } return m_acts_geometry_provider; } diff --git a/src/services/algorithms_init/AlgorithmsInit_service.h b/src/services/algorithms_init/AlgorithmsInit_service.h index 978aa8bbe1..25646ba809 100644 --- a/src/services/algorithms_init/AlgorithmsInit_service.h +++ b/src/services/algorithms_init/AlgorithmsInit_service.h @@ -45,7 +45,7 @@ class AlgorithmsInit_service : public JService { g.init(const_cast(this->m_dd4hep_service->detector().get())); }); - // Register DD4hep_service as algorithms::ActsSvc + // Register ACTSGeo_service as algorithms::ActsSvc [[maybe_unused]] auto& actsSvc = algorithms::ActsSvc::instance(); serviceSvc.setInit([this](auto&& g) { this->m_log->debug("Initializing algorithms::ActsSvc");