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

A cylindrical space point grid used for seeding in a cylindrical detector geometry. More...

#include <Acts/Seeding2/CylindricalSpacePointGrid2.hpp>

Classes

struct  Config

Public Types

using BinnedGroupType = BinnedGroup<GridType>
 Type alias for binned group over the cylindrical grid.
using BinType = std::vector<SpacePointIndex>
 Type alias for bin container holding space point indices.
using GridType = Grid<BinType, PhiAxisType, ZAxisType, RAxisType>
 Cylindrical space point grid type, which is a grid over BinType with axes defined by PhiAxisType, ZAxisType, and RAxisType.
using PhiAxisType = Axis<AxisType::Equidistant, AxisBoundaryType::Closed>
 Type alias for phi axis with equidistant binning and closed boundaries.
using RAxisType = Axis<AxisType::Variable, AxisBoundaryType::Open>
 Type alias for r axis with variable binning and open boundaries.
using SpacePointIndex = std::uint32_t
 Space point index type used in the grid.
using ZAxisType = Axis<AxisType::Variable, AxisBoundaryType::Open>
 Type alias for z axis with variable binning and open boundaries.

Public Member Functions

 CylindricalSpacePointGrid2 (const Config &config, std::unique_ptr< const Logger > logger=getDefaultLogger("CylindricalSpacePointGrid2", Logging::Level::INFO))
 Construct a cylindrical space point grid with the given configuration and an optional logger.
BinTypeat (std::size_t index)
 Mutable bin access by index.
const BinTypeat (std::size_t index) const
 Const bin access by index.
std::optional< std::size_t > binIndex (const Vector3 &position) const
 Get the bin index for a space point given its azimuthal angle, radial distance, and z-coordinate.
std::optional< std::size_t > binIndex (float phi, float z, float r) const
 Get the bin index for a space point given its azimuthal angle, radial distance, and z-coordinate.
const BinnedGroupTypebinnedGroup () const
 Access to the binned group.
void clear ()
 Clear the grid and drop all state.
Range1D< float > computeRadiusRange (const SpacePointContainer2 &spacePoints) const
 Compute the range of radii in the grid.
void extend (const SpacePointContainer2::ConstRange &spacePoints)
 Fill the grid with space points from the container.
GridTypegrid ()
 Mutable grid access.
const GridTypegrid () const
 Const grid access.
std::optional< std::size_t > insert (const ConstSpacePointProxy2 &sp)
 Insert a space point into the grid.
std::optional< std::size_t > insert (SpacePointIndex index, float phi, float z, float r)
 Insert a space point into the grid.
std::size_t numberOfBins () const
 Get the number of bins in the grid.
std::size_t numberOfSpacePoints () const
 Get the number of space points in the grid.
void sortBinsByR (const SpacePointContainer2 &spacePoints)
 Sort the bins in the grid by the space point radius, which is required by some algorithms that operate on the grid.

Detailed Description

A cylindrical space point grid used for seeding in a cylindrical detector geometry.

The grid is defined in cylindrical coordinates (phi, z, r) and allows for efficient access to space points based on their azimuthal angle, z-coordinate, and radial distance.

Member Typedef Documentation

◆ BinnedGroupType

Type alias for binned group over the cylindrical grid.

◆ BinType

Type alias for bin container holding space point indices.

◆ GridType

Cylindrical space point grid type, which is a grid over BinType with axes defined by PhiAxisType, ZAxisType, and RAxisType.

The grid is a 3D grid with the axes representing azimuthal angle (phi), z-coordinate, and radial distance (r).

◆ PhiAxisType

Type alias for phi axis with equidistant binning and closed boundaries.

◆ RAxisType

Type alias for r axis with variable binning and open boundaries.

◆ SpacePointIndex

Space point index type used in the grid.

◆ ZAxisType

Type alias for z axis with variable binning and open boundaries.

Constructor & Destructor Documentation

◆ CylindricalSpacePointGrid2()

Acts::CylindricalSpacePointGrid2::CylindricalSpacePointGrid2 ( const Config & config,
std::unique_ptr< const Logger > logger = getDefaultLogger("CylindricalSpacePointGrid2", Logging::Level::INFO) )
explicit

Construct a cylindrical space point grid with the given configuration and an optional logger.

Parameters
configConfiguration for the cylindrical grid
loggerOptional logger instance for debugging output

Member Function Documentation

◆ at() [1/2]

BinType & Acts::CylindricalSpacePointGrid2::at ( std::size_t index)

Mutable bin access by index.

Parameters
indexThe index of the bin to access
Returns
Mutable reference to the bin at the specified index

◆ at() [2/2]

const BinType & Acts::CylindricalSpacePointGrid2::at ( std::size_t index) const

Const bin access by index.

Parameters
indexThe index of the bin to access
Returns
Const reference to the bin at the specified index

◆ binIndex() [1/2]

std::optional< std::size_t > Acts::CylindricalSpacePointGrid2::binIndex ( const Vector3 & position) const

Get the bin index for a space point given its azimuthal angle, radial distance, and z-coordinate.

Parameters
positionThe position of the space point in (phi, z, r) coordinates
Returns
The index of the bin in which the space point is located, or std::nullopt if the space point is outside the grid bounds.

◆ binIndex() [2/2]

std::optional< std::size_t > Acts::CylindricalSpacePointGrid2::binIndex ( float phi,
float z,
float r ) const

Get the bin index for a space point given its azimuthal angle, radial distance, and z-coordinate.

Parameters
phiThe azimuthal angle of the space point in radians
zThe z-coordinate of the space point
rThe radial distance of the space point from the origin
Returns
The index of the bin in which the space point is located, or std::nullopt if the space point is outside the grid bounds.

◆ binnedGroup()

const BinnedGroupType & Acts::CylindricalSpacePointGrid2::binnedGroup ( ) const

Access to the binned group.

Returns
Reference to the binned group

◆ clear()

void Acts::CylindricalSpacePointGrid2::clear ( )

Clear the grid and drop all state.

The object will behave like a newly constructed one.

◆ computeRadiusRange()

Range1D< float > Acts::CylindricalSpacePointGrid2::computeRadiusRange ( const SpacePointContainer2 & spacePoints) const

Compute the range of radii in the grid.

This requires the grid to be filled with space points and sorted by radius. The sorting can be done with the sortBinsByR method.

Parameters
spacePointsThe space point container to compute the radius range
Returns
The range of radii in the grid

◆ extend()

void Acts::CylindricalSpacePointGrid2::extend ( const SpacePointContainer2::ConstRange & spacePoints)

Fill the grid with space points from the container.

Parameters
spacePointsThe space point container to fill the grid with

◆ grid() [1/2]

GridType & Acts::CylindricalSpacePointGrid2::grid ( )

Mutable grid access.

Returns
Mutable reference to the grid

◆ grid() [2/2]

const GridType & Acts::CylindricalSpacePointGrid2::grid ( ) const

Const grid access.

Returns
Const reference to the grid

◆ insert() [1/2]

std::optional< std::size_t > Acts::CylindricalSpacePointGrid2::insert ( const ConstSpacePointProxy2 & sp)

Insert a space point into the grid.

Parameters
spThe space point to insert
Returns
The index of the bin in which the space point was inserted, or std::nullopt if the space point is outside the grid bounds.

◆ insert() [2/2]

std::optional< std::size_t > Acts::CylindricalSpacePointGrid2::insert ( SpacePointIndex index,
float phi,
float z,
float r )

Insert a space point into the grid.

Parameters
indexThe index of the space point to insert
phiThe azimuthal angle of the space point in radians
zThe z-coordinate of the space point
rThe radial distance of the space point from the origin
Returns
The index of the bin in which the space point was inserted, or std::nullopt if the space point is outside the grid bounds.

◆ numberOfBins()

std::size_t Acts::CylindricalSpacePointGrid2::numberOfBins ( ) const

Get the number of bins in the grid.

Returns
The number of bins in the grid

◆ numberOfSpacePoints()

std::size_t Acts::CylindricalSpacePointGrid2::numberOfSpacePoints ( ) const

Get the number of space points in the grid.

Returns
The number of space points in the grid

◆ sortBinsByR()

void Acts::CylindricalSpacePointGrid2::sortBinsByR ( const SpacePointContainer2 & spacePoints)

Sort the bins in the grid by the space point radius, which is required by some algorithms that operate on the grid.

Parameters
spacePointsThe space point container to sort the bins by radius