Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/AdePTGeant4Integration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,9 @@ void AdePTGeant4Integration::ProcessGPUStep(GPUHit const &hit, bool const callUs
if (aSensitiveDetector != nullptr && hit.fStepCounter != 0) {
aSensitiveDetector->Hit(fScoringObjects->fG4Step);
}

// cleanup of the secondary vector that is created in FillG4Step above
fScoringObjects->fG4Step->DeleteSecondaryVector();
}

void AdePTGeant4Integration::FillG4NavigationHistory(vecgeom::NavigationState aNavState,
Expand Down Expand Up @@ -487,6 +490,9 @@ void AdePTGeant4Integration::FillG4Step(GPUHit const *aGPUHit, G4Step *aG4Step,
if (aGPUHit->fStepCounter == 1) aG4Step->SetFirstStepFlag(); // Real data
if (aGPUHit->fLastStepOfTrack) aG4Step->SetLastStepFlag(); // Real data
// aG4Step->SetPointerToVectorOfAuxiliaryPoints(nullptr); // Missing data
// initialize secondary vector (although it is empty for now)
// Note: we own this vector, we are responsible for deleting it!
aG4Step->NewSecondaryVector();
// aG4Step->SetSecondary(nullptr); // Missing data

// G4Track
Expand Down