54 {
55
56 if (aStep->GetTrack()->GetParentID())
57 {
58 aStep->GetTrack()->SetTrackStatus(fStopAndKill);
59 return;
60 }
61
62
63 G4StepPoint * g4PreStep = aStep->GetPreStepPoint();
64 G4ThreeVector g4Momentum = g4PreStep->GetMomentum();
65 const G4ThreeVector& g4Position = g4PreStep->GetPosition();
66
67 G4Track* g4Track = aStep->GetTrack();
68 const G4DynamicParticle* g4DynParticle = g4Track->GetDynamicParticle();
69
70
71 const G4TouchableHistory* touchHist = static_cast<const G4TouchableHistory*>(aStep->GetPreStepPoint()->GetTouchable());
73 {
74
75 const G4LogicalVolume *lv= touchHist->GetVolume()->GetLogicalVolume();
77 {
78 const G4Material *
mat = lv->GetMaterial();
79
80 double steplength = aStep->GetStepLength();
81
82 double X0 =
mat->GetRadlen();
83
84 m_helperPointer->trackParticle(g4Position,g4Momentum,g4DynParticle->GetPDGcode(),g4DynParticle->GetCharge(),steplength,X0);
85 }
86 else
87 {
89 description <<
"GeantFollower::SteppingAction NULL G4LogicalVolume pointer.";
90 G4Exception(
"GeantFollower",
"GeantFollower2", FatalException,
description);
91 }
92 }
93 else
94 {
96 description <<
"GeantFollower::SteppingAction NULL G4TouchableHistory pointer.";
97 G4Exception(
"GeantFollower",
"GeantFollower3", FatalException,
description);
98 }
99 }