Jdkio/308 kalman chi2 - #309
Open
jdkio wants to merge 2 commits into
Open
Conversation
TMS_Kalman::Runchi2() deliberately skips nodes 0 and 1 when computing
chi2 ("too sensitive at the end"), but TMS_KalmanNode::chi2 was never
initialized in the constructor. GetTrackChi2() unconditionally sums
chi2 across all nodes, so every track's chi2 -- and therefore the
plus/minus charge-sign selection at TMS_TrackFinder::FindTracks()'s
use_minus decision -- included uninitialized stack memory.
Confirmed via valgrind --track-origins=yes: this was the only
non-ROOT/zlib finding in the whole reconstruction pipeline (everything
else was well-known ROOT TStorage::UpdateIsOnHeap and Geant4's bundled
zlib longest_match/deflate_fast false positives). Initializing chi2 to
0.0 matches the apparent intent -- nodes excluded from the chi2 sum
should contribute nothing, not garbage.
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.
Fixes a few issues with the kalman filter. First, the chi2 issue mentioned in #308. Second, that the muon and anti-muons were switched.