Garfield++ v2r0
A toolkit for the detailed simulation of particle detectors based on ionisation measurement in gases and semiconductors
Loading...
Searching...
No Matches
GarfieldSteppingAction Class Reference

#include <GarfieldSteppingAction.hh>

+ Inheritance diagram for GarfieldSteppingAction:

Public Member Functions

 GarfieldSteppingAction (const GarfieldDetectorConstruction *detectorConstruction, GarfieldEventAction *eventAction)
 
virtual ~GarfieldSteppingAction ()
 
virtual void UserSteppingAction (const G4Step *step)
 

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

Definition at line 45 of file GarfieldSteppingAction.hh.

Constructor & Destructor Documentation

◆ GarfieldSteppingAction()

GarfieldSteppingAction::GarfieldSteppingAction ( const GarfieldDetectorConstruction detectorConstruction,
GarfieldEventAction eventAction 
)

Definition at line 40 of file GarfieldSteppingAction.cc.

42 :
43 G4UserSteppingAction(), fDetConstruction(detectorConstruction), fEventAction(
44 eventAction) {
45}

◆ ~GarfieldSteppingAction()

GarfieldSteppingAction::~GarfieldSteppingAction ( )
virtual

Definition at line 49 of file GarfieldSteppingAction.cc.

49 {
50}

Member Function Documentation

◆ UserSteppingAction()

void GarfieldSteppingAction::UserSteppingAction ( const G4Step *  step)
virtual

Definition at line 54 of file GarfieldSteppingAction.cc.

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

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