Initialize RecoX and RecoY to fix first node bug #205
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.
There's a bug where the RecoX of the first node of the kalman track will be initialized to 18314 .
That value corresponds to
TMS_Const::TMS_Thick_End
(a z value) so I thought it was being set to the wrong number at some point. But that was a dead end. Turns out all kalman node RecoX and RecoY values were uninitialized, and for some reason RecoX defaults to that value. But then Predict sets the value to a new one for all nodes except node 0 (the loop starts at node 1). This fixes it by initializing the RecoX to the same as x, and same with RecoY and y.@LiamOS, maybe you know if there's a better prediction than that? This seems slightly off since it's not taking into account the particle's trajectory, and only setting it to the hit x and y