Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
B4a::SteppingAction Class Reference
basic » B4 » B4a

Stepping action class. More...

#include <Doxymodules_basic.h>

Inheritance diagram for B4a::SteppingAction:
G4UserSteppingAction

Public Member Functions

 SteppingAction (const B4::DetectorConstruction *detConstruction, EventAction *eventAction)
 
 ~SteppingAction () override=default
 
void UserSteppingAction (const G4Step *step) override
 

Private Attributes

const B4::DetectorConstructionfDetConstruction = nullptr
 
EventActionfEventAction = nullptr
 

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 EventAction.

Definition at line 128 of file Doxymodules_basic.h.

Constructor & Destructor Documentation

◆ SteppingAction()

B4a::SteppingAction::SteppingAction ( const B4::DetectorConstruction detConstruction,
EventAction eventAction 
)

Definition at line 44 of file SteppingAction.cc.

46 : fDetConstruction(detConstruction),
47 fEventAction(eventAction)
48{}
EventAction * fEventAction
const B4::DetectorConstruction * fDetConstruction

◆ ~SteppingAction()

B4a::SteppingAction::~SteppingAction ( )
overridedefault

Member Function Documentation

◆ UserSteppingAction()

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

Definition at line 52 of file SteppingAction.cc.

53{
54// Collect energy and track length step by step
55
56 // get volume of the current step
57 auto volume = step->GetPreStepPoint()->GetTouchableHandle()->GetVolume();
58
59 // energy deposit
60 auto edep = step->GetTotalEnergyDeposit();
61
62 // step length
63 G4double stepLength = 0.;
64 if ( step->GetTrack()->GetDefinition()->GetPDGCharge() != 0. ) {
65 stepLength = step->GetStepLength();
66 }
67
68 if ( volume == fDetConstruction->GetAbsorberPV() ) {
69 fEventAction->AddAbs(edep,stepLength);
70 }
71
72 if ( volume == fDetConstruction->GetGapPV() ) {
73 fEventAction->AddGap(edep,stepLength);
74 }
75}
const G4VPhysicalVolume * GetAbsorberPV() const
const G4VPhysicalVolume * GetGapPV() const
void AddAbs(G4double de, G4double dl)
void AddGap(G4double de, G4double dl)

Member Data Documentation

◆ fDetConstruction

const B4::DetectorConstruction* B4a::SteppingAction::fDetConstruction = nullptr
private

Definition at line 61 of file SteppingAction.hh.

◆ fEventAction

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

Definition at line 62 of file SteppingAction.hh.


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

Applications | User Support | Publications | Collaboration