45 G4Track* theTrack = theStep->GetTrack();
50 = G4LogicalVolumeStore::GetInstance()->GetVolume(
"Target");
52 = G4LogicalVolumeStore::GetInstance()->GetVolume(
"TestPlane");
55 if (theTrack->GetParentID()==0) {
58 = theStep->GetPreStepPoint()->GetPhysicalVolume()->GetLogicalVolume();
60 theTrack->SetTrackStatus(fStopAndKill);
68 G4StepPoint* thePrePoint = theStep->GetPreStepPoint();
73 G4StepPoint* thePostPoint = theStep->GetPostStepPoint();
77 if (thePostPV) thePostLV = thePostPV->GetLogicalVolume();
86 G4ThreeVector theMomentumDirection = theTrack->
87 GetDynamicParticle()->GetMomentumDirection();
92 theTrack->SetTrackStatus(fStopAndKill);
99 auto trackInformation =
102 if (trackInformation->GetTrackStatusFlag() !=
reverse) {
104 if ( theTrack-> GetMomentumDirection().z()>0.0 &&
105 theTrack->GetVertexMomentumDirection().z()<0.0 )
107 trackInformation->SetTrackStatusFlag(
reverse);
113 if (theTrack->GetTrackStatus() == fAlive) {
return; }
115 if (thePostPoint->GetProcessDefinedStep() !=
nullptr) {
116 if (thePostPoint->GetProcessDefinedStep()->GetProcessName() !=
"Decay")