Public Member Functions | List of all members
EDepSim::UserStackingAction Class Reference

#include <EDepSimUserStackingAction.hh>

Inheritance diagram for EDepSim::UserStackingAction:

Public Member Functions

 UserStackingAction ()
 
virtual ~UserStackingAction ()
 
virtual G4ClassificationOfNewTrack ClassifyNewTrack (const G4Track *)
 Check if a new track should be tracked. More...
 

Detailed Description

Definition at line 10 of file EDepSimUserStackingAction.hh.

Constructor & Destructor Documentation

EDepSim::UserStackingAction::UserStackingAction ( )

Definition at line 14 of file EDepSimUserStackingAction.cc.

14 { }
EDepSim::UserStackingAction::~UserStackingAction ( )
virtual

Definition at line 16 of file EDepSimUserStackingAction.cc.

16 { }

Member Function Documentation

G4ClassificationOfNewTrack EDepSim::UserStackingAction::ClassifyNewTrack ( const G4Track *  aTrack)
virtual

Check if a new track should be tracked.

Definition at line 19 of file EDepSimUserStackingAction.cc.

19  {
20  // Get the particle type of the new track.
21  const G4ParticleDefinition* particle = aTrack->GetDefinition();
22 
23  // if (aTrack->GetCurrentStepNumber() > 0) return fUrgent;
24 
25  if (aTrack->GetParentID() <= 0) return fUrgent;
26 
27  // This is where we can throw away particles that we don't want to track.
28  // Drop photons below the "lowest" nuclear lines. The lowest I know if is
29  // about 6 keV, and atomic shells start messing with the cross section at
30  // about 70 keV.
31  if (particle->GetParticleName() == "gamma") {
32  if (aTrack->GetKineticEnergy() < 10.*CLHEP::keV) return fKill;
33  }
34 
35  if (particle->GetParticleName() == "opticalphoton") {
36  return fKill;
37  }
38 
39  if (particle->GetParticleName() == "thermalelectron") {
40  return fKill;
41  }
42 
43  return G4UserStackingAction::ClassifyNewTrack(aTrack);
44 }
static constexpr double keV
Definition: Units.h:128

The documentation for this class was generated from the following files: