ATLAS Offline Software
Loading...
Searching...
No Matches
ActsTrk::SeedContainer Struct Referencefinal

#include <SeedContainer.h>

Collaboration diagram for ActsTrk::SeedContainer:

Public Types

using Index = Acts::SeedIndex2
using value_type = Seed
using const_iterator

Public Member Functions

std::size_t size () const noexcept
bool empty () const noexcept
void reserve (std::size_t size, float averageSpacePoints=3) noexcept
void clear () noexcept
Seed operator[] (Index index) const noexcept
Seed at (Index index) const
SpacePointRange spacePoints (Index index) const noexcept
float quality (Index index) const noexcept
float vertexZ (Index index) const noexcept
const_iterator begin () const noexcept
const_iterator end () const noexcept
Seed push_back (SpacePointRange spacePoints, float quality, float vertexZ)
template<typename arbitrary_sp_range_t, typename xaod_sp_ptr_projector_t>
Seed push_back (const arbitrary_sp_range_t &arbitrarySpacePoints, const xaod_sp_ptr_projector_t &xAODspProjector, float quality, float vertexZ)
Seed push_back (SpacePointRange spacePoints, const Acts::ConstSeedProxy2 &seed)
template<typename xaod_sp_ptr_projector_t>
Seed push_back (const Acts::ConstSeedProxy2 &seed, const xaod_sp_ptr_projector_t &xAODspProjector)
template<typename arbitrary_sp_range_t, typename xaod_sp_ptr_projector_t>
Seed push_back (const arbitrary_sp_range_t &arbitrarySpacePoints, const xaod_sp_ptr_projector_t &xAODspProjector, const Acts::ConstSeedProxy2 &seed)

Private Member Functions

void push_back_ (std::size_t nSpacePoints, float quality, float vertexZ)

Private Attributes

std::uint32_t m_size {0}
std::vector< std::uint32_t > m_spacePointOffsets
std::vector< std::uint8_t > m_spacePointCounts
std::vector< float > m_qualities
std::vector< float > m_vertexZs
std::vector< const xAOD::SpacePoint * > m_spacePoints

Detailed Description

Definition at line 66 of file SeedContainer.h.

Member Typedef Documentation

◆ const_iterator

Initial value:
Acts::detail::ContainerIterator<SeedContainer, Seed, Index, true>

Definition at line 104 of file SeedContainer.h.

◆ Index

using ActsTrk::SeedContainer::Index = Acts::SeedIndex2

Definition at line 67 of file SeedContainer.h.

◆ value_type

Definition at line 68 of file SeedContainer.h.

Member Function Documentation

◆ at()

Seed ActsTrk::SeedContainer::at ( Index index) const
inline

Definition at line 89 of file SeedContainer.h.

89 {
90 if (index >= size()) {
91 throw std::out_of_range("SeedContainer index out of range");
92 }
93 return Seed(*this, index);
94 }
std::size_t size() const noexcept

◆ begin()

const_iterator ActsTrk::SeedContainer::begin ( ) const
inlinenoexcept

Definition at line 107 of file SeedContainer.h.

107{ return const_iterator(*this, 0); }
Acts::detail::ContainerIterator< SeedContainer, Seed, Index, true > const_iterator

◆ clear()

void ActsTrk::SeedContainer::clear ( )
inlinenoexcept

Definition at line 79 of file SeedContainer.h.

79 {
80 m_size = 0;
81 m_spacePointOffsets.clear();
82 m_spacePointCounts.clear();
83 m_qualities.clear();
84 m_vertexZs.clear();
85 m_spacePoints.clear();
86 }
std::vector< std::uint8_t > m_spacePointCounts
std::vector< const xAOD::SpacePoint * > m_spacePoints
std::vector< float > m_qualities
std::vector< float > m_vertexZs
std::vector< std::uint32_t > m_spacePointOffsets

◆ empty()

bool ActsTrk::SeedContainer::empty ( ) const
inlinenoexcept

Definition at line 71 of file SeedContainer.h.

71{ return size() == 0; }

◆ end()

const_iterator ActsTrk::SeedContainer::end ( ) const
inlinenoexcept

Definition at line 108 of file SeedContainer.h.

108{ return const_iterator(*this, size()); }

◆ operator[]()

Seed ActsTrk::SeedContainer::operator[] ( Index index) const
inlinenoexcept

Definition at line 88 of file SeedContainer.h.

88{ return Seed(*this, index); }

◆ push_back() [1/5]

template<typename xaod_sp_ptr_projector_t>
Seed ActsTrk::SeedContainer::push_back ( const Acts::ConstSeedProxy2 & seed,
const xaod_sp_ptr_projector_t & xAODspProjector )
inline

Definition at line 136 of file SeedContainer.h.

137 {
138 return push_back(seed.spacePointIndices(), xAODspProjector, seed);
139 }
Seed push_back(SpacePointRange spacePoints, float quality, float vertexZ)

◆ push_back() [2/5]

template<typename arbitrary_sp_range_t, typename xaod_sp_ptr_projector_t>
Seed ActsTrk::SeedContainer::push_back ( const arbitrary_sp_range_t & arbitrarySpacePoints,
const xaod_sp_ptr_projector_t & xAODspProjector,
const Acts::ConstSeedProxy2 & seed )
inline

Definition at line 142 of file SeedContainer.h.

144 {
145 return push_back(arbitrarySpacePoints, xAODspProjector, seed.quality(),
146 seed.vertexZ());
147 }

◆ push_back() [3/5]

template<typename arbitrary_sp_range_t, typename xaod_sp_ptr_projector_t>
Seed ActsTrk::SeedContainer::push_back ( const arbitrary_sp_range_t & arbitrarySpacePoints,
const xaod_sp_ptr_projector_t & xAODspProjector,
float quality,
float vertexZ )
inline

Definition at line 120 of file SeedContainer.h.

122 {
123 push_back_(arbitrarySpacePoints.size(), quality, vertexZ);
124 std::ranges::copy(
125 std::views::transform(arbitrarySpacePoints, xAODspProjector),
126 std::back_inserter(m_spacePoints));
127 return at(m_size++);
128 }
Seed at(Index index) const
void push_back_(std::size_t nSpacePoints, float quality, float vertexZ)
float quality(Index index) const noexcept
float vertexZ(Index index) const noexcept

◆ push_back() [4/5]

Seed ActsTrk::SeedContainer::push_back ( SpacePointRange spacePoints,
const Acts::ConstSeedProxy2 & seed )
inline

Definition at line 130 of file SeedContainer.h.

131 {
132 return push_back(spacePoints, seed.quality(), seed.vertexZ());
133 }
SpacePointRange spacePoints(Index index) const noexcept

◆ push_back() [5/5]

Seed ActsTrk::SeedContainer::push_back ( SpacePointRange spacePoints,
float quality,
float vertexZ )
inline

Definition at line 112 of file SeedContainer.h.

112 {
114 m_spacePoints.insert(m_spacePoints.end(), spacePoints.begin(),
115 spacePoints.end());
116 return at(m_size++);
117 }

◆ push_back_()

void ActsTrk::SeedContainer::push_back_ ( std::size_t nSpacePoints,
float quality,
float vertexZ )
inlineprivate

Definition at line 158 of file SeedContainer.h.

158 {
159 const std::uint32_t offset =
160 static_cast<std::uint32_t>(m_spacePoints.size());
161 const std::uint8_t count = static_cast<std::uint8_t>(nSpacePoints);
162
163 m_spacePointOffsets.push_back(offset);
164 m_spacePointCounts.push_back(count);
165 m_qualities.push_back(quality);
166 m_vertexZs.push_back(vertexZ);
167 }
int count(std::string s, const std::string &regx)
count how many occurances of a regx are in a string
Definition hcg.cxx:148

◆ quality()

float ActsTrk::SeedContainer::quality ( Index index) const
inlinenoexcept

Definition at line 101 of file SeedContainer.h.

101{ return m_qualities[index]; }
str index
Definition DeMoScan.py:362

◆ reserve()

void ActsTrk::SeedContainer::reserve ( std::size_t size,
float averageSpacePoints = 3 )
inlinenoexcept

Definition at line 72 of file SeedContainer.h.

72 {
74 m_spacePointCounts.reserve(size);
75 m_qualities.reserve(size);
76 m_vertexZs.reserve(size);
77 m_spacePoints.reserve(static_cast<std::size_t>(size * averageSpacePoints));
78 }

◆ size()

std::size_t ActsTrk::SeedContainer::size ( ) const
inlinenoexcept

Definition at line 70 of file SeedContainer.h.

70{ return m_size; }

◆ spacePoints()

SpacePointRange ActsTrk::SeedContainer::spacePoints ( Index index) const
inlinenoexcept

Definition at line 96 of file SeedContainer.h.

96 {
97 const std::uint32_t offset = m_spacePointOffsets[index];
98 const std::uint8_t count = m_spacePointCounts[index];
99 return SpacePointRange(m_spacePoints.data() + offset, count);
100 }

◆ vertexZ()

float ActsTrk::SeedContainer::vertexZ ( Index index) const
inlinenoexcept

Definition at line 102 of file SeedContainer.h.

102{ return m_vertexZs[index]; }

Member Data Documentation

◆ m_qualities

std::vector<float> ActsTrk::SeedContainer::m_qualities
private

Definition at line 153 of file SeedContainer.h.

◆ m_size

std::uint32_t ActsTrk::SeedContainer::m_size {0}
private

Definition at line 150 of file SeedContainer.h.

150{0};

◆ m_spacePointCounts

std::vector<std::uint8_t> ActsTrk::SeedContainer::m_spacePointCounts
private

Definition at line 152 of file SeedContainer.h.

◆ m_spacePointOffsets

std::vector<std::uint32_t> ActsTrk::SeedContainer::m_spacePointOffsets
private

Definition at line 151 of file SeedContainer.h.

◆ m_spacePoints

std::vector<const xAOD::SpacePoint*> ActsTrk::SeedContainer::m_spacePoints
private

Definition at line 156 of file SeedContainer.h.

◆ m_vertexZs

std::vector<float> ActsTrk::SeedContainer::m_vertexZs
private

Definition at line 154 of file SeedContainer.h.


The documentation for this struct was generated from the following file: