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
 Iterator over space points referenced by the seed. More...
class  SpacePointRange
 Range facade for the seed space points. More...

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.
SeedProxy2< true > asConst () const noexcept
 Returns a const proxy of the seed.
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.
template<bool other_read_only>
requires (!ReadOnly)
void copyFrom (const SeedProxy2< other_read_only > &other, SeedColumns columnsToCopy) const
 Copies the specified columns from another seed to this 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.
SeedProxy2operator= (const SeedProxy2 &other) noexcept=default
 Copy assign a seed proxy.
SeedProxy2operator= (const SeedProxy2< false > &other) noexcept
 Copy assign a mutable seed proxy.
SeedProxy2operator= (SeedProxy2 &&other) noexcept=default
 Move assign a seed proxy.
SeedProxy2operator= (SeedProxy2< false > &&other) noexcept
 Move assign a mutable seed proxy.
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.

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

◆ asConst()

template<bool read_only>
SeedProxy2< true > Acts::SeedProxy2< read_only >::asConst ( ) const
noexcept

Returns a const proxy of the seed.

Returns
A const proxy of the seed.

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

◆ copyFrom()

template<bool read_only>
template<bool other_read_only>
requires (!ReadOnly)
void Acts::SeedProxy2< read_only >::copyFrom ( const SeedProxy2< other_read_only > & other,
SeedColumns columnsToCopy ) const

Copies the specified columns from another seed to this seed.

Parameters
otherThe seed proxy to copy from.
columnsToCopyThe columns to copy from the other 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.

◆ operator=() [1/4]

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

Copy assign a seed proxy.

Parameters
otherThe seed proxy to copy.
Returns
Reference to this seed proxy after assignment.

◆ operator=() [2/4]

template<bool read_only>
SeedProxy2 & Acts::SeedProxy2< read_only >::operator= ( const SeedProxy2< false > & other)
noexcept

Copy assign a mutable seed proxy.

Parameters
otherThe mutable seed proxy to copy.
Returns
Reference to this seed proxy after assignment.

◆ operator=() [3/4]

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

Move assign a seed proxy.

Parameters
otherThe seed proxy to move.
Returns
Reference to this seed proxy after assignment.

◆ operator=() [4/4]

template<bool read_only>
SeedProxy2 & Acts::SeedProxy2< read_only >::operator= ( SeedProxy2< false > && other)
noexcept

Move assign a mutable seed proxy.

Parameters
otherThe mutable seed proxy to move.
Returns
Reference to this seed proxy after assignment.

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