Fixes the connection between primary and secondary particles#150
Open
jdkio wants to merge 12 commits into
Open
Fixes the connection between primary and secondary particles#150jdkio wants to merge 12 commits into
jdkio wants to merge 12 commits into
Conversation
chenel
approved these changes
Jun 4, 2026
chenel
left a comment
Collaborator
There was a problem hiding this comment.
This is a great implementation, and I'm especially happy to see the validation script---that'll be a big win in the future if/when we have to check whether future changes break anything. I'm happy to approve.
There are a few nits recorded below, with one possible edge-case bug that I'd like your further opinion on.
Collaborator
|
Okay---sounds good. In that case, if you have the check already instrumented, it might even be worth contemplating whether we should make it an abort, so we know to go figure out what happened? |
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.
Properly connects secondary particles to the parent particles in the caf, see issue #116. Also adds validation script.
The file sizes are not that different
Run times are not either (note these were measured on two different days):
Note about intermediate secondaries
Secondaries are only saved if a reconstructed track warrants it. This makes sense so we're not save too much info. But this meant that some intermediate particles weren't saved. Like if a secondary neutron creates a proton track, which we reconstruct, then there was no parent to the proton in the caf. Below is the result of the validation if we don't save the interemediate particles. The fix was to save the intermediate particles. It's a more general and stable solution than trying to link the secondary to the primary. Currently the unreco'd particles are not individually flagged but we could add that if need be.
Files touched
src/truth/FillTruth.cxx.gitignoreFiles added
scripts/validate_caf_truth.py