Geant4 11.1.1
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4UserStackingAction Class Reference

#include <G4UserStackingAction.hh>

+ Inheritance diagram for G4UserStackingAction:

Public Member Functions

 G4UserStackingAction ()
 
virtual ~G4UserStackingAction ()=default
 
void SetStackManager (G4StackManager *value)
 
virtual G4ClassificationOfNewTrack ClassifyNewTrack (const G4Track *aTrack)
 
virtual void NewStage ()
 
virtual void PrepareNewEvent ()
 

Protected Attributes

G4StackManagerstackManager = nullptr
 

Detailed Description

Definition at line 44 of file G4UserStackingAction.hh.

Constructor & Destructor Documentation

◆ G4UserStackingAction()

G4UserStackingAction::G4UserStackingAction ( )

Definition at line 37 of file G4UserStackingAction.cc.

38{
39 if(!(G4ParticleTable::GetParticleTable()->GetReadiness()))
40 {
41 G4String msg;
42 msg = "You are instantiating G4UserStackingAction BEFORE your \n";
43 msg += "G4VUserPhysicsList is instantiated and assigned to G4RunManager.\n";
44 msg += "Such an instantiation is prohibited since Geant4 version 8.0.\n";
45 msg += "To fix this problem, please make sure that your main() \n";
46 msg += "instantiates G4VUserPhysicsList AND set it to G4RunManager \n";
47 msg += "before instantiating other user action classes such as \n";
48 msg += "G4UserStackingAction.";
49 G4Exception("G4UserStackingAction::G4UserStackingAction()",
50 "Event0031", FatalException, msg);
51 }
52}
@ FatalException
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
Definition: G4Exception.cc:59
static G4ParticleTable * GetParticleTable()

◆ ~G4UserStackingAction()

virtual G4UserStackingAction::~G4UserStackingAction ( )
virtualdefault

Member Function Documentation

◆ ClassifyNewTrack()

G4ClassificationOfNewTrack G4UserStackingAction::ClassifyNewTrack ( const G4Track aTrack)
virtual

◆ NewStage()

void G4UserStackingAction::NewStage ( )
virtual

Reimplemented in G4AdjointStackingAction.

Definition at line 60 of file G4UserStackingAction.cc.

61{;}

Referenced by G4AdjointStackingAction::NewStage(), and G4StackManager::PopNextTrack().

◆ PrepareNewEvent()

void G4UserStackingAction::PrepareNewEvent ( )
virtual

◆ SetStackManager()

void G4UserStackingAction::SetStackManager ( G4StackManager value)
inline

Definition at line 51 of file G4UserStackingAction.hh.

51{ stackManager=value; }
G4StackManager * stackManager

Referenced by G4StackManager::SetUserStackingAction().

Member Data Documentation

◆ stackManager

G4StackManager* G4UserStackingAction::stackManager = nullptr
protected

Definition at line 115 of file G4UserStackingAction.hh.

Referenced by G4AdjointStackingAction::NewStage(), and SetStackManager().


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