add child_track_ids array column to Steps; remove parent_id

Each Steps row now carries a variable-length child_track_ids int array
containing the track IDs of all secondaries spawned during that step.
The parent_id column is removed — parentage is now expressed
unidirectionally (parent→children) via child_track_ids and the Spawning
ntuple, rather than bidirectionally.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-11 10:30:36 +02:00
parent 9ea0718139
commit 517ba2ecb2
5 changed files with 37 additions and 29 deletions
+2
View File
@@ -83,6 +83,8 @@ class RunAction : public G4UserRunAction
mutable std::vector<int> hitLayer;
mutable std::vector<int> hitCopyNumber;
mutable std::vector<int> stepChildIds;
mutable G4String filename;
};
+4
View File
@@ -33,6 +33,7 @@
#include "G4UserSteppingAction.hh"
#include "GeometryDescriptor.hh"
#include "DetectorConstruction.hh"
#include "RunAction.hh"
namespace B4a
@@ -54,8 +55,11 @@ public:
void UserSteppingAction(const G4Step* step) override;
void setRunAction(const B4::RunAction* runAction) { fRunAction = runAction; }
private:
EventAction* fEventAction = nullptr;
const B4::RunAction* fRunAction = nullptr;
};
}