Regularization fixes + switch for the pre-PR-15610 compatibility mode - #15784
Merged
Conversation
… duplications
DCAFitter: apply X-error regularization only where it is needed, drop duplications
Follow-up to PR15610. The fitted PCA and chi2 are unchanged; the vertex covariance
returned by calcPCACovMatrix() (and hence by createParentTrackParCov()) becomes larger
along weakly constrained directions.
1. TrackCovI::set() takes the regularization strength as an argument (XRegErrFactor
by default, XRegNone to disable). The weak dummy X error added to sxx is needed
only to keep the Newton Hessian invertible for (nearly) collinear prongs, so
calcPCACovMatrix() now rebuilds the information matrices with XRegNone: there
only their sum is inverted (and an ill-conditioned sum is already replaced by a
loose dummy), hence the prior would only make the longitudinal vertex error
follow the dummy XRegErrFactor*Cyy instead of the track slopes. Documented in
DCAFitterN_derivation.md.
2. createParentTrackParCov() uses getCovXYZPxPyPzGlo() again instead of the
hand-written momentum Jacobian, which was algebraically identical to it (same
J for the native snp,tgl,q/pt parameters, same |q/pt|/|snp| guard). Also
replaced the literal 21 by o2::track::kLabCovMatSize.
3. The M*E*M^T rotate-and-sum block, identical in calcInverseWeight() and
calcPCACovMatrix(), is factored into addRotatedTrackInfo(). This replaces the
now unused getTrackRotMatrix().
4. calcCollinearInflation() uses o2::gpu::GPUCommonMath instead of host-only
std::sqrt/clamp/max/min, so it stays device-compilable although currently not
called; its commented-out call site becomes an explicit TODO and the unused
InflateRelDet/MaxInflation constants are removed.
5. correctTracks() sets mPropFailed and logs via mLoggerBadProp on a failed
propagation, as propagate{Param}ToX() do; the commented-out Taylor block is
replaced by a comment on why mCandTr must be moved and why the analytic
constant-Bz transport is used for the small Newton steps.
6. Added the missing newline to the mLoggerBadPCACov message.
Verified by a full explicit instantiation of DCAFitterN<2>/<3>, which type-checks
all members including the otherwise uninstantiated calcCollinearInflation().
Co-Authored-By: Claude Opus 5
Collaborator
|
Error while checking build/O2/fullCI_slc9 for edb2171 at 2026-09-10 14:55: Full log here. |
shahor02
force-pushed
the
pr_dcaFClaude
branch
from
September 10, 2026 15:56
edb2171 to
443c45d
Compare
If isOldMode() is true (default), the behavior of the DCAFitter will reproduce the pre-PR-15610 version. One can swith any time (before calling DCAFitter::process(..)) between the modes via DCAFitter::setOldMode(bool v). In the o2-secondary-vertexing-workflow and related study workflows it can be steered by the svertexer.oldDCAFitterMode=true (default) configurable param.
shahor02
force-pushed
the
pr_dcaFClaude
branch
from
September 10, 2026 16:33
443c45d to
a1c7f8d
Compare
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.
Do not squash, the compatibility mode (2nd commit) might be temporary.