Add run number to vertex id for truth tracking - #247
Merged
Conversation
gavinsdavies
approved these changes
Jul 14, 2026
gavinsdavies
left a comment
Member
There was a problem hiding this comment.
nice, solid fixes here.
Note that there is RunNo vs. ParticleRunNo/TrueVtxRunNo normalization asymmetry:
- RunNo vs. ParticleRunNo/TrueVtxRunNo/VertexGlobalID disagree on run-number normalization. TMS_TreeWriter.cpp adds:
static int normalizeRunNumber(int run) {
return run >= 1000000000 ? run - 1000000000 : run;
}
...
RunNo = normalizeRunNumber(event.GetRunNumber());
This is the most likely thing to bite a CAFMaker user silently.
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.
Adds run numbers to vertex ids to track the true particle properly. That's required because run number indicates whether it's an anti-fiducial interaction or fiducial.
Also store "global vertex id", which is
run_number * 1e6 + vertex id. That's a bit more stable than requiring that we carry around the pair, though it has its own downsides if vertex id > 1e6. Currently we don't expect it to.This adds the missing information that's needed for the CAF maker, removing the need for the complex edep sim vertex location mapping. For more information, see this PR. Note that we don't want to revert the PR fully as it was fixing something more generally.
DUNE/ND_CAFMaker#151