src
SimG4Core
KillSecondaries
src
KillSecondariesStackingAction.cc
Go to the documentation of this file.
1
#include "
SimG4Core/KillSecondaries/interface/KillSecondariesStackingAction.h
"
2
#include "
SimG4Core/Notification/interface/CurrentG4Track.h
"
3
#include "
SimG4Core/Notification/interface/NewTrackAction.h
"
4
5
#include "G4Track.hh"
6
7
G4ClassificationOfNewTrack
KillSecondariesStackingAction::ClassifyNewTrack
(
const
G4Track *aTrack) {
8
NewTrackAction
newTA;
9
auto
track
=
const_cast<
G4Track *
>
(aTrack);
10
if
(aTrack->GetCreatorProcess() ==
nullptr
|| aTrack->GetParentID() == 0) {
11
newTA.
primary
(
track
);
12
return
fUrgent;
13
}
else
{
14
const
G4Track *mother =
CurrentG4Track::track
();
15
newTA.
secondary
(
track
, *mother, 0);
16
return
fKill;
17
}
18
}
KillSecondariesStackingAction.h
KillSecondariesStackingAction::ClassifyNewTrack
G4ClassificationOfNewTrack ClassifyNewTrack(const G4Track *) override
Definition:
KillSecondariesStackingAction.cc:7
CurrentG4Track.h
NewTrackAction::secondary
void secondary(const G4Track *aSecondary, const G4Track &mother, int) const
Definition:
NewTrackAction.cc:15
NewTrackAction::primary
void primary(const G4Track *aSecondary) const
Definition:
NewTrackAction.cc:11
HLT_2022v15_cff.track
track
Definition:
HLT_2022v15_cff.py:9644
NewTrackAction.h
CurrentG4Track::track
static const G4Track * track()
Definition:
CurrentG4Track.cc:7
NewTrackAction
Definition:
NewTrackAction.h:14
Generated for CMSSW Reference Manual by
1.8.14