Fix x-axis related error treatments#15610
Open
shahor02 wants to merge 1 commit into
Open
Conversation
Inspired by the refining (@galocco) of similar errors in the na60+ adaptation of DCAFitter (@fprino). List of changes: 1. TrackCovI now stores a full symmetric 3D information matrix. The old dummy X variance is removed. The X information is derived from the track slopes dY/dX and dZ/dX via H^T C_YZ^{-1} H. 2. XerrFactor was removed. The fit no longer creates an artificial longitudinal uncertainty from sigma_Y. 3. getTrackCovMatrix() was removed. PCA covariance is now computed from summed track information matrices, not by rotating an artificial 3D covariance with dummy X error. 4. calcPCACoefs() now multiplies the full local information matrix. Terms involving local XY and XZ correlations are included in the Ti coefficient matrices. 5. calcInverseWeight() now rotates and sums the full information matrix. All six local information elements contribute to the global 3x3 weight. 6. calcChi2Derivatives() now contracts residual derivatives with the full information matrix. The Hessian curvature term is added only to diagonal Hessian elements, matching the fact that each trajectory has second derivative only with respect to its own running parameter. 7. calcChi2DerivativesNoErr() was corrected analogously. The Gauss-Newton term contributes to all Hessian elements, while the residual-times-second-derivative term contributes only to diagonal elements. 8. calcPCACovMatrix() now returns the inverse of summed track information. The longitudinal vertex uncertainty comes from track slopes rather than from a dummy X covariance. 9. calcChi2() now uses all six information-matrix elements. Residual correlations involving X are included in the chi2 value. 10. correctTracks() now propagates mCandTr analytically to the corrected X. This keeps the candidate track state, slopes, covariance, and mTrPos synchronized between Newton iterations while avoiding full-field Propagator calls for the small Newton corrections. 11. createParentTrackParCov() now builds the parent momentum covariance from the native O2 momentum parameters (snp,tgl,q/pt). The Jacobian includes the track-frame alpha rotation, and daughter momentum covariances are summed in lab px,py,pz before the existing O2 parent TrackParCov constructor converts to the parent frame.
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.
Don't merge yet.
Inspired by the refining (@galocco) of similar errors in the na60+ adaptation of the DCAFitterN (@fprino).
List of changes:
TrackCovI now stores a full symmetric 3D information matrix. The old dummy X variance is removed. The X information is derived from the track slopes dY/dX and dZ/dX via H^T C_YZ^{-1} H.
XerrFactor was removed. The fit no longer creates an artificial longitudinal uncertainty from sigma_Y.
getTrackCovMatrix() was removed. PCA covariance is now computed from summed track information matrices, not by rotating an artificial 3D covariance with dummy X error.
calcPCACoefs() now multiplies the full local information matrix. Terms involving local XY and XZ correlations are included in the Ti coefficient matrices.
calcInverseWeight() now rotates and sums the full information matrix. All six local information elements contribute to the global 3x3 weight.
calcChi2Derivatives() now contracts residual derivatives with the full information matrix. The Hessian curvature term is added only to diagonal Hessian elements, matching the fact that each trajectory has second derivative only with respect to its own running parameter.
calcChi2DerivativesNoErr() was corrected analogously. The Gauss-Newton term contributes to all Hessian elements, while the residual-times-second-derivative term contributes only to diagonal elements.
calcPCACovMatrix() now returns the inverse of summed track information. The longitudinal vertex uncertainty comes from track slopes rather than from a dummy X covariance.
calcChi2() now uses all six information-matrix elements. Residual correlations involving X are included in the chi2 value.
correctTracks() now propagates mCandTr analytically to the corrected X. This keeps the candidate track state, slopes, covariance, and mTrPos synchronized between Newton iterations while avoiding full-field Propagator calls for the small Newton corrections.
createParentTrackParCov() now builds the parent momentum covariance from the native O2 momentum parameters (snp,tgl,q/pt). The Jacobian includes the track-frame alpha rotation, and daughter momentum covariances are summed in lab px,py,pz before the existing O2 parent TrackParCov constructor converts to the parent frame.