30#include "SteppingAction.hh"
32#include "DetectorConstruction.hh"
35#include "G4RunManager.hh"
45 : fDetConstruction(detConstruction)
56 auto volume = step->GetPreStepPoint()->GetTouchableHandle()->GetVolume();
59 auto edep = step->GetTotalEnergyDeposit();
62 G4double stepLength = 0.;
63 if ( step->GetTrack()->GetDefinition()->GetPDGCharge() != 0. ) {
64 stepLength = step->GetStepLength();
67 auto runData =
static_cast<RunData*
>
68 (G4RunManager::GetRunManager()->GetNonConstCurrentRun());
71 runData->
Add(
kAbs, edep, stepLength);
75 runData->Add(
kGap, edep, stepLength);
Definition of the B4b::RunData class.
Detector construction class to define materials and geometry.
const G4VPhysicalVolume * GetAbsorberPV() const
const G4VPhysicalVolume * GetGapPV() const
void Add(G4int id, G4double de, G4double dl)
void UserSteppingAction(const G4Step *step) override
const B4::DetectorConstruction * fDetConstruction
SteppingAction(const B4::DetectorConstruction *detConstruction)