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)
 
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 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 " +
93 }

◆ 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 }

◆ 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 }

◆ 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()

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 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 }

◆ 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.

◆ 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 }

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
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:142
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:79
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:21
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
xAOD::ParticleHypothesis
ParticleHypothesis
Definition: TrackingPrimitives.h:193
python.SystemOfUnits.s
float s
Definition: SystemOfUnits.py:147
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
ActsTrk::decodeSurface
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 ...
Definition: SurfaceEncoding.cxx:136
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37