Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4StackChecker Class Reference

#include <G4StackChecker.hh>

Inheritance diagram for G4StackChecker:
Collaboration 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)
 

Additional Inherited Members

- Protected Attributes inherited from G4UserStackingAction
G4StackManagerstackManager
 

Detailed Description

Definition at line 44 of file G4StackChecker.hh.

Constructor & Destructor Documentation

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 ( )
virtual

Definition at line 40 of file G4StackChecker.cc.

41 {}

Member Function Documentation

G4ClassificationOfNewTrack G4StackChecker::ClassifyNewTrack ( const G4Track track)
virtual

Reimplemented from G4UserStackingAction.

Definition at line 44 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 }
G4double G4ParticleHPJENDLHEData::G4double result
G4ParticleDefinition * GetDefinition() const
G4int GetParentID() const
const G4ThreeVector & GetPosition() const
const G4String & GetParticleName() const
const G4VProcess * GetCreatorProcess() const
G4double GetKineticEnergy() const
G4GLOB_DLL std::ostream G4cout
G4int GetTrackID() const
G4double GetGlobalTime() const
const G4String & GetProcessName() const
Definition: G4VProcess.hh:408
const G4ThreeVector & GetMomentumDirection() const
static G4EventManager * GetEventManager()
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76

Here is the call graph for this function:

virtual void G4StackChecker::NewStage ( )
inlinevirtual

Reimplemented from G4UserStackingAction.

Definition at line 55 of file G4StackChecker.hh.

55 {};
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: