Repository navigation
Conversation
… pi0 (p) although the fit is not singular there Create_Constraints and Get_ConstraintInfo (DKinFitUtils_GlueX.cc): when no particle of the p4 constraint has its own errors but two or more mass-constrained decaying particles are in it, and the p4 constraint is the production step, the system is not treated as over-constrained and no mass constraint is deleted. With one such particle nothing changes (the deletion avoids a singular matrix there). Measured on 1.6 M events of run 132404: NDF 2 -> 3, the first fitted photon pair 163.3 / 39.6 MeV -> 134.977 / 0.059 MeV, the fit no longer depends on the pi0 order. Relates to #733; the issue's own channel (one pi0, missing proton) is not fixed. Card: https://pages.jlab.org/halld/auto-hunt/cards/gh-733-pi0pi0-missing-proton-mass-constraint-dropped/ Created by Autonomous HallD "auto-hunt" campaign (executed by Claude) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…the inversion of S fails DKinFitter::Calc_dS lowers the tolerance on dS, but dS_Inverse = dS copies only the elements, so the inversion runs at the default tolerance, fails, and leaves S in place of S^-1; the fit goes on and reports a result. Now a copy is inverted with TDecompLU::InvertLU, its status is kept, both tolerances are reset, and a failed inversion ends the fit with d_KinFitFailedInversion. Same change as R7-26 of the campaign table. Card: https://pages.jlab.org/halld/auto-hunt/cards/gh-733b-kinfit-failed-inversion-used-as-inverse/ Created by Autonomous HallD "auto-hunt" campaign (executed by Claude) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Two-pi0 kinematic fits with a missing proton drop one pi0 mass constraintWhat is wrong. In the fit of g p -> pi0 pi0 (p missing) the fitter deletes the first pi0's mass constraint, The code (on GitHub): Fix, added before it (two constrained decays leave the matrix invertible): What it does (pi0 pi0 (p) combos, 1.6 M events):
First fitted photon-pair mass of pi0 pi0 (p) combos: 163.3 MeV mean today, 134.977 MeV with the fix Affected. Fits with a missing recoil where every measured particle sits in a mass-constrained decay, with two or The fix. Keep every mass constraint when two or more constrained decays carry the errors. Full card (JLab login): https://pages.jlab.org/halld/auto-hunt/cards/gh-733-pi0pi0-missing-proton-mass-constraint-dropped/ Created by Autonomous HallD "auto-hunt" campaign (executed by Claude) |
A fit that cannot invert its matrix goes on and reports a resultWhat is wrong. When the matrix S of the kinematic fit looks singular, the fitter lowers a tolerance on S so it The code (shortened, on GitHub): Fixed: invert the copy, keep the status, and What it does (test arm, 50 000 events: a code change keeps a pi0 mass constraint that master removes):
On real data it is rare: 0 failures in 1.6 M events (three reactions, six fit set-ups). A failed inversion is used as the inverse: 671 fits report CL = 1, none with the fix Who is affected.
Who is not. The fits measured here on real data. The fix. Report the failed inversion; the fit fails. Inverting at the lowered tolerance instead is left to the authors. Grade S4: no output changes above noise on real data. It does not say a published result moved. Full card (JLab login): https://pages.jlab.org/halld/auto-hunt/cards/gh-733b-kinfit-failed-inversion-used-as-inverse/ 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_kinfit-gh733.log |
Addresses part of #733.
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. Full cards with plots are on the campaign pages (JLab login): https://pages.jlab.org/halld/auto-hunt/index.html
What is left of #733
The issue's own channel, g p -> pi0 (p missing), is not fixed here. There a single mass-constrained pi0 carries all the measured errors of the p4 constraint, because the beam photon has no errors in the fit. The 4 p4 rows and the pi0 mass row then depend on the photons only through the pi0 4-vector, so S = D V D^T is singular (rank 4 for 5 rows). The fitter's guard removes the pi0 mass constraint to avoid that, silently. A 2C fit for that channel needs a change at the fitter level. The options are in a comment on #733 and are a choice for the maintainers. This pull request fixes the case where the guard is too broad: two or more constrained decaying particles.
Overall gains
2 confirmed bugs fixed in this pull request (S2 1, S4 1), one commit each, most serious first.
dS_Inverse = dScopies only the elements. The inversion then runs at the normal tolerance and fails, ROOT leaves the matrix unchanged, and the fit goes on with S in place of S^-1 and reports a result. On the data measured here it was not met (0 in 1.6 M events). The e+e- pair fit meets it 6-16 times per 1000 raw events, with no output change above noise. In a test that keeps the single-pi0 mass constraint, all 671 such fits came out with chi2 below 1e-5 and CL = 1.Related findings and commits that belong together
dS.SetTol(...)lowers the tolerance on dS, butdS_Inverse = dScopies only the elements.dS_Inversekeeps the default tolerance, soInvert()fails for exactly the matrices the lowering was meant to let through.How it was tested
Not tested: no simulation check of the CL distribution for true pi0 pi0 p events (the data sample has no pi0 or missing-mass selection and is mostly background). Decay-step p4 constraints with two constrained decaying products keep the old behaviour. This branch (both commits, on master c6ad386) builds: its ANALYSIS and KINFITTER libraries were compiled into the campaign's master tree with g++ 13 (BUILD EXIT 0, 2026-12-02); it was not run as a whole. An earlier test build carried GH-733b's change together with a broader form of GH-733's rule (it also kept the single-pi0 constraint, for the test arm above). In it, pi0 pi0 (p) with both mass constraints had 0 failed inversions and the same fit in 1857 of 1858 combos. The physics benchmark was not run.
Created by Autonomous HallD "auto-hunt" campaign (executed by Claude)
🤖 Generated with Claude Code