Skip to content

Commit

Permalink
Merge branch 'main' into adye-ckf01
Browse files Browse the repository at this point in the history
  • Loading branch information
kodiakhq[bot] authored Oct 9, 2024
2 parents f5a07f8 + 333d1a2 commit fab3056
Show file tree
Hide file tree
Showing 17 changed files with 32 additions and 50 deletions.
2 changes: 1 addition & 1 deletion Core/include/Acts/EventData/Seed.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
namespace Acts {

template <typename external_spacepoint_t, std::size_t N = 3ul>
requires(N >= 3)
requires(N >= 3ul)
class Seed {
public:
using value_type = external_spacepoint_t;
Expand Down
12 changes: 6 additions & 6 deletions Core/include/Acts/EventData/Seed.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -9,40 +9,40 @@
namespace Acts {

template <typename external_spacepoint_t, std::size_t N>
requires(N >= 3)
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 >= 3)
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 >= 3)
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 >= 3)
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 >= 3)
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 >= 3)
requires(N >= 3ul)
float Seed<external_spacepoint_t, N>::seedQuality() const {
return m_seedQuality;
}
Expand Down
1 change: 0 additions & 1 deletion Core/include/Acts/EventData/SourceLink.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

#include <cassert>
#include <concepts>
#include <iostream>
#include <type_traits>
#include <utility>

Expand Down
3 changes: 2 additions & 1 deletion Core/include/Acts/EventData/TrackStateProxy.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1043,8 +1043,9 @@ class TrackStateProxy {
jacobian() = other.jacobian();
}

// NOTE: we should not check hasCalibrated on this, since it
// may be not yet allocated
if (ACTS_CHECK_BIT(mask, PM::Calibrated) &&
has<hashString("calibrated")>() &&
other.template has<hashString("calibrated")>()) {
allocateCalibrated(other.calibratedSize());

Expand Down
2 changes: 0 additions & 2 deletions Core/include/Acts/Seeding/EstimateTrackParamsFromSeed.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

#include "Acts/Definitions/TrackParametrization.hpp"
#include "Acts/Definitions/Units.hpp"
#include "Acts/EventData/Seed.hpp"
#include "Acts/Geometry/GeometryContext.hpp"
#include "Acts/Surfaces/Surface.hpp"
#include "Acts/Utilities/Logger.hpp"
Expand All @@ -20,7 +19,6 @@
#include <iostream>
#include <iterator>
#include <optional>
#include <vector>

namespace Acts {
/// @todo:
Expand Down
13 changes: 0 additions & 13 deletions Core/include/Acts/TrackFinding/CombinatorialKalmanFilter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,43 +11,30 @@
// Workaround for building on clang+libstdc++
#include "Acts/Utilities/detail/ReferenceWrapperAnyCompat.hpp"

#include "Acts/Definitions/Algebra.hpp"
#include "Acts/Definitions/Common.hpp"
#include "Acts/EventData/MeasurementHelpers.hpp"
#include "Acts/EventData/MultiTrajectory.hpp"
#include "Acts/EventData/MultiTrajectoryHelpers.hpp"
#include "Acts/EventData/ProxyAccessor.hpp"
#include "Acts/EventData/TrackContainer.hpp"
#include "Acts/EventData/TrackParameters.hpp"
#include "Acts/EventData/TrackStatePropMask.hpp"
#include "Acts/EventData/Types.hpp"
#include "Acts/Geometry/GeometryContext.hpp"
#include "Acts/MagneticField/MagneticFieldContext.hpp"
#include "Acts/Material/MaterialSlab.hpp"
#include "Acts/Propagator/ActorList.hpp"
#include "Acts/Propagator/ConstrainedStep.hpp"
#include "Acts/Propagator/Propagator.hpp"
#include "Acts/Propagator/StandardAborters.hpp"
#include "Acts/Propagator/detail/LoopProtection.hpp"
#include "Acts/Propagator/detail/PointwiseMaterialInteraction.hpp"
#include "Acts/Surfaces/BoundaryTolerance.hpp"
#include "Acts/TrackFinding/CombinatorialKalmanFilterError.hpp"
#include "Acts/TrackFitting/KalmanFitter.hpp"
#include "Acts/TrackFitting/detail/VoidFitterComponents.hpp"
#include "Acts/Utilities/CalibrationContext.hpp"
#include "Acts/Utilities/HashedString.hpp"
#include "Acts/Utilities/Logger.hpp"
#include "Acts/Utilities/Result.hpp"
#include "Acts/Utilities/TrackHelpers.hpp"
#include "Acts/Utilities/Zip.hpp"

#include <functional>
#include <limits>
#include <memory>
#include <ranges>
#include <string_view>
#include <type_traits>
#include <unordered_map>

namespace Acts {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,10 @@

#pragma once

#include "Acts/EventData/MultiTrajectory.hpp"
#include "Acts/EventData/SourceLink.hpp"
#include "Acts/EventData/TrackContainer.hpp"
#include "Acts/EventData/TrackProxy.hpp"
#include "Acts/EventData/VectorMultiTrajectory.hpp"
#include "Acts/EventData/VectorTrackContainer.hpp"
#include "Acts/Geometry/TrackingGeometry.hpp"
#include "Acts/TrackFinding/CombinatorialKalmanFilter.hpp"
#include "Acts/TrackFinding/MeasurementSelector.hpp"
Expand All @@ -28,11 +26,9 @@
#include "ActsExamples/Framework/DataHandle.hpp"
#include "ActsExamples/Framework/IAlgorithm.hpp"
#include "ActsExamples/Framework/ProcessCode.hpp"
#include "ActsExamples/MagneticField/MagneticField.hpp"

#include <atomic>
#include <cstddef>
#include <functional>
#include <limits>
#include <memory>
#include <optional>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,10 @@
#include "Acts/Surfaces/Surface.hpp"
#include "Acts/TrackFinding/CombinatorialKalmanFilter.hpp"
#include "Acts/TrackFitting/GainMatrixUpdater.hpp"
#include "Acts/TrackFitting/KalmanFitter.hpp"
#include "Acts/Utilities/Delegate.hpp"
#include "Acts/Utilities/Enumerate.hpp"
#include "Acts/Utilities/Logger.hpp"
#include "Acts/Utilities/TrackHelpers.hpp"
#include "ActsExamples/EventData/IndexSourceLink.hpp"
#include "ActsExamples/EventData/Measurement.hpp"
#include "ActsExamples/EventData/MeasurementCalibration.hpp"
#include "ActsExamples/EventData/SimSeed.hpp"
#include "ActsExamples/EventData/Track.hpp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,17 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

#include "Acts/Definitions/Direction.hpp"
#include "Acts/EventData/MultiTrajectory.hpp"
#include "Acts/EventData/TrackContainer.hpp"
#include "Acts/EventData/TrackStatePropMask.hpp"
#include "Acts/EventData/VectorMultiTrajectory.hpp"
#include "Acts/EventData/VectorTrackContainer.hpp"
#include "Acts/Propagator/Navigator.hpp"
#include "Acts/Propagator/Propagator.hpp"
#include "Acts/Propagator/SympyStepper.hpp"
#include "Acts/TrackFinding/CombinatorialKalmanFilter.hpp"
#include "Acts/TrackFitting/GainMatrixSmoother.hpp"
#include "Acts/Utilities/Logger.hpp"
#include "ActsExamples/EventData/Track.hpp"
#include "ActsExamples/TrackFinding/TrackFindingAlgorithm.hpp"

#include <algorithm>
#include <map>
#include <memory>
#include <utility>
#include <vector>

namespace Acts {
class MagneticFieldProvider;
Expand Down Expand Up @@ -53,7 +44,7 @@ struct TrackFinderFunctionImpl
ActsExamples::TrackProxy rootBranch) const override {
return trackFinder.findTracks(initialParameters, options, tracks,
rootBranch);
};
}
};

} // namespace
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,9 @@

#include "Acts/Definitions/Algebra.hpp"
#include "Acts/Definitions/TrackParametrization.hpp"
#include "Acts/EventData/ParticleHypothesis.hpp"
#include "Acts/EventData/Seed.hpp"
#include "Acts/EventData/SourceLink.hpp"
#include "Acts/Geometry/GeometryIdentifier.hpp"
#include "Acts/Geometry/TrackingGeometry.hpp"
#include "Acts/MagneticField/MagneticFieldProvider.hpp"
#include "Acts/Seeding/EstimateTrackParamsFromSeed.hpp"
#include "Acts/Surfaces/Surface.hpp"
#include "Acts/Utilities/Result.hpp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#include <algorithm>
#include <memory>
#include <stdexcept>
#include <utility>

#include <DD4hep/Detector.h>
#include <DD4hep/Handle.h>
Expand Down
1 change: 1 addition & 0 deletions Examples/Framework/ML/src/NeuralCalibrator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include "Acts/Utilities/CalibrationContext.hpp"
#include "Acts/Utilities/Helpers.hpp"
#include "Acts/Utilities/UnitVectors.hpp"
#include "ActsExamples/EventData/IndexSourceLink.hpp"
#include "ActsExamples/EventData/Measurement.hpp"

#include <TFile.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#include "Acts/Geometry/GeometryContext.hpp"
#include "Acts/Utilities/CalibrationContext.hpp"
#include "ActsExamples/EventData/Cluster.hpp"
#include "ActsExamples/EventData/IndexSourceLink.hpp"
#include <ActsExamples/EventData/Measurement.hpp>

#include <cassert>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include "Acts/EventData/Seed.hpp"
#include "ActsExamples/EventData/SimSpacePoint.hpp"

#include <map>
#include <vector>

namespace ActsExamples {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
#include <Acts/MagneticField/MagneticFieldContext.hpp>
#include <Acts/Utilities/CalibrationContext.hpp>

#include <memory>

namespace ActsExamples {

class WhiteBoard;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class IAlgorithm : public SequenceElement {
/// @param context The algorithm context
ProcessCode internalExecute(const AlgorithmContext& context) final {
return execute(context);
};
}

/// Initialize the algorithm
ProcessCode initialize() override { return ProcessCode::SUCCESS; }
Expand Down
20 changes: 20 additions & 0 deletions Tests/UnitTests/Core/EventData/TrackTestsExtra.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -447,4 +447,24 @@ BOOST_AUTO_TEST_CASE(ReverseTrackStates) {
}
}

BOOST_AUTO_TEST_CASE(CopyTrackProxyCalibrated) {
VectorTrackContainer vtc{};
VectorMultiTrajectory mtj{};
TrackContainer tc{vtc, mtj};

constexpr static std::size_t kMeasurementSize = 3;

auto track1 = tc.makeTrack();
auto ts = track1.appendTrackState(TrackStatePropMask::Calibrated);
ts.allocateCalibrated(kMeasurementSize);
ts.calibrated<kMeasurementSize>() = Vector3::Ones();
ts.calibratedCovariance<kMeasurementSize>() = SquareMatrix3::Identity();
ts.setSubspaceIndices(BoundSubspaceIndices{});

auto tsCopy = track1.appendTrackState(TrackStatePropMask::Calibrated);
tsCopy.copyFrom(ts, TrackStatePropMask::Calibrated, false);

BOOST_CHECK_EQUAL(ts.calibratedSize(), tsCopy.calibratedSize());
}

BOOST_AUTO_TEST_SUITE_END()

0 comments on commit fab3056

Please sign in to comment.