18#ifndef ALICEO2_ACTS_SURFACEINDEXMAP_H
19#define ALICEO2_ACTS_SURFACEINDEXMAP_H
24#include <unordered_map>
27#include "Acts/Geometry/GeometryIdentifier.hpp"
32class TrackingGeometry;
62 void add(
int sensorID,
const Acts::Surface&
surface);
65 const Acts::Surface*
getSurface(
int sensorID)
const;
71 const std::vector<int>&
getSensorIDs(Acts::GeometryIdentifier geoId)
const;
73 bool empty()
const {
return mBySensor.empty(); }
75 std::size_t
size()
const {
return mBySensor.size(); }
82 const Acts::Surface*
surface =
nullptr;
83 Acts::GeometryIdentifier geoId{};
86 std::unordered_map<int, Entry> mBySensor;
87 std::unordered_map<Acts::GeometryIdentifier, std::vector<int>> mByGeoId;
123 const Acts::GeometryContext& gctx,
125 double toleranceCm = 1e-3,
const Acts::Surface * surface
std::size_t size() const
Number of mapped sensors.
const Acts::Surface * getSurface(int sensorID) const
const std::vector< int > & getSensorIDs(Acts::GeometryIdentifier geoId) const
std::size_t getNSurfaces() const
Number of distinct surfaces the sensors map onto.
void add(int sensorID, const Acts::Surface &surface)
static constexpr int InvalidSensorID
Acts::GeometryIdentifier getGeometryId(int sensorID) const
SurfaceIndexMap makeSurfaceIndex(const Acts::TrackingGeometry &geometry, const Acts::GeometryContext &gctx, const o2::detectors::DetMatrixCache &cache, double toleranceCm=1e-3, SensorPathProvider pathProvider={})
std::function< std::string(int sensorID)> SensorPathProvider
Full TGeo node path of one sensor, e.g. o2::trk::GeometryTGeo::getMatrixPath().