Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
asalzburger authored Nov 4, 2024
2 parents f16ac93 + 52681f7 commit a86056e
Show file tree
Hide file tree
Showing 134 changed files with 3,214 additions and 1,763 deletions.
44 changes: 5 additions & 39 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,41 +1,7 @@
PLEASE FOLLOW THE CHECKLIST BELOW WHEN CREATING A NEW PULL REQUEST. THE
CHECKLIST IS FOR YOUR INFORMATION AND MUST BE REMOVED BEFORE SUBMITTING THE PULL
REQUEST.
PLEASE DESCRIBE YOUR CHANGES.
THIS MESSAGE ENDS UP AS THE COMMIT MESSAGE.
DO NOT USE @-MENTIONS HERE!

## Checklist
--- END COMMIT MESSAGE ---

- [ ] Does the PR title follow the `<prefix>: title` scheme?

The prefix must be one of:

- `fix`: for a bugfix
- `feat`: for a new feature
- `refactor`: for an improvement of an existing feature
- `perf`, `test`: for performance- or test-related changes
- `docs`: for documentation-related changes
- `build`, `ci`, `chore`: as appropriated for infrastructure changes

- [ ] Does this modify the public API as defined in `docs/versioning.rst`?

- [ ] Does the PR title contain a `!` to indicate a breaking change?
- [ ] Is there section starting with `BREAKING CHANGE:` in the PR body
that explains the breaking change?

- [ ] Is the PR ready to be merged?

- [ ] If not: is it marked as a draft PR?

- [ ] Does this PR close an existing issue?

- [ ] Is the issue correctly linked so it will be automatically closed
upon successful merge (See closing keywords link in the sidebar)?

- The CI will initially report a missing milestone. One of the maintainers will
handle assigning a milestone for book-keeping.

- An automated workflow will assign labels based on changed files, and whether
or not reference files were changed. These do not have to be set manually.

- If you push updates, and you know they will be superseded later on, consider adding
`[skip ci]` in the commit message. This will instruct the CI system not to run any
jobs on this commit.
Any further description goes here, @-mentions are ok here!
2 changes: 1 addition & 1 deletion .github/workflows/analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ env:
CCACHE_MAXSIZE: 1.25G
CCACHE_KEY_SUFFIX: r2
ACTS_LOG_FAILURE_THRESHOLD: WARNING
DEPENDENCY_URL: https://acts.web.cern.ch/ACTS/ci/ubuntu-24.04/deps.v4.tar.zst
DEPENDENCY_URL: https://acts.web.cern.ch/ACTS/ci/ubuntu-24.04/deps.v5.tar.zst

# NOTE this only builds core unittests to reduce the output size. if we
# found a way to have Github actions not fail regularly with this job
Expand Down
24 changes: 19 additions & 5 deletions .github/workflows/builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ env:
CCACHE_DIR: ${{ github.workspace }}/ccache
CCACHE_MAXSIZE: 500M
CCACHE_KEY_SUFFIX: r2
DEPENDENCY_TAG: v5

jobs:
linux_ubuntu:
Expand All @@ -28,14 +29,16 @@ jobs:
env:
INSTALL_DIR: ${{ github.workspace }}/install
ACTS_LOG_FAILURE_THRESHOLD: WARNING
DEPENDENCY_URL: https://acts.web.cern.ch/ACTS/ci/ubuntu-24.04/deps.v4.tar.zst

steps:
- uses: actions/checkout@v4
with:
submodules: true
lfs: true

- name: Set dependencies URL
run: echo "DEPENDENCY_URL=https://acts.web.cern.ch/ACTS/ci/ubuntu-24.04/deps.${DEPENDENCY_TAG}.tar.zst" >> $GITHUB_ENV

- name: Install dependencies
run: CI/dependencies.sh

Expand Down Expand Up @@ -114,14 +117,16 @@ jobs:
needs: [linux_ubuntu]
env:
ACTS_SEQUENCER_DISABLE_FPEMON: true
DEPENDENCY_URL: https://acts.web.cern.ch/ACTS/ci/ubuntu-24.04/deps.v4.tar.zst

steps:
- uses: actions/checkout@v4
with:
submodules: true
lfs: true

- name: Set dependencies URL
run: echo "DEPENDENCY_URL=https://acts.web.cern.ch/ACTS/ci/ubuntu-24.04/deps.${DEPENDENCY_TAG}.tar.zst" >> $GITHUB_ENV

- name: Install dependencies
run: CI/dependencies.sh

Expand Down Expand Up @@ -152,7 +157,6 @@ jobs:
needs: [linux_ubuntu]
env:
ACTS_SEQUENCER_DISABLE_FPEMON: true
DEPENDENCY_URL: https://acts.web.cern.ch/ACTS/ci/ubuntu-24.04/deps.v4.tar.zst

steps:
- uses: actions/checkout@v4
Expand All @@ -161,6 +165,10 @@ jobs:
lfs: true

- run: apt-get update && apt-get install -y time

- name: Set dependencies URL
run: echo "DEPENDENCY_URL=https://acts.web.cern.ch/ACTS/ci/ubuntu-24.04/deps.${DEPENDENCY_TAG}.tar.zst" >> $GITHUB_ENV

- name: Install dependencies
run: CI/dependencies.sh

Expand Down Expand Up @@ -246,13 +254,16 @@ jobs:
env:
INSTALL_DIR: ${{ github.workspace }}/install
ACTS_LOG_FAILURE_THRESHOLD: WARNING
DEPENDENCY_URL: https://acts.web.cern.ch/ACTS/ci/ubuntu-22.04/deps.v4.tar.zst

steps:
- uses: actions/checkout@v4
with:
submodules: true
lfs: true

- name: Set dependencies URL
run: echo "DEPENDENCY_URL=https://acts.web.cern.ch/ACTS/ci/ubuntu-22.04/deps.${DEPENDENCY_TAG}.tar.zst" >> $GITHUB_ENV

- name: Install dependencies
run: CI/dependencies.sh

Expand Down Expand Up @@ -320,7 +331,7 @@ jobs:
env:
INSTALL_DIR: ${{ github.workspace }}/install_acts
ACTS_LOG_FAILURE_THRESHOLD: WARNING
DEPENDENCY_URL: https://acts.web.cern.ch/ACTS/ci/macos-14/deps.v4.tar.zst

steps:
- uses: actions/checkout@v4
with:
Expand All @@ -330,6 +341,9 @@ jobs:
- name: Print architecture
run: uname -p

- name: Set dependencies URL
run: echo "DEPENDENCY_URL=https://acts.web.cern.ch/ACTS/ci/macos-14/deps.${DEPENDENCY_TAG}.tar.zst" >> $GITHUB_ENV

- name: Install dependencies
run: >
brew install cmake ninja ccache xerces-c
Expand Down
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ variables:
CCACHE_KEY_SUFFIX: r2
CTEST_OUTPUT_ON_FAILURE: 1

DEPENDENCY_TAG: v4
DEPENDENCY_TAG: v5

clang_tidy:
stage: build
Expand Down
2 changes: 1 addition & 1 deletion .kodiak.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version = 1

merge.message.title = "pull_request_title"
merge.message.body = "pull_request_body"
merge.message.cut_body_before = "--- BEGIN COMMIT MESSAGE ---"
merge.message.cut_body_after = "--- END COMMIT MESSAGE ---"
merge.message.cut_body_and_text = true
merge.method = "squash"
merge.message.include_coauthors = true
Expand Down
2 changes: 0 additions & 2 deletions CI/check_unused_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ def main():
".gitignore",
"README.md",
"CMakeLists.txt",
"DetUtils.h",
"CommandLineArguments.h",
# Filename not completed in source
"vertexing_event_mu20_beamspot.csv",
"vertexing_event_mu20_tracks.csv",
Expand Down
13 changes: 11 additions & 2 deletions CI/physmon/workflows/physmon_simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,14 @@
)
)

s.addWriter(
acts.examples.RootParticleWriter(
level=acts.logging.INFO,
inputParticles="particles_input",
filePath=tp / "particles.root",
)
)

addFatras(
s,
setup.trackingGeometry,
Expand Down Expand Up @@ -100,6 +108,7 @@
s.run()

for file, name in [
(tp / "particles.root", "particles_gun.root"),
(tp / "fatras" / "particles_simulation.root", "particles_fatras.root"),
(tp / "geant4" / "particles_simulation.root", "particles_geant4.root"),
]:
Expand Down Expand Up @@ -135,8 +144,8 @@
s.run()

for file, name in [
(tp / "pythia8_particles.root", "particles_ttbar.root"),
(tp / "pythia8_vertices.root", "vertices_ttbar.root"),
(tp / "particles.root", "particles_ttbar.root"),
(tp / "vertices.root", "vertices_ttbar.root"),
]:
assert file.exists(), "file not found"
shutil.copy(file, setup.outdir / name)
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ option(ACTS_BUILD_EXAMPLES_HEPMC3 "Build HepMC3-based code in the examples" OFF)
option(ACTS_BUILD_EXAMPLES_HASHING "Build Hashing-based code in the examples" OFF)
option(ACTS_BUILD_EXAMPLES_PYTHIA8 "Build Pythia8-based code in the examples" OFF)
option(ACTS_BUILD_EXAMPLES_PYTHON_BINDINGS "Build python bindings for the examples" OFF)
option(ACTS_USE_EXAMPLES_TBB "Use Threading Building Blocks library in the examples" ON)
option(ACTS_BUILD_ANALYSIS_APPS "Build Analysis applications in the examples" OFF)
# test related options
option(ACTS_BUILD_BENCHMARKS "Build benchmarks" OFF)
Expand Down
7 changes: 5 additions & 2 deletions Core/include/Acts/EventData/GenericBoundTrackParameters.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#pragma once

#include "Acts/Definitions/Tolerance.hpp"
#include "Acts/EventData/TrackParameterHelpers.hpp"
#include "Acts/EventData/TransformationHelpers.hpp"
#include "Acts/EventData/detail/PrintParameters.hpp"
#include "Acts/Surfaces/Surface.hpp"
Expand All @@ -18,7 +19,6 @@
#include <cassert>
#include <cmath>
#include <memory>
#include <type_traits>

namespace Acts {

Expand Down Expand Up @@ -61,7 +61,10 @@ class GenericBoundTrackParameters {
m_cov(std::move(cov)),
m_surface(std::move(surface)),
m_particleHypothesis(std::move(particleHypothesis)) {
assert(m_surface);
// TODO set `validateAngleRange` to `true` after fixing caller code
assert(isBoundVectorValid(m_params, false) &&
"Invalid bound parameters vector");
assert(m_surface != nullptr && "Reference surface must not be null");
normalizePhiTheta();
}

Expand Down
11 changes: 8 additions & 3 deletions Core/include/Acts/EventData/GenericFreeTrackParameters.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,16 @@
#include "Acts/Definitions/Algebra.hpp"
#include "Acts/Definitions/Common.hpp"
#include "Acts/Definitions/TrackParametrization.hpp"
#include "Acts/EventData/TrackParameterHelpers.hpp"
#include "Acts/EventData/TrackParametersConcept.hpp"
#include "Acts/EventData/TransformationHelpers.hpp"
#include "Acts/EventData/detail/PrintParameters.hpp"
#include "Acts/Utilities/MathHelpers.hpp"
#include "Acts/Utilities/UnitVectors.hpp"
#include "Acts/Utilities/VectorHelpers.hpp"

#include <cassert>
#include <cmath>
#include <optional>
#include <type_traits>

namespace Acts {

Expand Down Expand Up @@ -55,7 +54,9 @@ class GenericFreeTrackParameters {
ParticleHypothesis particleHypothesis)
: m_params(params),
m_cov(std::move(cov)),
m_particleHypothesis(std::move(particleHypothesis)) {}
m_particleHypothesis(std::move(particleHypothesis)) {
assert(isFreeVectorValid(m_params) && "Invalid free parameters vector");
}

/// Construct from four-position, direction, absolute momentum, and charge.
///
Expand All @@ -78,6 +79,8 @@ class GenericFreeTrackParameters {
m_params[eFreeDir1] = dir[eMom1];
m_params[eFreeDir2] = dir[eMom2];
m_params[eFreeQOverP] = qOverP;

assert(isFreeVectorValid(m_params) && "Invalid free parameters vector");
}

/// Construct from four-position, angles, absolute momentum, and charge.
Expand All @@ -103,6 +106,8 @@ class GenericFreeTrackParameters {
m_params[eFreeDir1] = dir[eMom1];
m_params[eFreeDir2] = dir[eMom2];
m_params[eFreeQOverP] = qOverP;

assert(isFreeVectorValid(m_params) && "Invalid free parameters vector");
}

/// Converts a free track parameter with a different hypothesis.
Expand Down
3 changes: 2 additions & 1 deletion Core/include/Acts/EventData/Seed.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@
namespace Acts {

template <typename external_spacepoint_t, std::size_t N = 3ul>
requires(N >= 3ul)
class Seed {
static_assert(N >= 3ul);

public:
using value_type = external_spacepoint_t;
static constexpr std::size_t DIM = N;
Expand Down
6 changes: 0 additions & 6 deletions Core/include/Acts/EventData/Seed.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -9,40 +9,34 @@
namespace Acts {

template <typename external_spacepoint_t, std::size_t N>
requires(N >= 3ul)
template <typename... args_t>
requires(sizeof...(args_t) == N) &&
(std::same_as<external_spacepoint_t, args_t> && ...)
Seed<external_spacepoint_t, N>::Seed(const args_t&... points)
: m_spacepoints({&points...}) {}

template <typename external_spacepoint_t, std::size_t N>
requires(N >= 3ul)
void Seed<external_spacepoint_t, N>::setVertexZ(float vertex) {
m_vertexZ = vertex;
}

template <typename external_spacepoint_t, std::size_t N>
requires(N >= 3ul)
void Seed<external_spacepoint_t, N>::setQuality(float seedQuality) {
m_seedQuality = seedQuality;
}

template <typename external_spacepoint_t, std::size_t N>
requires(N >= 3ul)
const std::array<const external_spacepoint_t*, N>&
Seed<external_spacepoint_t, N>::sp() const {
return m_spacepoints;
}

template <typename external_spacepoint_t, std::size_t N>
requires(N >= 3ul)
float Seed<external_spacepoint_t, N>::z() const {
return m_vertexZ;
}

template <typename external_spacepoint_t, std::size_t N>
requires(N >= 3ul)
float Seed<external_spacepoint_t, N>::seedQuality() const {
return m_seedQuality;
}
Expand Down
Loading

0 comments on commit a86056e

Please sign in to comment.