Skip to content

Add run number to vertex id for truth tracking - #247

Merged
jdkio merged 9 commits into
mainfrom
jdkio/fix_truth_info_vertex_run_ids
Jul 15, 2026
Merged

Add run number to vertex id for truth tracking#247
jdkio merged 9 commits into
mainfrom
jdkio/fix_truth_info_vertex_run_ids

Conversation

@jdkio

@jdkio jdkio commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

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

@gavinsdavies gavinsdavies left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/TMS_TreeWriter.cpp Outdated
Comment thread src/TMS_Event.cpp Outdated
@jdkio
jdkio merged commit bab4a0e into main Jul 15, 2026
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.

2 participants