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

#include <B4aSteppingAction.hh>

Inheritance diagram for B4aSteppingAction:
Collaboration diagram for B4aSteppingAction:

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 ()
 
virtual 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 {}
B4aSteppingAction::~B4aSteppingAction ( )
virtual

Definition at line 50 of file B4aSteppingAction.cc.

51 {}

Member Function Documentation

void B4aSteppingAction::UserSteppingAction ( const G4Step step)
virtual

Reimplemented from G4UserSteppingAction.

Definition at line 55 of file B4aSteppingAction.cc.

56 {
57 // Collect energy and track length step by step
58 
59  // get volume of the current step
60  auto volume = step->GetPreStepPoint()->GetTouchableHandle()->GetVolume();
61 
62  // energy deposit
63  auto edep = step->GetTotalEnergyDeposit();
64 
65  // step length
66  G4double stepLength = 0.;
67  if ( step->GetTrack()->GetDefinition()->GetPDGCharge() != 0. ) {
68  stepLength = step->GetStepLength();
69  }
70 
71  if ( volume == fDetConstruction->GetAbsorberPV() ) {
72  fEventAction->AddAbs(edep,stepLength);
73  }
74 
75  if ( volume == fDetConstruction->GetGapPV() ) {
76  fEventAction->AddGap(edep,stepLength);
77  }
78 }
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

Here is the call graph for this function:


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