33#include "G4RunManager.hh"
43 : G4UserSteppingAction(),
44 fDetConstruction(detectorConstruction),
45 fEventAction(eventAction) {}
57 G4VPhysicalVolume* volume =
58 step->GetPreStepPoint()->GetTouchableHandle()->GetVolume();
61 G4double edep = step->GetTotalEnergyDeposit();
64 G4double stepLength = 0.;
65 if (step->GetTrack()->GetDefinition()->GetPDGCharge() != 0.) {
66 stepLength = step->GetStepLength();
70 fEventAction->
AddAbs(edep, stepLength);
73 if (volume == fDetConstruction->
GetGasPV()) {
74 fEventAction->
AddGas(edep);
Definition of the GarfieldDetectorConstruction class.
Definition of the GarfieldEventAction class.
Definition of the GarfieldSteppingAction class.
const G4VPhysicalVolume * GetGasPV() const
const G4VPhysicalVolume * GetAbsorberPV() const
void AddAbs(G4double de, G4double dl)
virtual void UserSteppingAction(const G4Step *step)
virtual ~GarfieldSteppingAction()
GarfieldSteppingAction(const GarfieldDetectorConstruction *detectorConstruction, GarfieldEventAction *eventAction)