57 if (aStep->GetTrack()->GetParentID()) {
58 aStep->GetTrack()->SetTrackStatus(fStopAndKill);
65 const G4TouchableHistory* touchHist =
static_cast<const G4TouchableHistory*
>(aStep->GetPreStepPoint()->GetTouchable());
67 const G4LogicalVolume *lv= touchHist ? touchHist->GetVolume()->GetLogicalVolume() :
nullptr;
68 const G4Material *mat = lv ? lv->GetMaterial() :
nullptr;
71 if (mat && mat->GetRadlen() < 200000.) {
73 G4ThreeVector pos = aStep->GetPreStepPoint()->GetPosition();
74 double px = aStep->GetPreStepPoint()->GetMomentum().x();
75 double py = aStep->GetPreStepPoint()->GetMomentum().y();
76 double pz = aStep->GetPreStepPoint()->GetMomentum().z();
84 double m = aStep->GetTrack()->GetDynamicParticle()->GetMass();
85 int pdgCode = aStep->GetTrack()->GetDynamicParticle()->GetPDGcode();
86 m_config.pmWriter->initializeTrack(position,momentum,m,pdgCode);
89 m_config.pmWriter->recordTrackState(position,momentum);