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

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

#include <Acts/Seeding/CylindricalSpacePointGrid.hpp>

Inheritance diagram for Acts::CylindricalSpacePointGrid:
[legend]
Collaboration diagram for Acts::CylindricalSpacePointGrid:
[legend]

Classes

struct  Config
 Configuration parameters for the cylindrical space point grid. More...

Public Types

using GridBase
 Type alias for the CRTP base class.
using PhiAxisType = GridBase::AxisTypeAt<0>
 Type alias for the phi axis (equidistant binning, closed boundaries).
using RAxisType = GridBase::AxisTypeAt<2>
 Type alias for the r axis (variable binning, open boundaries).
using ZAxisType = GridBase::AxisTypeAt<1>
 Type alias for the z axis (variable binning, open boundaries).

Public Member Functions

 CylindricalSpacePointGrid (const Config &config, std::unique_ptr< const Logger > logger=getDefaultLogger("CylindricalSpacePointGrid", Logging::Level::INFO))
 Construct a cylindrical space point grid with the given configuration and an optional logger.
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.
Range1D< float > computeRadiusRange (const SpacePointContainer &spacePoints) const
 Compute the range of radii in the grid.
std::optional< std::size_t > insert (const ConstSpacePointProxy &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.
void sortBinsByR (const SpacePointContainer &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

◆ GridBase

Initial value:
detail::SpacePointGridBase<CylindricalSpacePointGrid, GridType>

Type alias for the CRTP base class.

Constructor & Destructor Documentation

◆ CylindricalSpacePointGrid()

Acts::CylindricalSpacePointGrid::CylindricalSpacePointGrid ( const Config & config,
std::unique_ptr< const Logger > logger = getDefaultLogger("CylindricalSpacePointGrid", 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

◆ binIndex()

std::optional< std::size_t > Acts::CylindricalSpacePointGrid::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.

◆ computeRadiusRange()

Range1D< float > Acts::CylindricalSpacePointGrid::computeRadiusRange ( const SpacePointContainer & 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

◆ insert() [1/2]

std::optional< std::size_t > Acts::CylindricalSpacePointGrid::insert ( const ConstSpacePointProxy & 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::CylindricalSpacePointGrid::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.

◆ sortBinsByR()

void Acts::CylindricalSpacePointGrid::sortBinsByR ( const SpacePointContainer & 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