SaneCovariance : rename and allow cases of zero
In the context of ATLASRECTS-7840
- Rename saneCovariance to hasPositiveDiagonal
- Add a method
hasPositiveOrZeroDiagonal
The stepPropagator changes to using hasPositiveOrZeroDiagonal
All else stay the same.
"The issue"
In reality a covariance matrix needs to be Positive SemiDefinite.
Aka a Zero matrix is a valid covariance
This check as I said in the JIRA was introduced by the muon SW. As you can see from the changeLog that is used quite heavily for muons and very little for anything else.
ping @kluit @jojungge @todorova .
For the future
Continuing on my comment on the MR !44413 (merged). Let me ping @tstreble that looks at some of the Eigen facilities for another reason.
One can see https://godbolt.org/z/4ncY3ae3Y .
-
The matrix A in this example (which is the one I mention in the MR by @jojungge Is not positive definite nor positive semi definite . It has an eigenvalue that is <0 .
In theory a matrix that is non positive semi-definite is not valid covariance. -
The zero matrix is positive semi definite. Not positive definite.
-
The matrix B is again neither.
Now
-
The matrix B we can catch as has negative elem in the diagonal
-
The Zero matrix we can handle correcly for the STEP after this change.
There are 2 issues need thinking
-
"we need the matrix to have positive(or 0) diagonal elements" to be positive (semi) definite" but alone this is not enough. That is the issue with A . This will pass as is now . We might want to do something more exact.
-
More practical even for the "weaker" checks we do today. Are we checking covariance for being positive semi definite (it has to be ) or positive definite (it does not have to be) ? This test is all over the Muon software . So something to think about
Let me ping also @jdandoy , @jcatmore , @jchapman , @nstyles
Merge request reports
Activity
This merge request affects 11 packages:
- Event/EventPrimitives
- InnerDetector/InDetMonitoring/TRTMonitoringRun3
- MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonTGRecTools
- MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools
- MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackSteeringTools
- MuonSpectrometer/MuonTruthAlgs
- Reconstruction/MuonIdentification/MuidTrackBuilder
- Reconstruction/MuonIdentification/MuonCombinedBaseTools
- Tracking/TrkExtrapolation/TrkExSTEP_Propagator
- Tracking/TrkFitter/TrkiPatFitter
- Tracking/TrkTools/TrkMaterialProvider
Affected files list will not be printed in this case
Adding @pop ,@calfayan ,@stavrop ,@jojungge ,@kluit ,@gemmeren ,@goetz ,@cgrefe ,@rosati ,@rbianchi ,@apsallid ,@gavrilen ,@sroe ,@pscholer as watchers
This merge request affects 11 packages:
- Event/EventPrimitives
- InnerDetector/InDetMonitoring/TRTMonitoringRun3
- MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonTGRecTools
- MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools
- MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackSteeringTools
- MuonSpectrometer/MuonTruthAlgs
- Reconstruction/MuonIdentification/MuidTrackBuilder
- Reconstruction/MuonIdentification/MuonCombinedBaseTools
- Tracking/TrkExtrapolation/TrkExSTEP_Propagator
- Tracking/TrkFitter/TrkiPatFitter
- Tracking/TrkTools/TrkMaterialProvider
Affected files list will not be printed in this case
Adding @cgrefe ,@kluit ,@pscholer ,@rosati ,@goetz ,@gemmeren ,@apsallid ,@gavrilen ,@pop ,@calfayan ,@rbianchi ,@stavrop ,@jojungge ,@sroe as watchers
CI Result FAILURE (hash b46c8332)Athena AthSimulation AthGeneration AnalysisBase AthAnalysis externals cmake make tests Full details available on this CI monitor view. Check the JIRA CI status board for known problems
Athena: number of compilation errors 1, warnings 0
AthSimulation: number of compilation errors 0, warnings 0
AthGeneration: number of compilation errors 0, warnings 0
AnalysisBase: number of compilation errors 0, warnings 0
AthAnalysis: number of compilation errors 0, warnings 0
For experts only: Jenkins output [CI-MERGE-REQUEST-EL9 2926] CI Result FAILURE (hash c1d9e7f6)Athena AthSimulation AthGeneration AnalysisBase AthAnalysis externals cmake make tests Full details available on this CI monitor view. Check the JIRA CI status board for known problems
Athena: number of compilation errors 1, warnings 0
AthSimulation: number of compilation errors 0, warnings 0
AthGeneration: number of compilation errors 0, warnings 0
AnalysisBase: number of compilation errors 0, warnings 0
AthAnalysis: number of compilation errors 0, warnings 0
For experts only: Jenkins output [CI-MERGE-REQUEST-EL9 2924]added 93 commits
-
593c5401...77a881b4 - 90 commits from branch
atlas:main
- a8997449 - rename saneCovariance to isPositiveDefinite, add isSemiPositiveDefinite
- 6ad8f598 - explicit test 0 matrix
- b2dfea0f - fix all clients
Toggle commit list-
593c5401...77a881b4 - 90 commits from branch
This merge request affects 12 packages:
- Event/EventPrimitives
- InnerDetector/InDetMonitoring/TRTMonitoringRun3
- MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonTGRecTools
- MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools
- MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackSteeringTools
- MuonSpectrometer/MuonTruthAlgs
- Reconstruction/MuonIdentification/MuidTrackBuilder
- Reconstruction/MuonIdentification/MuonCombinedBaseTools
- Tracking/TrkExtrapolation/TrkExSTEP_Propagator
- Tracking/TrkFitter/TrkiPatFitter
- Tracking/TrkFitter/TrkiPatFitterUtils
- Tracking/TrkTools/TrkMaterialProvider
Affected files list will not be printed in this case
Adding @jojungge ,@kluit ,@cgrefe ,@gavrilen ,@sroe ,@pop ,@pscholer ,@apsallid ,@rbianchi ,@stavrop ,@gemmeren ,@goetz ,@calfayan ,@rosati as watchers
This merge request affects 12 packages:
- Event/EventPrimitives
- InnerDetector/InDetMonitoring/TRTMonitoringRun3
- MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonTGRecTools
- MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools
- MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackSteeringTools
- MuonSpectrometer/MuonTruthAlgs
- Reconstruction/MuonIdentification/MuidTrackBuilder
- Reconstruction/MuonIdentification/MuonCombinedBaseTools
- Tracking/TrkExtrapolation/TrkExSTEP_Propagator
- Tracking/TrkFitter/TrkiPatFitter
- Tracking/TrkFitter/TrkiPatFitterUtils
- Tracking/TrkTools/TrkMaterialProvider
Affected files list will not be printed in this case
Adding @stavrop ,@goetz ,@rbianchi ,@pop ,@rosati ,@gemmeren ,@cgrefe ,@calfayan ,@pscholer ,@gavrilen ,@jojungge ,@kluit ,@apsallid ,@sroe as watchers