Skip to content

Validate restG4 merge metadata#153

Open
cmargalejo wants to merge 2 commits into
masterfrom
cris_fix_merge_metadata_validation
Open

Validate restG4 merge metadata#153
cmargalejo wants to merge 2 commits into
masterfrom
cris_fix_merge_metadata_validation

Conversation

@cmargalejo

@cmargalejo cmargalejo commented Jun 23, 2026

Copy link
Copy Markdown
Member

cmargalejo Large: 298 Powered by Pull Request Badge

Preserve and validate the Geant4 metadata required by REST_Geant4_MergeRestG4Files.

This PR addresses the metadata-safety part of restG4 simulation-output merging. It updates
REST_Geant4_MergeRestG4Files.C and related metadata classes so merged files preserve and validate the simulation metadata needed to interpret Geant4/restG4 outputs.

Changes

  • Deep-copy particle sources in TRestGeant4Metadata.
  • Preserve TRestGeant4PhysicsLists in merged outputs.
  • Validate Geant4 version and physics-list compatibility across inputs.
  • Merge TRestGeant4PhysicsInfo lookup metadata with conflict checks.
  • Add unit coverage for particle-source copy and physics-info merge.

What this does not solve

This PR does not implement full AnalysisTree preservation/merge behavior from #114. That remains a separate design
decision because it affects duplicate event-ID handling and tree merge semantics.

If that behavior is implemented later, restG4 files with populated AnalysisTree objects could be merged more
completely through this macro. However, TRestDataSet is already intended to combine AnalysisTree data, so that
workflow should probably be prioritized unless maintainers decide otherwise.

cmargalejo and others added 2 commits June 23, 2026 11:28
Preserve and validate Geant4 metadata required by REST_Geant4_MergeRestG4Files.

- deep-copy particle sources in TRestGeant4Metadata

- preserve TRestGeant4PhysicsLists in merged outputs

- validate Geant4 version and physics-list compatibility across inputs

- merge TRestGeant4PhysicsInfo lookup metadata with conflict checks

- add unit coverage for source copy and physics-info merge

Refs #152
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.

1 participant