ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
Acts::SeedProxy2< read_only > Class Template Reference

A proxy class for accessing individual seeds. More...

#include <Acts/EventData/SeedProxy2.hpp>

Inheritance diagram for Acts::SeedProxy2< read_only >:
[legend]

Classes

class  SpacePointIterator
class  SpacePointRange

Public Types

using ContainerType = const_if_t<ReadOnly, SeedContainer2>
 Type alias for container type (const if read-only).
using IndexType = SeedIndex2
 Type alias for seed index type.

Public Member Functions

 SeedProxy2 (const SeedProxy2 &other) noexcept=default
 Copy construct a seed proxy.
 SeedProxy2 (const SeedProxy2< false > &other) noexcept
 Copy construct a mutable seed proxy.
 SeedProxy2 (ContainerType &container, IndexType index) noexcept
 Constructs a seed proxy for the given container and index.
void assignSpacePointIndices (std::span< const SpacePointIndex2 > spacePointIndices)
 Assigns space point indices to the seed at the given index.
const SeedContainer2container () const noexcept
 Gets the container holding the seed.
SeedContainer2container () noexcept
 Gets the container holding the seed.
bool empty () const noexcept
 Checks if the seed is empty, i.e., has no space points associated with it.
IndexType index () const noexcept
 Gets the index of the seed in the container.
float quality () const noexcept
 Const access to the quality of the seed.
float & quality () noexcept
 Mutable access to the quality of the seed.
std::size_t size () const noexcept
 Returns the size of the seed, i.e., the number of space points associated with it.
std::span< const SpacePointIndex2spacePointIndices () const noexcept
 Const access to the space point indices of the seed.
std::span< SpacePointIndex2spacePointIndices () noexcept
 Mutable access to the space point indices of the seed.
SpacePointRange spacePoints () const
 Get the space points associated with this seed.
SpacePointRange spacePoints (const SpacePointContainer2 &spacePointContainer) const noexcept
 Get the space points associated with this seed using an external space point container.
float vertexZ () const noexcept
 Const access to the vertex Z coordinate of the seed.
float & vertexZ () noexcept
 Mutable access to the vertex Z coordinate of the seed.

Static Public Attributes

static constexpr bool ReadOnly = read_only
 Indicates whether this seed proxy is read-only or if it can be modified.

Detailed Description

template<bool read_only>
class Acts::SeedProxy2< read_only >

A proxy class for accessing individual seeds.

Member Typedef Documentation

◆ ContainerType

template<bool read_only>
using Acts::SeedProxy2< read_only >::ContainerType = const_if_t<ReadOnly, SeedContainer2>

Type alias for container type (const if read-only).

◆ IndexType

template<bool read_only>
using Acts::SeedProxy2< read_only >::IndexType = SeedIndex2

Type alias for seed index type.

Constructor & Destructor Documentation

◆ SeedProxy2() [1/3]

template<bool read_only>
Acts::SeedProxy2< read_only >::SeedProxy2 ( ContainerType & container,
IndexType index )
noexcept

Constructs a seed proxy for the given container and index.

Parameters
containerThe container holding the seed.
indexThe index of the seed in the container.

◆ SeedProxy2() [2/3]

template<bool read_only>
Acts::SeedProxy2< read_only >::SeedProxy2 ( const SeedProxy2< read_only > & other)
defaultnoexcept

Copy construct a seed proxy.

Parameters
otherThe seed proxy to copy.

◆ SeedProxy2() [3/3]

template<bool read_only>
Acts::SeedProxy2< read_only >::SeedProxy2 ( const SeedProxy2< false > & other)
explicitnoexcept

Copy construct a mutable seed proxy.

Parameters
otherThe mutable seed proxy to copy.

Member Function Documentation

◆ assignSpacePointIndices()

template<bool read_only>
void Acts::SeedProxy2< read_only >::assignSpacePointIndices ( std::span< const SpacePointIndex2 > spacePointIndices)

Assigns space point indices to the seed at the given index.

Parameters
spacePointIndicesA span of space point indices to assign to the seed.
Exceptions
std::out_of_rangeif the index is out of range.
std::logic_errorif space point indices are already assigned to the seed.

◆ container() [1/2]

template<bool read_only>
const SeedContainer2 & Acts::SeedProxy2< read_only >::container ( ) const
noexcept

Gets the container holding the seed.

Returns
A const reference to the container holding the seed.

◆ container() [2/2]

template<bool read_only>
SeedContainer2 & Acts::SeedProxy2< read_only >::container ( )
noexcept

Gets the container holding the seed.

Returns
A reference to the container holding the seed.

◆ empty()

template<bool read_only>
bool Acts::SeedProxy2< read_only >::empty ( ) const
nodiscardnoexcept

Checks if the seed is empty, i.e., has no space points associated with it.

Returns
True if the seed is empty, false otherwise.

◆ index()

template<bool read_only>
IndexType Acts::SeedProxy2< read_only >::index ( ) const
noexcept

Gets the index of the seed in the container.

Returns
The index of the seed in the container.

◆ quality() [1/2]

template<bool read_only>
float Acts::SeedProxy2< read_only >::quality ( ) const
noexcept

Const access to the quality of the seed.

Returns
The quality of the seed.

◆ quality() [2/2]

template<bool read_only>
float & Acts::SeedProxy2< read_only >::quality ( )
noexcept

Mutable access to the quality of the seed.

Returns
A mutable reference to the quality of the seed.

◆ size()

template<bool read_only>
std::size_t Acts::SeedProxy2< read_only >::size ( ) const
nodiscardnoexcept

Returns the size of the seed, i.e., the number of space points associated with it.

Returns
The number of space points in the seed.

◆ spacePointIndices() [1/2]

template<bool read_only>
std::span< const SpacePointIndex2 > Acts::SeedProxy2< read_only >::spacePointIndices ( ) const
noexcept

Const access to the space point indices of the seed.

Returns
A span of space point indices associated with the seed. This span is read-only and cannot be modified.

◆ spacePointIndices() [2/2]

template<bool read_only>
std::span< SpacePointIndex2 > Acts::SeedProxy2< read_only >::spacePointIndices ( )
noexcept

Mutable access to the space point indices of the seed.

Returns
A mutable span of space point indices associated with the seed.

◆ spacePoints() [1/2]

template<bool read_only>
SpacePointRange Acts::SeedProxy2< read_only >::spacePoints ( ) const

Get the space points associated with this seed.

The space point container is taken from the seed container.

Returns
Range of space points for this seed

◆ spacePoints() [2/2]

template<bool read_only>
SpacePointRange Acts::SeedProxy2< read_only >::spacePoints ( const SpacePointContainer2 & spacePointContainer) const
noexcept

Get the space points associated with this seed using an external space point container.

Parameters
spacePointContainerExternal container holding all space points
Returns
Range of space points for this seed

◆ vertexZ() [1/2]

template<bool read_only>
float Acts::SeedProxy2< read_only >::vertexZ ( ) const
noexcept

Const access to the vertex Z coordinate of the seed.

Returns
The vertex Z coordinate of the seed.

◆ vertexZ() [2/2]

template<bool read_only>
float & Acts::SeedProxy2< read_only >::vertexZ ( )
noexcept

Mutable access to the vertex Z coordinate of the seed.

Returns
A mutable reference to the vertex Z coordinate of the seed.

Member Data Documentation

◆ ReadOnly

template<bool read_only>
bool Acts::SeedProxy2< read_only >::ReadOnly = read_only
staticconstexpr

Indicates whether this seed proxy is read-only or if it can be modified.