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

A spherical space point grid for seeding, binned in (phi, eta, r). More...

#include <Acts/Seeding/SphericalSpacePointGrid.hpp>

Inheritance diagram for Acts::Experimental::SphericalSpacePointGrid:
[legend]
Collaboration diagram for Acts::Experimental::SphericalSpacePointGrid:
[legend]

Classes

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

Public Types

using CotThetaAxisType = GridBase::AxisTypeAt<1>
 Type alias for the middle (cot(theta)) axis with variable binning and open boundaries.
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).

Public Member Functions

 SphericalSpacePointGrid (const Config &config, std::unique_ptr< const Logger > logger=getDefaultLogger("SphericalSpacePointGrid", Logging::Level::INFO))
 Construct a spherical space point grid with the given configuration and an optional logger.
std::optional< std::size_t > binIndex (float phi, float cotTheta, float r) const
 Get the bin index for a space point.
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, binning it by cot(theta) = z / r (a single division; assumes r > 0); see the class documentation.
std::optional< std::size_t > insert (SpacePointIndex index, float phi, float cotTheta, 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 spherical space point grid for seeding, binned in (phi, eta, r).

A space point's eta bin is found from cot(theta) = z / r (a single division), matched against bin edges that are stored as sinh(eta). Since cot(theta) = sinh(eta), comparing z / r against those edges places the point into exactly its eta bin, with no atan2 / tan / log / asinh.

Member Typedef Documentation

◆ CotThetaAxisType

Type alias for the middle (cot(theta)) axis with variable binning and open boundaries.

Edges are stored as sinh(eta) = cot(theta), so the binning is configured in eta while space points are placed by z / r (see class doc).

◆ GridBase

Initial value:
Acts::detail::SpacePointGridBase<SphericalSpacePointGrid, GridType>

Type alias for the CRTP base class.

Constructor & Destructor Documentation

◆ SphericalSpacePointGrid()

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

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

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

Member Function Documentation

◆ binIndex()

std::optional< std::size_t > Acts::Experimental::SphericalSpacePointGrid::binIndex ( float phi,
float cotTheta,
float r ) const

Get the bin index for a space point.

Parameters
phiThe azimuthal angle of the space point in radians
cotThetacot(theta) = z / r, used to place the point in its eta bin via cot(theta) = z / r = sinh(eta)
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::Experimental::SphericalSpacePointGrid::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::Experimental::SphericalSpacePointGrid::insert ( const ConstSpacePointProxy & sp)

Insert a space point into the grid, binning it by cot(theta) = z / r (a single division; assumes r > 0); see the class documentation.

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::Experimental::SphericalSpacePointGrid::insert ( SpacePointIndex index,
float phi,
float cotTheta,
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
cotThetacot(theta) = z / r, used to place the point in its eta bin via cot(theta) = z / r = sinh(eta)
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::Experimental::SphericalSpacePointGrid::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