File indexing completed on 2026-01-08 09:22:31
0001
0002
0003
0004
0005
0006
0007
0008
0009 #include "Acts/TrackFitting/detail/GsfUtils.hpp"
0010
0011 #include "Acts/EventData/MeasurementHelpers.hpp"
0012 #include "Acts/EventData/SubspaceHelpers.hpp"
0013 #include "Acts/EventData/Types.hpp"
0014
0015 #include <cstddef>
0016 #include <cstdint>
0017 #include <span>
0018
0019 namespace Acts::detail {
0020
0021 using TrackStateTraits = TrackStateTraits<kMeasurementSizeMax, true>;
0022
0023 double calculateDeterminant(const double* fullCalibratedCovariance,
0024 TrackStateTraits::Covariance predictedCovariance,
0025 BoundSubspaceIndices projector,
0026 unsigned int calibratedSize) {
0027 return visit_measurement(calibratedSize, [&](auto N) {
0028 constexpr std::size_t kMeasurementSize = decltype(N)::value;
0029 std::span<const std::uint8_t, kMeasurementSize> validSubspaceIndices(
0030 projector.begin(), projector.begin() + kMeasurementSize);
0031 FixedBoundSubspaceHelper<kMeasurementSize> subspaceHelper(
0032 validSubspaceIndices);
0033
0034 typename Acts::TrackStateTraits<
0035 kMeasurementSize, true>::CalibratedCovariance calibratedCovariance{
0036 fullCalibratedCovariance};
0037
0038 const auto H = subspaceHelper.projector();
0039
0040 return (H * predictedCovariance * H.transpose() + calibratedCovariance)
0041 .determinant();
0042 });
0043 }
0044 }