Geant4  10.02.p03
B4bSteppingAction Class Reference

#include <B4bSteppingAction.hh>

Inheritance diagram for B4bSteppingAction:
Collaboration diagram for B4bSteppingAction:

Public Member Functions

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

Private Attributes

const B4DetectorConstructionfDetConstruction
 

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 B4bRunData object.

Definition at line 44 of file B4bSteppingAction.hh.

Constructor & Destructor Documentation

◆ B4bSteppingAction()

B4bSteppingAction::B4bSteppingAction ( const B4DetectorConstruction detectorConstruction)

Definition at line 40 of file B4bSteppingAction.cc.

43  fDetConstruction(detectorConstruction)
44 {
45 }
const B4DetectorConstruction * fDetConstruction

◆ ~B4bSteppingAction()

B4bSteppingAction::~B4bSteppingAction ( )
virtual

Definition at line 49 of file B4bSteppingAction.cc.

50 {
51 }

Member Function Documentation

◆ UserSteppingAction()

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

Reimplemented from G4UserSteppingAction.

Definition at line 55 of file B4bSteppingAction.cc.

56 {
57 // Collect energy and track length step by step
58 
59  // get volume of the current step
60  G4VPhysicalVolume* volume
61  = step->GetPreStepPoint()->GetTouchableHandle()->GetVolume();
62 
63  // energy deposit
64  G4double edep = step->GetTotalEnergyDeposit();
65 
66  // step length
67  G4double stepLength = 0.;
68  if ( step->GetTrack()->GetDefinition()->GetPDGCharge() != 0. ) {
69  stepLength = step->GetStepLength();
70  }
71 
72  B4bRunData* runData = static_cast<B4bRunData*>
74 
75  if ( volume == fDetConstruction->GetAbsorberPV() ) {
76  runData->Add(kAbs, edep, stepLength);
77  }
78 
79  if ( volume == fDetConstruction->GetGapPV() ) {
80  runData->Add(kGap, edep, stepLength);
81  }
82 }
G4Run * GetNonConstCurrentRun() const
const B4DetectorConstruction * fDetConstruction
const G4VPhysicalVolume * GetGapPV() const
void Add(G4int id, G4double de, G4double dl)
Definition: B4bRunData.hh:82
Double_t edep
static G4RunManager * GetRunManager()
Definition: G4RunManager.cc:79
const G4VPhysicalVolume * GetAbsorberPV() const
double G4double
Definition: G4Types.hh:76
Here is the call graph for this function:

Member Data Documentation

◆ fDetConstruction

const B4DetectorConstruction* B4bSteppingAction::fDetConstruction
private

Definition at line 53 of file B4bSteppingAction.hh.


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