File indexing completed on 2026-05-07 07:58:54
0001
0002
0003
0004
0005
0006
0007
0008
0009 #pragma once
0010
0011 #include "Acts/EventData/AnyTrackStateProxy.hpp"
0012 #include "Acts/TrackFitting/MbfSmoother.hpp"
0013
0014 namespace Acts {
0015
0016 template <std::size_t N>
0017 void MbfSmoother::visitMeasurementImpl(const AnyConstTrackStateProxy& ts,
0018 BoundMatrix& bigLambdaHat,
0019 BoundVector& smallLambdaHat) const {
0020 const auto F = ts.jacobian();
0021
0022 const auto subspaceHelper = ts.projectorSubspaceHelper<N>();
0023
0024 using ProjectorMatrix = Eigen::Matrix<double, N, eBoundSize>;
0025 using CovarianceMatrix = Eigen::Matrix<double, N, N>;
0026 using KalmanGainMatrix = Eigen::Matrix<double, eBoundSize, N>;
0027
0028 typename TrackStateTraits<N, true>::Calibrated calibrated{ts.calibrated<N>()};
0029 typename TrackStateTraits<N, true>::CalibratedCovariance calibratedCovariance{
0030 ts.calibratedCovariance<N>()};
0031
0032
0033 const ProjectorMatrix H = subspaceHelper.projector();
0034
0035
0036 const auto predictedCovariance = ts.predictedCovariance();
0037
0038
0039 const CovarianceMatrix S =
0040 (H * predictedCovariance * H.transpose() + calibratedCovariance);
0041
0042 const CovarianceMatrix SInv = S.inverse();
0043
0044
0045
0046 const KalmanGainMatrix K = (predictedCovariance * H.transpose() * SInv);
0047
0048 const Acts::BoundMatrix CHat = (Acts::BoundMatrix::Identity() - K * H);
0049 const Eigen::Matrix<double, N, 1> y = (calibrated - H * ts.predicted());
0050
0051 const Acts::BoundMatrix bigLambdaTilde =
0052 (H.transpose() * SInv * H + CHat.transpose() * bigLambdaHat * CHat);
0053 const Eigen::Matrix<double, eBoundSize, 1> smallLambdaTilde =
0054 (-H.transpose() * SInv * y + CHat.transpose() * smallLambdaHat);
0055
0056 bigLambdaHat = F.transpose() * bigLambdaTilde * F;
0057 smallLambdaHat = F.transpose() * smallLambdaTilde;
0058 }
0059
0060 }