36#include "G4RunManager.hh"
43 G4UserSteppingAction(), fDetConstruction(detectorConstruction), fEventAction(
58 G4VPhysicalVolume* volume =
59 step->GetPreStepPoint()->GetTouchableHandle()->GetVolume();
62 G4double edep = step->GetTotalEnergyDeposit();
65 G4double stepLength = 0.;
66 if (step->GetTrack()->GetDefinition()->GetPDGCharge() != 0.) {
67 stepLength = step->GetStepLength();
72 fEventAction->
AddAbs(edep, stepLength);
75 if (volume == fDetConstruction->
GetGasPV()) {
76 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)