15 #include "G4Material.hh"
16 #include "G4Element.hh"
17 #include "G4StepPoint.hh"
18 #include "G4TouchableHistory.hh"
19 #include "G4LogicalVolume.hh"
20 #include "G4DynamicParticle.hh"
28 , m_helperPointer(nullptr)
47 description <<
"Cannot retrieve GeantFollowerMS helper";
48 G4Exception(
"GeantFollowerMS",
"GeantFollowerMS1", FatalException,
description);
55 description <<
"Cannot retrieve TrackingGeometrySvc in GeantFollowerMS";
56 G4Exception(
"GeantFollowerMS",
"GeantFollowerMS2", FatalException,
description);
65 if (aStep->GetTrack()->GetParentID()) {
66 aStep->GetTrack()->SetTrackStatus(fStopAndKill);
71 G4StepPoint * g4PreStep = aStep->GetPreStepPoint();
72 G4ThreeVector g4Momentum = g4PreStep->GetMomentum();
73 const G4ThreeVector& g4Position = g4PreStep->GetPosition();
75 G4Track* g4Track = aStep->GetTrack();
76 const G4DynamicParticle* g4DynParticle = g4Track->GetDynamicParticle();
79 const G4TouchableHistory* touchHist =
80 static_cast<const G4TouchableHistory*
>(aStep->GetPreStepPoint()->GetTouchable());
84 const G4LogicalVolume *lv= touchHist->GetVolume()->GetLogicalVolume();
87 const G4Material *
mat = lv->GetMaterial();
89 double steplength = aStep->GetStepLength();
91 double X0 =
mat->GetRadlen();
94 g4DynParticle->GetPDGcode(),
95 g4DynParticle->GetCharge(),
100 description <<
"GeantFollowerMS::SteppingAction NULL G4LogicalVolume pointer.";
101 G4Exception(
"GeantFollowerMS",
"GeantFollowerMS3", FatalException,
description);
106 description <<
"GeantFollowerMS::SteppingAction NULL G4TouchableHistory pointer.";
107 G4Exception(
"GeantFollowerMS",
"GeantFollowerMS4", FatalException,
description);