Repository navigation
auto-hunt: TRACKING - 19 fixes (S1 1, S2 6, S3 12) - #1259
Conversation
R3-43i S1 (commit ad67206)A simulation option that rates tracks by their true particle crashes the jobWhat is wrong. A simulation option replaces each track's quality number (normally its fit probability) by one The code (on GitHub): Fixed: find the position of the particle with that id first. What it does (1000 simulated events with the option):
Plot: BH-370: simulation jobs with the option, today and with the fix BH-370. Today dashed, nothing written; orange with the fix. Both crash reports name this function. Who is affected. Simulation studies that switch the option on. Who is not. Data, and every reconstruction without the option. The fix. Look the particle up by its id. Grade S1 (most severe of four, "the job crashes"): both tested jobs crash. The option is off by default, set by Full card with plots and the evidence for the code owner: https://pages.jlab.org/halld/auto-hunt/cards/r3-43i-truth-fom-thrown-indexed-by-myid/index.html Created by Autonomous HallD "auto-hunt" campaign (executed by Claude) |
R3-53 S1 (commit 103385b)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-1 S2 (commit dcf3986)The track fit gives electrons and positrons about half the collision energy loss they should haveWhat is wrong. For electron and positron fits, the loss formula holds the square of the mean excitation energy, The code (shortened, on GitHub): Fixed: What it does (unselected: 1000 events of a 2025-01 run; selected: seven standard reactions in 1M events
Plot: BH-67: the fit gives electrons 0.416 to 0.553 of the textbook collision loss at 1 GeV/c BH-67. Collision loss of the fit over the textbook value for an electron, from the code's formula (no events); Who is affected. Lepton analyses: too little lost energy is added back, so momenta Who is not. Pion, kaon and proton fits; no standard reaction yield moves beyond three standard deviations. The fix. Subtract the logarithm twice (one line). Grade S2 (second of four levels of how widely an output moves): electron and positron fits change beyond 0.1% in Full card with plots and the evidence for the code owner: https://pages.jlab.org/halld/auto-hunt/cards/r3-1-electron-dedx-ln-i-once/index.html Created by Autonomous HallD "auto-hunt" campaign (executed by Claude) |
R3-33 S2 (commit f9bc3cd)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-41 S2 (commit a746929)The step-size settings of the track swim do not reach the wire-based fitWhat is wrong. The tracking swim reads its step settings (the TRK parameters, such as the largest step) from The code. The real lines, shortened (on GitHub): Fixed: What it does (998 events of a 2025-01 run read in both runs; events that change with the fix):
BH-901. Events changed by the fix per object type, default settings and largest step 1 cm (default 3 cm), current Who is affected. Jobs that set a TRK step parameter: the time-based energy-loss swim follows it, the wire-based Who is not. Default jobs and production: 0 of 998 events change. The fix. Build the wire-based swim with the job's handle. Grade S2 (second of four; S1 is the most severe), on jobs that set a TRK step parameter: with the one value Full card with plots and the evidence for the code owner: https://pages.jlab.org/halld/auto-hunt/cards/r3-41-wirebased-rt-ignores-trk-parameters/index.html Created by Autonomous HallD "auto-hunt" campaign (executed by Claude) |
R3-56 S2 (commit 3158f7f)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) |
|
Build status for this pull request: FAILURE Build log: make_auto-hunt_tracking.log |
R3-59 S2 (commit 7f64e7f)Forward tracks: after the CDC endplate, every step of the track fit has the endplate's thicknessWhat is wrong. Stepping along z, the forward track fit crosses the CDC endplate in one step of the endplate's thickness, 0.6 cm, and sets a flag. The flag is never cleared, so every later step The code Fixed: What it does (BH-T74; 1000 events of run 132404, 998 event numbers in both outputs):
Plot: BH-287: changed fits per angle range, lower and higher chi2/ndf BH-287. Fits per angle range, one per track: unchanged, lower or higher chi2/ndf with the fix. Real data; no truth. Who is affected. Every analysis with forward tracks (FDC hits, below about 20 degrees), and less so 20-60 degrees Who is not. Tracks above 60 degrees (4 of 1454 fits move). The fix. Clear the flag after the endplate step. Grade S2 (second most severe of four): track fits move beyond one printed digit in 65% of events. No physics effect was measured; Full card with plots and the evidence for the code owner: https://pages.jlab.org/halld/auto-hunt/cards/r3-59-forward-steps-ignore-limits-after-cdc-endplate/index.html Created by Autonomous HallD "auto-hunt" campaign (executed by Claude) |
R3-6 S2 (commit 2e4929c)Most tracks carry their z correlations with the wrong signWhat is wrong. Most tracks end their fit in a forward description, and their error matrix is then converted to the point closest to the beam line. There the code takes the derivatives of that point's z with the wrong The code (on GitHub): Fixed, as in the file's other conversion: What it does (2025-01 data; the fits fit energy, momentum and vertex):
Plot: BH-74: kinematic fit quality per event, with the fix against today BH-74. Per event selected with and without the fix, 1 million 2025-01 raw events: fit chi-square per degree of freedom, fix over today (orange), two runs without the fix (blue). Left of 1: lower with the fix. Limits: real data, three reactions; a lower chi-square is not by itself a check against the true vertex. Who is affected.
Who is not. Track parameters and their single errors; reactions with one charged track. Yields of seven standard The fix. Change the four signs. Grade S2 (second of four levels of how widely an output moves): the vertex fit changes in most events. It says Full card with plots and the evidence for the code owner: https://pages.jlab.org/halld/auto-hunt/cards/r3-6-transformcovariance-z-row-sign/index.html Created by Autonomous HallD "auto-hunt" campaign (executed by Claude) |
R3-63 S2 (commit 7400bde)A simulation option that forces the true particle identity misses most masses, so a wrong mass often winsWhat is wrong. Each track is fitted under several masses, each with a quality number (FOM, 0 to 1); later code picks the highest-FOM mass. The simulation option The code (on GitHub): Fixed: every mass gets the truth score after What it does (1000 simulated events; 2439 tracks matched to a simulated hadron):
Plot: BH-465: which mass wins, without the option, today and with the fix BH-465. Without the option a wrong mass wins in 1495 (the fit FOM alone does not identify particles). The 1134 are Side effect of the fix (at the default FDC setting). Tracks with every FOM 0 fail the vertex fit's minimum: events Who is affected. Simulation studies that set this option (off by default). Grade S2 (S1 the most severe of four): in jobs that set the option, a wrong mass wins for at least one track in Full card with plots and the evidence for the code owner: https://pages.jlab.org/halld/auto-hunt/cards/r3-63-truth-fom-skips-added-hypotheses/index.html Created by Autonomous HallD "auto-hunt" campaign (executed by Claude) |
R3-9 S2 (commit 5a68e7c)Forward track fit: one field-gradient term uses the wrong track slopeWhat is wrong. The forward track fit carries the track and its errors from step to step with derivatives of the The code. The real lines, shortened (on GitHub): Fixed: What it does (raw: 1000 events of a 2025-01 run; selected: 22187 events seven standard reactions select in
Plot: BH-76: largest track momentum change per selected event BH-76. Largest track momentum change per selected event. Right of the dotted line, beyond 0.1%: 1879 events (2299 with angle changes). Limits: one run. Who is affected. Every analysis with charged tracks, in data and simulation; photons through clustering and Who is not. Analyses without charged tracks or photons near tracks. In most selected events tracks move only by The fix. One letter: tx to ty. Grade S2 (second of four levels of how widely an output moves), at its lower edge: tracks change beyond a tenth Full card with plots and the evidence for the code owner: https://pages.jlab.org/halld/auto-hunt/cards/r3-9-forward-jacobian-tx-for-ty/index.html Created by Autonomous HallD "auto-hunt" campaign (executed by Claude) |
R3-10 S3 (commit f11403d)Path length and flight time are swapped for FDC planes beyond the fitted forward trackWhat is wrong. After a forward track fit, the code extends the track to the FDC planes the fit did not reach and The code. The real lines, shortened (on GitHub): Fixed, as in every other call of the file: What it does. Raw data of a 2025-01 run, and a direct call:
Plot: Path length per FDC plane Who is affected. Forward tracks, most when the hit search runs along a slow mass hypothesis: time-based tracks Who is not. Photons: neutral showers change in 12 of 998 events, through track matching. The fix. Swap the two arguments back, one line. Grade S3 (third of four levels of how widely an output moves, S1 the widest): tracks change in 8% of events (2% in Full card with plots and the evidence for the code owner: https://pages.jlab.org/halld/auto-hunt/cards/r3-10-fdc-extrapolation-s-t-swapped/index.html Created by Autonomous HallD "auto-hunt" campaign (executed by Claude) |
R3-12 S3 (commit 5668850)The final step of a central track to the beam line applies the energy loss with the wrong signWhat is wrong. A track fitted with the central (CDC) parameters is finally stepped from the start of its fitted The code. The real lines, shortened (on GitHub): What it does. Simulated gamma p -> eta p, eta -> gamma gamma, proton momentum at the vertex:
Plot: Proton momentum change per event Who is affected.
Who is not. Photons: 0 of 1041 photon energies change. Yields of seven selected reactions in 1 million raw events The fix. Drop the minus. Grade S3 (third of four levels of how widely an output moves, S1 the widest): track values, to the printed digits, change in Full card with plots and the evidence for the code owner: https://pages.jlab.org/halld/auto-hunt/cards/r3-12-vertex-extrapolation-eloss-sign/index.html Created by Autonomous HallD "auto-hunt" campaign (executed by Claude) |
R3-14 S3 (commit 0d8a379)Track fit at the CDC end: the wire is taken at a different place along the beam than the trackWhat is wrong. For forward tracks the Kalman fitter takes each CDC hit's track-to-wire distance at their closest The code. Shortened (on GitHub): Fixed, inside the same What it does. Raw data of run 132404 (2025-01), 998 events, each run now and fixed:
Plot: Momentum change of each track fit the fix changes Who is affected. Analyses with tracks at 10 to 30 degrees, which leave the CDC through its end: a fit changes in Who is not. Yields of seven selected reactions (none beyond 1.13 standard deviations). Photons, except through The fix. Take the wire where the track is. Grade S3 (third of four, S1 the most severe): fits change in a minority of events; no count or yield moves by 1%. Full card with plots and the evidence for the code owner: https://pages.jlab.org/halld/auto-hunt/cards/r3-14-finddoca-endplate-clamp-z/index.html Created by Autonomous HallD "auto-hunt" campaign (executed by Claude) |
R3-19 S3 (commit bf3a770)Forward track candidates keep a stale record of which FDC packages they spanWhat is wrong. An FDC track candidate records its first and last FDC package (of four). When segments from The code. Shortened (on GitHub): Fixed: set the range from the joined segments, sorted along the beam. What it does. Raw data of run 132404 (2025-01) reprocessed with master, without -> with the fix:
Plot: Where the changed candidates start, and the CDC hits they gain Who is affected. Future passes with master: forward tracks up to 30 degrees get their CDC hits in 4.2% of events; Who is not. Files of the 2025-01 pass (release 5.9.0). Photons, except through tracks; The fix. Update the package range wherever segments are joined. Grade S3 (third of four, S1 the most severe): candidates change in a minority of events with master; no count or Full card with plots and the evidence for the code owner: https://pages.jlab.org/halld/auto-hunt/cards/r3-19-fdc-package-range-not-updated/index.html Created by Autonomous HallD "auto-hunt" campaign (executed by Claude) |
R3-2 S3 (commit 3d9d887)The first track fit compounds a magnetic-field correction from one wire hit to the nextWhat is wrong. For the first fit of every track, the hit selection gives each wire hit an error from the track's The code. CDC loop, shortened; the FDC loop is the same (on GitHub): Fixed: scale the values at the track's start, kept before the loop. What it does. Run 132404 (2025-01), same events:
Plot: Error given to each hit of the test track, now against fixed Who is affected. Every analysis with charged tracks: in 28% of events a track takes different hits, or a track Who is hardly affected. Photon energies: none change in 1041 simulated eta -> gamma gamma events. The fix. Scale from the values at the track's start. Grade S3 (third of four levels of how widely an output moves): a minority of events; no count or yield by 1%. Full card with plots and the evidence for the code owner: https://pages.jlab.org/halld/auto-hunt/cards/r3-2-alt2-field-ratio-compounded/index.html Created by Autonomous HallD "auto-hunt" campaign (executed by Claude) |
R3-32 S3 (commit bc6cd50)The alternative Kalman track fitter subtracts the hit time offset twice and oversteps toward the CDC wireWhat is wrong. Two faults in the optional second Kalman track fitter. Its hits arrive with the event's time The code (on GitHub): With the fix the offset is subtracted once, and each piece starts where the last one ended. The double offset exists What it does (998 raw events of a 2025-01 run, this fitter selected):
BH-894. Track fits of this fitter, today and with the time fix. The default fitter on the same events is the Who is affected.
Who is not. The default reconstruction, its files and the physics benchmarks, which run the default fitter and The fix. Subtract the offset once; start each step piece where the last one ended. Grade S3 (second lowest of four), on the jobs that set the option: objects change in 498 of 998 events, just Full card with plots and the evidence for the code owner: https://pages.jlab.org/halld/auto-hunt/cards/r3-32-alt1-finddoca-step-and-double-t0/index.html Created by Autonomous HallD "auto-hunt" campaign (executed by Claude) |
R3-37 S3 (commit 6a3adbc)The track extrapolation to a radius returns the flight time of the wrong pointWhat is wrong. To find where a track crosses a radius, a BCAL shower's, the code steps back from the The code. Shortened (on GitHub): Fixed: What it does. Off by up to one step:
Plot: Flight time returned at each radius on a test step, now and fixed Who is affected.
Who is not. Uses of the crossing position alone; photon energies (1041 simulated eta -> gamma gamma events). The fix. The same fraction for both. Grade S3 (third of four levels, S1 the widest): a minority of events; no count or yield moves 1%. The Full card with plots and the evidence for the code owner: https://pages.jlab.org/halld/auto-hunt/cards/r3-37-extrapolate-to-radius-alpha/index.html Created by Autonomous HallD "auto-hunt" campaign (executed by Claude) |
R3-4b S3 (commit 7346f0e)Track fits: the forward fit of a track with CDC hits only wins the comparison but was never storedWhat is wrong. A track below 60 degrees is fitted with the forward and the central track model; the The code. Shortened (on GitHub): Fixed: the FDC block closes before the store. What it does. Raw data of run 132404 (2025-01), 998 events, now -> fixed:
Plot: Simulated tracks whose fit the fix replaces, against the thrown particle In simulation (picture), of 6 replaced fits (4 tracks) near a thrown particle, 5 move closer to it in direction, 4 in Who is affected. Analyses with charged tracks below 60 degrees with CDC hits only: a fit changes in 2.4% to 3.4% of Who is not. Photons, except through track matching (simulated eta -> gamma gamma: 0 of 1041 events change); in The fix. Store the forward fit for every track. Grade S3 (third of four levels): track fits change in a minority of events; no object count or yield Full card with plots and the evidence for the code owner: https://pages.jlab.org/halld/auto-hunt/cards/r3-4b-forward-cdc-fit-never-saved/index.html Created by Autonomous HallD "auto-hunt" campaign (executed by Claude) |
R3-43d S3 (commit b094616)Distance from a track to a hit point: one branch checks its small-angle limit the wrong way roundWhat is wrong. A tracking routine finds the distance from a track to a hit point with a small-angle expansion of The code. The real lines, shortened (on GitHub): Fixed: What it does (1000 raw events of a 2025-01 run, alternative hit selector):
BH-905. Constructed cases, the calls on 1000 raw events, and track counts with the alternative hit selector. Who is affected. Jobs run with the alternative hit selector, a switch the code offers on the command line; the Who is not. Standard reconstruction, REST files and analyses: the default hit selector uses another distance The fix. Turn the test round. Grade S3 (third of four; S1 is the most severe), on jobs that select the alternative hit selector: wire-based Full card with plots and the evidence for the code owner: https://pages.jlab.org/halld/auto-hunt/cards/r3-43d-disttort-three-root-angle-check-inverted/index.html Created by Autonomous HallD "auto-hunt" campaign (executed by Claude) |
R3-48 S3 (commit f4e661c)The energy-loss density correction compares ln I with a threshold off by a factor of 10What is wrong. The density-effect correction of the track fit's energy loss takes one form for materials whose The code (the same test sits in two more places; Fixed: What it does (BH-T80; the code's formulas and the run 132404 maps; data: run 132404, 1000 events, 998 event
Plot: BH-301: density correction in aluminium, and the change of energy loss BH-301. Computed from the code's formulas, not measured. Top: the correction in aluminium, today, fixed, tabulated. Who is affected. Every analysis with charged tracks, release 5.9.0 and master, data and simulation. Changed pion Who is not. Photon-only analyses, but for track matching (neutral showers change in 15 of 998 events). The fix. Write -16.118 in the three places (measured at the main one). Grade S3 (third of four): track fits move beyond one printed digit in 36% of events; track counts by 0.11%. No Full card with plots and the evidence for the code owner: https://pages.jlab.org/halld/auto-hunt/cards/r3-48-density-effect-ln-i-threshold-factor-10/index.html Created by Autonomous HallD "auto-hunt" campaign (executed by Claude) |
R3-49 S3 (commit e26cea8)Some track fits store a time of about one million nanosecondsWhat is wrong. The track fit takes a track's time from the earliest CDC or FDC drift time along its path, The code. The real lines, shortened (on GitHub): With the fix: What it does. Track fits near 1 000 000 ns in the reduced (REST) output of 1000 events: 256 of 10 342 today, 1M raw events of run 132404, master; same events, σ from events gained and lost:
Not moving: π⁰ → γγ, η → γγ, e⁺e⁻ and ω → π⁰γ (below 3σ: at most +1.1%, 1.2σ). Plot: BH-543: 1061 simulated track times at the placeholder today, none with the fix BH-543. 4000 simulated events, one sample; momentum and angle are in the details. Who is affected.
Who is not. Track momentum and angle. The fix. Keep the fit's start time when no drift time was found. Grade S3 (third of four levels, S1 the widest): objects change in 159 of 998 events. A benchmark move of 1% or Full card with plots and the evidence for the code owner: https://pages.jlab.org/halld/auto-hunt/cards/r3-49-kalman-t0-sentinel-reaches-tracks/index.html Created by Autonomous HallD "auto-hunt" campaign (executed by Claude) |
R3-51 S3 (commit 256b429)CDC stereo points of the track-candidate refit are placed beyond the track's crossingWhat is wrong. When a track candidate joins FDC and CDC hits, its helix is refitted, and each CDC stereo wire The code. The real lines, shortened (on GitHub): Fixed: What it does. 1000 events of run 132404 (2025-01):
Benchmark reactions: No benchmark reaction moves beyond the run-to-run noise (1M raw events). Plot: BH-554: a CDC stereo point is stored past the wire-circle crossing, 0.22 cm at 40 cm BH-554. Where the point is stored today and with the fix, drawn with an enlarged angle; measured distances on the figure. Who is affected.
Who is hardly affected. Physics yields: no benchmark reaction moves. In 4000 simulated events the fixed tracks lean The fix. Drop the second division. Grade S3 (third of four levels, S1 the most severe): candidates change in a quarter of the events; no count or Full card with plots and the evidence for the code owner: https://pages.jlab.org/halld/auto-hunt/cards/r3-51-helicalfit-stereo-distance-divided-twice/index.html Created by Autonomous HallD "auto-hunt" campaign (executed by Claude) |
R3-52 S3 (commit 48d9897)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-11 S4 (commit 8204e73)CDC hit pulls get their track error from a matrix the smoother has already overwrittenWhat is wrong. After a central track is fitted, the smoother walks back along it and, at each CDC hit, computes The code (on GitHub): With the fix: What it does (1000 raw events of run 132404, 2025-01):
Plot: BH-881: 18322 of 19598 CDC hits get their track error from an overwritten matrix; 0 with the fix BH-881. Smoothed CDC hits of 1000 raw events, today and with the fix. Dashed: the count expected from the Who is affected.
Who is not. Tracks, showers, particles, reduced (REST) files and analysis trees: the smoother feeds only the The fix. Move a copy of the error matrix to the wire. Grade S4 (lowest of four): 0 of 998 events change a reconstructed object; only monitoring and alignment inputs Full card with plots and the evidence for the code owner: https://pages.jlab.org/halld/auto-hunt/cards/r3-11-smoothcentral-overwrites-smoothed-covariance/index.html Created by Autonomous HallD "auto-hunt" campaign (executed by Claude) |
R3-13 S4 (commit 4527943)A rare fallback of the track finder gives forward track candidates a polar angle of 32 to 43 degreesWhat is wrong. The track finder refits candidates that join CDC and FDC hits. When the straight-line part of The code (on GitHub): With the fix, the cotangent, the form the same code uses elsewhere for this slope: What it does (track candidates that take the fallback):
Plot: BH-887: all 6 changed candidates sit at 32.6 to 42.6 deg today; with the fix 0.5 to 30.0 deg BH-887. The 6 track candidates the fix changes in the first 100 000 events of a 2025-01 raw file, today and with Who is affected.
Who is not. Physics results: no benchmark reaction moves beyond the run-to-run noise (1M raw events, 2025-01 The fix. Use the cotangent of the forward candidate's angle. Grade S4 (lowest of four): candidates change in 6 of 99 998 events, final tracks in 2; which side is closer to Full card with plots and the evidence for the code owner: https://pages.jlab.org/halld/auto-hunt/cards/r3-13-dorefit-tanl-fallback-wrong-formula/index.html Created by Autonomous HallD "auto-hunt" campaign (executed by Claude) |
R3-15 S4 (commit daf74d7)Dense CDC regions are mostly not remembered, so outer layers start tracks there anywayWhat is wrong. The CDC has seven rings of wire layers, called super layers. Where one super layer's hits are The code (on GitHub): With the fix every stretch, the last included, is stored under its own number, from its first dropped seed. What it does (1000 raw events of a 2025-01 run):
BH-893 version 2. Every dense super layer in 1000 raw events and what is stored for it. The three faults were not Who is affected.
Who is not. Physics analyses at 2025-01 rate: no benchmark reaction moves beyond the run-to-run noise (1M raw The fix. Store every stretch, the last one included, under its own super layer and with its true edges. Grade S4 (lowest of four): track candidates change in 2 of 998 events (0.2%), final tracks in 1. It says nothing Full card with plots and the evidence for the code owner: https://pages.jlab.org/halld/auto-hunt/cards/r3-15-cdc-rejected-phi-regions-misindexed/index.html Created by Autonomous HallD "auto-hunt" campaign (executed by Claude) |
R3-17 S4 (commit 27427c7)A rare fallback of the CDC track finder gives every circle it fits the same chargeWhat is wrong. The CDC track finder fits a circle to each track seed. When that fit fails, a second circle fit The code (on GitHub): With the fix, the fallback takes the charge from the circle, as the first fit does: What it does:
Plot: BH-889: the one candidate the fix changes in 998 events, today moving inward, with the fix outward BH-889. The changed candidate (5 CDC hits) seen along the beam, start point and direction today and with the fix. Who is affected.
Who is not. Final tracks and physics: the changed candidate makes no track, and no benchmark reaction moves The fix. Take the charge from the circle in the fallback too. Grade S4 (lowest of four): one candidate changes in 1 of 998 events, nothing downstream. Present in release 5.9.0 Full card with plots and the evidence for the code owner: https://pages.jlab.org/halld/auto-hunt/cards/r3-17-cdc-fallback-circle-charge-fixed/index.html Created by Autonomous HallD "auto-hunt" campaign (executed by Claude) |
R3-21 S4 (commit 2480c40)One forward track piece can be joined to two central track candidates at onceWhat is wrong. The track finder joins forward (FDC) track pieces to central (CDC) track candidates. Once a pair The code (on GitHub): With the fix the inner loop stops after the first match: What it does (998 raw events of a 2025-01 run):
BH-878. The two candidates that take a forward piece a second time, today and with the fix. Today's and fixed Who is affected.
Who is not. Physics analyses: no benchmark reaction moves beyond the run-to-run noise (1M raw events). The number The fix. Stop the search once a forward piece is joined. Grade S4 (lowest of four): tracks change in 2 of 998 events (0.2%). It says nothing about physics weight. Full card with plots and the evidence for the code owner: https://pages.jlab.org/halld/auto-hunt/cards/r3-21-fdc-candidate-merged-into-several-cdc/index.html Created by Autonomous HallD "auto-hunt" campaign (executed by Claude) |
R3-22 S4 (commit ab162f7)Forward track candidates that pick up stray CDC hits keep the fit quality and charge of the FDC fit aloneWhat is wrong. The track finder gives CDC hits that no candidate uses ("stray" hits) to a forward (FDC) The code (on GitHub): With the fix, after a refit (as the code already does for the other matching step a few lines above): What it does (track candidates the fix changes):
Plot: BH-525: today no changed candidate counts its CDC hits; with the fix 591 of 749 count them all BH-525. Candidates by CDC hits the fit quality leaves out. With the fix these are, by reading, stereo hits, added Who is affected.
Who is not. Final tracks and physics. Later fits start from the candidate's charge but refit the hits: a charge The fix. After a refit, take chi-square, degrees of freedom and charge from the refit. Grade S4 (lowest of four): the changed values stay inside the reconstruction; no file or final track carries Full card with plots and the evidence for the code owner: https://pages.jlab.org/halld/auto-hunt/cards/r3-22-unused-cdc-refit-takes-fdc-values/index.html Created by Autonomous HallD "auto-hunt" campaign (executed by Claude) |
… hit `libraries/TRACKING/DTrackHitSelectorALT2.cc`, `GetCDCHits` and `GetFDCHits` (the versions that take a reference trajectory, used by the wire-based fit): the values of pt/a, p/a and a/p at the track's start are kept in three constants before the hit loop, and each hit sets `p_over_a=p_over_a_0*invBratio` (and the same for the other two) instead of multiplying in place. One line added and three changed in each of the two functions. `patches/master.patch` for master, `patches/r5.9.0.patch` for release 5.9.0 (same lines, nine lines later). This is the smallest change that gives each hit one ratio, the local-field one the lines already compute; the error model itself is left as it is. Card: https://pages.jlab.org/halld/auto-hunt/cards/r3-2-alt2-field-ratio-compounded/index.html Evidence folder: https://code.jlab.org/halld/auto-hunt/-/tree/main/bughunt/confirmed/halld_recon/TRACKING/r3-2-alt2-field-ratio-compounded Created by Autonomous HallD "auto-hunt" campaign (executed by Claude) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Two patches, one cause each, both in `libraries/TRACKING/DTrackFitterKalmanSIMD_ALT1.cc`. - `patches/master.patch` (doca): `StepJacobian(z,newz,...)` and `Step(z,newz,...)` in the piecewise doca loop become `StepJacobian(my_z,newz,...)` and `Step(my_z,newz,...)`. The loop already advances `my_z`, and the remainder step after it already starts from `my_z`. Applies unchanged to release 5.9.0 (same lines). - `patches/master-t0-companion.patch` (time): the three `-mT0` terms of the FDC and CDC updates are removed, since the hit objects of the base fitter already carry the subtraction at master. For master only: at 5.9.0 the hit objects keep the raw times, and these lines are the only subtraction. Card: https://pages.jlab.org/halld/auto-hunt/cards/r3-32-alt1-finddoca-step-and-double-t0/index.html Evidence folder: https://code.jlab.org/halld/auto-hunt/-/tree/main/bughunt/confirmed/halld_recon/TRACKING/r3-32-alt1-finddoca-step-and-double-t0 Created by Autonomous HallD "auto-hunt" campaign (executed by Claude) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…) where α is needed `libraries/TRACKING/DTrackFitter.cc`, `ExtrapolateToRadius`: `double ds=alpha*delta.Mag();` in place of `(1.-alpha)*delta.Mag()`, so that s and t are corrected by the same fraction of the step as the position. One line. `patches/master.patch` for master, `patches/r5.9.0.patch` for release 5.9.0 (same line, 546). Card: https://pages.jlab.org/halld/auto-hunt/cards/r3-37-extrapolate-to-radius-alpha/index.html Evidence folder: https://code.jlab.org/halld/auto-hunt/-/tree/main/bughunt/confirmed/halld_recon/TRACKING/r3-37-extrapolate-to-radius-alpha Created by Autonomous HallD "auto-hunt" campaign (executed by Claude) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s below THETA_CUT (save block inside the FDC branch)
`src/libraries/TRACKING/DTrackFitterKalmanSIMD.cc`, `KalmanLoop`: the branch `if (my_fdchits.size()>0){` now closes
before the store of the forward-CDC fit, which becomes a block of its own, so the forward fit is stored for tracks
with and without FDC hits. One brace moved, one brace and a comment added; the stored fields are unchanged. This is
the minimal change: the comparison at lines 3486 and 3512 is already written for every track. `patches/master.patch`
for master, `patches/r5.9.0.patch` for release 5.9.0 (the same lines two earlier). The result does not depend on the
order of hits or tracks.
Card: https://pages.jlab.org/halld/auto-hunt/cards/r3-4b-forward-cdc-fit-never-saved/index.html
Evidence folder: https://code.jlab.org/halld/auto-hunt/-/tree/main/bughunt/confirmed/halld_recon/TRACKING/r3-4b-forward-cdc-fit-never-saved
Created by Autonomous HallD "auto-hunt" campaign (executed by Claude)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…root branch; last_swim_step set before NaN returns `libraries/TRACKING/DReferenceTrajectory.cc`: `fabs(phi)>=0.2` instead of `fabs(phi)<0.2` before the NaN return of the three-root branch, matching the one-root branch and the small-angle expansion both evaluate. One line. The patch applies to master and to release 5.9.0 unchanged. Card: https://pages.jlab.org/halld/auto-hunt/cards/r3-43d-disttort-three-root-angle-check-inverted/index.html Evidence folder: https://code.jlab.org/halld/auto-hunt/-/tree/main/bughunt/confirmed/halld_recon/TRACKING/r3-43d-disttort-three-root-angle-check-inverted Created by Autonomous HallD "auto-hunt" campaign (executed by Claude) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ry non-gas material takes the low-I branch One literal in `DTrackFitter::CalcDensityEffect` (run), and the same literal in `DReferenceTrajectory::dPdx` and `DParticleID::GetScintMPdEandSigma` (not run; the scintillator lies below 100 eV either way). Effect: materials above 100 eV take the X1 = 3 branch; pion dE/dx in aluminium at 1 GeV/c 2.7% lower, delta 0.58 -> 1.19 (tabulated 1.01). Run 132404, 1000 events: time-based fits change in 733 of 998 events, 545 of 10452 paired fits change printed momentum; fit quality unchanged. Not checked against truth. Card: https://pages.jlab.org/halld/auto-hunt/cards/r3-48-density-effect-ln-i-threshold-factor-10/index.html Evidence folder: https://code.jlab.org/halld/auto-hunt/-/tree/main/bughunt/confirmed/halld_recon/TRACKING/r3-48-density-effect-ln-i-threshold-factor-10 Created by Autonomous HallD "auto-hunt" campaign (executed by Claude) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e sentinel reaches DTrackTimeBased on the refit path `libraries/TRACKING/DTrackFitterKalmanSIMD.cc`: the track time and t0 take the earliest drift time only when the search found one (`mT0MinimumDriftTime < 1e6`); otherwise they keep the start time the fit used, with its error and detector. `patches/master.patch` for master, `patches/r5.9.0.patch` for release 5.9.0, where the code differs (5.9.0 does not add `mT0` back). Card: https://pages.jlab.org/halld/auto-hunt/cards/r3-49-kalman-t0-sentinel-reaches-tracks/index.html Evidence folder: https://code.jlab.org/halld/auto-hunt/-/tree/main/bughunt/confirmed/halld_recon/TRACKING/r3-49-kalman-t0-sentinel-reaches-tracks Created by Autonomous HallD "auto-hunt" campaign (executed by Claude) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e by cos(stereo) a second time, so every CDC stereo point of a FDC+CDC candidate refit sits off the wire-circle intersection and its z is stretched by 1/cos(stereo) `libraries/TRACKING/DHelicalFit.cc`: `s = dz` instead of `dz/cos(wire->stereo)`; `dir` is the unit wire vector, so the root of the quadratic is the distance along the wire. One line. `patches/master.patch` for master, `patches/r5.9.0.patch` for release 5.9.0 (the debug print next to the line differs there). Card: https://pages.jlab.org/halld/auto-hunt/cards/r3-51-helicalfit-stereo-distance-divided-twice/index.html Evidence folder: https://code.jlab.org/halld/auto-hunt/-/tree/main/bughunt/confirmed/halld_recon/TRACKING/r3-51-helicalfit-stereo-distance-divided-twice Created by Autonomous HallD "auto-hunt" campaign (executed by Claude) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
e00c717 to
46a4bc4
Compare
|
Thank you. The pull request is now split three ways:
Each commit is cherry-picked unchanged; the patch ids are identical to the old 49 commits. No pick conflicted, so nothing was ported by hand. The three branches merge in any order without conflict, and their merge equals the old branch file for file. Every changed source file passes a syntax-only compile against the release headers at each branch tip. The card comments posted here earlier carry the old commit hashes. The 30 findings that moved have their comments posted again in #1263 and #1264. 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.log |
staylorjlab
left a comment
There was a problem hiding this comment.
R3-43i: Yes, it's good to make the meaning of FOM in this context consistent.
staylorjlab
left a comment
There was a problem hiding this comment.
R3-41. Yes, it makes the command-parameters for the DReferenceTrajectory actually useful.
staylorjlab
left a comment
There was a problem hiding this comment.
R3-48: yes, this gives a better approximation and appears to be consistent with what is done elsewhere, e.g. in geant4
staylorjlab
left a comment
There was a problem hiding this comment.
R3-32: Yes. This alternate fitter is deprecated and will eventually be removed.
staylorjlab
left a comment
There was a problem hiding this comment.
R3-10: Yes -- this fixes a typo.
staylorjlab
left a comment
There was a problem hiding this comment.
R3-9: Yes, this fixes a typo.
staylorjlab
left a comment
There was a problem hiding this comment.
R3-6: yes, looks like a good fix.
staylorjlab
left a comment
There was a problem hiding this comment.
R3-12. Yes. Now dEdx is handled consistently.
staylorjlab
left a comment
There was a problem hiding this comment.
R3-37: yes, looks good.
R3-43d: yes, fixes logic flaw
staylorjlab
left a comment
There was a problem hiding this comment.
R3-19: Yes, this restores the intended behavior as implemented in the earlier release.
staylorjlab
left a comment
There was a problem hiding this comment.
R3-4b. Looks okay. The fits that trigger this condition are not very good, but it looks like there is some recovery/improvement.
staylorjlab
left a comment
There was a problem hiding this comment.
R3-49. Yes, this gets rid of some ridiculous timing values. I plan to revisit how the minimum drift time is found later.
staylorjlab
left a comment
There was a problem hiding this comment.
Just as a quick test: running p2pi_hists on one run (120400) from 2023 for MC and real data:
Computing rho yields/1 k events
master this_PR ratio
MC 291.0 296.5 1.019 (only 100 k events were simulated)
Data 5.04 5.21 1.034 (one full run)
In both cases the yields go up. It will need further study to determine if the difference between the gain improvements is significant.
staylorjlab
left a comment
There was a problem hiding this comment.
R3-2. Yes, seems okay.
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 at the reviewer's request (2026-12-01). This pull request first held all 49 tracking findings. It now holds the 19 production-tracking fixes (S1 to S3). The straight-line (field-off) fixes are in #1263 (8 commits) and the remaining minor fixes in #1264 (22 commits, all S4). The commits are the same changes as before, cherry-picked onto the current master without conflicts; the branch was force-pushed. The three pull requests merge together in any order, and their combination equals the former 49-commit branch file for file. The comments below for the 30 findings that moved belong to #1263 and #1264 now, where each is posted again; the commit hashes in all 49 earlier comments here are those of the old branch.
Overall gains
19 confirmed bugs fixed in this pull request (S1 1, S2 6, S3 12), one commit each, in the order of the commits (most serious first).
TRKFIT:PID_FORCE_TRUTHshould replace every FOM by a truth score, above 0 only for the true mass. It does so only for the masses fitted first (the pion, and the proton for slow tracks); masses added later keep their fit FOM. Release 5.9.0 is the same; "today" includes the fix of the option's crash.Related findings and commits that belong together
DTrackFitterKalmanSIMD.cc,DReferenceTrajectory.cc,DTrackFitter.cc,DHelicalFit.cc,DTrackCandidate_factory_FDCCathodes.cc) in different places; they merge without conflict in either order.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)