Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions
OpNoviceStackingAction Class Reference

#include <OpNoviceStackingAction.hh>

Inheritance diagram for OpNoviceStackingAction:
G4UserStackingAction

Public Member Functions

 OpNoviceStackingAction ()
 
virtual ~OpNoviceStackingAction ()
 
virtual G4ClassificationOfNewTrack ClassifyNewTrack (const G4Track *aTrack)
 
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 38 of file OpNoviceStackingAction.hh.

Constructor & Destructor Documentation

OpNoviceStackingAction::OpNoviceStackingAction ( )

Definition at line 41 of file OpNoviceStackingAction.cc.

43  fScintillationCounter(0), fCerenkovCounter(0)
44 {}
OpNoviceStackingAction::~OpNoviceStackingAction ( )
virtual

Definition at line 48 of file OpNoviceStackingAction.cc.

49 {}

Member Function Documentation

G4ClassificationOfNewTrack OpNoviceStackingAction::ClassifyNewTrack ( const G4Track aTrack)
virtual

Reimplemented from G4UserStackingAction.

Definition at line 54 of file OpNoviceStackingAction.cc.

References fUrgent, G4Track::GetCreatorProcess(), G4Track::GetDefinition(), G4Track::GetParentID(), G4VProcess::GetProcessName(), and G4OpticalPhoton::OpticalPhotonDefinition().

55 {
57  { // particle is optical photon
58  if(aTrack->GetParentID()>0)
59  { // particle is secondary
60  if(aTrack->GetCreatorProcess()->GetProcessName() == "Scintillation")
61  fScintillationCounter++;
62  if(aTrack->GetCreatorProcess()->GetProcessName() == "Cerenkov")
63  fCerenkovCounter++;
64  }
65  }
66  return fUrgent;
67 }
G4ParticleDefinition * GetDefinition() const
G4int GetParentID() const
const G4VProcess * GetCreatorProcess() const
const G4String & GetProcessName() const
Definition: G4VProcess.hh:408
static G4OpticalPhoton * OpticalPhotonDefinition()
void OpNoviceStackingAction::NewStage ( )
virtual

Reimplemented from G4UserStackingAction.

Definition at line 71 of file OpNoviceStackingAction.cc.

References G4cout, and G4endl.

72 {
73  G4cout << "Number of Scintillation photons produced in this event : "
74  << fScintillationCounter << G4endl;
75  G4cout << "Number of Cerenkov photons produced in this event : "
76  << fCerenkovCounter << G4endl;
77 }
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61
void OpNoviceStackingAction::PrepareNewEvent ( )
virtual

Reimplemented from G4UserStackingAction.

Definition at line 81 of file OpNoviceStackingAction.cc.

82 {
83  fScintillationCounter = 0;
84  fCerenkovCounter = 0;
85 }

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