You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Continue with RG-L Fix in the HitReader and AHDCEngine (#1207)
* AHDC: skip raw-hit cut lookups in sim and tidy HitReader
In simulation mode fetch_AHDCHits was still reading the per-wire
rawHitCuts table even though the pass/fail result was discarded,
which is wasted work and can fail when the sim CCDB run has no
cut entries. The cut lookups and pass check are now nested inside
the existing !sim branch alongside the ToT and ADC-gain corrections,
so sim events go straight from time calibration to DOCA.
While in the file:
- Drop the rawHitCutsTable/timeOffsetsTable/... instance fields;
the IndexedTables are passed through to fetch_AHDCHits and
T2Dfunction as parameters, matching how they are used.
- Make T2Dfunction / fetch_AHDCHits / fetch_TrueAHDCHits private;
nothing outside HitReader calls them.
- Collapse the DOCA branch to a single ternary.
- Add Javadoc on the class, constructor, calibration pipeline,
T2D function, and the hit/true-hit accessors.
* AHDC: register missing output banks, fix track-finding mode leak, drop unused MaterialMap
- Add AHDC::interclusters and AHDC::docaclusters to registerOutputBank
so framework bank management (clearing, schema lookup) sees them.
- Use a per-event effectiveMode local instead of overwriting the
modeTrackFinding instance field when an event exceeds MAX_HITS_FOR_AI;
previously a single noisy event forced CV_Distance for the rest of
the run.
- Remove the unused materialMap field and its MaterialMap/Material
imports; the Kalman filter no longer consumes it from AHDCEngine.
* AHDC/ATOF/ALERT: suffix IndexedTable variables with "Table"
Rename all IndexedTable fields, parameters, and javadoc references in the ALERT engine suite to carry a "Table" suffix, making calibration-table variables easy to spot at a glance. Touches AHDCEngine, ATOFEngine, ALERTEngine, HitReader, HitFinder, ATOFHit, and BarHit.
* ALERTEngine: fix IOOBE when Kalman loop skips a track row
The Kalman preprocessing loop read tracks back via AHDC_tracks.get(row), which breaks as soon as the empty-hit guard skips a row and desynchronises row from the list index. Build each Track through a local reference, initialise position/momentum/trackid, then append — so skipped rows never
poison later iterations. Also log a warning on the skip branch so the upstream "AHDC::track row with no matching AHDC::hits" case is visible.
* ALERTEngine: drop unreachable empty-hit guard, document invariant
* AHDC: greedy non-overlap selection in AI track finding
The AI candidate generator routinely emits overlapping TrackPredictions that share PreCluster (and therefore Hit) references. Accepting all predictions above threshold let later tracks silently steal earlier
tracks' hits via in-place set_trackId() mutation, leaving orphan rows in AHDC::track with no matching rows in AHDC::hits — which in turn crashed the ALERTEngine Kalman loop with IndexOutOfBoundsException inside
Track(ArrayList<Hit>).
Sort predictions by score descending, greedily accept each one only if none of its PreClusters has already been claimed, enforcing one-hit one-track.
0 commit comments