Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
B1::SteppingAction Class Reference

Stepping action class. More...

#include <Doxymodules_basic.h>

Inheritance diagram for B1::SteppingAction:
G4UserSteppingAction

Public Member Functions

 SteppingAction (EventAction *eventAction)
 
 ~SteppingAction () override=default
 
void UserSteppingAction (const G4Step *) override
 

Private Attributes

EventActionfEventAction = nullptr
 
G4LogicalVolumefScoringVolume = nullptr
 

Detailed Description

Stepping action class.

Definition at line 25 of file Doxymodules_basic.h.

Constructor & Destructor Documentation

◆ SteppingAction()

B1::SteppingAction::SteppingAction ( EventAction eventAction)

Definition at line 44 of file SteppingAction.cc.

45: fEventAction(eventAction)
46{}
EventAction * fEventAction

◆ ~SteppingAction()

B1::SteppingAction::~SteppingAction ( )
overridedefault

Member Function Documentation

◆ UserSteppingAction()

void B1::SteppingAction::UserSteppingAction ( const G4Step step)
override

Definition at line 50 of file SteppingAction.cc.

51{
52 if (!fScoringVolume) {
53 const auto detConstruction = static_cast<const DetectorConstruction*>(
54 G4RunManager::GetRunManager()->GetUserDetectorConstruction());
55 fScoringVolume = detConstruction->GetScoringVolume();
56 }
57
58 // get volume of the current step
59 G4LogicalVolume* volume
60 = step->GetPreStepPoint()->GetTouchableHandle()
61 ->GetVolume()->GetLogicalVolume();
62
63 // check if we are in scoring volume
64 if (volume != fScoringVolume) return;
65
66 // collect energy deposited in this step
67 G4double edepStep = step->GetTotalEnergyDeposit();
68 fEventAction->AddEdep(edepStep);
69}
void AddEdep(G4double edep)
G4LogicalVolume * fScoringVolume

Member Data Documentation

◆ fEventAction

EventAction* B1::SteppingAction::fEventAction = nullptr
private

Definition at line 55 of file SteppingAction.hh.

◆ fScoringVolume

G4LogicalVolume* B1::SteppingAction::fScoringVolume = nullptr
private

Definition at line 56 of file SteppingAction.hh.


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

Applications | User Support | Publications | Collaboration