Skip to content

Staggering + linearisation references + misc - #67

Closed
mpuccio wants to merge 46 commits into
f3sch:devfrom
mpuccio:fix/gtrk-pr-f3sch-dev
Closed

mpuccio wants to merge 46 commits into
f3sch:devfrom
mpuccio:fix/gtrk-pr-f3sch-dev

Conversation

@mpuccio

@mpuccio mpuccio commented Nov 12, 2026

Copy link
Copy Markdown

No description provided.

Felix Schlepper and others added 30 commits November 5, 2026 21:28
… and never on the device

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… has it

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Detectors/GenericTracking grows from the bounded allocator to a
detector-generic tracking library with its ALICE adapters and devices:

- base/ (O2::GTrkBase): the bounded allocator, the capacity estimator, the
  bounded columns (memlayout), the geometry and time model and the layouts
  of ITS, MFT and ALICE 3's TRK+FT3.
- tracking/ (O2::GTrkTracking, O2::GTrkTrackingCUDA/HIP): the header
  tracker (tracklets, triplets, roads, fit, selection, follow, refit), the
  vertexer, and the device tracker on O2's GPU framework: a GPU chain of its
  own holds the arena's block of the reconstruction's pool, and each backend
  library registers its runtime when it is loaded.
- workflow/ (O2::GTrkWorkflow): the cluster conversion, the measurement
  producer (with the mean vertex per timeframe) and the tracking device
  gtrk-<det>-tracker (host, or --gtrk-gpu-backend cuda|hip), publishing
  GenericTracking's own track records, vertices and contributor counts; the
  ITS and MFT adaptors to O2's TrackITS and TrackMFT with their labels; one
  workflow per detector, o2-gtrk-its-, -mft- and -trk-reco-workflow, the
  ITS's and the MFT's with the adaptor and O2's track writers.
- study/ and tools/ (with the upgrades): the bench, the study sink and its
  QA, o2-gtrk-<det>-study-workflow, the analyses, the material LUT builder
  and the checks.

The only lines outside Detectors/GenericTracking are in ITSMFT: the ITS and
ITSMFT tracking include GenericTracking/Base/BoundedAllocator.h and link
O2::GTrkBase, the allocator's new location and library.

Needs GPUhdnii() (GPU/Common) and o2-mft-track-writer-workflow (MFT).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
O2::GPUTrackingCUDA/HIP link O2::GTrkTrackingCUDA/HIP, as they link ITS's:
loaded with the backend, GenericTracking's device library registers its
runtime. AllocateRegisteredPermanentMemory sums its sizes in size_t, for
permanent resources of several GB.

Needs the GenericTracking PR (O2::GTrkTrackingCUDA/HIP).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…on, in its pool after the TPC

The device tracker attaches its block and configures the run every timeframe (attach, detach, the
arena's rebind), so that the block may move: the GPU reconstruction lends the pool's free memory
after the TPC per timeframe (DeviceContext on a borrowed reconstruction, borrow). GPURecoTracking
runs the tracking device's timeframe there; the conditions held by the GPU reconstruction take only
the detector's own; input bindings carry the detector; a dropped timeframe publishes no vertices;
the reco workflows' --tracking-in-gpu-reco and --adaptor-only are the halves before and after it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ected device, the interface's reconstruction

DeviceMemoryGap() gives the free memory between the pool's two ends, GetDeviceId() the device the
backend selected, GPUO2Interface::GetReconstruction() its reconstruction: what GenericTracking
borrows its timeframe's memory from.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…(gtrk-its-tracks, gtrk-mft-tracks)

The output types run GenericTracking's tracking inside the GPU reconstruction, after the TPC's and
before the pool is cleared, in its free memory; refused with the double pipeline and, for the ITS,
with O2's ITS tracking.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… tracking reaches

The beam spot the windows, the pair cut, the grid, the vertexing pass and the
vertex-list iterations take reaches beamZReachNSigma of the beam's z width
instead of windowNSigma of it. The default, 3, is the windows' nSigma: unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ass alone against the MC collisions

Every run timed, the first scored as the sink's vertex QA (VertexQA.h), one JSON
line per run with its vertices record: what a tuning of the vertexer's knobs takes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ets went

VertexScore keeps each collision no vertex is the best of, with its findable
primaries and its triplets cut, free or another vertex's; the bench's
--vertices-only prints them by findable bin and one by one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… too

windowAudit takes the step's direction (the outward link's order) and gives the
row's offsets from the window's centre over the gate window's half-widths; the
outward stops outside the window or not queried are audited and their offsets
printed beside the inward stops' flags.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…its rows are

The measurements' azimuth and second coordinate are about the beam line
(gridPoint); the follow's nominal crossing is the detector frame's. The step's
window (targetWindow) now takes the crossing point's azimuth and second
coordinate about the beam line (follow::windowCentre); so do the step
anatomy's window audit and the bench's clone-join replay. With the beam line at
the origin nothing changes (TRK val30 tf1 digests identical on the host and
CUDA); off it, the window no longer misses rows by the beam's offset.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…'s source score

TrackingInterface gives the own vertexer the tracker's pool, so memoryLimitGB
bounds what both hold at once: the vertexer's pass stays allocated while the
tracking runs. The bench records the pool's peak over the vertexing
(vertexerPoolPeakBytes, beside the run's poolPeakBytes, which now includes the
vertexer's pass), and --score-sources scores the particles of the given MC
sources alone (scoreSources in the JSON), for the collisions added to a mixed
timeframe. Tracks unchanged (ITS Pb-Pb digests identical).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e rows of particles not found

--breakdown-origin picks the breakdown's class, the physical primaries or the decay daughters;
--breakdown-particles records, for a particle not found or only in a fake, where each of its
layers' rows went: whether a later pass could still take them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d one fate loop

The seeding study's population (primaries, decay daughters, V0 daughters) moves into
the study library as study::Population with its parser; --breakdown-population takes
it too, in place of a second vocabulary. The --score-sources score is scoreAndPrint's
over the sources' particles, and the breakdown finds every missing row's fate in one
loop, the place against the best track only when there is one. Outputs unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A checkpoint's conditions hold the run's vertices, the dump's or the own vertexer's
(the same on the host every run); a resumed run reads it after its vertexing and
checks them. Without the vertexer the vertices are the dump's, as before. A resumed
seven-pass run gives the full run's tracks, digest and score, with either vertices.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… the device tracks' rows once

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A wave of 64 walked a tracklet source eight lanes at a time; the flat run (the
candidates listed, tested one a thread) is faster there too. The lane-group
generate (LaneGroups, its kernel and emitter) and the tracklet walk's lane share
go. Host tracks unchanged; CUDA unchanged; HIP's tracks equal on the ITS and MFT,
a track or two in a million move on TRK where a candidate sits on a window's edge.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…wer contributor floor (vertexerAloneMinContributors, off by default)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ut frame (the tracks' rule; the box's margin put it one frame early)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ploads, re-targeted where the device buffer moves
… for all their columns (DeviceRuntime::copyEachOnDevice)
…hare no array, one launch per step for both
…olumn into the sort's dead buffers and one copy back
…e bytes after the last whole unit copied apart
Felix Schlepper and others added 16 commits November 9, 2026 00:37
…ned offsets, not selected again"

This reverts commit 92f375e.
The code was formatted with a 160 column limit before; O2 has none. Lines
the limit had broken are joined again; designated initialiser lists that
span several lines keep one initialiser per line (trailing comma), and the
member initialisers of constructors longer than 160 characters stay one per
line.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… TPC's (gtrk-its-tracks, gtrk-mft-tracks)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…er it

Detectors/GenericTracking/.clang-tidy replaces O2's root configuration for
GenericTracking's sources (a superset of its checks). The code is fixed to
it: [[nodiscard]], const, auto, literal suffixes, designated initialisers,
signed/unsigned comparisons, special members, reference members as
pointers, std::format for snprintf. A replay's outward walk is a Walk, not
a Replay, so that the type does not contain itself. DeviceContext creates
its reconstruction in the member initialisers. Names that ITS, the
standard library or O2's GPU chain fix, and findings the checks cannot
see through (dependent writes, BOOST_REQUIRE, O2ParamDef), are marked
NOLINT with the reason. Nested conditionals are allowed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…etries (AliceO2Group#16063)

Co-authored-by: Andrea Sofia Triolo <andrea.sofia.triolo@©ern.ch>
Read per-layer clusters, labels and ROFs in a shared dense ordering while
preserving composed O2 cluster references in the output adapters. Propagate
staggering options through reconstruction and study workflows, use per-layer
frame timing and select the fastest output clock.

Decode native per-layer cluster references for common-truth QA. Initialize
ALICE3 converter geometry before using the curved VD segmentation.

Validation: build ITS/MFT reconstruction and study workflows and TRK study;
retain the completed uniform/staggered MC device-study comparison evidence.
Use the whole-chain Karimaki circle and longitudinal seed as an independent outward reference. Option 2 starts a new independent inward reference from the outward fitted parameters. Anchor each reference to cluster positions while retaining its transported direction and momentum within the pass.

Use the reference in the initial road fit and reuse its outward fitted state for selected-track and beam-line inward fits. Follower refits use the same per-pass policy. No per-surface reference cache is needed.

Keep ordinary fitting as the default and preserve the covariance reset, material model, mass and cuts. Expose reference configuration and fit diagnostics, and exercise the modes in the existing physical-truth and road regression tests.

Validation: ten CPU regression modules pass; options 0 and 1 produce byte-identical first-timeframe outputs for ITS, MFT and TRK. CUDA fitter memcheck and initcheck are clean, including a partial final batch; full GPU tracking remains unvalidated.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants