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

#include <G4StackChecker.hh>

+ Inheritance diagram for G4StackChecker:

Public Member Functions

 G4StackChecker ()
 
virtual ~G4StackChecker ()
 
virtual G4ClassificationOfNewTrack ClassifyNewTrack (const G4Track *track)
 
virtual void NewStage ()
 
virtual void PrepareNewEvent ()
 
- Public Member Functions inherited from G4UserStackingAction
 G4UserStackingAction ()
 
virtual ~G4UserStackingAction ()
 
void SetStackManager (G4StackManager *value)
 
virtual G4ClassificationOfNewTrack ClassifyNewTrack (const G4Track *aTrack)
 
virtual void NewStage ()
 
virtual void PrepareNewEvent ()
 

Additional Inherited Members

- Protected Attributes inherited from G4UserStackingAction
G4StackManagerstackManager
 

Detailed Description

Definition at line 44 of file G4StackChecker.hh.

Constructor & Destructor Documentation

◆ G4StackChecker()

G4StackChecker::G4StackChecker ( )

Definition at line 36 of file G4StackChecker.cc.

36 :
37 nullDirection(G4ThreeVector(0.0,0.0,0.0))
38{}
CLHEP::Hep3Vector G4ThreeVector

◆ ~G4StackChecker()

G4StackChecker::~G4StackChecker ( )
virtual

Definition at line 40 of file G4StackChecker.cc.

41{}

Member Function Documentation

◆ ClassifyNewTrack()

G4ClassificationOfNewTrack G4StackChecker::ClassifyNewTrack ( const G4Track track)
virtual

Reimplemented from G4UserStackingAction.

Definition at line 43 of file G4StackChecker.cc.

45{
47 G4double e = track->GetKineticEnergy();
48 if ( (!(e < 0.0) && !(e > 0.0) && !(e == 0.0)) ||
49 track->GetMomentumDirection() == nullDirection)
50 {
51 result = fKill;
52 G4String nam = track->GetDefinition()->GetParticleName();
53 G4cout << "### G4StackChecker: event# "
54 << (G4EventManager::GetEventManager())->GetConstCurrentEvent()->GetEventID()
55 << " unacceptable " << nam << " is killed in the stack" << G4endl;
56 G4cout << "### " << nam << " have been produced by the process "
57 << track->GetCreatorProcess()->GetProcessName()
58 << " trackID= " << track->GetTrackID()
59 << " parentID= " << track->GetParentID()
60 << G4endl;
61 G4cout << "### E= " << track->GetKineticEnergy()
62 << " position= " << track->GetPosition()
63 << " direction= " << track->GetMomentumDirection()
64 << " time= " << track->GetGlobalTime()
65 << G4endl;
66 }
67 return result;
68}
double G4double
Definition: G4Types.hh:64
#define G4endl
Definition: G4ios.hh:52
G4DLLIMPORT std::ostream G4cout
static G4EventManager * GetEventManager()
const G4String & GetParticleName() const
G4int GetTrackID() const
const G4VProcess * GetCreatorProcess() const
const G4ThreeVector & GetPosition() const
G4double GetGlobalTime() const
G4ParticleDefinition * GetDefinition() const
const G4ThreeVector & GetMomentumDirection() const
G4double GetKineticEnergy() const
G4int GetParentID() const
const G4String & GetProcessName() const
Definition: G4VProcess.hh:379

◆ NewStage()

virtual void G4StackChecker::NewStage ( )
inlinevirtual

Reimplemented from G4UserStackingAction.

Definition at line 55 of file G4StackChecker.hh.

55{};

◆ PrepareNewEvent()

virtual void G4StackChecker::PrepareNewEvent ( )
inlinevirtual

Reimplemented from G4UserStackingAction.

Definition at line 56 of file G4StackChecker.hh.

56{};

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