Skip to content

Commit

Permalink
Merge branch 'main' into fix/gsf-refit-wrong-outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
kodiakhq[bot] authored Dec 20, 2024
2 parents 26fbffa + 87439ad commit b84b2cd
Show file tree
Hide file tree
Showing 133 changed files with 4,766 additions and 1,530 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
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
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
Loading

0 comments on commit b84b2cd

Please sign in to comment.