Skip to content

feat: displaced-track (LRT) support for GBTS seeding#5668

Draft
jburzy wants to merge 4 commits into
acts-project:mainfrom
jburzy:jburzyns-GBTS-LRT
Draft

feat: displaced-track (LRT) support for GBTS seeding#5668
jburzy wants to merge 4 commits into
acts-project:mainfrom
jburzy:jburzyns-GBTS-LRT

Conversation

@jburzy

@jburzy jburzy commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

The GBTS graph builder assumed beamline-pointing tracks in several places, making its LRT mode inefficient for large impact parameters. This PR removes or parametrizes those assumptions so that GBTS can seed tracks with |d0| up to a configured d0Max (300 mm for ITk LRT), and fixes several related bugs. All changes are should not affect prompt
configurations. The widenings scale with d0Max (negligible at prompt values) or are gated on lrtMode, and new configuration fields default to the previous behaviour.

Bug fixes:

  • Fix the ptCoeff units error (0.5BUnitConstants::m with pT in GeV), which made the curvature cuts ~1000x too loose and silently disabled them in LRT mode and in the old-tunings path
  • Keep the entry-layer graph vetoes (isolated-node skip, z0-bitmask) out of LRT mode: they require a confirmed continuation two hits beyond the candidate doublet, which is only valid for minLevel >= 3; in LRT mode (minLevel 2) they rejected every three-space-point seed
  • Bounds-guard the z0 histogram fill, which wrote out of bounds when doubletFilterRZ was disabled

Displaced-aware cut widenings, evaluated as upper bounds at d0Max and radius-dependent so they vanish for r >> d0Max:

  • phi sliding window: widened by the position-azimuth swing asin(d0Max/r1) - asin(d0Max/r2); the phi wrap-around indexing margin scales accordingly
  • curvature proxy |dphi/dr|: widened by the same swing per unit radius, evaluated only for candidates in the marginal band
  • segment tau-ratio matching: widened by the ds/dr chord-factor ratio bound (cot(theta) cancels); each edge caches its chord factor
  • segment direction-phi matching: both estimates anchor at the shared node, so they differ by (c12 - c23)*r2 with c the per-segment asin(d0Max/r) chord slope; widened by that bound, band-gated

Configurability and generalization:

  • GbtsGeometry: the eta-bin pair connectivity z0 range (previously hardcoded to +-168 mm) is a constructor argument; a per-layer inward depth derived from the connection map replaces hardcoded layer IDs for the LRT matchBeforeCreate gate
  • Barrel/endcap decisions use the geometry layer type instead of ITk pixel layer-ID arithmetic, enabling triplet d0/pT validation and adaptive tau corrections for strip seeding
  • GbtsConnectionFilter enum (PixelOnly/StripOnly/All) replaces the boolean lrtMode volume filtering (bool overloads kept)
  • GbtsTrackingFilter: initial state covariances are configurable and an optional d0-driven r-z slope process noise accounts for the geometric dz/dr variation of displaced trajectories
  • z0 bitmask resolution and histogram tolerance made configurable
  • Per-cut debug accounting in the graph builder, chain statistics in the seed extraction, and rejection counters in the tracking filter, reported at DEBUG level with per-rejection kinematics at VERBOSE

--- END COMMIT MESSAGE ---

cc @jpreston-cern

Remove implicit beamspot/prompt-track assumptions from the GBTS graph
builder and make the remaining ones configurable, so that the LRT mode
can reconstruct tracks with transverse impact parameters up to d0Max
(300 mm for ITk LRT). All changes are no-ops for prompt configurations:
they are gated on lrtMode or scale with d0Max.

Correctness fixes:
- Fix the ptCoeff units bug (0.5*B*UnitConstants::m with minPt in GeV
  made maxCurv ~1000x too loose, silently disabling the LRT and
  old-tunings curvature cuts)
- Bounds-guard the z0 histogram fill, which wrote out of bounds when
  doubletFilterRZ was disabled
- Make the eta-bin pair connectivity z0 range configurable
  (GbtsGeometry constructor arguments replacing the hardcoded +-168 mm)

Displaced-aware graph building (lrtMode):
- Widen the phi sliding window by the position-azimuth swing
  asin(d0Max/r1) - asin(d0Max/r2) and scale the phi wrap-around
  indexing margin to cover the widest window
- Widen the segment tau-ratio matching (and the matchBeforeCreate
  precut) by the exact ds/dr chord-factor bound; each edge now carries
  its dsdrD0 factor
- Widen the curvature-proxy cut by the geometric term
  (asin(d0Max/r1) - asin(d0Max/r2))/dr, evaluated only for candidates
  in the marginal band

Generalized layer gating:
- Barrel tests now use the geometry layer type instead of the
  pixel-barrel layer-ID arithmetic, activating triplet validation
  (d0/pT cuts) and adaptive tau corrections for strip seeding
- In lrtMode the entry-layer pruning gates (isolated-node skip,
  z0-bitmask veto, matchBeforeCreate) derive from a new per-layer
  inward depth computed from the connection map instead of the
  hardcoded 80000/81000 pixel layer IDs
- Layer adjacency in the adaptive tau correction handles the strip
  numbering (consecutive IDs differ by 1) alongside the pixel one
- z0 bitmask resolution is configurable (z0HistoResolution)

Tracking filter:
- Initial state covariances are configurable (initCovX/initCovY)
- Optional d0-driven r-z slope process noise (Config::d0Max) accounts
  for the geometric dz/dr variation along a displaced trajectory

Connection parsing:
- GbtsConnectionFilter (PixelOnly/StripOnly/All) replaces the
  hardcoded lrtMode volume filtering; bool overloads kept for
  backward compatibility

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@github-actions github-actions Bot added Component - Core Affects the Core module Seeding labels Jul 11, 2026
@github-actions github-actions Bot added this to the next milestone Jul 11, 2026
@jburzy jburzy closed this Jul 11, 2026
jburzy and others added 3 commits July 11, 2026 10:49
The isolated-node skip and the z0-bitmask veto require the outer node of
a candidate doublet to have a confirmed outward continuation, i.e. two
further hits beyond the doublet. This is only valid when the minimum
chain level is 3 (prompt configuration). In LRT mode a bare triplet is a
valid seed (minLevel 2) and its middle node is never confirmed, so the
generalized entry-layer gate was rejecting all seeds built from exactly
three space points, costing 20-30% absolute LRT efficiency at low d0 in
single-muon validation. Restrict both vetoes to the prompt configuration;
the matchBeforeCreate precut only requires an existing tau-compatible
continuation edge and remains active in LRT mode.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Count every doublet/triplet rejection cause in buildTheGraph, report
chain-length and level statistics in extractSeedsFromTheGraph, and count
per-cut rejections in the tracking filter State. Summaries are printed
at DEBUG level, per-rejection kinematic detail at VERBOSE, for
diagnosing seed-level inefficiencies (e.g. single-muon samples where
every real edge should survive).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Both direction estimates of two linked segments anchor at their shared
node, so for a displaced track they differ by (c12 - c23) * r2, where
c_ab is the position-azimuth chord slope asin-difference of each
segment. This exceeds cutDPhiMax for impact parameters above ~90 mm at
the ITk strip radii, which was the dominant seed loss for
90 < d0 < 300 mm in single-muon validation (GridTriplet reference holds
~75% there while GBTS fell to ~25%). Widen the acceptance in LRT mode
by the bound evaluated at d0Max, computed only for candidates in the
marginal band.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@jburzy jburzy reopened this Jul 11, 2026
@jburzy jburzy marked this pull request as draft July 11, 2026 15:49
@jburzy jburzy force-pushed the jburzyns-GBTS-LRT branch from 9fa1d8f to be5bb5b Compare July 11, 2026 16:01
@github-actions

Copy link
Copy Markdown
Contributor

📊: Physics performance monitoring for be5bb5b

Full contents

physmon summary

❗️: Downstream build failure

  • eic-shell EICrecon (cc @acts-project/epic-contacts)

❗️: Downstream build failure

  • Key4hep (cc @acts-project/key4hep-contacts)

@sonarqubecloud

Copy link
Copy Markdown

@jpreston-cern

Copy link
Copy Markdown
Contributor

Thanks for doing this @jburzy! can you validate that the prompt tracking still looks relatively the same (although i imagine it'll be a little different with the corrected ptCoeff ), as well as if running in Examples stand alone is affected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Component - Core Affects the Core module Seeding

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants