-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kleykamp issue 158 #162
Kleykamp issue 158 #162
Conversation
src/TMS_Reco.cpp
Outdated
Accumulator[i][c_bin]++; | ||
// Fill the accumulator, but only within bounds | ||
// We don't care about lines outside of bounds | ||
if (i > 0 && c_bin > 0 && i < nSlope && c_bin < nIntercept) Accumulator[i][c_bin]++; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The two conditions for i should be redundant with the for loop definition.
Also why only above 0 for i? With the loop starting at 0, the first 'row' for the slope would never get a hit which doesn't make sense to me.
The two conditions for c_bin are fine
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops yes, it should be i >= 0 && c_bin >= 0
. I know that technically i will never be below zero but I made it a strong check just in case something changes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look good, redundant ones should still merge fine if both sanitize PRs merged.
Approving.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the change. I approve as well
Fixes recent issues with crashes. They were mostly caused by array indices that were outside the range,
make sanitize
is good at finding thoseAlso found some cases of reco y positions being outside the TMS, which caused a regular crash. See issue #160. Didn't fix it but instead made Material class throw
invalid_argument
exception that the Kalman filter than catches and ignoresYou can find example output here made from running over 14 files from the most recent microprod:
/exp/dune/data/users/kleykamp/dune-tms/2024-09-24_test_23rd_version.tmsreco.root
Separate files and logs in
/exp/dune/data/users/kleykamp/dune-tms/2024-09-24_test_23rd_version/
. Current validation plot (a bit messy rn) can be found in/exp/dune/data/users/kleykamp/dune-tms/Validation/Tracking_Validation/2024-09-24_test_23rd_version.tmsreco_images
. See also issue #161