File indexing completed on 2025-01-18 09:11: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 =
0022 TrackStateTraits<MultiTrajectoryTraits::MeasurementSizeMax, true>;
0023
0024 double calculateDeterminant(const double* fullCalibratedCovariance,
0025 TrackStateTraits::Covariance predictedCovariance,
0026 BoundSubspaceIndices projector,
0027 unsigned int calibratedSize) {
0028 return visit_measurement(calibratedSize, [&](auto N) {
0029 constexpr std::size_t kMeasurementSize = decltype(N)::value;
0030 std::span<const std::uint8_t, kMeasurementSize> validSubspaceIndices(
0031 projector.begin(), projector.begin() + kMeasurementSize);
0032 FixedBoundSubspaceHelper<kMeasurementSize> subspaceHelper(
0033 validSubspaceIndices);
0034
0035 typename Acts::TrackStateTraits<
0036 kMeasurementSize, true>::CalibratedCovariance calibratedCovariance{
0037 fullCalibratedCovariance};
0038
0039 const auto H = subspaceHelper.projector();
0040
0041 return (H * predictedCovariance * H.transpose() + calibratedCovariance)
0042 .determinant();
0043 });
0044 }
0045 }