![]() |
Project
|
#include <TrackingGeometryManager.h>
Public Member Functions | |
| void | setBuilder (std::unique_ptr< ITrackingGeometryBuilder > builder) |
| Install the detector-specific builder. Must be called before the first build. | |
| bool | hasBuilder () const |
| void | setMaterialMapFile (std::string fileName) |
| const std::string & | getMaterialMapFile () const |
| void | setLogLevel (Acts::Logging::Level level) |
| void | build () |
| void | buildFromFile (std::string_view geomFileName) |
| bool | isBuilt () const |
| void | clear () |
| std::shared_ptr< const Acts::TrackingGeometry > | getShared () |
| Builds on first call if not built yet. | |
| const Acts::TrackingGeometry & | get () |
| const SurfaceIndexMap & | getIndex () |
| const SurfaceIndexMap & | getIndex (const o2::detectors::DetMatrixCache &cache, double toleranceCm=1e-3, SensorPathProvider pathProvider={}) |
| const Acts::GeometryContext & | getNominalContext () const |
| std::size_t | getNDecoratedSurfaces () const |
Static Public Member Functions | |
| static TrackingGeometryManager & | instance () |
Provider of the shared, immutable Acts::TrackingGeometry.
Follows the same pattern as o2::base::Propagator::Instance(), o2::base::GRPGeomHelper::instance() and o2::its::GeometryTGeo::Instance(): a process-wide lazily-built singleton fed from the geometry O2 already has live in memory. It fetches nothing by itself – the caller is responsible for making gGeoManager available first, normally by declaring o2::base::GRPGeomRequest::Aligned and calling o2::base::GRPGeomHelper::instance().checkUpdates(pc).
Typical use in a DPL task:
Thread safety: build() is not re-entrant and is expected to run once, before any parallel processing. Once built the geometry is immutable and all accessors are safe to call concurrently.
Definition at line 58 of file TrackingGeometryManager.h.
| void o2::acts::TrackingGeometryManager::build | ( | ) |
Build from the live gGeoManager.
| std::runtime_error | if no builder is set or no geometry is loaded |
Definition at line 87 of file TrackingGeometryManager.cxx.
| void o2::acts::TrackingGeometryManager::buildFromFile | ( | std::string_view | geomFileName | ) |
Build from a TGeo file, for macros and tests running outside a workflow. Loads the file through o2::base::GeometryManager, so it ends up in gGeoManager exactly as it would inside a workflow.
Definition at line 103 of file TrackingGeometryManager.cxx.
| void o2::acts::TrackingGeometryManager::clear | ( | ) |
Definition at line 76 of file TrackingGeometryManager.cxx.
| const Acts::TrackingGeometry & o2::acts::TrackingGeometryManager::get | ( | ) |
Definition at line 201 of file TrackingGeometryManager.cxx.
| const SurfaceIndexMap & o2::acts::TrackingGeometryManager::getIndex | ( | ) |
Sensor <-> surface lookup, as filled by the builder. Empty if the builder did not provide one – which is the normal case when the geometry spans several detectors, since each has its own sensor numbering. Use the overload below for those.
Definition at line 206 of file TrackingGeometryManager.cxx.
| const SurfaceIndexMap & o2::acts::TrackingGeometryManager::getIndex | ( | const o2::detectors::DetMatrixCache & | cache, |
| double | toleranceCm = 1e-3, |
||
| SensorPathProvider | pathProvider = {} |
||
| ) |
Sensor <-> surface lookup for one detector, built from its geometry helper on first request and cached per detector afterwards.
Pass pathProvider whenever the detector offers one – it makes the match an identity rather than a geometric inference, see makeSurfaceIndex():
| cache | a DetMatrixCache-derived helper with a filled L2G cache, e.g. o2::trk::GeometryTGeo::Instance() |
| toleranceCm | matching tolerance, see makeSurfaceIndex() |
| pathProvider | optional TGeo path lookup for exact identification |
Definition at line 214 of file TrackingGeometryManager.cxx.
|
inline |
Definition at line 70 of file TrackingGeometryManager.h.
|
inline |
Number of surfaces that received material during decoration. Zero when no material map was configured.
Definition at line 122 of file TrackingGeometryManager.h.
|
inline |
Context the geometry was built with. Carries no alignment payload: O2 bakes alignment into the TGeo matrices before the ACTS geometry is built, so the nominal transforms are already the aligned ones.
Definition at line 118 of file TrackingGeometryManager.h.
| std::shared_ptr< const Acts::TrackingGeometry > o2::acts::TrackingGeometryManager::getShared | ( | ) |
Builds on first call if not built yet.
Definition at line 193 of file TrackingGeometryManager.cxx.
|
inline |
Definition at line 65 of file TrackingGeometryManager.h.
|
static |
Definition at line 60 of file TrackingGeometryManager.cxx.
|
inline |
Definition at line 83 of file TrackingGeometryManager.h.
| void o2::acts::TrackingGeometryManager::setBuilder | ( | std::unique_ptr< ITrackingGeometryBuilder > | builder | ) |
Install the detector-specific builder. Must be called before the first build.
Definition at line 66 of file TrackingGeometryManager.cxx.
|
inline |
Definition at line 72 of file TrackingGeometryManager.h.
|
inline |
Path to an ACTS JSON material map, applied after construction. Empty (the default) means no material decoration.
Definition at line 69 of file TrackingGeometryManager.h.