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