Skip to content
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

Merged
merged 9 commits into from
Sep 25, 2024
Merged

Kleykamp issue 158 #162

merged 9 commits into from
Sep 25, 2024

Conversation

jdkio
Copy link
Contributor

@jdkio jdkio commented Sep 24, 2024

Fixes recent issues with crashes. They were mostly caused by array indices that were outside the range, make sanitize is good at finding those

Also 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 ignores

You 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

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]++;
Copy link
Contributor

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

Copy link
Contributor Author

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

Copy link
Member

@LiamOS LiamOS left a 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.

Copy link
Contributor

@AsaNehm AsaNehm left a 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

@jdkio jdkio merged commit 8fc2e62 into main Sep 25, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants