26 #include <type_traits>
27 #include <unordered_map>
36 namespace detail_vtc {
64 template <
bool EnsureConst,
typename T>
67 using namespace Acts::HashedStringLiteral;
68 if constexpr (EnsureConst) {
69 static_assert(std::is_const_v<std::remove_reference_t<T>>,
73 using namespace Acts::HashedStringLiteral;
76 return &instance.m_tipIndex[itrack];
77 case "stemIndex"_hash:
78 return &instance.m_stemIndex[itrack];
79 case "particleHypothesis"_hash:
80 return &instance.m_particleHypothesis[itrack];
82 return &instance.m_params[itrack];
84 return &instance.m_cov[itrack];
85 case "nMeasurements"_hash:
86 return &instance.m_nMeasurements[itrack];
88 return &instance.m_nHoles[itrack];
90 return &instance.m_chi2[itrack];
92 return &instance.m_ndf[itrack];
93 case "nOutliers"_hash:
94 return &instance.m_nOutliers[itrack];
95 case "nSharedHits"_hash:
96 return &instance.m_nSharedHits[itrack];
98 auto it = instance.m_dynamic.find(key);
99 if (
it == instance.m_dynamic.end()) {
100 throw std::runtime_error(
"Unable to handle this component");
104 detail::DynamicColumnBase*>
105 col =
it->second.get();
106 assert(col &&
"Dynamic column is null");
107 return col->get(itrack);
142 result = result &&
col->size() ==
size;
150 using namespace Acts::HashedStringLiteral;
170 std::vector<typename detail_lt::Types<eBoundSize>::Coefficients>
m_params;
181 std::unordered_map<HashedString, std::unique_ptr<detail::DynamicColumnBase>>
196 VectorTrackContainer(
const VectorTrackContainer& other) =
default;
197 VectorTrackContainer(VectorTrackContainer&&) =
default;
199 VectorTrackContainer(
const ConstVectorTrackContainer& other);
205 return detail_vtc::VectorTrackContainerBase::component_impl<false>(
210 return detail_vtc::VectorTrackContainerBase::component_impl<true>(
218 template <
typename T>
221 {
hashString(key), std::make_unique<detail::DynamicColumn<T>>()});
240 void copyDynamicFrom_impl(
IndexType dstIdx,
244 void ensureDynamicColumns_impl(
251 std::shared_ptr<const Surface>
surface) {
255 void setParticleHypothesis_impl(
265 class ConstVectorTrackContainer;
275 ConstVectorTrackContainer(
const ConstVectorTrackContainer& other) =
default;
281 ConstVectorTrackContainer(ConstVectorTrackContainer&&) =
default;
291 return detail_vtc::VectorTrackContainerBase::component_impl<true>(
307 ConstVectorTrackContainer);
312 assert(checkConsistency());