File indexing completed on 2025-08-06 08:10:01
0001
0002
0003
0004
0005
0006
0007
0008
0009 namespace Acts {
0010 template <typename D, std::size_t M, bool ReadOnly>
0011 inline TrackStateProxy<D, M, ReadOnly>::TrackStateProxy(
0012 detail_lt::ConstIf<MultiTrajectory<D>, ReadOnly>& trajectory,
0013 IndexType istate)
0014 : m_traj(&trajectory), m_istate(istate) {}
0015
0016 template <typename D, std::size_t M, bool ReadOnly>
0017 TrackStatePropMask TrackStateProxy<D, M, ReadOnly>::getMask() const {
0018 using PM = TrackStatePropMask;
0019
0020 PM mask = PM::None;
0021 if (hasPredicted()) {
0022 mask |= PM::Predicted;
0023 }
0024 if (hasFiltered()) {
0025 mask |= PM::Filtered;
0026 }
0027 if (hasSmoothed()) {
0028 mask |= PM::Smoothed;
0029 }
0030 if (hasJacobian()) {
0031 mask |= PM::Jacobian;
0032 }
0033 if (hasCalibrated()) {
0034 mask |= PM::Calibrated;
0035 }
0036 return mask;
0037 }
0038
0039 template <typename D, std::size_t M, bool ReadOnly>
0040 inline auto TrackStateProxy<D, M, ReadOnly>::parameters() const
0041 -> ConstParameters {
0042 if (hasSmoothed()) {
0043 return smoothed();
0044 } else if (hasFiltered()) {
0045 return filtered();
0046 } else {
0047 return predicted();
0048 }
0049 }
0050
0051 template <typename D, std::size_t M, bool ReadOnly>
0052 inline auto TrackStateProxy<D, M, ReadOnly>::covariance() const
0053 -> ConstCovariance {
0054 if (hasSmoothed()) {
0055 return smoothedCovariance();
0056 } else if (hasFiltered()) {
0057 return filteredCovariance();
0058 } else {
0059 return predictedCovariance();
0060 }
0061 }
0062
0063 template <typename D, std::size_t M, bool ReadOnly>
0064 inline auto TrackStateProxy<D, M, ReadOnly>::projector() const -> Projector {
0065 assert(has<hashString("projector")>());
0066 return bitsetToMatrix<Projector>(
0067 component<ProjectorBitset, hashString("projector")>());
0068 }
0069
0070 template <typename D, std::size_t M, bool ReadOnly>
0071 inline auto TrackStateProxy<D, M, ReadOnly>::getUncalibratedSourceLink() const
0072 -> SourceLink {
0073 assert(has<hashString("uncalibratedSourceLink")>());
0074 return m_traj->getUncalibratedSourceLink(m_istate);
0075 }
0076
0077 }