ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
Acts::SeedContainer2 Class Reference

A container of seeds. More...

#include <Acts/EventData/SeedContainer2.hpp>

Public Types

using const_iterator = Iterator<true>
 Type alias for const iterator over seeds.
using ConstProxy = ConstSeedProxy2
 Type alias for const seed proxy.
using Index = SeedIndex2
 Type alias for seed index type.
template<bool read_only>
using Iterator
 Type alias for iterator template over seed container.
using iterator = Iterator<false>
 Type alias for mutable iterator over seeds.
using MutableProxy = MutableSeedProxy2
 Type alias for mutable seed proxy.

Public Member Functions

 SeedContainer2 () noexcept
 Constructs and empty seed container.
 SeedContainer2 (const SeedContainer2 &other) noexcept
 Constructs a copy of the given seed container.
 SeedContainer2 (SeedContainer2 &&other) noexcept
 Move constructs a seed container.
 ~SeedContainer2 () noexcept=default
 Detructs the seed container.
void assignSpacePointContainer (const SpacePointContainer2 &spacePointContainer) noexcept
 Assigns the const space point container to be used by this seed container by const reference.
void assignSpacePointContainer (const std::shared_ptr< const SpacePointContainer2 > &spacePointContainer) noexcept
 Assigns the const space point container to be used by this seed container by shared pointer.
void assignSpacePointContainer (const std::shared_ptr< SpacePointContainer2 > &spacePointContainer) noexcept
 Assigns the mutable space point container to be used by this seed container by shared pointer.
void assignSpacePointContainer (SpacePointContainer2 &spacePointContainer) noexcept
 Assigns the mutable space point container to be used by this seed container by reference.
void assignSpacePointContainer (SpacePointContainer2 spacePointContainer) noexcept
 Assigns the mutable space point container to be used by this seed container by value.
void assignSpacePointIndices (Index index, std::span< const SpacePointIndex2 > spacePointIndices)
 Assigns space point indices to the seed at the given index.
MutableProxy at (Index index)
 Returns a mutable proxy to the seed at the given index.
ConstProxy at (Index index) const
 Returns a const proxy to the seed at the given index.
const_iterator begin () const noexcept
 Get const iterator to the beginning of seeds.
iterator begin () noexcept
 Get mutable iterator to the beginning of seeds.
void clear () noexcept
 Clears the seed container, removing all seeds and space points.
MutableProxy createSeed () noexcept
 Creates a new seed.
bool empty () const noexcept
 Checks if the seed container is empty.
const_iterator end () const noexcept
 Get const iterator to the end of seeds.
iterator end () noexcept
 Get mutable iterator to the end of seeds.
bool hasMutableSpacePointContainer () const noexcept
 Checks if a mutable space point container has been assigned to this seed container.
bool hasSpacePointContainer () const noexcept
 Checks if a space point container has been assigned to this seed container.
SpacePointContainer2mutableSpacePointContainer ()
 Returns a mutable reference to the assigned space point container.
SeedContainer2operator= (const SeedContainer2 &other) noexcept
 Assignment operator for copying a seed container.
SeedContainer2operator= (SeedContainer2 &&other) noexcept
 Move assignment operator for a seed container.
ConstProxy operator[] (Index index) const noexcept
 Returns a const proxy to the seed at the given index.
MutableProxy operator[] (Index index) noexcept
 Returns a mutable proxy to the seed at the given index.
float quality (Index index) const noexcept
 Const access to the quality of the seed at the given index.
float & quality (Index index) noexcept
 Mutable access to the quality of the seed at the given index.
void reserve (std::size_t size, float averageSpacePoints=3) noexcept
 Reserves space for the given number of seeds.
std::size_t size () const noexcept
 Returns the size of the seed container, i.e., the number of seeds contained in it.
const SpacePointContainer2spacePointContainer () const
 Returns a const reference to the assigned space point container.
std::span< const SpacePointIndex2spacePointIndices (Index index) const noexcept
 Const access to the space point indices of the seed at the given index.
std::span< SpacePointIndex2spacePointIndices (Index index) noexcept
 Mutable access to the space point indices of the seed at the given index.
float vertexZ (Index index) const noexcept
 Const access to the vertex Z coordinate of the seed at the given index.
float & vertexZ (Index index) noexcept
 Mutable access to the vertex Z coordinate of the seed at the given index.

Detailed Description

A container of seeds.

Individual seeds are modeled as a sequence of N space points which are addressed via an index into the space point container. Individual seeds are addressed via index. A proxy object simplifies the handling.

Member Typedef Documentation

◆ const_iterator

Type alias for const iterator over seeds.

◆ ConstProxy

Type alias for const seed proxy.

◆ Index

Type alias for seed index type.

◆ Iterator

template<bool read_only>
using Acts::SeedContainer2::Iterator
Initial value:
detail::ContainerIterator<
std::conditional_t<read_only, ConstSeedProxy2, MutableSeedProxy2>, Index,
read_only>
SeedContainer2() noexcept
Constructs and empty seed container.
SeedIndex2 Index
Type alias for seed index type.
Definition SeedContainer2.hpp:34

Type alias for iterator template over seed container.

◆ iterator

Type alias for mutable iterator over seeds.

◆ MutableProxy

Type alias for mutable seed proxy.

Constructor & Destructor Documentation

◆ SeedContainer2() [1/3]

Acts::SeedContainer2::SeedContainer2 ( )
noexcept

Constructs and empty seed container.

◆ SeedContainer2() [2/3]

Acts::SeedContainer2::SeedContainer2 ( const SeedContainer2 & other)
noexcept

Constructs a copy of the given seed container.

Parameters
otherThe seed container to copy.

◆ SeedContainer2() [3/3]

Acts::SeedContainer2::SeedContainer2 ( SeedContainer2 && other)
noexcept

Move constructs a seed container.

Parameters
otherThe seed container to move.

◆ ~SeedContainer2()

Acts::SeedContainer2::~SeedContainer2 ( )
defaultnoexcept

Detructs the seed container.

Member Function Documentation

◆ assignSpacePointContainer() [1/5]

void Acts::SeedContainer2::assignSpacePointContainer ( const SpacePointContainer2 & spacePointContainer)
noexcept

Assigns the const space point container to be used by this seed container by const reference.

Note that the ownership of the space point container is not transferred and the user must ensure that the space point container remains valid for the lifetime of this seed container.

Parameters
spacePointContainerThe space point container to assign.

◆ assignSpacePointContainer() [2/5]

void Acts::SeedContainer2::assignSpacePointContainer ( const std::shared_ptr< const SpacePointContainer2 > & spacePointContainer)
noexcept

Assigns the const space point container to be used by this seed container by shared pointer.

The ownership of the space point container is shared between this seed container and the user.

Parameters
spacePointContainerThe space point container to assign.

◆ assignSpacePointContainer() [3/5]

void Acts::SeedContainer2::assignSpacePointContainer ( const std::shared_ptr< SpacePointContainer2 > & spacePointContainer)
noexcept

Assigns the mutable space point container to be used by this seed container by shared pointer.

The ownership of the space point container is shared between this seed container and the user.

Parameters
spacePointContainerThe space point container to assign.

◆ assignSpacePointContainer() [4/5]

void Acts::SeedContainer2::assignSpacePointContainer ( SpacePointContainer2 & spacePointContainer)
noexcept

Assigns the mutable space point container to be used by this seed container by reference.

Note that the ownership of the space point container is not transferred and the user must ensure that the space point container remains valid for the lifetime of this seed container.

Parameters
spacePointContainerThe space point container to assign.

◆ assignSpacePointContainer() [5/5]

void Acts::SeedContainer2::assignSpacePointContainer ( SpacePointContainer2 spacePointContainer)
noexcept

Assigns the mutable space point container to be used by this seed container by value.

This can be used to either copy or move-assign a container. The ownership of the space point container is transferred to this seed container.

Parameters
spacePointContainerThe space point container to assign.

◆ assignSpacePointIndices()

void Acts::SeedContainer2::assignSpacePointIndices ( Index index,
std::span< const SpacePointIndex2 > spacePointIndices )

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

Parameters
indexThe index of the seed to assign space point indices to.
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.

◆ at() [1/2]

MutableProxy Acts::SeedContainer2::at ( Index index)

Returns a mutable proxy to the seed at the given index.

If the index is out of range, an exception is thrown.

Parameters
indexThe index of the seed to access.
Returns
A mutable proxy to the seed at the given index.
Exceptions
std::out_of_rangeif the index is out of range.

◆ at() [2/2]

ConstProxy Acts::SeedContainer2::at ( Index index) const

Returns a const proxy to the seed at the given index.

If the index is out of range, an exception is thrown.

Parameters
indexThe index of the seed to access.
Returns
A const proxy to the seed at the given index.
Exceptions
std::out_of_rangeif the index is out of range.

◆ begin() [1/2]

const_iterator Acts::SeedContainer2::begin ( ) const
noexcept

Get const iterator to the beginning of seeds.

Returns
Const iterator to the first seed

◆ begin() [2/2]

iterator Acts::SeedContainer2::begin ( )
noexcept

Get mutable iterator to the beginning of seeds.

Returns
Mutable iterator to the first seed

◆ clear()

void Acts::SeedContainer2::clear ( )
noexcept

Clears the seed container, removing all seeds and space points.

◆ createSeed()

MutableProxy Acts::SeedContainer2::createSeed ( )
noexcept

Creates a new seed.

Returns
A mutable proxy to the newly created seed.

◆ empty()

bool Acts::SeedContainer2::empty ( ) const
noexcept

Checks if the seed container is empty.

Returns
True if the container is empty, false otherwise.

◆ end() [1/2]

const_iterator Acts::SeedContainer2::end ( ) const
noexcept

Get const iterator to the end of seeds.

Returns
Const iterator past the last seed

◆ end() [2/2]

iterator Acts::SeedContainer2::end ( )
noexcept

Get mutable iterator to the end of seeds.

Returns
Mutable iterator past the last seed

◆ hasMutableSpacePointContainer()

bool Acts::SeedContainer2::hasMutableSpacePointContainer ( ) const
noexcept

Checks if a mutable space point container has been assigned to this seed container.

Returns
True if a mutable space point container has been assigned.

◆ hasSpacePointContainer()

bool Acts::SeedContainer2::hasSpacePointContainer ( ) const
noexcept

Checks if a space point container has been assigned to this seed container.

Returns
True if a space point container has been assigned.

◆ mutableSpacePointContainer()

SpacePointContainer2 & Acts::SeedContainer2::mutableSpacePointContainer ( )

Returns a mutable reference to the assigned space point container.

Returns
A mutable reference to the assigned space point container.
Exceptions
std::logic_errorif no mutable space point container has been assigned.

◆ operator=() [1/2]

SeedContainer2 & Acts::SeedContainer2::operator= ( const SeedContainer2 & other)
noexcept

Assignment operator for copying a seed container.

Parameters
otherThe seed container to copy.
Returns
A reference to this seed container.

◆ operator=() [2/2]

SeedContainer2 & Acts::SeedContainer2::operator= ( SeedContainer2 && other)
noexcept

Move assignment operator for a seed container.

Parameters
otherThe seed container to move.
Returns
A reference to this seed container.

◆ operator[]() [1/2]

ConstProxy Acts::SeedContainer2::operator[] ( Index index) const
noexcept

Returns a const proxy to the seed at the given index.

Parameters
indexThe index of the seed to access.
Returns
A const proxy to the seed at the given index.

◆ operator[]() [2/2]

MutableProxy Acts::SeedContainer2::operator[] ( Index index)
noexcept

Returns a mutable proxy to the seed at the given index.

Parameters
indexThe index of the seed to access.
Returns
A mutable proxy to the seed at the given index.

◆ quality() [1/2]

float Acts::SeedContainer2::quality ( Index index) const
noexcept

Const access to the quality of the seed at the given index.

Parameters
indexThe index of the seed.
Returns
A const reference to the quality of the seed at the given index.

◆ quality() [2/2]

float & Acts::SeedContainer2::quality ( Index index)
noexcept

Mutable access to the quality of the seed at the given index.

Parameters
indexThe index of the seed.
Returns
A mutable reference to the quality of the seed at the given index.

◆ reserve()

void Acts::SeedContainer2::reserve ( std::size_t size,
float averageSpacePoints = 3 )
noexcept

Reserves space for the given number of seeds.

Parameters
sizeThe number of seeds to reserve space for.
averageSpacePointsThe average number of space points per seed.

◆ size()

std::size_t Acts::SeedContainer2::size ( ) const
noexcept

Returns the size of the seed container, i.e., the number of seeds contained in it.

Returns
The number of seeds in the container.

◆ spacePointContainer()

const SpacePointContainer2 & Acts::SeedContainer2::spacePointContainer ( ) const

Returns a const reference to the assigned space point container.

Returns
A const reference to the assigned space point container.
Exceptions
std::logic_errorif no space point container has been assigned.

◆ spacePointIndices() [1/2]

std::span< const SpacePointIndex2 > Acts::SeedContainer2::spacePointIndices ( Index index) const
noexcept

Const access to the space point indices of the seed at the given index.

Parameters
indexThe index of the seed.
Returns
A span of space point indices associated with the seed at the given index.

◆ spacePointIndices() [2/2]

std::span< SpacePointIndex2 > Acts::SeedContainer2::spacePointIndices ( Index index)
noexcept

Mutable access to the space point indices of the seed at the given index.

Parameters
indexThe index of the seed.
Returns
A span of space point indices associated with the seed at the given index.

◆ vertexZ() [1/2]

float Acts::SeedContainer2::vertexZ ( Index index) const
noexcept

Const access to the vertex Z coordinate of the seed at the given index.

Parameters
indexThe index of the seed.
Returns
A const reference to the vertex Z coordinate of the seed at the given index.

◆ vertexZ() [2/2]

float & Acts::SeedContainer2::vertexZ ( Index index)
noexcept

Mutable access to the vertex Z coordinate of the seed at the given index.

Parameters
indexThe index of the seed.
Returns
A mutable reference to the vertex Z coordinate of the seed at the