ATLAS Offline Software
Public Types | Public Member Functions | Static Public Attributes | Protected Attributes | Friends | List of all members
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 More...
 
const Acts::Surface * referenceSurface_impl (ActsTrk::IndexType itrack) const
 return pointer to reference surface More...
 
Acts::ParticleHypothesis particleHypothesis_impl (IndexType itrack) const
 return pointer to reference surface More...
 
std::size_t size_impl () const
 returns number of stored tracks More...
 
std::any component_impl (Acts::HashedString key, ActsTrk::IndexType itrack) const
 access to components by pointer with type More...
 
ActsTrk::ConstParameters parameters (ActsTrk::IndexType itrack) const
 parameters of the track More...
 
ActsTrk::ConstCovariance covariance (ActsTrk::IndexType itrack) const
 covariance of the track fit More...
 
void fillFrom (ActsTrk::MutableTrackSummaryContainer &mtb)
 
void restoreDecorations ()
 
void decodeSurfaces (const xAOD::TrackSurfaceContainer *src, const Acts::GeometryContext &)
 
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

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

Member Typedef Documentation

◆ IndexType

Constructor & Destructor Documentation

◆ TrackSummaryContainer()

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

Definition at line 27 of file TrackSummaryContainer.cxx.

29  : m_trackBackend(link)
30  {}

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 78 of file TrackSummaryContainer.cxx.

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

◆ covariance()

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

covariance of the track fit

Definition at line 99 of file TrackSummaryContainer.cxx.

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

◆ decodeSurfaces()

void ActsTrk::TrackSummaryContainer::decodeSurfaces ( const xAOD::TrackSurfaceContainer src,
const Acts::GeometryContext &  geoContext 
)

Definition at line 124 of file TrackSummaryContainer.cxx.

124  {
125  for ( auto xAODSurfacePtr: *src) {
126  m_surfaces.push_back( decodeSurface(xAODSurfacePtr, geoContext));
127  }
128 }

◆ dynamicKeys_impl()

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

Definition at line 113 of file TrackSummaryContainer.cxx.

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

◆ fillFrom()

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

Definition at line 104 of file TrackSummaryContainer.cxx.

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

◆ hasColumn_impl()

constexpr 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 94 of file TrackSummaryContainer.cxx.

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

◆ particleHypothesis_impl()

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

return pointer to reference surface

Definition at line 41 of file TrackSummaryContainer.cxx.

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

◆ referenceSurface_impl()

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

return pointer to reference surface

Definition at line 32 of file TrackSummaryContainer.cxx.

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

◆ restoreDecorations()

void ActsTrk::TrackSummaryContainer::restoreDecorations ( )

Definition at line 109 of file TrackSummaryContainer.cxx.

◆ size_impl()

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

returns number of stored tracks

Definition at line 45 of file TrackSummaryContainer.cxx.

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

Friends And Related Function Documentation

◆ MutableTrackContainerHandle

template<typename T >
friend class MutableTrackContainerHandle
friend

◆ MutableTrackSummaryContainer

friend class MutableTrackSummaryContainer
friend

Member Data Documentation

◆ kInvalid

constexpr 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 62 of file Tracking/Acts/ActsEvent/ActsEvent/TrackSummaryContainer.h.

◆ 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 61 of file Tracking/Acts/ActsEvent/ActsEvent/TrackSummaryContainer.h.


The documentation for this class was generated from the following files:
ActsTrk::TrackSummaryContainer::m_surfaces
std::vector< std::shared_ptr< const Acts::Surface > > m_surfaces
Definition: Tracking/Acts/ActsEvent/ActsEvent/TrackSummaryContainer.h:115
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
get_generator_info.result
result
Definition: get_generator_info.py:21
ActsTrk::TrackSummaryContainer::staticVariables
static const std::set< std::string > staticVariables
Definition: Tracking/Acts/ActsEvent/ActsEvent/TrackSummaryContainer.h:61
WriteCellNoiseToCool.src
src
Definition: WriteCellNoiseToCool.py:513
hist_file_dump.d
d
Definition: hist_file_dump.py:137
ActsTrk::ParticleHypothesis::convert
xAOD::ParticleHypothesis convert(Acts::ParticleHypothesis h)
Definition: ParticleHypothesisEncoding.cxx:12
ActsTrk::TrackSummaryContainer::component_impl
std::any component_impl(Acts::HashedString key, ActsTrk::IndexType itrack) const
access to components by pointer with type
Definition: TrackSummaryContainer.cxx:78
ActsTrk::TrackSummaryContainer::m_trackBackend
DataLink< xAOD::TrackSummaryContainer > m_trackBackend
Definition: Tracking/Acts/ActsEvent/ActsEvent/TrackSummaryContainer.h:113
ActsTrk::detail::restoreDecorations
std::vector< Decoration > restoreDecorations(const SG::IConstAuxStore *container, const std::set< std::string > &staticVariables)
Definition: Decoration.cxx:9
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
ActsTrk::decodeSurface
std::shared_ptr< const Acts::Surface > decodeSurface(const xAOD::TrackSurface *backend, const Acts::GeometryContext &geoContext)
Creates transient Acts Surface objects given a surface backend implementation should be exact mirror ...
Definition: SurfaceEncoding.cxx:143
xAOD::ParticleHypothesis
ParticleHypothesis
Definition: TrackingPrimitives.h:192
ActsTrk::TrackSummaryContainer::m_decorations
std::vector< ActsTrk::detail::Decoration > m_decorations
Definition: Tracking/Acts/ActsEvent/ActsEvent/TrackSummaryContainer.h:114
ActsTrk::TrackSummaryContainer::staticVariableHashes
static const std::set< Acts::HashedString > staticVariableHashes
Definition: Tracking/Acts/ActsEvent/ActsEvent/TrackSummaryContainer.h:62
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37