Skip to content
Snippets Groups Projects
Commit 541f66a7 authored by Chad Lantz's avatar Chad Lantz
Browse files

Set lastStep based on where the particle died

parent 26d4524d
No related branches found
No related tags found
No related merge requests found
......@@ -30,7 +30,7 @@
#include "SteppingAction.hh"
#include "EventAction.hh"
#include "Analysis.hh"
#include "AnalysisManager.hh"
#include "DetectorConstruction.hh"
#include "FiberSD.hh"
......@@ -64,7 +64,8 @@ void SteppingAction::UserSteppingAction(__attribute__((unused)) const G4Step* th
{
G4Track* theTrack = theStep->GetTrack();
if(theTrack->GetParentID()==0 && theStep->IsLastStepInVolume()){
//Find out when the primary particles died
if(theTrack->GetParentID()==0 && theTrack->GetTrackStatus() == fStopAndKill ){
lastStep = theTrack->GetPosition().getZ();
auto analysisManager = G4AnalysisManager::Instance();
for(int i = 0; i < analysisManager->GetNofNtuples(); i++){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment