Skip to content

Feat: Adding relevant fields to save the rich SPINE output - #91

Draft
pgranger23 wants to merge 17 commits into
DUNE:mainfrom
pgranger23:feat/dlp-detailed
Draft

Feat: Adding relevant fields to save the rich SPINE output#91
pgranger23 wants to merge 17 commits into
DUNE:mainfrom
pgranger23:feat/dlp-detailed

Conversation

@pgranger23

Copy link
Copy Markdown
Member

Initial proposal on how to include relevant output fields from SPINE into the CAFs.
This is a first guess to start the discussion, I'm open to doing things differently.
Note that many of those fields are genuinely useful and could be populated by other reconstruction algorithms.

Pierre Granger added 10 commits July 6, 2026 07:17
…ndardRecord

Added the SRDLPParticle container, flat DLPPid and DLPShape enums,
updated SRRecoParticlesBranch to include dlp_detailed vector, and
implemented required ROOT dictionary classes registration and proxy
generation template instantiations.
…RecoParticle

Removed SRDLPParticle and instead added SREnergyEst, SRPIDProbability,
SRClusteringInfo, and SRDLPInfo as nested structs inside SRRecoParticle,
which also got start_dir, end_dir, and length fields. Checked in auto-generated
ROOT dictionary checksums.
# Conflicts:
#	CMakeLists.txt
#	duneanaobj/StandardRecord/Proxy/Instantiations.cxx
#	duneanaobj/StandardRecord/SRRecoParticle.h
#	duneanaobj/StandardRecord/classes_def.xml
@pgranger23
pgranger23 requested a review from chenel July 6, 2026 13:52
@pgranger23

Copy link
Copy Markdown
Member Author

Following the comments from our meeting:

Summary of Changes since initial submission

1. Rename DLP to SPINE

  • Renamed all occurrences of dlp/DLP to spine/SPINE in the Standard Record branch names, enums, files, and classes (e.g., rec.common.ixn.spine, kNDLArSPINETrack, etc.).

2. Simplify Reconstructed Particles collection (SRInteraction::part)

  • Eliminated the wrapper class SRRecoParticlesBranch completely.
  • Changed part inside SRInteraction to be a direct std::vector<SRRecoParticle>. This avoids redundant parallel lists per reconstruction stack (since the parent interaction is already split by reco stack at the top-level).
  • Simplified navigation lookups (Navigate.ixx) and interaction containment logic to loop over part directly.

3. Merge and Rename Detector-Specific Particle Metrics (SRLArRecoParticle)

  • Removed cathode-crossing, drift, and clustering metrics from the generic SRRecoParticle (which lives in common).
  • Renamed SRPFP to SRLArRecoParticle to represent a general, unified detector-specific reconstructed LAr particle.
  • Merged voxel-clustering/fragments metrics (formerly SRClusteringInfo) and SPINE-specific metrics (formerly SRSpineInfo / SRLArTPCInfo), including pid and shape classifications, into the new SRLArRecoParticle class.
  • Renamed the Far Detector collection inside SRFDInt from pfps to lar_particles (e.g. rec.fd.hd.pandora.lar_particles).

4. Modularize PID & Energy Hypotheses (SRPIDProbability)

  • Grouped kinetic energy estimators (calorimetric, CSDA range, and MCS deflection) under a new SREnergy class nested within SRPIDProbability.
  • Species-specific parameters are stored as a std::vector<SRPIDHypothesis> hyp; where each hypothesis contains the PDG ID, score, fit $\chi^2$, and the corresponding SREnergy estimates.
  • Implemented map-like helper methods on SRPIDProbability for analyzer-facing convenience:
    • float PIDScore(int pdg) const
    • float Chi2(int pdg) const
    • const SREnergy& Energy(int pdg) const (returns a static default with NaN if not found)
  • Measured, hypothesis-independent variables (depositions, start_dedx) remain directly in SRRecoParticle.

@chenel

chenel commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator

I think we're more or less agreed on the fundamentals now, just waiting for signoff from ND.

One note: I think you missed an instance of DLP (probably because it's got the full name in it): line 205 of SREnums.h. Let's change kDeepLearnPhys to kSPINE. Also affects its usage (SRNDLAr.cxx etc.). All the affected spots, I think:

https://github.com/pgranger23/duneanaobj/blob/feat/dlp-detailed/duneanaobj/StandardRecord/SREnums.h#L205
https://github.com/pgranger23/duneanaobj/blob/feat/dlp-detailed/duneanaobj/StandardRecord/SRNDLAr.cxx#L12
https://github.com/pgranger23/duneanaobj/blob/feat/dlp-detailed/duneanaobj/StandardRecord/SRNeutrinoHypothesisBranch.h#L19

@pgranger23

Copy link
Copy Markdown
Member Author

Good catch, had missed it, thanks!
Should be fixed by now.

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.

Add Particle PID Scores and Availability of Corresponding Energy Estimation Methods

2 participants