Geant4 11.2.2
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4MSSteppingAction Class Reference

#include <G4MSSteppingAction.hh>

+ Inheritance diagram for G4MSSteppingAction:

Public Member Functions

 G4MSSteppingAction ()=default
 
 ~G4MSSteppingAction () override=default
 
void Initialize (G4bool rSens, G4Region *reg)
 
void UserSteppingAction (const G4Step *) override
 
G4double GetTotalStepLength () const
 
G4double GetX0 () const
 
G4double GetLambda0 () const
 
- Public Member Functions inherited from G4UserSteppingAction
 G4UserSteppingAction ()
 
virtual ~G4UserSteppingAction ()=default
 
virtual void SetSteppingManagerPointer (G4SteppingManager *pValue)
 

Additional Inherited Members

- Protected Attributes inherited from G4UserSteppingAction
G4SteppingManagerfpSteppingManager = nullptr
 

Detailed Description

Definition at line 42 of file G4MSSteppingAction.hh.

Constructor & Destructor Documentation

◆ G4MSSteppingAction()

G4MSSteppingAction::G4MSSteppingAction ( )
default

◆ ~G4MSSteppingAction()

G4MSSteppingAction::~G4MSSteppingAction ( )
overridedefault

Member Function Documentation

◆ GetLambda0()

G4double G4MSSteppingAction::GetLambda0 ( ) const
inline

Definition at line 53 of file G4MSSteppingAction.hh.

53{ return lambda; }

◆ GetTotalStepLength()

G4double G4MSSteppingAction::GetTotalStepLength ( ) const
inline

Definition at line 51 of file G4MSSteppingAction.hh.

51{ return length; }

◆ GetX0()

G4double G4MSSteppingAction::GetX0 ( ) const
inline

Definition at line 52 of file G4MSSteppingAction.hh.

52{ return x0; }

◆ Initialize()

void G4MSSteppingAction::Initialize ( G4bool rSens,
G4Region * reg )

Definition at line 40 of file G4MSSteppingAction.cc.

41{
42 regionSensitive = rSens;
43 theRegion = reg;
44 length = 0.;
45 x0 = 0.;
46 lambda = 0.;
47}

◆ UserSteppingAction()

void G4MSSteppingAction::UserSteppingAction ( const G4Step * aStep)
overridevirtual

Reimplemented from G4UserSteppingAction.

Definition at line 50 of file G4MSSteppingAction.cc.

51{
52 G4StepPoint* preStepPoint = aStep->GetPreStepPoint();
53 G4Region* region = preStepPoint->GetPhysicalVolume()->GetLogicalVolume()->GetRegion();
54
55 if (regionSensitive && (region != theRegion)) return;
56
57 G4double stlen = aStep->GetStepLength();
58 const G4Material* material = preStepPoint->GetMaterial();
59 length += stlen;
60 x0 += stlen / (material->GetRadlen());
61 lambda += stlen / (material->GetNuclearInterLength());
62}
double G4double
Definition G4Types.hh:83
G4Region * GetRegion() const
G4double GetRadlen() const
G4double GetNuclearInterLength() const
G4Material * GetMaterial() const
G4VPhysicalVolume * GetPhysicalVolume() const
G4StepPoint * GetPreStepPoint() const
G4double GetStepLength() const
G4LogicalVolume * GetLogicalVolume() const

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