Project
Loading...
Searching...
No Matches
o2::acts::SurfaceIndexMap Class Reference

#include <SurfaceIndexMap.h>

Public Member Functions

void add (int sensorID, const Acts::Surface &surface)
 
const Acts::Surface * getSurface (int sensorID) const
 
Acts::GeometryIdentifier getGeometryId (int sensorID) const
 
const std::vector< int > & getSensorIDs (Acts::GeometryIdentifier geoId) const
 
bool empty () const
 
std::size_t size () const
 Number of mapped sensors.
 
std::size_t getNSurfaces () const
 Number of distinct surfaces the sensors map onto.
 
void clear ()
 

Static Public Attributes

static constexpr int InvalidSensorID = -1
 

Detailed Description

Lookup between an O2 sensor index (chip ID, as used by the detector's DetMatrixCache-derived geometry helper) and the ACTS surface it sits on.

The relation is many-to-one, not one-to-one. A planar sensor becomes its own ACTS surface, but a sub-detector modelled as a whole cylindrical or disc layer – as the ALICE 3 vertex detector is – becomes a single surface that backs every chip of that layer. Hence getSurface() takes a sensor and getSensorIDs() gives back a list.

ACTS assigns the Acts::GeometryIdentifier inside Acts::Blueprint::construct(), so this map can only be filled once the TrackingGeometry is complete. See makeSurfaceIndex().

Definition at line 56 of file SurfaceIndexMap.h.

Member Function Documentation

◆ add()

void o2::acts::SurfaceIndexMap::add ( int  sensorID,
const Acts::Surface &  surface 
)
Exceptions
std::runtime_errorif the sensor is already mapped

Definition at line 48 of file SurfaceIndexMap.cxx.

◆ clear()

void o2::acts::SurfaceIndexMap::clear ( )

Definition at line 77 of file SurfaceIndexMap.cxx.

◆ empty()

bool o2::acts::SurfaceIndexMap::empty ( ) const
inline

Definition at line 73 of file SurfaceIndexMap.h.

◆ getGeometryId()

Acts::GeometryIdentifier o2::acts::SurfaceIndexMap::getGeometryId ( int  sensorID) const
Returns
a default-constructed identifier if the sensor is not mapped

Definition at line 65 of file SurfaceIndexMap.cxx.

◆ getNSurfaces()

std::size_t o2::acts::SurfaceIndexMap::getNSurfaces ( ) const
inline

Number of distinct surfaces the sensors map onto.

Definition at line 77 of file SurfaceIndexMap.h.

◆ getSensorIDs()

const std::vector< int > & o2::acts::SurfaceIndexMap::getSensorIDs ( Acts::GeometryIdentifier  geoId) const

All sensors sitting on the given surface, in increasing sensor order.

Returns
an empty vector if the surface backs no sensor

Definition at line 71 of file SurfaceIndexMap.cxx.

◆ getSurface()

const Acts::Surface * o2::acts::SurfaceIndexMap::getSurface ( int  sensorID) const
Returns
nullptr if the sensor is not mapped

Definition at line 59 of file SurfaceIndexMap.cxx.

◆ size()

std::size_t o2::acts::SurfaceIndexMap::size ( ) const
inline

Number of mapped sensors.

Definition at line 75 of file SurfaceIndexMap.h.

Member Data Documentation

◆ InvalidSensorID

constexpr int o2::acts::SurfaceIndexMap::InvalidSensorID = -1
staticconstexpr

Definition at line 59 of file SurfaceIndexMap.h.


The documentation for this class was generated from the following files: