Skip to content

add pointing-based selection among multiple confluence points in vertex reconstruction - #182

Merged
francois-drielsma merged 2 commits into
DeepLearnPhysics:mainfrom
nvpm-lab:vertex-confluence-selection
Oct 19, 2026
Merged

francois-drielsma merged 2 commits into
DeepLearnPhysics:mainfrom
nvpm-lab:vertex-confluence-selection

Conversation

@nvpm-lab

Copy link
Copy Markdown
Contributor

Adding an optional confluence_selection flag to the vertex post-processor. Off by default, so nothing changes unless it's turned on.

When get_confluence_points finds more than one confluence group, get_vertex currently goes to confluence_dir and then usually ends up in track_length (start of the longest track). With confluence_selection: pointing, each candidate is instead scored by how well the particles point away from it, and the best one is taken. A particle starting within touching_threshold of the candidate counts as 1, otherwise (1 + cos θ)/2, where θ is the angle between its direction and the candidate --> start vector. No beam direction is used, so it should also work for atmospherics.

Usage -->
Screenshot from 2026-10-19 20-54-59

post:
  vertex:
    confluence_selection: pointing

Motivation

On the DUNE FD-HD LBNF v1 sample, about 38% of CC events have more than one confluence group. These mostly end up in track_length, which accounts for over half of the vertices that are >10 cm off.

Full inference on the same 10k events with/without the flag, CC (numu + nue), overlap > 0.5 (almost 5.3k interactions):

  • median: 1.30 --> 1.09 cm
  • 68%: 2.4 --> 1.7 cm
  • 90%: 11.6 --> 5.8 cm
  • fraction > 10 cm: 10.9% --> 7.4%

About 1.6k interactions change vertex, roughly 1.3k of them for the better.

Type of change

  • New feature (non-breaking)

Testing

New unit tests for the selection and for the processor passing the flag through. Existing vertex tests still pass. Plus the two inference runs above.

Notes

  • Confluence points are defined basically on track–track only.
  • Not tried on atmospherics yet.

@francois-drielsma francois-drielsma 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.

Looks good. Added regression coverage for shower-driven selection and unchanged default/fallback paths, plus formatting fixes. All 17 vertex tests and pre-commit checks pass.

@codecov

codecov Bot commented Oct 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.99%. Comparing base (d4de053) to head (a725567).
⚠️ Report is 32 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #182      +/-   ##
==========================================
- Coverage   99.99%   99.99%   -0.01%     
==========================================
  Files         435      440       +5     
  Lines       37678    39316    +1638     
==========================================
+ Hits        37677    39314    +1637     
- Misses          1        2       +1     
Flag Coverage Δ
unittests 99.99% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/spine/physics/vertex.py 100.00% <100.00%> (ø)
src/spine/post/reco/vertex.py 100.00% <100.00%> (ø)

... and 78 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@francois-drielsma
francois-drielsma merged commit 1522d2c into DeepLearnPhysics:main Oct 19, 2026
19 checks passed
@francois-drielsma francois-drielsma mentioned this pull request Oct 22, 2026
11 tasks done
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