Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
OpNoviceStackingAction Class Reference

#include <OpNoviceStackingAction.hh>

Inheritance diagram for OpNoviceStackingAction:
Collaboration diagram for OpNoviceStackingAction:

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 41 of file OpNoviceStackingAction.hh.

Constructor & Destructor Documentation

OpNoviceStackingAction::OpNoviceStackingAction ( )

Definition at line 44 of file OpNoviceStackingAction.cc.

46  fScintillationCounter(0), fCerenkovCounter(0)
47 {}
OpNoviceStackingAction::~OpNoviceStackingAction ( )
virtual

Definition at line 51 of file OpNoviceStackingAction.cc.

52 {}

Member Function Documentation

G4ClassificationOfNewTrack OpNoviceStackingAction::ClassifyNewTrack ( const G4Track aTrack)
virtual

Reimplemented from G4UserStackingAction.

Definition at line 57 of file OpNoviceStackingAction.cc.

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

Here is the call graph for this function:

void OpNoviceStackingAction::NewStage ( )
virtual

Reimplemented from G4UserStackingAction.

Definition at line 74 of file OpNoviceStackingAction.cc.

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

Reimplemented from G4UserStackingAction.

Definition at line 84 of file OpNoviceStackingAction.cc.

85 {
86  fScintillationCounter = 0;
87  fCerenkovCounter = 0;
88 }

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