CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Attributes
Geant4eSteppingAction Class Reference

#include <Geant4eSteppingAction.h>

Inheritance diagram for Geant4eSteppingAction:

Public Member Functions

 Geant4eSteppingAction ()
 
void reset ()
 
double trackLength () const
 
virtual void UserSteppingAction (const G4Step *step)
 
virtual ~Geant4eSteppingAction ()
 

Protected Attributes

double theTrackLength
 

Detailed Description

A G4 User stepping action used to calculate the total track. The method G4UserSteppingAction::UserSteppingAction(const G4Step*) should be automatically called by G4eManager at each step.

Definition at line 11 of file Geant4eSteppingAction.h.

Constructor & Destructor Documentation

Geant4eSteppingAction::Geant4eSteppingAction ( )
inline

Definition at line 13 of file Geant4eSteppingAction.h.

virtual Geant4eSteppingAction::~Geant4eSteppingAction ( )
inlinevirtual

Definition at line 14 of file Geant4eSteppingAction.h.

14 {}

Member Function Documentation

void Geant4eSteppingAction::reset ( void  )
inline

Resets to 0 the counter on the track length. Should be called at the beginning of any extrapolation.

Definition at line 24 of file Geant4eSteppingAction.h.

References theTrackLength.

Referenced by Geant4ePropagator::propagateWithPath().

double Geant4eSteppingAction::trackLength ( ) const
inline

Retrieve the length that the track has accumulated since the last call to reset()

Definition at line 19 of file Geant4eSteppingAction.h.

References theTrackLength.

Referenced by Geant4ePropagator::propagateWithPath().

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

This method is automatically called by G4eManager at each step. The step length is then added to the stored value of the track length.

Definition at line 4 of file Geant4eSteppingAction.cc.

References theTrackLength.

4  {
5  theTrackLength += step->GetStepLength();
6 }
list step
Definition: launcher.py:15

Member Data Documentation

double Geant4eSteppingAction::theTrackLength
protected

Definition at line 32 of file Geant4eSteppingAction.h.

Referenced by reset(), trackLength(), and UserSteppingAction().