CMS 3D CMS Logo

KillSecondariesStackingAction.cc
Go to the documentation of this file.
4 
5 #include "G4Track.hh"
6 
7 G4ClassificationOfNewTrack KillSecondariesStackingAction::ClassifyNewTrack(const G4Track *aTrack) {
8  NewTrackAction newTA;
9  if (aTrack->GetCreatorProcess() == nullptr || aTrack->GetParentID() == 0) {
10  newTA.primary(aTrack);
11  return fUrgent;
12  } else {
13  const G4Track *mother = CurrentG4Track::track();
14  newTA.secondary(aTrack, *mother, 0);
15  return fKill;
16  }
17 }
KillSecondariesStackingAction::ClassifyNewTrack
G4ClassificationOfNewTrack ClassifyNewTrack(const G4Track *) override
Definition: KillSecondariesStackingAction.cc:7
CurrentG4Track.h
NewTrackAction.h
NewTrackAction::secondary
void secondary(const G4Track *aSecondary, const G4Track &mother, int) const
Definition: NewTrackAction.cc:18
NewTrackAction
Definition: NewTrackAction.h:14
CurrentG4Track::track
static const G4Track * track()
Definition: CurrentG4Track.cc:7
NewTrackAction::primary
void primary(const G4Track *aSecondary) const
Definition: NewTrackAction.cc:14
KillSecondariesStackingAction.h