29 G4Track* track = step->GetTrack();
32 if (track->GetParentID() != 0)
return;
35 G4int pdgID = track->GetParticleDefinition()->GetPDGEncoding();
38 if (pdgID != 11)
return;
41 G4VPhysicalVolume* volume = track->GetVolume();
42 G4String volumeName = volume->GetName();
52 track->SetTrackStatus(fKillTrackAndSecondaries);
53 G4RunManager::GetRunManager()->AbortEvent();
58 const G4TrackVector* secondaries = step->GetSecondary();
62 if (secondaries->size() == 0) {
68 track->SetTrackStatus(fKillTrackAndSecondaries);
69 G4RunManager::GetRunManager()->AbortEvent();
72 G4String processName =
73 secondaries->at(0)->GetCreatorProcess()->GetProcessName();
81 if (!processName.contains(
process_)) {
87 track->SetTrackStatus(fKillTrackAndSecondaries);
88 G4RunManager::GetRunManager()->AbortEvent();
92 std::cout <<
"[ TargetENProcessFilter ]: "
93 <<
"Electronuclear reaction resulted in " << secondaries->size()
94 <<
" particles via " << processName <<
" process." << std::endl;