Skip to content

ALICE3: ACTS tracking geometry provider - #15805

Draft
pbutti wants to merge 1 commit into
AliceO2Group:devfrom
pbutti:acts-tracking-geometry
Draft

pbutti wants to merge 1 commit into
AliceO2Group:devfrom
pbutti:acts-tracking-geometry

Conversation

@pbutti

@pbutti pbutti commented Sep 16, 2026

Copy link
Copy Markdown

Adds the Acts::TrackingGeometry that an ACTS-based reconstruction needs, built from the TGeo geometry O2 already has live in memory. ACTS stays an optional dependency: without it these packages produce no targets.

O2::ACTSInterface (Detectors/ACTS/interface), no DPL dependency:

  • TrackingGeometryManager, a lazily-built process-wide provider following the o2::base::Propagator::Instance() / GeometryTGeo::Instance() pattern. It fetches nothing itself; callers make gGeoManager available first, normally by declaring GRPGeomRequest::Aligned.
  • ITrackingGeometryBuilder, the detector-specific seam, plus the element store the geometry does not own but depends on.
  • SurfaceIndexMap, the O2 sensor <-> ACTS surface lookup.
  • MagneticFieldAdapter, an Acts::MagneticFieldProvider over the O2 field.

O2::ACTSWorkflow (Detectors/ACTS/workflow): ActsGeometryService, the same provider reachable through the DPL ServiceRegistry with ServiceKind::DeviceGlobal.

O2::ALICE3ACTS (Detectors/Upgrades/ALICE3/ACTS): the Gen3 Blueprint builder, ported from actsO2 ActsAlgorithms/Geometry/src/ALICE3Gen3Geometry.cpp. The construction logic is unchanged so the geometry identifiers stay compatible with the standalone chain's material maps and digitisation/seeding configs; verified by decorating an O2-built geometry with actsO2's own material map. Differences from the original: it reads a TGeoManager handed in by the caller instead of importing a ROOT file, and its process-lifetime static stores became member state so several builders can coexist in one process.

Sensors are identified by the TGeo node the surface was built from, not by position. A transform is not an identity: the vertex-detector petals are tube segments, so the three layers of a petal share both origin and rotation and differ only in radius, which the O2 matrix cache does not carry. Position-only matching is kept as a fallback and reports such cases as ambiguous instead of assigning them arbitrarily.

macros/run_test.sh generates an ALICE 3 geometry with o2-sim and checks every TRK chip against its ACTS surface; config/gen3_geometry_config.json is the matching geometry description.

@njacazio

Adds the Acts::TrackingGeometry that an ACTS-based reconstruction needs, built
from the TGeo geometry O2 already has live in memory. ACTS stays an optional
dependency: without it these packages produce no targets.

O2::ACTSInterface (Detectors/ACTS/interface), no DPL dependency:
  - TrackingGeometryManager, a lazily-built process-wide provider following the
    o2::base::Propagator::Instance() / GeometryTGeo::Instance() pattern. It
    fetches nothing itself; callers make gGeoManager available first, normally
    by declaring GRPGeomRequest::Aligned.
  - ITrackingGeometryBuilder, the detector-specific seam, plus the element store
    the geometry does not own but depends on.
  - SurfaceIndexMap, the O2 sensor <-> ACTS surface lookup.
  - MagneticFieldAdapter, an Acts::MagneticFieldProvider over the O2 field.

O2::ACTSWorkflow (Detectors/ACTS/workflow): ActsGeometryService, the same
provider reachable through the DPL ServiceRegistry with ServiceKind::DeviceGlobal.

O2::ALICE3ACTS (Detectors/Upgrades/ALICE3/ACTS): the Gen3 Blueprint builder,
ported from actsO2 ActsAlgorithms/Geometry/src/ALICE3Gen3Geometry.cpp. The
construction logic is unchanged so the geometry identifiers stay compatible with
the standalone chain's material maps and digitisation/seeding configs; verified
by decorating an O2-built geometry with actsO2's own material map. Differences
from the original: it reads a TGeoManager handed in by the caller instead of
importing a ROOT file, and its process-lifetime static stores became member
state so several builders can coexist in one process.

Sensors are identified by the TGeo node the surface was built from, not by
position. A transform is not an identity: the vertex-detector petals are tube
segments, so the three layers of a petal share both origin and rotation and
differ only in radius, which the O2 matrix cache does not carry. Position-only
matching is kept as a fallback and reports such cases as ambiguous instead of
assigning them arbitrarily.

macros/run_test.sh generates an ALICE 3 geometry with o2-sim and checks every
TRK chip against its ACTS surface; config/gen3_geometry_config.json is the
matching geometry description.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant