Geant4  10.02.p03
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 ()
 
void SetSteppingManagerPointer (G4SteppingManager *pValue)
 

Private Attributes

const B4DetectorConstructionfDetConstruction
 
B4aEventActionfEventAction
 

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

Definition at line 40 of file B4aSteppingAction.cc.

44  fDetConstruction(detectorConstruction),
45  fEventAction(eventAction)
46 {
47 }
const B4DetectorConstruction * fDetConstruction
B4aEventAction * fEventAction

◆ ~B4aSteppingAction()

B4aSteppingAction::~B4aSteppingAction ( )
virtual

Definition at line 51 of file B4aSteppingAction.cc.

52 {
53 }

Member Function Documentation

◆ UserSteppingAction()

void B4aSteppingAction::UserSteppingAction ( const G4Step *  step)
virtual

Reimplemented from G4UserSteppingAction.

Definition at line 57 of file B4aSteppingAction.cc.

58 {
59 // Collect energy and track length step by step
60 
61  // get volume of the current step
62  G4VPhysicalVolume* volume
63  = step->GetPreStepPoint()->GetTouchableHandle()->GetVolume();
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 }
const G4VPhysicalVolume * GetGapPV() const
const B4DetectorConstruction * fDetConstruction
Double_t edep
B4aEventAction * fEventAction
void AddGap(G4double de, G4double dl)
const G4VPhysicalVolume * GetAbsorberPV() const
void AddAbs(G4double de, G4double dl)
double G4double
Definition: G4Types.hh:76
Here is the call graph for this function:

Member Data Documentation

◆ fDetConstruction

const B4DetectorConstruction* B4aSteppingAction::fDetConstruction
private

Definition at line 55 of file B4aSteppingAction.hh.

◆ fEventAction

B4aEventAction* B4aSteppingAction::fEventAction
private

Definition at line 56 of file B4aSteppingAction.hh.


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