Geant4 10.7.0
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 ()
 
virtual ~G4MSSteppingAction ()
 
void Initialize (G4bool rSens, G4Region *reg)
 
virtual void UserSteppingAction (const G4Step *)
 
G4double GetTotalStepLength () const
 
G4double GetX0 () const
 
G4double GetLambda0 () const
 
- Public Member Functions inherited from G4UserSteppingAction
 G4UserSteppingAction ()
 
virtual ~G4UserSteppingAction ()
 
virtual void SetSteppingManagerPointer (G4SteppingManager *pValue)
 
virtual void UserSteppingAction (const G4Step *)
 

Additional Inherited Members

- Protected Attributes inherited from G4UserSteppingAction
G4SteppingManagerfpSteppingManager = nullptr
 

Detailed Description

Definition at line 45 of file G4MSSteppingAction.hh.

Constructor & Destructor Documentation

◆ G4MSSteppingAction()

G4MSSteppingAction::G4MSSteppingAction ( )

Definition at line 39 of file G4MSSteppingAction.cc.

39{ Initialize(false, 0); }
void Initialize(G4bool rSens, G4Region *reg)

◆ ~G4MSSteppingAction()

G4MSSteppingAction::~G4MSSteppingAction ( )
virtual

Definition at line 41 of file G4MSSteppingAction.cc.

41{ ; }

Member Function Documentation

◆ GetLambda0()

G4double G4MSSteppingAction::GetLambda0 ( ) const
inline

Definition at line 64 of file G4MSSteppingAction.hh.

64{ return lambda; }

◆ GetTotalStepLength()

G4double G4MSSteppingAction::GetTotalStepLength ( ) const
inline

Definition at line 62 of file G4MSSteppingAction.hh.

62{ return length; }

◆ GetX0()

G4double G4MSSteppingAction::GetX0 ( ) const
inline

Definition at line 63 of file G4MSSteppingAction.hh.

63{ return x0; }

◆ Initialize()

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

Definition at line 43 of file G4MSSteppingAction.cc.

44{
45 regionSensitive = rSens;
46 theRegion = reg;
47 length = 0.;
48 x0 = 0.;
49 lambda = 0.;
50}

Referenced by G4MSSteppingAction().

◆ UserSteppingAction()

void G4MSSteppingAction::UserSteppingAction ( const G4Step aStep)
virtual

Reimplemented from G4UserSteppingAction.

Definition at line 52 of file G4MSSteppingAction.cc.

53{
54 G4StepPoint* preStepPoint = aStep->GetPreStepPoint();
55 G4Region* region =
56 preStepPoint->GetPhysicalVolume()->GetLogicalVolume()->GetRegion();
57
58 if(regionSensitive && (region != theRegion))
59 return;
60
61 G4double stlen = aStep->GetStepLength();
62 G4Material* material = preStepPoint->GetMaterial();
63 length += stlen;
64 x0 += stlen / (material->GetRadlen());
65 lambda += stlen / (material->GetNuclearInterLength());
66}
double G4double
Definition: G4Types.hh:83
G4Region * GetRegion() const
G4double GetRadlen() const
Definition: G4Material.hh:218
G4double GetNuclearInterLength() const
Definition: G4Material.hh:221
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: