Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: eic/EICrecon
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 8432604
Choose a base ref
...
head repository: eic/EICrecon
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 0e56fd2
Choose a head ref
  • 11 commits
  • 17 files changed
  • 3 contributors

Commits on Jan 15, 2025

  1. 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>
    veprbl and pre-commit-ci[bot] authored Jan 15, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    451c246 View commit details
  2. 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 (actions/runner-images#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
    actions/runner-images#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.
    wdconinc authored Jan 15, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    fddfc5f View commit details

Commits on Jan 16, 2025

  1. 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.
    wdconinc authored Jan 16, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    809b1ac View commit details
  2. 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.
    wdconinc authored Jan 16, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    7daf8e2 View commit details

Commits on Jan 17, 2025

  1. 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.
    wdconinc authored Jan 17, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    35db332 View commit details
  2. 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.
    wdconinc authored Jan 17, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    c58b522 View commit details
  3. Copy the full SHA
    48809d6 View commit details
  4. run clang-format in CI

    veprbl committed Jan 17, 2025
    Copy the full SHA
    8e1c4a8 View commit details
  5. Copy the full SHA
    0467bb6 View commit details
  6. Copy the full SHA
    6543e03 View commit details
  7. eicrecon.cc: clang-format pragma

    veprbl committed Jan 17, 2025
    Copy the full SHA
    0e56fd2 View commit details
4 changes: 3 additions & 1 deletion .clang-format
Original file line number Diff line number Diff line change
@@ -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
...
46 changes: 23 additions & 23 deletions .github/workflows/linux-eic-shell.yml
Original file line number Diff line number Diff line change
@@ -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
12 changes: 5 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
ci:
skip: [clang-format]
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:
@@ -18,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:
17 changes: 15 additions & 2 deletions cmake/jana_plugin.cmake
Original file line number Diff line number Diff line change
@@ -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)
@@ -287,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()
2 changes: 2 additions & 0 deletions src/algorithms/interfaces/ParticleSvc.cc
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions src/algorithms/reco/Beam.h
Original file line number Diff line number Diff line change
@@ -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) {
2 changes: 1 addition & 1 deletion src/algorithms/reco/UndoAfterBurner.cc
Original file line number Diff line number Diff line change
@@ -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);

2 changes: 1 addition & 1 deletion src/benchmarks/reconstruction/TRACKINGcheck/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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})
1 change: 0 additions & 1 deletion src/benchmarks/reconstruction/femc_studies/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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})
Original file line number Diff line number Diff line change
@@ -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})
12 changes: 2 additions & 10 deletions src/benchmarks/reconstruction/tof_efficiency/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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})
12 changes: 2 additions & 10 deletions src/benchmarks/reconstruction/tracking_efficiency/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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})
Loading