Conversation
Extend MatchTPCITS to work with ITS clusters provided either as a single (monolithic) input or per layer, with layer-dependent ROF length and bias (staggered readout): - ITS clusters, sizes, cluster ROFRecords and MC labels are stored per layer, clusters are addressed by the composed ID (layer<<28)+index_in_layer (all in slot 0 for the monolithic input) - all ITS ROF timings (per-layer lengths and biases in BC and mus, the clock layer defining the ITS tracks ROFs granularity) are derived from the DPLAlpideParam object set via setAlpideParam; the setITSROFrameLength... and setITSTimeBiasInBC setters are removed - interaction candidates are related to the cluster ROFs of every AfterBurner layer within the optional abROFMarginMUS margin (allowing up to 2 compatible ROFs per layer) and are cut at the last clock-layer cluster ROF - AfterBurner reworked for CPU efficiency: unused clusters are filtered and (chip,Z)-sorted once per TF into per (layer, ROF) blocks, built only for the ROFs referenced by candidates with seeds; ITSChipClustersRefs is replaced by thread-local per-layer views (compact Y,Z,id,chip cluster info) refreshed only when the processed group of candidates changes ROFs - tpcits-match-workflow can request the per-layer ITS clusters input (through RecoContainer::setITSPerLayer) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…hing MatchTPCITS previously assigned every ITS track the full clock-layer ROF duration as its time bracket. TrackITS now carries a per-track TimeStamp (BC since TF start, symmetric error, ROF bias already applied), which is typically much narrower than the ROF, especially in staggered running. - prepareITSData builds the per-track bracket from getTimeStamp(), widened by the new itsTimeStampMarginBC margin (BC, both edges), falling back to the nominal ROF bracket when the time stamp is invalid (legacy input) - mITSROFTimes is extended to the envelope of the nominal ROF bracket and the actual per-track brackets, keeping the TPC-side and triggered-mode ITS ROF entry caches conservative - mITSMaxROFOverhangMUS tracks how far track brackets extend past their ROF end in the current TF; doMatching's continuous-mode entry lookup is shifted by this amount so no compatible track is skipped - sorting by bracket min time still cannot mix tracks of different ROFs (the tracker guarantees the raw lower edge stays within the assigned ROF, and the margin shifts all tracks alike), so the existing mITSTimeStart assignment and the tBracket-based break/continue gates in doMatching remain valid without a LUT rebuild; the long-dead RejectOnTgl ROF-skip code (whose precondition never held with mixed layers) is removed - refitTrackTPCITS derives the fallback ITS time error from the track's own bracket (delta()/sqrt(12)) instead of the nominal clock-layer ROF resolution Net effect: most TPC x ITS pairs are now rejected by the cheap bracket overlap check in doMatching before the sqrt/kinematic comparisons, with no new containers and a single extra float member. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
With the per-layer (staggered readout) ITS clusters input the cluster index kept by TrackITS is local to its layer, so the layer must be encoded into the stored reference for the consumers to be able to find the cluster. MatchTPCITS already decoded the ITS/TRACKCLSID entries as such composed IDs, but the tracker pushed the bare per-layer index, which was correct only for the layer 0. - ITSTrackingInterface::run composes the stored reference as (layer << ClusLayerShift) + index_in_layer; with the monolithic clusters input the layer slot is 0 and the composed ID stays equal to the flat index, so the non-staggered output is unchanged - the ID composition/decomposition and the max number of separately provided ITS/MFT cluster layers move from MatchTPCITS.h to the new lightweight DataFormatsITSMFT/ClusterID.h, so that both the producer and the (many) consumers can use them without pulling in GlobalTracking; RecoContainer.h includes it and keeps MaxITSLayers/MaxMFTLayers as aliases - the layer field is shifted by 27 rather than 28 bits, so that it can accommodate the MFT layers too: the bit 31 is unusable, since the negative values of the composed ID are reserved for the "no cluster" flags - the unused TrackITSExt::setClusterIndex, carrying its own hardcoded copy of the composition (and writing to the packed slot while getClusterIndex reads the layer slot), is removed Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Stores the clusters of all layers in a single vector with the per-layer offsets and gives access by the composed ID of ClusterID.h, so that the same code works for the monolithic and the per-layer input. Detector agnostic: the filling is left to the caller, since the spacepoint conversion needs the detector geometry and dictionary. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
shahor02
requested review from
a team,
arossi81,
bazinski,
davidrohr,
f3sch,
fgrosa,
fprino,
mconcas,
mcoquet642,
wiechula and
wille10
as code owners
September 30, 2026 20:01
Collaborator
The parallel cluster sizes vector is indexed via ClustersPerLayer::flatIndex so that it cannot diverge from the cluster container offsets.
Cluster-overlap bookkeeping in AlignableDetectorITS moves to a per-layer ROF loop; this is the natural granularity anyway since row-side chip overlaps are always within a single layer. Note: this whole module will be superseded by the new MP-2 based package.
…y-workflow TrackMCStudy's ITS occupancy counting sums over the layer slots, each with its own ROF cursor advanced by DPLAlpideParam::getROFLengthInBC/ getROFBiasInBC(layer).
EveWorkflowHelper only flattens the per-layer clusters; its ROF records were already used solely as an emptiness guard, not for timing.
All 7 study classes selectable from this single workflow. AnomalyStudy is ported in full (its nROF is a config parameter and all histograms are per layer, so per-layer ROF counters are the natural granularity). EfficiencyStudy and ITSBeamBackgroundStudy request the per-layer input but refuse to run on it (LOGP fatal): their algorithms rely on assumptions the staggered readout breaks (cluster-ROF index == track-ROF index; chaining consecutive ROFs across the 3 IB layers into one strobe series), and the replacement is an analysis choice for the study to make. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Depends on #15869
Keeping 1 commit per workflow to facilitate review/reverting if needed.
The structures made for ITS can be directly used also for staggered MFT.
Not covered yet: accounting of finite ITS track time interval in PVFinder.
Also, the QC is not yet ready for per-layer input.