CMS 3D CMS Logo

List of all members | Public Member Functions
KillSecondariesStackingAction Class Reference

#include <KillSecondariesStackingAction.h>

Inheritance diagram for KillSecondariesStackingAction:

Public Member Functions

G4ClassificationOfNewTrack ClassifyNewTrack (const G4Track *) override
 
 KillSecondariesStackingAction ()
 
 ~KillSecondariesStackingAction () override
 

Detailed Description

Definition at line 8 of file KillSecondariesStackingAction.h.

Constructor & Destructor Documentation

◆ KillSecondariesStackingAction()

KillSecondariesStackingAction::KillSecondariesStackingAction ( )
inline

Definition at line 10 of file KillSecondariesStackingAction.h.

10 {}

◆ ~KillSecondariesStackingAction()

KillSecondariesStackingAction::~KillSecondariesStackingAction ( )
inlineoverride

Definition at line 11 of file KillSecondariesStackingAction.h.

11 {}

Member Function Documentation

◆ ClassifyNewTrack()

G4ClassificationOfNewTrack KillSecondariesStackingAction::ClassifyNewTrack ( const G4Track *  aTrack)
override

Definition at line 7 of file KillSecondariesStackingAction.cc.

References NewTrackAction::primary(), NewTrackAction::secondary(), CurrentG4Track::track(), and HLT_2023v12_cff::track.

7  {
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 }
void secondary(const G4Track *aSecondary, const G4Track &mother, int) const
void primary(const G4Track *aSecondary) const
static const G4Track * track()