std::forward_list<> has less performance penalty, when the hit/event ratio is skewed enough. I like that idea
Thats an important point. I additionally have to manually keep track of all the ancestor IDs. At the moment of impact to the SD, only the current track ID and G4Track::GetParentID() is defined anymore: Get G4Track by trackID
update: Geant4 is epic Performance-penalty in a quick test seems to be surprisingly low, takes only about 40% longer in the qt gui (with /vis/disable & /tracking/storeTrajectory 0)
G4WT1 > hit! SensorID: 8 in TrackID 77
G4WT1 > Volumes for TrackID: 77
G4WT1 > vol: World
G4WT1 > vol: shielding
G4WT1 > vol: World
G4WT1 > vol: shielding
G4WT1 > Ancestors:
G4WT1 > Volumes for AncestorID: 23
G4WT1 > vol: shieldingFront_mesh023_Lead
G4WT1 > Volumes for AncestorID: 1
G4WT1 > vol: shieldingFront_mesh023_Lead
G4WT1 > vol: World
G4WT1 > vol: scintillatorModule_mesh029_Glass
G4WT1 > vol: World
G4WT1 > vol: scintillatorModule_mesh000_Kevlar
G4WT1 > vol: World
G4WT1 > vol: enclosure_mesh000_Kevlar