From 451c246b7b8c328a70d4e4556a0c351ed4c0072e Mon Sep 17 00:00:00 2001
From: Dmitry Kalinkin <dmitry.kalinkin@gmail.com>
Date: Tue, 14 Jan 2025 22:50:18 -0500
Subject: [PATCH 01/11] services/io/podio: remove unused datamodel_LinkDef.h
 (#1704)

### Briefly, what does this PR introduce?

Removing it as it should be irrelevant for recent PODIO with frames
format.
Resolves: #1693

### What kind of change does this PR introduce?
- [x] Bug fix (issue ##1693)
- [ ] New feature (issue #__)
- [ ] Documentation update
- [ ] Other: __

### Please check if this PR fulfills the following:
- [ ] Tests for the changes have been added
- [ ] Documentation has been added / updated
- [ ] Changes have been communicated to collaborators

### Does this PR introduce breaking changes? What changes might users
need to make to their code?
Not supposed to

### Does this PR change default behavior?
No

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
---
 cmake/jana_plugin.cmake                      | 11 +++++++
 src/services/io/podio/CMakeLists.txt         | 30 ++++++--------------
 src/services/io/podio/datamodel_LinkDef.h    | 15 ----------
 src/services/io/podio/make_datamodel_glue.py |  4 ++-
 4 files changed, 23 insertions(+), 37 deletions(-)
 delete mode 100644 src/services/io/podio/datamodel_LinkDef.h

diff --git a/cmake/jana_plugin.cmake b/cmake/jana_plugin.cmake
index 76d9deee4a..c9f2940233 100644
--- a/cmake/jana_plugin.cmake
+++ b/cmake/jana_plugin.cmake
@@ -107,6 +107,17 @@ macro(plugin_add _name)
   endif()
 endmacro()
 
+# add_dependencies for both a plugin and a library
+macro(plugin_add_dependencies _name)
+  if(${_name}_WITH_PLUGIN)
+    add_dependencies(${_name}_plugin ${ARGN})
+  endif(${_name}_WITH_PLUGIN)
+
+  if(${_name}_WITH_LIBRARY)
+    add_dependencies(${_name}_library ${ARGN})
+  endif(${_name}_WITH_LIBRARY)
+endmacro()
+
 # target_link_libraries for both a plugin and a library
 macro(plugin_link_libraries _name)
   if(${_name}_WITH_PLUGIN)
diff --git a/src/services/io/podio/CMakeLists.txt b/src/services/io/podio/CMakeLists.txt
index 81b9cc3db4..40450704d9 100644
--- a/src/services/io/podio/CMakeLists.txt
+++ b/src/services/io/podio/CMakeLists.txt
@@ -31,11 +31,6 @@ file(RELATIVE_PATH DATAMODEL_RELATIVE_PATH ${PROJECT_SOURCE_DIR}/src
      ${CMAKE_CURRENT_SOURCE_DIR})
 
 # Generate the datamodel header files.
-add_custom_command(
-  OUTPUT ${PROJECT_BINARY_DIR}/include/${DATAMODEL_RELATIVE_PATH}
-  COMMAND ${CMAKE_COMMAND} -E make_directory
-          ${PROJECT_BINARY_DIR}/include/${DATAMODEL_RELATIVE_PATH}
-  COMMENT Create datamodel glue directory)
 add_custom_command(
   OUTPUT
     ${PROJECT_BINARY_DIR}/include/${DATAMODEL_RELATIVE_PATH}/datamodel_glue.h
@@ -46,9 +41,15 @@ add_custom_command(
     EDM4HEP_INCLUDE_DIR=${EDM4HEP_INTERFACE_INCLUDE_DIRECTORIES}
     EDM4EIC_INCLUDE_DIR=${EDM4EIC_INTERFACE_INCLUDE_DIRECTORIES}
   MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/make_datamodel_glue.py
-  DEPENDS ${PROJECT_BINARY_DIR}/include/${DATAMODEL_RELATIVE_PATH}
-          ${EDM_VERSION_INCLUDES}
-  COMMENT Create datamodel glue headers)
+  DEPENDS ${EDM_VERSION_INCLUDES}
+  COMMENT "Create datamodel glue headers")
+add_custom_target(
+  podio_datamodel_glue
+  DEPENDS
+    ${PROJECT_BINARY_DIR}/include/${DATAMODEL_RELATIVE_PATH}/datamodel_glue.h
+  COMMENT "Create datamodel glue headers")
+
+plugin_add_dependencies(${PLUGIN_NAME} podio_datamodel_glue)
 
 # Install datamodel_glue headers
 install(
@@ -70,16 +71,3 @@ plugin_link_libraries(
   EDM4EIC::edm4eic
   EDM4EIC::edm4eic_utils
   podio::podioRootIO)
-
-# Create a ROOT dictionary with the vector<edm4hep::XXXData> types defined.
-# Without this, root will complain about not having a compiled CollectionProxy.
-root_generate_dictionary(
-  G__datamodel_vectors
-  ${PROJECT_BINARY_DIR}/include/${DATAMODEL_RELATIVE_PATH}/datamodel_includes.h
-  MODULE ${PLUGIN_NAME}_plugin LINKDEF datamodel_LinkDef.h)
-
-# Install root dictionaries made by PODIO
-set(my_root_dict_files
-    ${CMAKE_CURRENT_BINARY_DIR}/lib${PLUGIN_NAME}_plugin_rdict.pcm
-    ${CMAKE_CURRENT_BINARY_DIR}/lib${PLUGIN_NAME}_plugin.rootmap)
-install(FILES ${my_root_dict_files} DESTINATION ${PLUGIN_OUTPUT_DIRECTORY})
diff --git a/src/services/io/podio/datamodel_LinkDef.h b/src/services/io/podio/datamodel_LinkDef.h
deleted file mode 100644
index 1dba35ae28..0000000000
--- a/src/services/io/podio/datamodel_LinkDef.h
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2022, David Lawrence
-// Subject to the terms in the LICENSE file found in the top-level directory.
-//
-//
-// This is used when generating the ROOT dictionary file needed to define
-// the vector types like "vector<edm4hep::EventHeader>".
-//
-
-
-#include <vector>
-#ifdef __ROOTCLING__
-
-//#pragma link C++ class vector<edm4hep::*>+;
-
-#endif
diff --git a/src/services/io/podio/make_datamodel_glue.py b/src/services/io/podio/make_datamodel_glue.py
index d45a8252e9..0bb7a3eff4 100644
--- a/src/services/io/podio/make_datamodel_glue.py
+++ b/src/services/io/podio/make_datamodel_glue.py
@@ -99,7 +99,9 @@ def AddCollections(datamodelName, collectionfiles):
 AddCollections('edm4eic'   , collectionfiles_edm4eic   )
 
 
-if WORKING_DIR : os.chdir( WORKING_DIR )
+if WORKING_DIR:
+    os.makedirs(WORKING_DIR, exist_ok=True)
+    os.chdir(WORKING_DIR)
 
 with open('datamodel_includes.h', 'w') as f:
     f.write('\n// This file automatically generated by the make_datamodel.py script\n\n')

From fddfc5fb624fd7ab99d615a4b7d050b355bc4692 Mon Sep 17 00:00:00 2001
From: Wouter Deconinck <wdconinc@gmail.com>
Date: Wed, 15 Jan 2025 13:28:08 -0600
Subject: [PATCH 02/11] feat(ci): runs-on: ubuntu-22.04 -> ubuntu-24.04 (#1686)

### Briefly, what does this PR introduce?
This PR updates the target operating system for CI jobs, from
ubuntu-latest to a more explicit ubuntu-24.04. This is in part to test
that the automatic update of implicit ubuntu-latest will not break
anything (https://github.com/actions/runner-images/issues/10636), and in
part because it makes sense to be explicit about the target operating
system.

### What kind of change does this PR introduce?
- [ ] Bug fix (issue #__)
- [x] New feature (issue
https://github.com/actions/runner-images/issues/10636)
- [ ] Documentation update
- [ ] Other: __

### Please check if this PR fulfills the following:
- [ ] Tests for the changes have been added
- [ ] Documentation has been added / updated
- [ ] Changes have been communicated to collaborators

### Does this PR introduce breaking changes? What changes might users
need to make to their code?
No.

### Does this PR change default behavior?
Yes, for the next few days ubuntu-latest will still be ubuntu-22.04, and
this will mean an upgrade to ubuntu-24.04.
---
 .github/workflows/linux-eic-shell.yml | 46 +++++++++++++--------------
 1 file changed, 23 insertions(+), 23 deletions(-)

diff --git a/.github/workflows/linux-eic-shell.yml b/.github/workflows/linux-eic-shell.yml
index 4f4e8bfed2..b52ef70d6f 100644
--- a/.github/workflows/linux-eic-shell.yml
+++ b/.github/workflows/linux-eic-shell.yml
@@ -49,7 +49,7 @@ jobs:
   env:
     # env cannot be used in matrix, but outputs can
     # so this job turns env into outputs
-    runs-on: ubuntu-22.04
+    runs-on: ubuntu-24.04
     outputs:
       platform_json: ${{ steps.define.outputs.platform_json }}
       release_json: ${{ steps.define.outputs.release_json }}
@@ -60,7 +60,7 @@ jobs:
         echo "release_json=[\"${{ env.release }}\"]" >> $GITHUB_OUTPUT
 
   build:
-    runs-on: ubuntu-22.04
+    runs-on: ubuntu-24.04
     needs: env
     strategy:
       # include multiple compilers for one release version,
@@ -175,7 +175,7 @@ jobs:
         if-no-files-found: error
 
   clang-tidy-iwyu:
-    runs-on: ubuntu-22.04
+    runs-on: ubuntu-24.04
     needs: build
     steps:
     - uses: actions/checkout@v4
@@ -252,7 +252,7 @@ jobs:
       run: git diff --exit-code
 
   llvm-cov:
-    runs-on: ubuntu-22.04
+    runs-on: ubuntu-24.04
     needs: build
     permissions:
       statuses: write
@@ -311,7 +311,7 @@ jobs:
         path: build/codecov_report/
 
   detector-info:
-    runs-on: ubuntu-22.04
+    runs-on: ubuntu-24.04
     outputs:
       hash: ${{ steps.detector-info.outputs.hash }}
     steps:
@@ -326,7 +326,7 @@ jobs:
         echo "hash=${hash%% *}" | tee $GITHUB_OUTPUT
 
   npsim-gun:
-    runs-on: ubuntu-22.04
+    runs-on: ubuntu-24.04
     needs:
     - detector-info
     strategy:
@@ -356,7 +356,7 @@ jobs:
         if-no-files-found: error
 
   npsim-gun-EcalLumiSpec:
-    runs-on: ubuntu-22.04
+    runs-on: ubuntu-24.04
     needs:
     - detector-info
     strategy:
@@ -390,7 +390,7 @@ jobs:
         if-no-files-found: error
 
   npsim-dis:
-    runs-on: ubuntu-22.04
+    runs-on: ubuntu-24.04
     needs:
     - detector-info
     strategy:
@@ -426,7 +426,7 @@ jobs:
         if-no-files-found: error
 
   npsim-minbias:
-    runs-on: ubuntu-22.04
+    runs-on: ubuntu-24.04
     needs:
     - detector-info
     strategy:
@@ -462,7 +462,7 @@ jobs:
         if-no-files-found: error
 
   eicrecon-two-stage-running:
-    runs-on: ubuntu-22.04
+    runs-on: ubuntu-24.04
     needs:
     - build
     - npsim-gun
@@ -526,7 +526,7 @@ jobs:
         if-no-files-found: error
 
   eicrecon-eicmkplugin:
-    runs-on: ubuntu-22.04
+    runs-on: ubuntu-24.04
     needs:
     - build
     - npsim-gun
@@ -569,7 +569,7 @@ jobs:
           $PWD/install/bin/eicrecon $JANA_OPTIONS -Pplugins=MyCustomPlugin -Ppodio:output_file=rec_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}.edm4eic.root sim_${{ matrix.particle }}_1GeV_20GeV_${{ matrix.detector_config }}.edm4hep.root
 
   eicrecon-test-plugins:
-    runs-on: ubuntu-22.04
+    runs-on: ubuntu-24.04
     needs:
     - build
     - npsim-gun
@@ -618,7 +618,7 @@ jobs:
         if-no-files-found: error
 
   eicrecon-benchmarks-plugins:
-    runs-on: ubuntu-22.04
+    runs-on: ubuntu-24.04
     needs:
     - build
     - npsim-gun
@@ -671,7 +671,7 @@ jobs:
         if-no-files-found: error
 
   eicrecon-gun:
-    runs-on: ubuntu-22.04
+    runs-on: ubuntu-24.04
     needs:
     - build
     - npsim-gun
@@ -785,7 +785,7 @@ jobs:
         if-no-files-found: error
 
   eicrecon-gun-EcalLumiSpec:
-    runs-on: ubuntu-22.04
+    runs-on: ubuntu-24.04
     needs:
     - build
     - npsim-gun-EcalLumiSpec
@@ -852,7 +852,7 @@ jobs:
         if-no-files-found: error
 
   eicrecon-dis:
-    runs-on: ubuntu-22.04
+    runs-on: ubuntu-24.04
     needs:
     - build
     - npsim-dis
@@ -985,7 +985,7 @@ jobs:
         if-no-files-found: error
 
   trigger-container:
-    runs-on: ubuntu-22.04
+    runs-on: ubuntu-24.04
     if: ${{ github.event_name != 'merge_group' && github.event_name != 'schedule' && github.actor != 'dependabot[bot]' }}
     needs:
     - eicrecon-gun
@@ -1017,7 +1017,7 @@ jobs:
         GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
 
   build-docs:
-    runs-on: ubuntu-22.04
+    runs-on: ubuntu-24.04
     needs:
       - eicrecon-gun
       - eicrecon-dis
@@ -1055,7 +1055,7 @@ jobs:
           if-no-files-found: error
 
   list-open-prs:
-    runs-on: ubuntu-22.04
+    runs-on: ubuntu-24.04
     outputs:
       json: ${{ steps.remap.outputs.json }}
     steps:
@@ -1074,7 +1074,7 @@ jobs:
           include.*.head_sha: ${{ toJSON(fromJSON(steps.query.outputs.data).*.head.sha) }}
 
   get-docs-from-open-prs:
-    runs-on: ubuntu-22.04
+    runs-on: ubuntu-24.04
     needs:
       - build-docs
       - list-open-prs
@@ -1125,7 +1125,7 @@ jobs:
           if-no-files-found: ignore
 
   get-docs-from-main:
-    runs-on: ubuntu-22.04
+    runs-on: ubuntu-24.04
     needs:
       - build-docs
     steps:
@@ -1182,7 +1182,7 @@ jobs:
           if-no-files-found: error
 
   collect-docs:
-    runs-on: ubuntu-22.04
+    runs-on: ubuntu-24.04
     needs:
       - get-docs-from-main
       - get-docs-from-open-prs
@@ -1241,7 +1241,7 @@ jobs:
     environment:
       name: github-pages
       url: ${{ steps.deployment.outputs.page_url }}
-    runs-on: ubuntu-22.04
+    runs-on: ubuntu-24.04
     steps:
       - name: Deploy to GitHub Pages
         id: deployment

From 809b1acfb73a9082b3d535768571ef4a2db8f52c Mon Sep 17 00:00:00 2001
From: Wouter Deconinck <wdconinc@gmail.com>
Date: Thu, 16 Jan 2025 09:06:05 -0600
Subject: [PATCH 03/11] fix: allow both Vector3f or Vector3d in Beam.h (#1707)

### Briefly, what does this PR introduce?
EDM4hep-0.99 changed the type of momentum in particles from float to
double, which requires more flexibility in our
`round_beam_four_momentum` function.

### What kind of change does this PR introduce?
- [ ] Bug fix (issue #__)
- [x] New feature (support EDM4hep-0.99)
- [ ] Documentation update
- [ ] Other: __

### Please check if this PR fulfills the following:
- [ ] Tests for the changes have been added
- [ ] Documentation has been added / updated
- [ ] Changes have been communicated to collaborators

### Does this PR introduce breaking changes? What changes might users
need to make to their code?
No.

### Does this PR change default behavior?
No.
---
 src/algorithms/reco/Beam.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/algorithms/reco/Beam.h b/src/algorithms/reco/Beam.h
index 6c81b1c622..b27bd3a2d3 100644
--- a/src/algorithms/reco/Beam.h
+++ b/src/algorithms/reco/Beam.h
@@ -60,10 +60,10 @@ namespace eicrecon {
     return find_first_with_pdg(rcparts, {11});
   }
 
-  inline
+  template<typename Vector3>
   PxPyPzEVector
   round_beam_four_momentum(
-      const edm4hep::Vector3f& p_in,
+      const Vector3& p_in,
       const float mass,
       const std::vector<float>& pz_set,
       const float crossing_angle = 0.0) {

From 7daf8e21c944977d2e97b235dd8979d0e84a6b6f Mon Sep 17 00:00:00 2001
From: Wouter Deconinck <wdconinc@gmail.com>
Date: Thu, 16 Jan 2025 14:01:49 -0600
Subject: [PATCH 04/11] fix: decltype on MCParticle::momentum in
 UndoAfterBurner (#1708)

### Briefly, what does this PR introduce?
In EDM4hep-0.99, `MCParticle::momentum` is now `Vector3f` instead of
`Vector3d`, which causes warnings in UndoAfterBurner. This PR adds a
decltype to get around this.

### What kind of change does this PR introduce?
- [ ] Bug fix (issue #__)
- [x] New feature (support EDM4hep-0.99)
- [ ] Documentation update
- [ ] Other: __

### Please check if this PR fulfills the following:
- [ ] Tests for the changes have been added
- [ ] Documentation has been added / updated
- [ ] Changes have been communicated to collaborators

### Does this PR introduce breaking changes? What changes might users
need to make to their code?
No.

### Does this PR change default behavior?
No.
---
 src/algorithms/reco/UndoAfterBurner.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/algorithms/reco/UndoAfterBurner.cc b/src/algorithms/reco/UndoAfterBurner.cc
index 129674f470..1be31d0e22 100644
--- a/src/algorithms/reco/UndoAfterBurner.cc
+++ b/src/algorithms/reco/UndoAfterBurner.cc
@@ -126,7 +126,7 @@ void eicrecon::UndoAfterBurner::process(
         mc = rotationAboutX(mc);
         mc = headOnBoostVector(mc);
 
-        edm4hep::Vector3f mcMom(mc.Px(), mc.Py(), mc.Pz());
+        decltype(edm4hep::MCParticleData::momentum) mcMom(mc.Px(), mc.Py(), mc.Pz());
         edm4hep::MutableMCParticle MCTrack(p.clone());
         MCTrack.setMomentum(mcMom);
 

From 35db33252e2d024e2954ce3a8b5babbaea68e07a Mon Sep 17 00:00:00 2001
From: Wouter Deconinck <wdconinc@gmail.com>
Date: Thu, 16 Jan 2025 18:26:29 -0600
Subject: [PATCH 05/11] fix: rm find_package outside jana_plugin.cmake (#1710)

### Briefly, what does this PR introduce?
This PR removes the find_package use in benchmarks, outside of
jana_plugin.cmake. Finding packages is better done centralized, to
reduce duplication, to ensure the same components are found, and to
ensure we keep track of minimum version requirements.

### What kind of change does this PR introduce?
- [x] Bug fix (issue: code duplication)
- [ ] New feature (issue #__)
- [ ] Documentation update
- [ ] Other: __

### Please check if this PR fulfills the following:
- [ ] Tests for the changes have been added
- [ ] Documentation has been added / updated
- [ ] Changes have been communicated to collaborators

### Does this PR introduce breaking changes? What changes might users
need to make to their code?
No.

### Does this PR change default behavior?
No.
---
 .../reconstruction/TRACKINGcheck/CMakeLists.txt      |  2 +-
 .../reconstruction/femc_studies/CMakeLists.txt       |  1 -
 .../reconstruction/lfhcal_studies/CMakeLists.txt     |  1 -
 .../reconstruction/tof_efficiency/CMakeLists.txt     | 12 ++----------
 .../tracking_efficiency/CMakeLists.txt               | 12 ++----------
 .../reconstruction/tracking_occupancy/CMakeLists.txt |  1 -
 6 files changed, 5 insertions(+), 24 deletions(-)

diff --git a/src/benchmarks/reconstruction/TRACKINGcheck/CMakeLists.txt b/src/benchmarks/reconstruction/TRACKINGcheck/CMakeLists.txt
index 53bf42a9ef..29024b84bb 100644
--- a/src/benchmarks/reconstruction/TRACKINGcheck/CMakeLists.txt
+++ b/src/benchmarks/reconstruction/TRACKINGcheck/CMakeLists.txt
@@ -19,4 +19,4 @@ plugin_add_eigen3(${PLUGIN_NAME})
 plugin_add_event_model(${PLUGIN_NAME})
 
 # Add libraries (works same as target_include_directories)
-plugin_link_libraries(${PLUGIN_NAME} Eigen3::Eigen)
+plugin_link_libraries(${PLUGIN_NAME})
diff --git a/src/benchmarks/reconstruction/femc_studies/CMakeLists.txt b/src/benchmarks/reconstruction/femc_studies/CMakeLists.txt
index bf5afcd6d5..b4191dfd68 100644
--- a/src/benchmarks/reconstruction/femc_studies/CMakeLists.txt
+++ b/src/benchmarks/reconstruction/femc_studies/CMakeLists.txt
@@ -8,7 +8,6 @@ get_filename_component(PLUGIN_NAME ${CMAKE_CURRENT_LIST_DIR} NAME)
 plugin_add(${PLUGIN_NAME})
 
 # Find dependencies
-find_package(ROOT REQUIRED COMPONENTS Core Tree Hist RIO EG)
 plugin_add_event_model(${PLUGIN_NAME})
 plugin_add_dd4hep(${PLUGIN_NAME})
 plugin_add_acts(${PLUGIN_NAME})
diff --git a/src/benchmarks/reconstruction/lfhcal_studies/CMakeLists.txt b/src/benchmarks/reconstruction/lfhcal_studies/CMakeLists.txt
index bf5afcd6d5..b4191dfd68 100644
--- a/src/benchmarks/reconstruction/lfhcal_studies/CMakeLists.txt
+++ b/src/benchmarks/reconstruction/lfhcal_studies/CMakeLists.txt
@@ -8,7 +8,6 @@ get_filename_component(PLUGIN_NAME ${CMAKE_CURRENT_LIST_DIR} NAME)
 plugin_add(${PLUGIN_NAME})
 
 # Find dependencies
-find_package(ROOT REQUIRED COMPONENTS Core Tree Hist RIO EG)
 plugin_add_event_model(${PLUGIN_NAME})
 plugin_add_dd4hep(${PLUGIN_NAME})
 plugin_add_acts(${PLUGIN_NAME})
diff --git a/src/benchmarks/reconstruction/tof_efficiency/CMakeLists.txt b/src/benchmarks/reconstruction/tof_efficiency/CMakeLists.txt
index 23c4c38305..07d4f2638f 100644
--- a/src/benchmarks/reconstruction/tof_efficiency/CMakeLists.txt
+++ b/src/benchmarks/reconstruction/tof_efficiency/CMakeLists.txt
@@ -9,8 +9,8 @@ plugin_add(${PLUGIN_NAME})
 
 # Find dependencies
 plugin_add_dd4hep(${PLUGIN_NAME})
-find_package(ROOT REQUIRED COMPONENTS Core Tree Hist RIO EG)
 plugin_add_acts(${PLUGIN_NAME})
+plugin_add_cern_root(${PLUGIN_NAME})
 plugin_add_event_model(${PLUGIN_NAME})
 
 # The macro grabs sources as *.cc *.cpp *.c and headers as *.h *.hh *.hpp Then
@@ -20,12 +20,4 @@ plugin_glob_all(${PLUGIN_NAME})
 
 # Add libraries (same as target_include_directories but for both plugin and
 # library)
-plugin_link_libraries(
-  ${PLUGIN_NAME}
-  ROOT::Core
-  ROOT::Tree
-  ROOT::Hist
-  ROOT::RIO
-  ROOT::EG
-  ActsCore
-  EDM4EIC::edm4eic)
+plugin_link_libraries(${PLUGIN_NAME})
diff --git a/src/benchmarks/reconstruction/tracking_efficiency/CMakeLists.txt b/src/benchmarks/reconstruction/tracking_efficiency/CMakeLists.txt
index 23c4c38305..07d4f2638f 100644
--- a/src/benchmarks/reconstruction/tracking_efficiency/CMakeLists.txt
+++ b/src/benchmarks/reconstruction/tracking_efficiency/CMakeLists.txt
@@ -9,8 +9,8 @@ plugin_add(${PLUGIN_NAME})
 
 # Find dependencies
 plugin_add_dd4hep(${PLUGIN_NAME})
-find_package(ROOT REQUIRED COMPONENTS Core Tree Hist RIO EG)
 plugin_add_acts(${PLUGIN_NAME})
+plugin_add_cern_root(${PLUGIN_NAME})
 plugin_add_event_model(${PLUGIN_NAME})
 
 # The macro grabs sources as *.cc *.cpp *.c and headers as *.h *.hh *.hpp Then
@@ -20,12 +20,4 @@ plugin_glob_all(${PLUGIN_NAME})
 
 # Add libraries (same as target_include_directories but for both plugin and
 # library)
-plugin_link_libraries(
-  ${PLUGIN_NAME}
-  ROOT::Core
-  ROOT::Tree
-  ROOT::Hist
-  ROOT::RIO
-  ROOT::EG
-  ActsCore
-  EDM4EIC::edm4eic)
+plugin_link_libraries(${PLUGIN_NAME})
diff --git a/src/benchmarks/reconstruction/tracking_occupancy/CMakeLists.txt b/src/benchmarks/reconstruction/tracking_occupancy/CMakeLists.txt
index bf5afcd6d5..b4191dfd68 100644
--- a/src/benchmarks/reconstruction/tracking_occupancy/CMakeLists.txt
+++ b/src/benchmarks/reconstruction/tracking_occupancy/CMakeLists.txt
@@ -8,7 +8,6 @@ get_filename_component(PLUGIN_NAME ${CMAKE_CURRENT_LIST_DIR} NAME)
 plugin_add(${PLUGIN_NAME})
 
 # Find dependencies
-find_package(ROOT REQUIRED COMPONENTS Core Tree Hist RIO EG)
 plugin_add_event_model(${PLUGIN_NAME})
 plugin_add_dd4hep(${PLUGIN_NAME})
 plugin_add_acts(${PLUGIN_NAME})

From c58b5225e1a1bd89ba45646d7236367c4564fd6c Mon Sep 17 00:00:00 2001
From: Wouter Deconinck <wdconinc@gmail.com>
Date: Fri, 17 Jan 2025 10:08:51 -0600
Subject: [PATCH 06/11] feat: export Acts_VERSION_MINOR as compile definition
 (#1711)

### Briefly, what does this PR introduce?
We're going to encounter some ACTS API changes introduced at the minor
version number (we're arguably using a bit of private API). This PR adds
`Acts_VERSION_MINOR` to compile definitions, in anticipation.

### What kind of change does this PR introduce?
- [ ] Bug fix (issue #__)
- [x] New feature (issue: ACTS ViewConfig changes in 37.1.0 will need
this)
- [ ] Documentation update
- [ ] Other: __

### Please check if this PR fulfills the following:
- [ ] Tests for the changes have been added
- [ ] Documentation has been added / updated
- [ ] Changes have been communicated to collaborators

### Does this PR introduce breaking changes? What changes might users
need to make to their code?
No.

### Does this PR change default behavior?
No.
---
 cmake/jana_plugin.cmake | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/cmake/jana_plugin.cmake b/cmake/jana_plugin.cmake
index c9f2940233..256c6f2025 100644
--- a/cmake/jana_plugin.cmake
+++ b/cmake/jana_plugin.cmake
@@ -298,11 +298,13 @@ macro(plugin_add_acts _name)
   )
   if(${_name}_WITH_LIBRARY)
     target_compile_definitions(
-      ${PLUGIN_NAME}_library PRIVATE "Acts_VERSION_MAJOR=${Acts_VERSION_MAJOR}")
+      ${PLUGIN_NAME}_library PRIVATE "Acts_VERSION_MAJOR=${Acts_VERSION_MAJOR}"
+                                     "Acts_VERSION_MINOR=${Acts_VERSION_MINOR}")
   endif()
   if(${_name}_WITH_PLUGIN)
     target_compile_definitions(
-      ${PLUGIN_NAME}_plugin PRIVATE "Acts_VERSION_MAJOR=${Acts_VERSION_MAJOR}")
+      ${PLUGIN_NAME}_plugin PRIVATE "Acts_VERSION_MAJOR=${Acts_VERSION_MAJOR}"
+                                    "Acts_VERSION_MINOR=${Acts_VERSION_MINOR}")
   endif()
 
 endmacro()

From 48809d6f8f2b6a57e6d63b5dfe2a09eac5a5f804 Mon Sep 17 00:00:00 2001
From: Dmitry Kalinkin <dmitry.kalinkin@gmail.com>
Date: Sun, 29 Dec 2024 22:09:42 -0500
Subject: [PATCH 07/11] use consistent .clang-format with epic

---
 .clang-format | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/.clang-format b/.clang-format
index 5c443be69c..6041e26532 100644
--- a/.clang-format
+++ b/.clang-format
@@ -3,7 +3,7 @@ BasedOnStyle:  LLVM
 BreakConstructorInitializersBeforeComma: true
 ConstructorInitializerAllOnOneLineOrOnePerLine: true
 Cpp11BracedListStyle: true
-Standard: Cpp11
+Standard: c++20
 #SpaceBeforeParens: ControlStatements
 SpaceAfterControlStatementKeyword: true
 PointerBindsToType: true
@@ -12,4 +12,6 @@ UseTab:          Never
 ColumnLimit:     100
 NamespaceIndentation: Inner
 AlignConsecutiveAssignments: true
+SortIncludes: Never
+ReflowComments: false
 ...

From 8e1c4a81d3c9c93568b5eef09bca77a5a2c41902 Mon Sep 17 00:00:00 2001
From: Dmitry Kalinkin <dmitry.kalinkin@gmail.com>
Date: Sun, 29 Dec 2024 22:10:00 -0500
Subject: [PATCH 08/11] run clang-format in CI

---
 .pre-commit-config.yaml | 2 --
 1 file changed, 2 deletions(-)

diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 033cb95c37..88251382db 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -1,5 +1,3 @@
-ci:
-    skip: [clang-format]
 repos:
 - repo: https://github.com/pre-commit/pre-commit-hooks
   rev: v5.0.0

From 0467bb6924a7399471109901eaf02c7a00e0f7d1 Mon Sep 17 00:00:00 2001
From: Dmitry Kalinkin <dmitry.kalinkin@gmail.com>
Date: Sun, 29 Dec 2024 22:13:28 -0500
Subject: [PATCH 09/11] ParticleSvc: clang-format pragma

---
 src/algorithms/interfaces/ParticleSvc.cc | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/algorithms/interfaces/ParticleSvc.cc b/src/algorithms/interfaces/ParticleSvc.cc
index c23128ded3..607b016015 100644
--- a/src/algorithms/interfaces/ParticleSvc.cc
+++ b/src/algorithms/interfaces/ParticleSvc.cc
@@ -8,6 +8,7 @@
 namespace algorithms {
 
 const std::shared_ptr<ParticleSvc::ParticleMap> ParticleSvc::kParticleMap =
+// clang-format off
   std::make_shared<ParticleSvc::ParticleMap>(ParticleSvc::ParticleMap{
     {           0, {           0,   0,   0.0           , "unknown" }},
     {          11, {          11,  -1,   0.000510998928, "e-" }},
@@ -248,5 +249,6 @@ const std::shared_ptr<ParticleSvc::ParticleMap> ParticleSvc::kParticleMap =
     {  1000020030, {  1000020030,   2,   2.80923       , "He-3" }},
     {  1000020040, {  1000020040,   2,   3.72742       , "Alpha" }},
 });
+// clang-format on
 
 } // namespace algorithms

From 6543e038abf675404e9a72cdfa1a55ba86f59bfb Mon Sep 17 00:00:00 2001
From: Dmitry Kalinkin <dmitry.kalinkin@gmail.com>
Date: Sun, 29 Dec 2024 22:22:31 -0500
Subject: [PATCH 10/11] .pre-commit-config.yaml: add check-yaml and
 clang-format

---
 .pre-commit-config.yaml | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 88251382db..e7a967de67 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -2,12 +2,17 @@ repos:
 - repo: https://github.com/pre-commit/pre-commit-hooks
   rev: v5.0.0
   hooks:
+  - id: check-yaml
   - id: end-of-file-fixer
   - id: trailing-whitespace
 - repo: https://github.com/codespell-project/codespell
   rev: v2.3.0
   hooks:
   - id: codespell
+- repo: https://github.com/pre-commit/mirrors-clang-format
+  rev: v19.1.4
+  hooks:
+  - id: clang-format
 - repo: https://github.com/Lucas-C/pre-commit-hooks
   rev: v1.5.5
   hooks:
@@ -16,11 +21,6 @@ repos:
   - id: forbid-tabs
   - id: remove-tabs
     args: [--whitespaces-count, '8']
-- repo: https://github.com/pocc/pre-commit-hooks
-  rev: v1.3.5
-  hooks:
-  - id: clang-format
-    args: [-i]
 - repo: https://github.com/cheshirekow/cmake-format-precommit
   rev: v0.6.13
   hooks:

From 0e56fd2c19d6b9e53297415aa8653679950f520f Mon Sep 17 00:00:00 2001
From: Dmitry Kalinkin <dmitry.kalinkin@gmail.com>
Date: Sun, 29 Dec 2024 22:39:34 -0500
Subject: [PATCH 11/11] eicrecon.cc: clang-format pragma

---
 src/utilities/eicrecon/eicrecon.cc | 75 +++++++++++++++---------------
 1 file changed, 38 insertions(+), 37 deletions(-)

diff --git a/src/utilities/eicrecon/eicrecon.cc b/src/utilities/eicrecon/eicrecon.cc
index e8c75c6948..fd44bfb8cc 100644
--- a/src/utilities/eicrecon/eicrecon.cc
+++ b/src/utilities/eicrecon/eicrecon.cc
@@ -12,43 +12,44 @@
 /// The default plugins
 /// Add new default plugin names here and the main() will do JApplication::AddPlugin() for you.
 std::vector<std::string> EICRECON_DEFAULT_PLUGINS = {
-
-        "log",
-        "dd4hep",
-        "acts",
-        "algorithms_init",
-        "evaluator",
-        "pid_lut",
-        "richgeo",
-        "rootfile",
-        "beam",
-        "reco",
-        "tracking",
-        "pid",
-        "EEMC",
-        "BEMC",
-        "FEMC",
-        "EHCAL",
-        "BHCAL",
-        "FHCAL",
-        "B0ECAL",
-        "ZDC",
-        "BTRK",
-        "BVTX",
-        "PFRICH",
-        "DIRC",
-        "DRICH",
-        "ECTRK",
-        "MPGD",
-        "B0TRK",
-        "RPOTS",
-        "FOFFMTRK",
-        "BTOF",
-        "ECTOF",
-        "LOWQ2",
-        "LUMISPECCAL",
-        "podio",
-        "janatop",
+// clang-format off
+    "log",
+    "dd4hep",
+    "acts",
+    "algorithms_init",
+    "evaluator",
+    "pid_lut",
+    "richgeo",
+    "rootfile",
+    "beam",
+    "reco",
+    "tracking",
+    "pid",
+    "EEMC",
+    "BEMC",
+    "FEMC",
+    "EHCAL",
+    "BHCAL",
+    "FHCAL",
+    "B0ECAL",
+    "ZDC",
+    "BTRK",
+    "BVTX",
+    "PFRICH",
+    "DIRC",
+    "DRICH",
+    "ECTRK",
+    "MPGD",
+    "B0TRK",
+    "RPOTS",
+    "FOFFMTRK",
+    "BTOF",
+    "ECTOF",
+    "LOWQ2",
+    "LUMISPECCAL",
+    "podio",
+    "janatop",
+// clang-format on
 };
 
 int main( int narg, char **argv)