ATLAS Offline Software
Loading...
Searching...
No Matches
ActsTrk::TrackSummaryContainer Class Reference

#include <TrackSummaryContainer.h>

Inheritance diagram for ActsTrk::TrackSummaryContainer:
Collaboration diagram for ActsTrk::TrackSummaryContainer:

Public Types

using IndexType = uint32_t

Public Member Functions

 TrackSummaryContainer (const DataLink< xAOD::TrackSummaryContainer > &lin=nullptr)
constexpr bool hasColumn_impl (Acts::HashedString key) const
 return true if the container has specific decoration
const Acts::Surface * referenceSurface_impl (ActsTrk::IndexType itrack) const
 return pointer to reference surface
Acts::ParticleHypothesis particleHypothesis_impl (IndexType itrack) const
 return pointer to reference surface
std::size_t size_impl () const
 returns number of stored tracks
std::any component_impl (Acts::HashedString key, ActsTrk::IndexType itrack) const
 access to components by pointer with type
ActsTrk::ConstParameters parameters (ActsTrk::IndexType itrack) const
 parameters of the track
ActsTrk::ConstCovariance covariance (ActsTrk::IndexType itrack) const
 covariance of the track fit
void fillFrom (ActsTrk::MutableTrackSummaryContainer &mtb)
void restoreDecorations ()
void decodeSurfaces (const xAOD::TrackSurfaceContainer *src)
std::vector< Acts::HashedString > dynamicKeys_impl () const

Static Public Attributes

static constexpr auto kInvalid = Acts::MultiTrajectoryTraits::kInvalid
static const std::set< std::string > staticVariables
static const std::set< Acts::HashedString > staticVariableHashes

Protected Attributes

DataLink< xAOD::TrackSummaryContainerm_trackBackend = nullptr
std::vector< ActsTrk::detail::Decorationm_decorations
std::vector< std::shared_ptr< const Acts::Surface > > m_surfaces

Friends

template<typename T>
class MutableTrackContainerHandle
class MutableTrackSummaryContainer

Detailed Description

Member Typedef Documentation

◆ IndexType

Constructor & Destructor Documentation

◆ TrackSummaryContainer()

ActsTrk::TrackSummaryContainer::TrackSummaryContainer ( const DataLink< xAOD::TrackSummaryContainer > & lin = nullptr)

Definition at line 28 of file TrackSummaryContainer.cxx.

30 : m_trackBackend(link)
31 {}

Member Function Documentation

◆ component_impl()

std::any ActsTrk::TrackSummaryContainer::component_impl ( Acts::HashedString key,
ActsTrk::IndexType itrack ) const

access to components by pointer with type

Definition at line 79 of file TrackSummaryContainer.cxx.

80 {
81 std::any result = ::component_impl(*m_trackBackend, key, itrack);
82 if (result.has_value()) {
83 return result;
84 }
85 for (auto& d : m_decorations) {
86 if (d.hash == key) {
87 // TODO the dynamic case will be eliminated once we switch to use Aux containers directly
88 return d.getter(m_trackBackend->getStore(), itrack, d.auxid);
89 }
90 }
91 throw std::runtime_error("TrackSummaryContainer no such component " +
92 std::to_string(key));
93}
std::any component_impl(Acts::HashedString key, ActsTrk::IndexType itrack) const
access to components by pointer with type

◆ covariance()

ActsTrk::ConstCovariance ActsTrk::TrackSummaryContainer::covariance ( ActsTrk::IndexType itrack) const

covariance of the track fit

Definition at line 100 of file TrackSummaryContainer.cxx.

101 {
102 return m_trackBackend->at(itrack)->covParamsEigen();
103}

◆ decodeSurfaces()

void ActsTrk::TrackSummaryContainer::decodeSurfaces ( const xAOD::TrackSurfaceContainer * src)

Definition at line 125 of file TrackSummaryContainer.cxx.

125 {
126 m_surfaces.reserve(src->size());
127 for ( auto xAODSurfacePtr: *src) {
128 m_surfaces.push_back( decodeSurface(xAODSurfacePtr));
129 }
130}
std::vector< std::shared_ptr< const Acts::Surface > > m_surfaces
std::shared_ptr< const Acts::Surface > decodeSurface(const xAOD::TrackSurface *backend)
Creates transient Acts Surface objects given a surface backend implementation should be exact mirror ...

◆ dynamicKeys_impl()

std::vector< Acts::HashedString > ActsTrk::TrackSummaryContainer::dynamicKeys_impl ( ) const

Definition at line 114 of file TrackSummaryContainer.cxx.

114 {
115 std::vector<Acts::HashedString> result;
116 for ( const auto& d: m_decorations) {
117 if (staticVariableHashes.count(d.hash) == 1) {
118 continue;
119 }
120 result.push_back(d.hash);
121 }
122 return result;
123}
static const std::set< Acts::HashedString > staticVariableHashes

◆ fillFrom()

void ActsTrk::TrackSummaryContainer::fillFrom ( ActsTrk::MutableTrackSummaryContainer & mtb)

Definition at line 105 of file TrackSummaryContainer.cxx.

106 {
107 m_surfaces = std::move(mtb.m_surfaces);
108}

◆ hasColumn_impl()

bool ActsTrk::TrackSummaryContainer::hasColumn_impl ( Acts::HashedString key) const
constexpr

return true if the container has specific decoration

Definition at line 214 of file Tracking/Acts/ActsEvent/ActsEvent/TrackSummaryContainer.h.

215 {
216 using namespace Acts::HashedStringLiteral;
217 switch (key) {
218 case "params"_hash:
219 case "cov"_hash:
220 case "nMeasurements"_hash:
221 case "nHoles"_hash:
222 case "d0"_hash:
223 case "chi2"_hash:
224 case "ndf"_hash:
225 case "nOutliers"_hash:
226 case "hSharedHits"_hash:
227 case "tipIndex"_hash:
228 case "stemIndex"_hash:
229
230 return true;
231 }
232 for (auto& d : m_decorations) {
233 if (d.hash == key) {
234 return true;
235 }
236 }
237 return false;
238}

◆ parameters()

ActsTrk::ConstParameters ActsTrk::TrackSummaryContainer::parameters ( ActsTrk::IndexType itrack) const

parameters of the track

Definition at line 95 of file TrackSummaryContainer.cxx.

96 {
97 return m_trackBackend->at(itrack)->paramsEigen();
98}

◆ particleHypothesis_impl()

Acts::ParticleHypothesis ActsTrk::TrackSummaryContainer::particleHypothesis_impl ( IndexType itrack) const

return pointer to reference surface

Definition at line 42 of file TrackSummaryContainer.cxx.

42 {
43 return ActsTrk::ParticleHypothesis::convert( static_cast<xAOD::ParticleHypothesis>(m_trackBackend->at(itrack)->particleHypothesis()));
44}
xAOD::ParticleHypothesis convert(Acts::ParticleHypothesis h)

◆ referenceSurface_impl()

const Acts::Surface * ActsTrk::TrackSummaryContainer::referenceSurface_impl ( ActsTrk::IndexType itrack) const

return pointer to reference surface

Definition at line 33 of file TrackSummaryContainer.cxx.

34 {
35 if (itrack >= m_surfaces.size())
36 throw std::out_of_range(
37 "TrackSummaryContainer index out of range when accessing reference "
38 "surface");
39 return m_surfaces[itrack].get();
40}

◆ restoreDecorations()

void ActsTrk::TrackSummaryContainer::restoreDecorations ( )

Definition at line 110 of file TrackSummaryContainer.cxx.

110 {
112}
std::vector< Decoration > restoreDecorations(const SG::IConstAuxStore *container, const std::set< std::string > &staticVariables)

◆ size_impl()

std::size_t ActsTrk::TrackSummaryContainer::size_impl ( ) const

returns number of stored tracks

Definition at line 46 of file TrackSummaryContainer.cxx.

46 {
47 return m_trackBackend->size();
48}

◆ MutableTrackContainerHandle

template<typename T>
friend class MutableTrackContainerHandle
friend

◆ MutableTrackSummaryContainer

Member Data Documentation

◆ kInvalid

auto ActsTrk::TrackSummaryContainer::kInvalid = Acts::MultiTrajectoryTraits::kInvalid
staticconstexpr

◆ m_decorations

std::vector<ActsTrk::detail::Decoration> ActsTrk::TrackSummaryContainer::m_decorations
protected

◆ m_surfaces

std::vector<std::shared_ptr<const Acts::Surface> > ActsTrk::TrackSummaryContainer::m_surfaces
protected

◆ m_trackBackend

DataLink<xAOD::TrackSummaryContainer> ActsTrk::TrackSummaryContainer::m_trackBackend = nullptr
protected

◆ staticVariableHashes

const std::set< Acts::HashedString > ActsTrk::TrackSummaryContainer::staticVariableHashes
static
Initial value:
= [](){
std::set<Acts::HashedString> result;
result.insert(Acts::hashStringDynamic(s));
}
return result;
}()

Definition at line 19 of file Tracking/Acts/ActsEvent/ActsEvent/TrackSummaryContainer.h.

25 {

◆ staticVariables

const std::set< std::string > ActsTrk::TrackSummaryContainer::staticVariables
static
Initial value:
= {
"params", "covParams", "nMeasurements", "nHoles", "chi2f",
"ndf", "nOutliers", "nSharedHits", "tipIndex", "stemIndex",
"particleHypothesis", "surfaceIndex"}

Definition at line 13 of file Tracking/Acts/ActsEvent/ActsEvent/TrackSummaryContainer.h.


The documentation for this class was generated from the following files: