Repository navigation
Conversation
…resic, errc) to (resi, var, ..., z, tcorr, resic, varc) at master, but the straight-line fitter (3 sites) and ALT1 still pass the old list - field-off pulls carry sigma as variance, cos(theta_rel) as tcorr, the drift time as the CDC cathode residual and the FDC cathode residual as its variance; by reading, MilleFieldOff would reject nearly every field-off track - `libraries/TRACKING/DTrackFitterStraightTrack.cc`, three sites (CDC forward, FDC, CDC central): pass the variance `V` (FDC: `V(0,0)` and `V(1,1)`) instead of its square root and drop the `cosThetaRel` argument, which the master `pull_t` no longer has, so `tcorr`, `resic` and `varc` receive what their names say. - `libraries/TRACKING/DTrackFitterALT1.cc`: pass the variance instead of the error. Only the arguments change; the fit itself is untouched. Master only: release 5.9.0 has the old `pull_t` and its call sites are right there. Card: https://pages.jlab.org/halld/auto-hunt/cards/r3-53-straightline-pulls-old-pull-t-arguments/index.html Evidence folder: https://code.jlab.org/halld/auto-hunt/-/tree/main/bughunt/confirmed/halld_recon/TRACKING/r3-53-straightline-pulls-old-pull-t-arguments Created by Autonomous HallD "auto-hunt" campaign (executed by Claude) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tart segment never marked matched Two patches, one cause each, both in `libraries/TRACKING/DTrackFinder.cc`. - `patches/master.patch` (start segment): one line, `fdc_segments[i][j].matched=true;` where the linked track is built. The segments linked to it are already marked; the start segment then no longer comes back as a one-segment candidate and can no longer be attached to another track. - `patches/master-state-companion.patch` (state): `fdc_tracks[i].FindStateVector();` becomes `fdc_tracks[i].S=fdc_tracks[i].FindStateVector();` at the two places, as the constructor of `fdc_segment_t` does. Both apply unchanged to release 5.9.0 (same lines). Card: https://pages.jlab.org/halld/auto-hunt/cards/r3-33-straightline-stale-state-duplicate-segment/index.html Evidence folder: https://code.jlab.org/halld/auto-hunt/-/tree/main/bughunt/confirmed/halld_recon/TRACKING/r3-33-straightline-stale-state-duplicate-segment Created by Autonomous HallD "auto-hunt" campaign (executed by Claude) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…C hit variance V_CDC uninitialised in wire-based fits, so field-off forward tracks with CDC hits are filtered with a garbage CDC weight `libraries/TRACKING/DTrackFitterStraightTrack.cc`: `V_CDC` starts at `1.15*(0.78*0.78/12.)`, the wire-based CDC variance the central filter of the same file uses; time-based fits overwrite it with `CDCDriftParameters` as before. One line. The patch applies to master and to release 5.9.0 unchanged (the file is the same). Card: https://pages.jlab.org/halld/auto-hunt/cards/r3-56-straightline-forward-cdc-variance-uninitialised/index.html Evidence folder: https://code.jlab.org/halld/auto-hunt/-/tree/main/bughunt/confirmed/halld_recon/TRACKING/r3-56-straightline-forward-cdc-variance-uninitialised Created by Autonomous HallD "auto-hunt" campaign (executed by Claude) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…etector into the new t0_sigma argument of DTrackFitter::FitTrack, so every field-off time-based fit gets t0_detector = SYS_NULL (and t0_sigma = 256 for the start counter) `libraries/TRACKING/DTrackTimeBased_factory_StraightLine.cc`: the call to `DTrackFitter::FitTrack` passes `Quiet_NaN` for the new `t0_sigma` argument (its default) and the start-time detector in `t0_det`, so the call matches the master signature. One line; it is the only call of this wrapper with a start time in `libraries/` and `plugins/`. Card: https://pages.jlab.org/halld/auto-hunt/cards/r3-52-straightline-t0-detector-into-t0-sigma/index.html Evidence folder: https://code.jlab.org/halld/auto-hunt/-/tree/main/bughunt/confirmed/halld_recon/TRACKING/r3-52-straightline-t0-detector-into-t0-sigma Created by Autonomous HallD "auto-hunt" campaign (executed by Claude) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…en identical runs (UNKNOWN 40.155 against NULL_DETECTOR 0.0): a field left unset `patches/master.patch`, one line in `libraries/TRACKING/DTrackCandidate.h`: the constructor also sets `xc`, `yc`, `rc`, `dCharge` and `dMinimumDriftTime` to 0, `dDetector` to `SYS_NULL`, and `FirstPackage` and `LastPackage` to 0. These are the values release 5.9.0 gives the time and its detector (`DTrackingData`). Factories that set the members are not changed; the StraightLine factory (no-field runs) now hands out defined values where it sets none. Setting the fields in the StraightLine factory alone would fix the case seen; the constructor covers every factory and every member at once. The code comment in the patch says the wire-based factory reads these fields of every candidate; with no field it does not (it takes the StraightLine wire-based tracks), so the comment may be shortened. Card: https://pages.jlab.org/halld/auto-hunt/cards/r3-45-straightline-candidate-detector-time-unset/index.html Evidence folder: https://code.jlab.org/halld/auto-hunt/-/tree/main/bughunt/confirmed/halld_recon/TRACKING/r3-45-straightline-candidate-detector-time-unset Created by Autonomous HallD "auto-hunt" campaign (executed by Claude) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…after the beyond-table branch, so a drift time past the last table entry reads cdc_drift_table one element past its end
`libraries/TRACKING/DTrackFitterStraightTrack.cc`, `CDCDriftParameters`: the interpolation block becomes the `else`
branch of the beyond-table test, so a drift time beyond the last entry keeps `d = f_delta` and never reads the table.
Two lines (an `else{` and its closing brace); the result is the value the code computes today whenever the read past
the end returns a finite number. The file is identical at release 5.9.0; the patch applies there unchanged.
Card: https://pages.jlab.org/halld/auto-hunt/cards/r3-54-straight-line-drift-table-read-past-end/index.html
Evidence folder: https://code.jlab.org/halld/auto-hunt/-/tree/main/bughunt/confirmed/halld_recon/TRACKING/r3-54-straight-line-drift-table-read-past-end
Created by Autonomous HallD "auto-hunt" campaign (executed by Claude)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…o identical runs in most events: their time and detector fields are never set `libraries/TRACKING/DTrackCandidate_factory_StraightLine.cc`: after each `new DTrackCandidate` (the FDC and the CDC branch), set `dMinimumDriftTime = 0`, `dDetector = SYS_NULL`, `xc = yc = rc = 0` and `FirstPackage = LastPackage = 0`, the values release 5.9.0 effectively gives the time and the detector. Five lines per branch. An initialiser in `DTrackCandidate.h` would cover every factory but recompile every user of the header; this patch keeps to the factory that leaves them unset. Master only: release 5.9.0 initialises them in the base class. Card: https://pages.jlab.org/halld/auto-hunt/cards/r3-60-straight-line-candidate-unset-time-detector/index.html Evidence folder: https://code.jlab.org/halld/auto-hunt/-/tree/main/bughunt/confirmed/halld_recon/TRACKING/r3-60-straight-line-candidate-unset-time-detector Created by Autonomous HallD "auto-hunt" campaign (executed by Claude) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ased and 9 time-based of run 133609 (10000 events), one with chisq 0.000011 at Ndof -2 One line in `libraries/TRACKING/DTrackFitterStraightTrack.cc`, at the end of the forward Kalman filter: return `VALUE_OUT_OF_RANGE` when the measurement count is 4 or less, before `ndof-=4`. This is the guard the central filter already has (line 596), so both filters now treat a fit without degrees of freedom the same way: the iteration fails, the fit keeps its previous iteration or, on the first one, fails. Card: https://pages.jlab.org/halld/auto-hunt/cards/r3-64-straight-line-forward-fit-negative-ndof/index.html Evidence folder: https://code.jlab.org/halld/auto-hunt/-/tree/main/bughunt/confirmed/halld_recon/TRACKING/r3-64-straight-line-forward-fit-negative-ndof Created by Autonomous HallD "auto-hunt" campaign (executed by Claude) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
R3-53 S1 (commit 97d8753)The field-off drift-chamber alignment gets no tracks: the straight-line fitter fills hit residuals in an old orderWhat is wrong. For each hit on a track the fitter stores its residual and error in a small record (a "pull"). The code (on GitHub): Fixed, as the main (Kalman) fitter already fills it: What it does (real data, field-off run, 10000 events):
Plot: BH-371: tracks written to the field-off alignment file, today and with the fix BH-371 (version 2). Today's bars have zero length; orange with the fix. Limits: the alignment fit itself was not run. Who is affected. Field-off alignment of the CDC and FDC with the development code; anyone reading the pulls of Who is not. Field-on running and physics; release 5.9.0 (it has the old record). The fix. Fill the record in its new order, with variances. Grade S1 (most severe of four, "an output missing in every event"): the alignment output is empty; no crash, no Full card with plots and the evidence for the code owner: https://pages.jlab.org/halld/auto-hunt/cards/r3-53-straightline-pulls-old-pull-t-arguments/index.html Created by Autonomous HallD "auto-hunt" campaign (executed by Claude) |
R3-33 S2 (commit cfe8bc3)Solenoid off: each forward track's first piece also comes back as its own trackWhat is wrong. Without field, forward tracks are built by linking straight pieces (segments) of the The code (on GitHub): Fixed: What it does (field-off run 133609, 2.4M events; selected events, mostly not the
η → π⁰γγ: not run on this sample. About half of the gains are explained by the duplicates: the selection drops events with more than three extra BH-443. A different sample from the table's: field on, 1000 events (998 read), finder forced on, start-piece fix alone. Who is affected. Event selection without field, the only case using this finder. The 2025-01 pass has the The fix. Mark the start piece used; keep the direction after a join. Grade S2 (second of four levels of how widely an output moves): three photon reactions change by about 4% Full card with plots and the evidence for the code owner: https://pages.jlab.org/halld/auto-hunt/cards/r3-33-straightline-stale-state-duplicate-segment/index.html Created by Autonomous HallD "auto-hunt" campaign (executed by Claude) |
R3-56 S2 (commit 90d6fc2)Field-off track fits weight forward CDC hits with an uninitialised numberWhat is wrong. With the solenoid off, tracks are fitted as straight lines in two passes: wire-based (wire The code (on GitHub): Fixed, with the wire-based value the same fitter already uses for central tracks: What it does (field-off data, 10 000 events; two runs of today's code are identical):
Plot: BH-390: field-off track counts today and with the fix BH-390. Limits: one field-off run, no truth (no field-off simulation), one build. Benchmark reactions (a change; no direction is claimed): 2.4M raw events of the field-off run 133609 (solenoid off), master; same events, σ from events gained and lost:
No event selected in this sample: ω → π⁺π⁻π⁰, ρ → π⁺π⁻, φ → K⁺K⁻ and e⁺e⁻. Who is affected. Anyone reconstructing field-off runs (mostly alignment): these are then the default tracks. Who is not. Field-on data and simulation, including eta -> pi0 gamma gamma: the straight-line fit does not make The fix. Give the variable its wire-based value (one line). Grade S2 (second most severe of four): track counts change by more than 1% in this build (another build may Full card with plots and the evidence for the code owner: https://pages.jlab.org/halld/auto-hunt/cards/r3-56-straightline-forward-cdc-variance-uninitialised/index.html Created by Autonomous HallD "auto-hunt" campaign (executed by Claude) |
R3-52 S3 (commit 7f70127)Field-off track fits lose the detector of the start timeWhat is wrong. With the solenoid off, tracks are fitted as straight lines. The time-based fit is told which The code. The real lines (on GitHub): Fixed: What it does. Field-off run 133609 (2025-01), first 10000 events; two runs of today's code are identical:
A lower chi2 is expected once hit errors grow; it does not say which fit is right. No benchmark reaction moves beyond the run-to-run noise (2.4M raw events, field off). Plot: BH-558: with the fix the fit chi2 falls in 6076 field-off tracks and rises in 459 BH-558. Change of the fit chi2 per field-off track, fix minus today. Who is affected. Anyone reconstructing field-off runs with master or 5.16.0, mostly for alignment: these are Who is not. Field-on data and simulation, and every job of release 5.9.0. The fix. Pass the detector in its own argument (one line). Grade S3 (third of four levels, S1 the most severe), graded on field-off jobs: tracks change in a minority of Full card with plots and the evidence for the code owner: https://pages.jlab.org/halld/auto-hunt/cards/r3-52-straightline-t0-detector-into-t0-sigma/index.html Created by Autonomous HallD "auto-hunt" campaign (executed by Claude) |
R3-45 S4 (commit f1a9ba8)Full card with plots and the evidence for the code owner: https://pages.jlab.org/halld/auto-hunt/cards/r3-45-straightline-candidate-detector-time-unset/index.html Created by Autonomous HallD "auto-hunt" campaign (executed by Claude) |
R3-54 S4 (commit f41db51)Full card with plots and the evidence for the code owner: https://pages.jlab.org/halld/auto-hunt/cards/r3-54-straight-line-drift-table-read-past-end/index.html Created by Autonomous HallD "auto-hunt" campaign (executed by Claude) |
R3-60 S4 (commit 4b4e3ef)Full card with plots and the evidence for the code owner: https://pages.jlab.org/halld/auto-hunt/cards/r3-60-straight-line-candidate-unset-time-detector/index.html Created by Autonomous HallD "auto-hunt" campaign (executed by Claude) |
R3-64 S4 (commit 3a44e79)Full card with plots and the evidence for the code owner: https://pages.jlab.org/halld/auto-hunt/cards/r3-64-straight-line-forward-fit-negative-ndof/index.html Created by Autonomous HallD "auto-hunt" campaign (executed by Claude) |
|
This pull request was split out of #1259 at your request. It holds the straight-line (field-off) tracking fixes: R3-53 ( Two notes. R3-53 also fixes the same call in the optional ALT1 fitter; it is one finding, so it is kept in one commit. R3-45 and R3-60 are alternatives: R3-45 changes the shared Created by Autonomous HallD "auto-hunt" campaign (executed by Claude) |
|
Test status for this pull request: SUCCESS Summary: summary.txt Build log: make_auto-hunt_tracking-straight.log |
These fixes come from the Hall D bug hunt, an autonomous campaign that read the GlueX software, built a test for every suspect line, and kept only findings confirmed by a measurement: a test run of the program on data or simulation, or a direct call of the code against a known answer. Each commit below fixes one finding and is named by its finding id and grade (S1 most serious, S4 least). Every commit has a comment in this pull request with the finding's card: what is wrong, the code, the measured effect, who is affected and the fix. Full cards with plots are on the campaign pages (JLab login): https://pages.jlab.org/halld/auto-hunt/index.html, by library: https://pages.jlab.org/halld/auto-hunt/libraries.html
Split out of #1259 at the reviewer's request. #1259 first held all 49 tracking findings. It now holds the production-tracking fixes (S1 to S3); the straight-line (field-off) fixes and the minor (S4) fixes are in two separate pull requests, this one and #1264 (S4). The commits are the same changes as before, cherry-picked onto the current master without conflicts; the three pull requests merge together in any order, and their combination equals the former #1259 branch file for file.
Overall gains
8 confirmed bugs fixed in this pull request (S1 1, S2 2, S3 1, S4 4), one commit each, in the order of the commits (most serious first).
Related findings and commits that belong together
DTrackFitterALT1.cc); one finding, one commit, so that hunk stays here with the straight-line sites.DTrackCandidateconstructor, which every candidate factory uses, production included; R3-60 sets them in the straight-line candidate factory only. Either one fixes the field-off case; take R3-60 alone if the shared header should not change.DTrackFitterStraightTrack.ccand are in this order on the branch.How it was tested
Each finding's card says how it was confirmed (a run of the program before and after the fix on the same events, or a direct call of the function). The commits were rebased on the current default branch; every changed source file compiles (syntax check against the release headers). A full build and a physics benchmark of this combination of commits has not been run on the new base.
Created by Autonomous HallD "auto-hunt" campaign (executed by Claude)