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

Stepping action class. More...

#include <Doxymodules_analysis.h>

Inheritance diagram for B1SteppingAction:
G4UserSteppingAction

Public Member Functions

 B1SteppingAction (B1EventAction *eventAction)
 
virtual ~B1SteppingAction ()
 
virtual void UserSteppingAction (const G4Step *)
 

Private Attributes

B1EventActionfEventAction
 
G4LogicalVolumefScoringVolume
 

Detailed Description

Stepping action class.

Definition at line 52 of file Doxymodules_analysis.h.

Constructor & Destructor Documentation

◆ B1SteppingAction()

B1SteppingAction::B1SteppingAction ( B1EventAction eventAction)

Definition at line 41 of file B1SteppingAction.cc.

43 fEventAction(eventAction),
45{}
B1EventAction * fEventAction
G4LogicalVolume * fScoringVolume

◆ ~B1SteppingAction()

B1SteppingAction::~B1SteppingAction ( )
virtual

Definition at line 49 of file B1SteppingAction.cc.

50{}

Member Function Documentation

◆ UserSteppingAction()

void B1SteppingAction::UserSteppingAction ( const G4Step step)
virtual

Definition at line 54 of file B1SteppingAction.cc.

55{
56 if (!fScoringVolume) {
57 const B1DetectorConstruction* detectorConstruction
58 = static_cast<const B1DetectorConstruction*>
59 (G4RunManager::GetRunManager()->GetUserDetectorConstruction());
60 fScoringVolume = detectorConstruction->GetScoringVolume();
61 }
62
63 // get volume of the current step
64 G4LogicalVolume* volume
65 = step->GetPreStepPoint()->GetTouchableHandle()
66 ->GetVolume()->GetLogicalVolume();
67
68 // check if we are in scoring volume
69 if (volume != fScoringVolume) return;
70
71 // collect energy deposited in this step
72 G4double edepStep = step->GetTotalEnergyDeposit();
73 fEventAction->AddEdep(edepStep);
74}
Detector construction class to define materials and geometry.
G4LogicalVolume * GetScoringVolume() const
void AddEdep(G4double edep)

Member Data Documentation

◆ fEventAction

B1EventAction* B1SteppingAction::fEventAction
private

Definition at line 53 of file B1SteppingAction.hh.

◆ fScoringVolume

G4LogicalVolume* B1SteppingAction::fScoringVolume
private

Definition at line 54 of file B1SteppingAction.hh.


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

Applications | User Support | Publications | Collaboration