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

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

#include <Acts/Seeding/CartesianSpacePointGrid.hpp>

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

Classes

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

Public Types

using GridBase
 Type alias for the CRTP base class.
using XAxisType = GridBase::AxisTypeAt<0>
 Type alias for the x axis (equidistant binning, open boundaries).
using YAxisType = GridBase::AxisTypeAt<1>
 Type alias for the y axis (equidistant binning, open boundaries).
using ZAxisType = GridBase::AxisTypeAt<2>
 Type alias for the z axis (equidistant binning, open boundaries).

Public Member Functions

 CartesianSpacePointGrid (const Config &config, std::unique_ptr< const Logger > logger=getDefaultLogger("CartesianSpacePointGrid", Logging::Level::INFO))
 Construct a cartesian space point grid with the given configuration and an optional logger.
std::optional< std::size_t > binIndex (float x, float y, float z) const
 Get the bin index for a space point given its x-, y-, and z-coordinate.
Range1D< float > computeCoordRange (const SpacePointContainer &spacePoints) const
 Compute the range of the sorting coordinates 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 x, float y, float z)
 Insert a space point into the grid.
void sortBinsByCoord (const SpacePointContainer &spacePoints)
 Sort the bins in the grid by the space point sorting-coordinate, which is required by some algorithms that operate on the grid.

Detailed Description

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

The grid is defined in cartesian coordinates (x,y,z).

Member Typedef Documentation

◆ GridBase

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

Type alias for the CRTP base class.

Constructor & Destructor Documentation

◆ CartesianSpacePointGrid()

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

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

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

Member Function Documentation

◆ binIndex()

std::optional< std::size_t > Acts::CartesianSpacePointGrid::binIndex ( float x,
float y,
float z ) const

Get the bin index for a space point given its x-, y-, and z-coordinate.

Parameters
xThe x-coordinate of the space point
yThe y-coordinate of the space point
zThe z-coordinate of the space point
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.

◆ computeCoordRange()

Range1D< float > Acts::CartesianSpacePointGrid::computeCoordRange ( const SpacePointContainer & spacePoints) const

Compute the range of the sorting coordinates in the grid.

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

Parameters
spacePointsThe space point container to compute the coordinate range
Returns
The range of sorting-coordinate values in the grid

◆ insert() [1/2]

std::optional< std::size_t > Acts::CartesianSpacePointGrid::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::CartesianSpacePointGrid::insert ( SpacePointIndex index,
float x,
float y,
float z )

Insert a space point into the grid.

Parameters
indexThe index of the space point to insert
xThe x-coordinate the space point
yThe y-coordinate the space point
zThe z-coordinate the space point
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.

◆ sortBinsByCoord()

void Acts::CartesianSpacePointGrid::sortBinsByCoord ( const SpacePointContainer & spacePoints)

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

Parameters
spacePointsThe space point container to sort the bins by the configured coordinate