Skip to content

Commit

Permalink
Merge branch 'main' of github.com:acts-project/acts into ex-split-par…
Browse files Browse the repository at this point in the history
…ticle-selection
  • Loading branch information
andiwand committed Jan 10, 2025
2 parents a90b5c6 + fe95173 commit 6875c42
Show file tree
Hide file tree
Showing 212 changed files with 5,968 additions and 3,561 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ genConf
x86_64-slc6-gcc48-opt
x86_64-slc6-gcc49-opt
.*
build*
/build*
.asetup.save

#json output
Expand All @@ -30,7 +30,7 @@ build*

# dont ignore hidden configs
!.clang-format
!.github/**
!.github
!.gitignore
!.gitlab-ci.yml
!.clang-tidy
Expand Down
31 changes: 14 additions & 17 deletions CI/codespell_ignore.txt
Original file line number Diff line number Diff line change
@@ -1,24 +1,21 @@
aline
ans
boxs
bu
strack
compres
coner
dependees
dthe
iself
sortings
exprot
gaus
te
parm
writet
localy
iself
lastr
exprot
localy
millepede
parm
pixelx
pring
aline
boxs
ans
dthe
dthe
sortings
strack
te
vart
pixelx
millepede
dependees
writet
4 changes: 2 additions & 2 deletions Core/include/Acts/Definitions/Algebra.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ using Translation2 = Eigen::Translation<double, 2>;
using Translation3 = Eigen::Translation<double, 3>;

// linear (rotation) matrices
using RotationMatrix2 = ActsMatrix<2, 2>;
using RotationMatrix3 = ActsMatrix<3, 3>;
using RotationMatrix2 = SquareMatrix2;
using RotationMatrix3 = SquareMatrix3;

// pure rotation defined by a rotation angle around a rotation axis
using AngleAxis3 = Eigen::AngleAxis<double>;
Expand Down
12 changes: 6 additions & 6 deletions Core/include/Acts/Definitions/Units.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -201,12 +201,12 @@ constexpr double mol = 1.0;

namespace UnitLiterals {
// define user literal functions for the given unit constant
#define ACTS_DEFINE_UNIT_LITERAL(name) \
constexpr double operator"" _##name(long double x) { \
return ::Acts::UnitConstants::name * x; \
} \
constexpr double operator"" _##name(unsigned long long x) { \
return ::Acts::UnitConstants::name * x; \
#define ACTS_DEFINE_UNIT_LITERAL(name) \
constexpr double operator""_##name(long double x) { \
return ::Acts::UnitConstants::name * x; \
} \
constexpr double operator""_##name(unsigned long long x) { \
return ::Acts::UnitConstants::name * x; \
}
ACTS_DEFINE_UNIT_LITERAL(fm)
ACTS_DEFINE_UNIT_LITERAL(pm)
Expand Down
6 changes: 3 additions & 3 deletions Core/include/Acts/EventData/GenericBoundTrackParameters.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,10 @@ class GenericBoundTrackParameters {
/// Parameters vector.
const ParametersVector& parameters() const { return m_params; }
/// Vector of spatial impact parameters (i.e., d0 and z0)
ActsVector<2> spatialImpactParameters() const { return m_params.head<2>(); }
Vector2 spatialImpactParameters() const { return m_params.head<2>(); }
/// Vector of spatial and temporal impact parameters (i.e., d0, z0, and t)
ActsVector<3> impactParameters() const {
ActsVector<3> ip;
Vector3 impactParameters() const {
Vector3 ip;
ip.template head<2>() = m_params.template head<2>();
ip(2) = m_params(eBoundTime);
return ip;
Expand Down
6 changes: 3 additions & 3 deletions Core/include/Acts/EventData/MultiTrajectoryBackendConcept.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ concept CommonMultiTrajectoryBackend =

{
cv.template calibrated_impl<2>(istate)
} -> std::same_as<Eigen::Map<const ActsVector<2>>>;
} -> std::same_as<Eigen::Map<const Vector2>>;

{
cv.template calibratedCovariance_impl<2>(istate)
Expand Down Expand Up @@ -86,7 +86,7 @@ concept ConstMultiTrajectoryBackend =

{
v.template calibrated_impl<2>(istate)
} -> std::same_as<Eigen::Map<const ActsVector<2>>>;
} -> std::same_as<Eigen::Map<const Vector2>>;

{
v.template calibratedCovariance_impl<2>(istate)
Expand All @@ -107,7 +107,7 @@ concept MutableMultiTrajectoryBackend =

{
v.template calibrated_impl<2>(istate)
} -> std::same_as<Eigen::Map<ActsVector<2>>>;
} -> std::same_as<Eigen::Map<Vector2>>;

{
v.template calibratedCovariance_impl<2>(istate)
Expand Down
12 changes: 6 additions & 6 deletions Core/include/Acts/EventData/TrackStateProxy.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include "Acts/EventData/TrackStateType.hpp"
#include "Acts/EventData/Types.hpp"
#include "Acts/Surfaces/Surface.hpp"
#include "Acts/Utilities/EigenConcepts.hpp"
#include "Acts/Utilities/HashedString.hpp"
#include "Acts/Utilities/Helpers.hpp"

Expand Down Expand Up @@ -782,12 +783,11 @@ class TrackStateProxy {
template <typename val_t, typename cov_t>
void allocateCalibrated(const Eigen::DenseBase<val_t>& val,
const Eigen::DenseBase<cov_t>& cov)
requires(Eigen::PlainObjectBase<val_t>::RowsAtCompileTime > 0 &&
Eigen::PlainObjectBase<val_t>::RowsAtCompileTime <= eBoundSize &&
Eigen::PlainObjectBase<val_t>::RowsAtCompileTime ==
Eigen::PlainObjectBase<cov_t>::RowsAtCompileTime &&
Eigen::PlainObjectBase<cov_t>::RowsAtCompileTime ==
Eigen::PlainObjectBase<cov_t>::ColsAtCompileTime)
requires(Concepts::eigen_base_is_fixed_size<val_t> &&
Concepts::eigen_bases_have_same_num_rows<val_t, cov_t> &&
Concepts::eigen_base_is_square<cov_t> &&
Eigen::PlainObjectBase<val_t>::RowsAtCompileTime <=
static_cast<std::underlying_type_t<BoundIndices>>(eBoundSize))
{
m_traj->template allocateCalibrated<
Eigen::PlainObjectBase<val_t>::RowsAtCompileTime>(m_istate, val, cov);
Expand Down
4 changes: 2 additions & 2 deletions Core/include/Acts/EventData/TrackStateProxyConcept.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ using Covariance = Eigen::Map<BoundMatrix>;
using ConstParameters = Eigen::Map<const BoundVector>;
using ConstCovariance = Eigen::Map<const BoundMatrix>;

using Measurement = Eigen::Map<ActsVector<2>>;
using Measurement = Eigen::Map<Vector2>;
using MeasurementCovariance = Eigen::Map<ActsSquareMatrix<2>>;

using ConstMeasurement = Eigen::Map<const ActsVector<2>>;
using ConstMeasurement = Eigen::Map<const Vector2>;
using ConstMeasurementCovariance = Eigen::Map<const ActsSquareMatrix<2>>;

using DynamicMeasurement =
Expand Down
17 changes: 8 additions & 9 deletions Core/include/Acts/EventData/VectorMultiTrajectory.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include "Acts/EventData/Types.hpp"
#include "Acts/EventData/detail/DynamicColumn.hpp"
#include "Acts/EventData/detail/DynamicKeyIterator.hpp"
#include "Acts/Utilities/EigenConcepts.hpp"
#include "Acts/Utilities/HashedString.hpp"
#include "Acts/Utilities/Helpers.hpp"
#include "Acts/Utilities/ThrowAssert.hpp"
Expand Down Expand Up @@ -191,7 +192,7 @@ class VectorMultiTrajectoryBase {
TrackStatePropMask allocMask = TrackStatePropMask::None;
};

VectorMultiTrajectoryBase() = default;
VectorMultiTrajectoryBase() noexcept = default;

VectorMultiTrajectoryBase(const VectorMultiTrajectoryBase& other)
: m_index{other.m_index},
Expand Down Expand Up @@ -387,7 +388,7 @@ class VectorMultiTrajectory final
VectorMultiTrajectory(const VectorMultiTrajectory& other)
: VectorMultiTrajectoryBase{other} {}

VectorMultiTrajectory(VectorMultiTrajectory&& other)
VectorMultiTrajectory(VectorMultiTrajectory&& other) noexcept
: VectorMultiTrajectoryBase{std::move(other)} {}

Statistics statistics() const {
Expand Down Expand Up @@ -495,13 +496,11 @@ class VectorMultiTrajectory final
void allocateCalibrated_impl(IndexType istate,
const Eigen::DenseBase<val_t>& val,
const Eigen::DenseBase<cov_t>& cov)

requires(Eigen::PlainObjectBase<val_t>::RowsAtCompileTime > 0 &&
Eigen::PlainObjectBase<val_t>::RowsAtCompileTime <= eBoundSize &&
Eigen::PlainObjectBase<val_t>::RowsAtCompileTime ==
Eigen::PlainObjectBase<cov_t>::RowsAtCompileTime &&
Eigen::PlainObjectBase<cov_t>::RowsAtCompileTime ==
Eigen::PlainObjectBase<cov_t>::ColsAtCompileTime)
requires(Concepts::eigen_base_is_fixed_size<val_t> &&
Concepts::eigen_bases_have_same_num_rows<val_t, cov_t> &&
Concepts::eigen_base_is_square<cov_t> &&
Eigen::PlainObjectBase<val_t>::RowsAtCompileTime <=
static_cast<std::underlying_type_t<BoundIndices>>(eBoundSize))
{
constexpr std::size_t measdim = val_t::RowsAtCompileTime;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1235,7 +1235,7 @@ class MultiTrajectoryTestsCommon {
auto [par2, cov2] = generateBoundParametersCovariance(rng, {});

ts.allocateCalibrated(3);
BOOST_CHECK_EQUAL(ts.template calibrated<3>(), ActsVector<3>::Zero());
BOOST_CHECK_EQUAL(ts.template calibrated<3>(), Vector3::Zero());
BOOST_CHECK_EQUAL(ts.template calibratedCovariance<3>(),
ActsSquareMatrix<3>::Zero());

Expand Down
6 changes: 3 additions & 3 deletions Core/include/Acts/EventData/detail/TestSourceLink.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ struct TestSourceLink final {
std::size_t sourceId = 0u;
// use eBoundSize to indicate unused indices
std::array<BoundIndices, 2> indices = {eBoundSize, eBoundSize};
Acts::ActsVector<2> parameters;
Acts::Vector2 parameters;
Acts::ActsSquareMatrix<2> covariance;

/// Construct a source link for a 1d measurement.
Expand All @@ -52,10 +52,10 @@ struct TestSourceLink final {
sourceId(sid),
indices{idx, eBoundSize},
parameters(val, 0),
covariance(Acts::ActsVector<2>(var, 0).asDiagonal()) {}
covariance(Acts::Vector2(var, 0).asDiagonal()) {}
/// Construct a source link for a 2d measurement.
TestSourceLink(BoundIndices idx0, BoundIndices idx1,
const Acts::ActsVector<2>& params,
const Acts::Vector2& params,
const Acts::ActsSquareMatrix<2>& cov,
GeometryIdentifier gid = GeometryIdentifier(),
std::size_t sid = 0u)
Expand Down
25 changes: 0 additions & 25 deletions Core/include/Acts/Geometry/CutoutCylinderVolumeBounds.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#include <array>
#include <iosfwd>
#include <memory>
#include <stdexcept>
#include <vector>

namespace Acts {
Expand Down Expand Up @@ -47,8 +46,6 @@ class CutoutCylinderVolumeBounds : public VolumeBounds {
eSize
};

CutoutCylinderVolumeBounds() = delete;

/// Constructor from defining parameters
///
/// @param rmin Minimum radius at the "choke points"
Expand All @@ -73,8 +70,6 @@ class CutoutCylinderVolumeBounds : public VolumeBounds {
buildSurfaceBounds();
}

~CutoutCylinderVolumeBounds() override = default;

VolumeBounds::BoundsType type() const final {
return VolumeBounds::eCutoutCylinder;
}
Expand Down Expand Up @@ -151,24 +146,4 @@ class CutoutCylinderVolumeBounds : public VolumeBounds {
void checkConsistency() noexcept(false);
};

inline std::vector<double> CutoutCylinderVolumeBounds::values() const {
std::vector<double> valvector;
valvector.insert(valvector.begin(), m_values.begin(), m_values.end());
return valvector;
}

inline void CutoutCylinderVolumeBounds::checkConsistency() noexcept(false) {
if (get(eMinR) < 0. || get(eMedR) <= 0. || get(eMaxR) <= 0. ||
get(eMinR) >= get(eMedR) || get(eMinR) >= get(eMaxR) ||
get(eMedR) >= get(eMaxR)) {
throw std::invalid_argument(
"CutoutCylinderVolumeBounds: invalid radial input.");
}
if (get(eHalfLengthZ) <= 0 || get(eHalfLengthZcutout) <= 0. ||
get(eHalfLengthZcutout) > get(eHalfLengthZ)) {
throw std::invalid_argument(
"CutoutCylinderVolumeBounds: invalid longitudinal input.");
}
}

} // namespace Acts
4 changes: 2 additions & 2 deletions Core/include/Acts/Geometry/GeometryHierarchyMap.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,10 @@ class GeometryHierarchyMap {
// defaulted constructors and assignment operators
GeometryHierarchyMap() = default;
GeometryHierarchyMap(const GeometryHierarchyMap&) = default;
GeometryHierarchyMap(GeometryHierarchyMap&&) = default;
GeometryHierarchyMap(GeometryHierarchyMap&&) noexcept = default;
~GeometryHierarchyMap() = default;
GeometryHierarchyMap& operator=(const GeometryHierarchyMap&) = default;
GeometryHierarchyMap& operator=(GeometryHierarchyMap&&) = default;
GeometryHierarchyMap& operator=(GeometryHierarchyMap&&) noexcept = default;

/// Return an iterator pointing to the beginning of the stored values.
Iterator begin() const { return m_values.begin(); }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

#pragma once

#include <memory>
#include <vector>

Expand Down
1 change: 1 addition & 0 deletions Core/include/Acts/Geometry/ITrackingGeometryBuilder.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

#pragma once

#include "Acts/Geometry/GeometryContext.hpp"

#include <memory>
Expand Down
1 change: 1 addition & 0 deletions Core/include/Acts/Geometry/ProtoLayer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

#pragma once

#include "Acts/Geometry/Extent.hpp"
#include "Acts/Geometry/GeometryContext.hpp"
#include "Acts/Surfaces/Surface.hpp"
Expand Down
1 change: 1 addition & 0 deletions Core/include/Acts/MagneticField/BFieldMapUtils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

#pragma once

#include "Acts/Definitions/Algebra.hpp"
#include "Acts/Definitions/Units.hpp"
#include "Acts/MagneticField/InterpolatedBFieldMap.hpp"
Expand Down
16 changes: 1 addition & 15 deletions Core/include/Acts/MagneticField/ConstantBField.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

#pragma once

#include "Acts/Definitions/Algebra.hpp"
#include "Acts/MagneticField/MagneticFieldContext.hpp"
#include "Acts/MagneticField/MagneticFieldProvider.hpp"
Expand Down Expand Up @@ -44,21 +45,6 @@ class ConstantBField final : public MagneticFieldProvider {
return Result<Vector3>::success(m_BField);
}

/// @copydoc MagneticFieldProvider::getFieldGradient(const Vector3&,ActsMatrix<3,3>&,MagneticFieldProvider::Cache&) const
///
/// @note The @p position is ignored and only kept as argument to provide
/// a consistent interface with other magnetic field services.
/// @note currently the derivative is not calculated
/// @todo return derivative
Result<Vector3> getFieldGradient(
const Vector3& position, ActsMatrix<3, 3>& derivative,
MagneticFieldProvider::Cache& cache) const override {
(void)position;
(void)derivative;
(void)cache;
return Result<Vector3>::success(m_BField);
}

/// @copydoc MagneticFieldProvider::makeCache(const MagneticFieldContext&) const
Acts::MagneticFieldProvider::Cache makeCache(
const Acts::MagneticFieldContext& mctx) const override {
Expand Down
13 changes: 0 additions & 13 deletions Core/include/Acts/MagneticField/InterpolatedBFieldMap.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include "Acts/MagneticField/MagneticFieldContext.hpp"
#include "Acts/MagneticField/MagneticFieldError.hpp"
#include "Acts/MagneticField/MagneticFieldProvider.hpp"
#include "Acts/Utilities/Grid.hpp"
#include "Acts/Utilities/Interpolation.hpp"
#include "Acts/Utilities/Result.hpp"

Expand Down Expand Up @@ -309,18 +308,6 @@ class InterpolatedBFieldMap : public InterpolatedMagneticField {
return Result<Vector3>::success((*lcache.fieldCell).getField(gridPosition));
}

/// @copydoc MagneticFieldProvider::getFieldGradient(const Vector3&,ActsMatrix<3,3>&,MagneticFieldProvider::Cache&) const
///
/// @note currently the derivative is not calculated
/// @note Cache is not used currently
/// @todo return derivative
Result<Vector3> getFieldGradient(
const Vector3& position, ActsMatrix<3, 3>& derivative,
MagneticFieldProvider::Cache& cache) const final {
(void)derivative;
return getField(position, cache);
}

private:
Config m_cfg;

Expand Down
Loading

0 comments on commit 6875c42

Please sign in to comment.