ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
Acts::GridPortalLinkT< Axes > Class Template Reference

Concrete class deriving from GridPortalLink that boxes a concrete grid for lookup. More...

#include <Acts/Geometry/GridPortalLink.hpp>

Inheritance diagram for Acts::GridPortalLinkT< Axes >:
[legend]
Collaboration diagram for Acts::GridPortalLinkT< Axes >:
[legend]

Public Types

using GridType = Grid<const TrackingVolume*, Axes...>
 The internal grid type.

Public Member Functions

 GridPortalLinkT (std::shared_ptr< RegularSurface > surface, AxisDirection direction, Axes &&... axes)
 Constructor from a surface, axes and direction.
unsigned int dim () const override
 Get the number of dimensions of the grid.
std::unique_ptr< GridPortalLinkextendTo2d (const IAxis *other) const override
 Makes a 2D grid from a 1D grid by extending it using an optional axis.
const GridTypegrid () const override
 Get the grid.
GridTypegrid () override
 Get the grid.
Result< const TrackingVolume * > resolveVolume (const GeometryContext &, const Vector2 &position, double=s_onSurfaceTolerance) const override
 Lookup the tracking volume at a position on the surface.
Result< const TrackingVolume * > resolveVolume (const GeometryContext &gctx, const Vector3 &position, double tolerance=s_onSurfaceTolerance) const override
 Lookup the tracking volume at a position on the surface.
void setVolume (TrackingVolume *volume) override
 Set the volume on all grid bins.
void toStream (std::ostream &os) const override
 Prints an identification to the output stream.

Static Public Attributes

static constexpr std::size_t DIM = sizeof...(Axes)
 The dimension of the grid.

Additional Inherited Members

 Helper enum to declare which local direction to fill. More...

Detailed Description

template<typename... Axes>
requires (sizeof...(Axes) <= 2)
class Acts::GridPortalLinkT< Axes >

Concrete class deriving from GridPortalLink that boxes a concrete grid for lookup.

Template Parameters
AxesThe axis types of the grid

Member Typedef Documentation

◆ GridType

template<typename... Axes>
using Acts::GridPortalLinkT< Axes >::GridType = Grid<const TrackingVolume*, Axes...>

The internal grid type.

Constructor & Destructor Documentation

◆ GridPortalLinkT()

template<typename... Axes>
Acts::GridPortalLinkT< Axes >::GridPortalLinkT ( std::shared_ptr< RegularSurface > surface,
AxisDirection direction,
Axes &&... axes )

Constructor from a surface, axes and direction.

Parameters
surfaceThe surface
directionThe binning direction
axesThe axes for the grid
Note
The axes are checked for consistency with the bounds of surface.

Member Function Documentation

◆ dim()

template<typename... Axes>
unsigned int Acts::GridPortalLinkT< Axes >::dim ( ) const
overridevirtual

Get the number of dimensions of the grid.

Returns
The number of dimensions

Implements Acts::GridPortalLink.

◆ extendTo2d()

template<typename... Axes>
std::unique_ptr< GridPortalLink > Acts::GridPortalLinkT< Axes >::extendTo2d ( const IAxis * other) const
overridevirtual

Makes a 2D grid from a 1D grid by extending it using an optional axis.

Parameters
otherThe axis to use for the missing direction, can be null for auto determination
Returns
A unique pointer to the 2D grid portal link

Implements Acts::GridPortalLink.

◆ grid() [1/2]

template<typename... Axes>
const GridType & Acts::GridPortalLinkT< Axes >::grid ( ) const
overridevirtual

Get the grid.

Returns
The grid

Implements Acts::GridPortalLink.

◆ grid() [2/2]

template<typename... Axes>
GridType & Acts::GridPortalLinkT< Axes >::grid ( )
overridevirtual

Get the grid.

Returns
The grid

Implements Acts::GridPortalLink.

◆ resolveVolume() [1/2]

template<typename... Axes>
Result< const TrackingVolume * > Acts::GridPortalLinkT< Axes >::resolveVolume ( const GeometryContext & ,
const Vector2 & position,
double = s_onSurfaceTolerance ) const
overridevirtual

Lookup the tracking volume at a position on the surface.

Parameters
positionThe local position
Note
The position is required to be on the associated surface
Returns
The tracking volume (can be null)

Implements Acts::PortalLinkBase.

◆ resolveVolume() [2/2]

template<typename... Axes>
Result< const TrackingVolume * > Acts::GridPortalLinkT< Axes >::resolveVolume ( const GeometryContext & gctx,
const Vector3 & position,
double tolerance = s_onSurfaceTolerance ) const
overridevirtual

Lookup the tracking volume at a position on the surface.

Parameters
gctxThe geometry context
positionThe local position
toleranceThe tolerance for the lookup
Note
The position is required to be on the associated surface
Returns
The tracking volume (can be null)

Implements Acts::PortalLinkBase.

◆ setVolume()

template<typename... Axes>
void Acts::GridPortalLinkT< Axes >::setVolume ( TrackingVolume * volume)
overridevirtual

Set the volume on all grid bins.

Parameters
volumeThe volume to set

Implements Acts::GridPortalLink.

◆ toStream()

template<typename... Axes>
void Acts::GridPortalLinkT< Axes >::toStream ( std::ostream & os) const
overridevirtual

Prints an identification to the output stream.

Parameters
osThe output stream

Implements Acts::PortalLinkBase.

Member Data Documentation

◆ DIM

template<typename... Axes>
std::size_t Acts::GridPortalLinkT< Axes >::DIM = sizeof...(Axes)
staticconstexpr

The dimension of the grid.