Skip to content

[WIP] Prototype TruthInfo graph for truth history navigation and association studies#50913

Draft
felicepantaleo wants to merge 41 commits into
cms-sw:masterfrom
felicepantaleo:truthGraph_17_0_0_pre1
Draft

[WIP] Prototype TruthInfo graph for truth history navigation and association studies#50913
felicepantaleo wants to merge 41 commits into
cms-sw:masterfrom
felicepantaleo:truthGraph_17_0_0_pre1

Conversation

@felicepantaleo
Copy link
Copy Markdown
Contributor

This draft PR collects the ongoing TruthInfo graph developments being worked on during the 20th Patatrack hackathon.

The goal is to prototype a common truth-history representation in CMSSW, combining generator-level and simulation-level information into graph-based data structures that can be navigated through a physics-oriented API.

This PR is intentionally opened as a draft so that the working group can collaborate in a single place during the hackathon.

This development explores two related layers:

  • a compact raw TruthGraph, built from existing CMS truth products such as HepMC, SimTrack, and SimVertex;
  • a higher-level logical truth::Graph, exposing particles, vertices, payload, and navigation methods.

The long-term goal is to provide a stable abstraction for truth navigation and truth-reco association, avoiding the need for downstream reconstruction and validation code to directly depend on the internal structure of several low-level truth collections.

Hackathon work area

This PR is meant as the shared development branch for the working group at the ongoing 20th Patatrack hackathon.

Status

This is a prototype and not yet intended as a final interface.

The main purpose of this draft PR is to collect ideas, code, tests, and validation feedback in a common place during the hackathon. The implementation and API are expected to evolve substantially before this can become a stable CMSSW interface.

@cmsbuild
Copy link
Copy Markdown
Contributor

cmsbuild commented May 11, 2026

cms-bot internal usage

@cmsbuild
Copy link
Copy Markdown
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-50913/49282

  • Found files with invalid states:
    • PhysicsTools/TruthInfo/src/BuildFile.xml:

@cmsbuild
Copy link
Copy Markdown
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-50913/49283

  • Found files with invalid states:
    • PhysicsTools/TruthInfo/src/BuildFile.xml:

@cmsbuild
Copy link
Copy Markdown
Contributor

Pull request #50913 was updated.

Store packed reco::GenStatusFlags in the raw TruthGraph and propagate them to the logical truth::Graph particle payload. Decode and print the active status flags in the logical graph dumper to make hard-process and copy-history information visible in DOT dumps.
Add an optional post-processing pass for the logical truth graph. The pass collapses GEN-only chains of the form P -> V -> C when P has status different from 1, C is the only daughter, and P and C have the same PDG id. This removes intermediate generator-history copies while preserving the physics-forward graph topology.
@cmsbuild
Copy link
Copy Markdown
Contributor

-code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-50913/49311

  • Found files with invalid states:
    • PhysicsTools/TruthInfo/src/BuildFile.xml:

Code check has found code style and quality issues which could be resolved by applying following patch(s)

@cmsbuild
Copy link
Copy Markdown
Contributor

-code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-50913/49312

  • Found files with invalid states:
    • PhysicsTools/TruthInfo/src/BuildFile.xml:

Code check has found code style and quality issues which could be resolved by applying following patch(s)

@cmsbuild
Copy link
Copy Markdown
Contributor

-code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-50913/49317

Code check has found code style and quality issues which could be resolved by applying following patch(s)

@cmsbuild
Copy link
Copy Markdown
Contributor

-code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-50913/49324

Code check has found code style and quality issues which could be resolved by applying following patch(s)

@cmsbuild
Copy link
Copy Markdown
Contributor

-code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-50913/49328

Code check has found code style and quality issues which could be resolved by applying following patch(s)

@cmsbuild
Copy link
Copy Markdown
Contributor

-code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-50913/49329

Code check has found code style and quality issues which could be resolved by applying following patch(s)

@cmsbuild
Copy link
Copy Markdown
Contributor

-code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-50913/49350

Code check has found code style and quality issues which could be resolved by applying following patch(s)

@cmsbuild
Copy link
Copy Markdown
Contributor

-code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-50913/49351

Code check has found code style and quality issues which could be resolved by applying following patch(s)

@cmsbuild
Copy link
Copy Markdown
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-50913/49352

@cmsbuild
Copy link
Copy Markdown
Contributor

Pull request #50913 was updated.

@cmsbuild
Copy link
Copy Markdown
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-50913/49362

@cmsbuild
Copy link
Copy Markdown
Contributor

Pull request #50913 was updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants