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

#include <B4aSteppingAction.hh>

Inheritance diagram for B4aSteppingAction:
G4UserSteppingAction

Public Member Functions

 B4aSteppingAction (const B4DetectorConstruction *detectorConstruction, B4aEventAction *eventAction)
 
virtual ~B4aSteppingAction ()
 
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

Stepping action class.

In UserSteppingAction() there are collected the energy deposit and track lengths of charged particles in Absober and Gap layers and updated in B4aEventAction.

Definition at line 45 of file B4aSteppingAction.hh.

Constructor & Destructor Documentation

B4aSteppingAction::B4aSteppingAction ( const B4DetectorConstruction detectorConstruction,
B4aEventAction eventAction 
)

Definition at line 40 of file B4aSteppingAction.cc.

44  fDetConstruction(detectorConstruction),
45  fEventAction(eventAction)
46 {
47 }
B4aSteppingAction::~B4aSteppingAction ( )
virtual

Definition at line 51 of file B4aSteppingAction.cc.

52 {
53 }

Member Function Documentation

void B4aSteppingAction::UserSteppingAction ( const G4Step step)
virtual

Reimplemented from G4UserSteppingAction.

Definition at line 57 of file B4aSteppingAction.cc.

References B4aEventAction::AddAbs(), B4aEventAction::AddGap(), B4DetectorConstruction::GetAbsorberPV(), G4Track::GetDefinition(), B4DetectorConstruction::GetGapPV(), G4ParticleDefinition::GetPDGCharge(), G4Step::GetPreStepPoint(), G4Step::GetStepLength(), G4Step::GetTotalEnergyDeposit(), G4StepPoint::GetTouchableHandle(), G4Step::GetTrack(), and G4VTouchable::GetVolume().

58 {
59 // Collect energy and track length step by step
60 
61  // get volume of the current step
62  G4VPhysicalVolume* volume
64 
65  // energy deposit
66  G4double edep = step->GetTotalEnergyDeposit();
67 
68  // step length
69  G4double stepLength = 0.;
70  if ( step->GetTrack()->GetDefinition()->GetPDGCharge() != 0. ) {
71  stepLength = step->GetStepLength();
72  }
73 
74  if ( volume == fDetConstruction->GetAbsorberPV() ) {
75  fEventAction->AddAbs(edep,stepLength);
76  }
77 
78  if ( volume == fDetConstruction->GetGapPV() ) {
79  fEventAction->AddGap(edep,stepLength);
80  }
81 }
G4ParticleDefinition * GetDefinition() const
G4double GetStepLength() const
G4StepPoint * GetPreStepPoint() const
const G4VPhysicalVolume * GetGapPV() const
const G4VPhysicalVolume * GetAbsorberPV() const
G4double GetTotalEnergyDeposit() const
void AddGap(G4double de, G4double dl)
virtual G4VPhysicalVolume * GetVolume(G4int depth=0) const
Definition: G4VTouchable.cc:44
void AddAbs(G4double de, G4double dl)
double G4double
Definition: G4Types.hh:76
G4Track * GetTrack() const
G4double GetPDGCharge() const
const G4TouchableHandle & GetTouchableHandle() const

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