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

#include <XrayTelSteppingAction.hh>

Inheritance diagram for XrayTelSteppingAction:
G4UserSteppingAction

Public Member Functions

 XrayTelSteppingAction ()
 
virtual ~XrayTelSteppingAction ()
 
virtual void UserSteppingAction (const G4Step *step)
 
- Public Member Functions inherited from G4UserSteppingAction
 G4UserSteppingAction ()
 
virtual ~G4UserSteppingAction ()
 
void SetSteppingManagerPointer (G4SteppingManager *pValue)
 

Additional Inherited Members

- Protected Attributes inherited from G4UserSteppingAction
G4SteppingManagerfpSteppingManager
 

Detailed Description

Definition at line 64 of file XrayTelSteppingAction.hh.

Constructor & Destructor Documentation

XrayTelSteppingAction::XrayTelSteppingAction ( )

Definition at line 74 of file XrayTelSteppingAction.cc.

75 { }
XrayTelSteppingAction::~XrayTelSteppingAction ( )
virtual

Definition at line 78 of file XrayTelSteppingAction.cc.

79 { }

Member Function Documentation

void XrayTelSteppingAction::UserSteppingAction ( const G4Step step)
virtual

Reimplemented from G4UserSteppingAction.

Definition at line 82 of file XrayTelSteppingAction.cc.

References XrayTelAnalysis::analyseStepping(), XrayTelAnalysis::getInstance(), G4Track::GetKineticEnergy(), G4VPhysicalVolume::GetName(), G4Track::GetNextVolume(), G4RunManager::GetRunManager(), G4Step::GetTrack(), G4RunManager::GetUserRunAction(), G4Track::GetVolume(), and XrayTelRunAction::Update().

83 {
84  G4bool entering = false;
85  G4Track* track = step->GetTrack();
86 
87  G4String volName;
88  if (track->GetVolume()) volName = track->GetVolume()->GetName();
89  G4String nextVolName;
90  if (track->GetNextVolume()) nextVolName = track->GetNextVolume()->GetName();
91 
92  // Entering Detector
93  if (volName != "Detector_P" && nextVolName == "Detector_P")
94  {
95  entering = true;
96 
98 
99  // Notify the corresponding UserAction to update the run counters
100  XrayTelRunAction* runAction = (XrayTelRunAction*) runManager->GetUserRunAction();
101  runAction->Update(track->GetKineticEnergy());
102  }
103 
104  // Do the analysis related to this step
106  analysis->analyseStepping(*track,entering);
107 
108 }
void Update(G4double energy)
G4VPhysicalVolume * GetNextVolume() const
G4double GetKineticEnergy() const
const G4String & GetName() const
bool G4bool
Definition: G4Types.hh:79
static G4RunManager * GetRunManager()
Definition: G4RunManager.cc:74
G4VPhysicalVolume * GetVolume() const
void analyseStepping(const G4Track &track, G4bool entering)
const G4UserRunAction * GetUserRunAction() const
G4Track * GetTrack() const
static XrayTelAnalysis * getInstance()

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