Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:10:50

0001 // This file is part of the ACTS project.
0002 //
0003 // Copyright (C) 2016 CERN for the benefit of the ACTS project
0004 //
0005 // This Source Code Form is subject to the terms of the Mozilla Public
0006 // License, v. 2.0. If a copy of the MPL was not distributed with this
0007 // file, You can obtain one at https://mozilla.org/MPL/2.0/.
0008 
0009 namespace Acts {
0010 
0011 template <typename D, std::size_t M, bool ReadOnly>
0012 inline TrackStateProxy<D, M, ReadOnly>::TrackStateProxy(
0013     detail_lt::ConstIf<MultiTrajectory<D>, ReadOnly>& trajectory,
0014     IndexType istate)
0015     : m_traj(&trajectory), m_istate(istate) {}
0016 
0017 template <typename D, std::size_t M, bool ReadOnly>
0018 TrackStatePropMask TrackStateProxy<D, M, ReadOnly>::getMask() const {
0019   using PM = TrackStatePropMask;
0020 
0021   PM mask = PM::None;
0022   if (hasPredicted()) {
0023     mask |= PM::Predicted;
0024   }
0025   if (hasFiltered()) {
0026     mask |= PM::Filtered;
0027   }
0028   if (hasSmoothed()) {
0029     mask |= PM::Smoothed;
0030   }
0031   if (hasJacobian()) {
0032     mask |= PM::Jacobian;
0033   }
0034   if (hasCalibrated()) {
0035     mask |= PM::Calibrated;
0036   }
0037   return mask;
0038 }
0039 
0040 template <typename D, std::size_t M, bool ReadOnly>
0041 inline auto TrackStateProxy<D, M, ReadOnly>::parameters() const
0042     -> ConstParameters {
0043   if (hasSmoothed()) {
0044     return smoothed();
0045   } else if (hasFiltered()) {
0046     return filtered();
0047   } else {
0048     return predicted();
0049   }
0050 }
0051 
0052 template <typename D, std::size_t M, bool ReadOnly>
0053 inline auto TrackStateProxy<D, M, ReadOnly>::covariance() const
0054     -> ConstCovariance {
0055   if (hasSmoothed()) {
0056     return smoothedCovariance();
0057   } else if (hasFiltered()) {
0058     return filteredCovariance();
0059   } else {
0060     return predictedCovariance();
0061   }
0062 }
0063 
0064 template <typename D, std::size_t M, bool ReadOnly>
0065 inline auto TrackStateProxy<D, M, ReadOnly>::getUncalibratedSourceLink() const
0066     -> SourceLink {
0067   assert(has<hashString("uncalibratedSourceLink")>());
0068   return m_traj->getUncalibratedSourceLink(m_istate);
0069 }
0070 
0071 }  // namespace Acts