15 #include "G4Material.hh"
16 #include "G4StepPoint.hh"
17 #include "G4TouchableHistory.hh"
18 #include "G4LogicalVolume.hh"
19 #include "G4DynamicParticle.hh"
27 , m_helperPointer(nullptr)
45 description <<
"Cannot retrieve GeantFollower helper";
46 G4Exception(
"GeantFollower",
"GeantFollower1", FatalException,
description);
56 if (aStep->GetTrack()->GetParentID())
58 aStep->GetTrack()->SetTrackStatus(fStopAndKill);
63 G4StepPoint * g4PreStep = aStep->GetPreStepPoint();
64 G4ThreeVector g4Momentum = g4PreStep->GetMomentum();
65 const G4ThreeVector& g4Position = g4PreStep->GetPosition();
67 G4Track* g4Track = aStep->GetTrack();
68 const G4DynamicParticle* g4DynParticle = g4Track->GetDynamicParticle();
71 const G4TouchableHistory* touchHist =
static_cast<const G4TouchableHistory*
>(aStep->GetPreStepPoint()->GetTouchable());
75 const G4LogicalVolume *lv= touchHist->GetVolume()->GetLogicalVolume();
78 const G4Material *
mat = lv->GetMaterial();
80 double steplength = aStep->GetStepLength();
82 double X0 =
mat->GetRadlen();
89 description <<
"GeantFollower::SteppingAction NULL G4LogicalVolume pointer.";
90 G4Exception(
"GeantFollower",
"GeantFollower2", FatalException,
description);
96 description <<
"GeantFollower::SteppingAction NULL G4TouchableHistory pointer.";
97 G4Exception(
"GeantFollower",
"GeantFollower3", FatalException,
description);