Skip to content

Commit

Permalink
Merge branch 'main' of github.com:acts-project/acts into chore-clean-…
Browse files Browse the repository at this point in the history
…some-surface-code
  • Loading branch information
andiwand committed Dec 18, 2024
2 parents 050382c + 32d4bc1 commit 405f7aa
Show file tree
Hide file tree
Showing 54 changed files with 96 additions and 75 deletions.
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
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
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
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
5 changes: 3 additions & 2 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,14 +45,14 @@ class ConstantBField final : public MagneticFieldProvider {
return Result<Vector3>::success(m_BField);
}

/// @copydoc MagneticFieldProvider::getFieldGradient(const Vector3&,ActsMatrix<3,3>&,MagneticFieldProvider::Cache&) const
/// @copydoc MagneticFieldProvider::getFieldGradient(const Vector3&,SquareMatrix3&,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,
const Vector3& position, SquareMatrix3& derivative,
MagneticFieldProvider::Cache& cache) const override {
(void)position;
(void)derivative;
Expand Down
4 changes: 2 additions & 2 deletions Core/include/Acts/MagneticField/InterpolatedBFieldMap.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -308,13 +308,13 @@ class InterpolatedBFieldMap : public InterpolatedMagneticField {
return Result<Vector3>::success((*lcache.fieldCell).getField(gridPosition));
}

/// @copydoc MagneticFieldProvider::getFieldGradient(const Vector3&,ActsMatrix<3,3>&,MagneticFieldProvider::Cache&) const
/// @copydoc MagneticFieldProvider::getFieldGradient(const Vector3&,SquareMatrix3&,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,
const Vector3& position, SquareMatrix3& derivative,
MagneticFieldProvider::Cache& cache) const final {
(void)derivative;
return getField(position, cache);
Expand Down
2 changes: 1 addition & 1 deletion Core/include/Acts/MagneticField/MagneticFieldProvider.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class MagneticFieldProvider {
/// @param [in,out] cache Field provider specific cache object
/// @return magnetic field vector
virtual Result<Vector3> getFieldGradient(const Vector3& position,
ActsMatrix<3, 3>& derivative,
SquareMatrix3& derivative,
Cache& cache) const = 0;

virtual ~MagneticFieldProvider();
Expand Down
3 changes: 2 additions & 1 deletion Core/include/Acts/MagneticField/MultiRangeBField.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/MagneticFieldError.hpp"
Expand Down Expand Up @@ -61,7 +62,7 @@ class MultiRangeBField final : public MagneticFieldProvider {
///
/// @warning This is not currently implemented.
Result<Vector3> getFieldGradient(
const Vector3& position, ActsMatrix<3, 3>& /*unused*/,
const Vector3& position, SquareMatrix3& /*unused*/,
MagneticFieldProvider::Cache& cache) const override;
};
} // namespace Acts
5 changes: 3 additions & 2 deletions Core/include/Acts/MagneticField/NullBField.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 @@ -36,14 +37,14 @@ class NullBField final : public MagneticFieldProvider {
return Result<Vector3>::success(m_BField);
}

/// @copydoc MagneticFieldProvider::getFieldGradient(const Vector3&,ActsMatrix<3,3>&,MagneticFieldProvider::Cache&) const
/// @copydoc MagneticFieldProvider::getFieldGradient(const Vector3&,SquareMatrix3&,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,
const Vector3& position, SquareMatrix3& derivative,
MagneticFieldProvider::Cache& cache) const override {
(void)position;
(void)derivative;
Expand Down
4 changes: 2 additions & 2 deletions Core/include/Acts/MagneticField/SolenoidBField.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,12 @@ class SolenoidBField final : public MagneticFieldProvider {
Result<Vector3> getField(const Vector3& position,
MagneticFieldProvider::Cache& cache) const override;

/// @copydoc MagneticFieldProvider::getFieldGradient(const Vector3&,ActsMatrix<3,3>&,MagneticFieldProvider::Cache&) const
/// @copydoc MagneticFieldProvider::getFieldGradient(const Vector3&,SquareMatrix3&,MagneticFieldProvider::Cache&) const
///
/// @note currently the derivative is not calculated
/// @todo return derivative
Result<Vector3> getFieldGradient(
const Vector3& position, ActsMatrix<3, 3>& derivative,
const Vector3& position, SquareMatrix3& derivative,
MagneticFieldProvider::Cache& cache) const override;

private:
Expand Down
8 changes: 4 additions & 4 deletions Core/include/Acts/Propagator/EigenStepperDefaultExtension.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,10 +175,10 @@ struct EigenStepperDefaultExtension {
auto dGdT = D.block<3, 3>(4, 4);
auto dGdL = D.block<3, 1>(4, 7);

ActsMatrix<3, 3> dk1dT = ActsMatrix<3, 3>::Zero();
ActsMatrix<3, 3> dk2dT = ActsMatrix<3, 3>::Identity();
ActsMatrix<3, 3> dk3dT = ActsMatrix<3, 3>::Identity();
ActsMatrix<3, 3> dk4dT = ActsMatrix<3, 3>::Identity();
SquareMatrix3 dk1dT = SquareMatrix3::Zero();
SquareMatrix3 dk2dT = SquareMatrix3::Identity();
SquareMatrix3 dk3dT = SquareMatrix3::Identity();
SquareMatrix3 dk4dT = SquareMatrix3::Identity();

Vector3 dk1dL = Vector3::Zero();
Vector3 dk2dL = Vector3::Zero();
Expand Down
8 changes: 4 additions & 4 deletions Core/include/Acts/Propagator/EigenStepperDenseExtension.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -263,10 +263,10 @@ struct EigenStepperDenseExtension {
auto dGdT = D.block<3, 3>(4, 4);
auto dGdL = D.block<3, 1>(4, 7);

ActsMatrix<3, 3> dk1dT = ActsMatrix<3, 3>::Zero();
ActsMatrix<3, 3> dk2dT = ActsMatrix<3, 3>::Identity();
ActsMatrix<3, 3> dk3dT = ActsMatrix<3, 3>::Identity();
ActsMatrix<3, 3> dk4dT = ActsMatrix<3, 3>::Identity();
SquareMatrix3 dk1dT = SquareMatrix3::Zero();
SquareMatrix3 dk2dT = SquareMatrix3::Identity();
SquareMatrix3 dk3dT = SquareMatrix3::Identity();
SquareMatrix3 dk4dT = SquareMatrix3::Identity();

Vector3 dk1dL = Vector3::Zero();
Vector3 dk2dL = Vector3::Zero();
Expand Down
1 change: 1 addition & 0 deletions Core/include/Acts/Seeding/HoughTransformUtils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
/// This file implements the tools for a hough transform.

#pragma once

#include "Acts/Utilities/Delegate.hpp"
#include "Acts/Utilities/Grid.hpp"
#include "Acts/Utilities/Logger.hpp"
Expand Down
3 changes: 2 additions & 1 deletion Core/include/Acts/Surfaces/DiscTrapezoidBounds.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/Surfaces/BoundaryTolerance.hpp"
#include "Acts/Surfaces/DiscBounds.hpp"
Expand Down Expand Up @@ -165,7 +166,7 @@ class DiscTrapezoidBounds : public DiscBounds {
/// into its Cartesian representation
///
/// @param lposition The local position in polar coordinates
ActsMatrix<2, 2> jacobianToLocalCartesian(const Vector2& lposition) const;
SquareMatrix2 jacobianToLocalCartesian(const Vector2& lposition) const;
};

} // namespace Acts
1 change: 1 addition & 0 deletions Core/include/Acts/Utilities/BinnedArray.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
///////////////////////////////////////////////////////////////////

#pragma once

#include "Acts/Definitions/Algebra.hpp"
#include "Acts/Utilities/BinUtility.hpp"

Expand Down
1 change: 1 addition & 0 deletions Core/include/Acts/Utilities/BinnedArrayXD.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
///////////////////////////////////////////////////////////////////

#pragma once

#include "Acts/Utilities/BinUtility.hpp"
#include "Acts/Utilities/BinnedArray.hpp"
#include "Acts/Utilities/Helpers.hpp"
Expand Down
1 change: 1 addition & 0 deletions Core/include/Acts/Utilities/BinningType.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 <string>
#include <type_traits>
#include <vector>
Expand Down
2 changes: 1 addition & 1 deletion Core/include/Acts/Utilities/HashedString.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ constexpr HashedString hashStringDynamic(std::string_view s) {
}

namespace HashedStringLiteral {
constexpr HashedString operator"" _hash(char const* s, std::size_t count) {
constexpr HashedString operator""_hash(char const* s, std::size_t count) {
return detail::fnv1a_32(s, count);
}

Expand Down
1 change: 1 addition & 0 deletions Core/include/Acts/Utilities/ThrowAssert.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 <exception>
#include <iostream>
#include <sstream>
Expand Down
4 changes: 2 additions & 2 deletions Core/include/Acts/Utilities/VectorHelpers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,8 @@ inline double cast(const Vector3& position, BinningValue bval) {
/// @param [in] m Matrix that will be used for cross products
/// @param [in] v Vector for cross products
/// @return Constructed matrix
inline ActsMatrix<3, 3> cross(const ActsMatrix<3, 3>& m, const Vector3& v) {
ActsMatrix<3, 3> r;
inline SquareMatrix3 cross(const SquareMatrix3& m, const Vector3& v) {
SquareMatrix3 r;
r.col(0) = m.col(0).cross(v);
r.col(1) = m.col(1).cross(v);
r.col(2) = m.col(2).cross(v);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
///////////////////////////////////////////////////////////////////

#pragma once

#include <cmath>
#include <utility>

Expand Down
1 change: 1 addition & 0 deletions Core/include/Acts/Vertexing/AdaptiveGridTrackDensity.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/EventData/TrackParameters.hpp"
#include "Acts/Utilities/Result.hpp"
Expand Down
1 change: 1 addition & 0 deletions Core/include/Acts/Vertexing/GaussianGridTrackDensity.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/EventData/TrackParameters.hpp"
#include "Acts/Utilities/Result.hpp"
Expand Down
2 changes: 1 addition & 1 deletion Core/src/MagneticField/MultiRangeBField.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ Result<Vector3> MultiRangeBField::getField(
}

Result<Vector3> MultiRangeBField::getFieldGradient(
const Vector3& position, ActsMatrix<3, 3>& /*unused*/,
const Vector3& position, SquareMatrix3& /*unused*/,
MagneticFieldProvider::Cache& cache) const {
return getField(position, cache);
}
Expand Down
Loading

0 comments on commit 405f7aa

Please sign in to comment.