Geant4 VMC Version 6.6
Loading...
Searching...
No Matches
TG4SteppingAction Class Reference

Actions at each step. More...

#include <TG4SteppingAction.h>

Inheritance diagram for TG4SteppingAction:

Public Member Functions

 TG4SteppingAction ()
 
virtual ~TG4SteppingAction ()
 
void ProcessTrackIfGeneralProcess (const G4Step *step)
 
void LateInitialize ()
 
virtual void SteppingAction (const G4Step *step)
 
virtual void UserSteppingAction (const G4Step *step)
 
void SetLoopVerboseLevel (G4int level)
 
void SetMaxNofSteps (G4int number)
 
void SetSpecialControls (TG4SpecialControlsV2 *specialControls)
 
void SetIsPairCut (G4bool isPairCut)
 
void SetCollectTracks (G4bool collectTracks)
 
G4int GetLoopVerboseLevel () const
 
G4int GetMaxNofSteps () const
 
G4bool GetIsPairCut () const
 
G4bool GetCollectTracks () const
 

Static Public Member Functions

static TG4SteppingActionInstance ()
 

Protected Member Functions

void PrintTrackInfo (const G4Track *track) const
 

Private Types

enum  { kMaxNofSteps = 30000 , kMaxNofLoopSteps = 5 }
 

Private Member Functions

 TG4SteppingAction (const TG4SteppingAction &right)
 Not implemented.
 
TG4SteppingActionoperator= (const TG4SteppingAction &right)
 Not implemented.
 
void ProcessTrackIfLooping (const G4Step *step)
 
void ProcessTrackIfOutOfRegion (const G4Step *step)
 
void ProcessTrackIfBelowCut (const G4Step *step)
 
void ProcessTrackOnBoundary (const G4Step *step)
 

Private Attributes

TG4SteppingActionMessenger fMessenger
 messenger
 
TG4GeoTrackManager fGeoTrackManager
 manager for collecting TGeo tracks
 
TG4SpecialControlsV2fSpecialControls
 the special controls manager
 
TVirtualMCApplication * fMCApplication
 Cached pointer to thread-local VMC application.
 
TG4TrackManagerfTrackManager
 Cached pointer to thread-local track manager.
 
TG4StepManagerfStepManager
 Cached pointer to thread-local step manager.
 
TG4StackPopperfStackPopper
 Cached pointer to thread-local stack popper.
 
G4int fMaxNofSteps
 max number of allowed steps
 
G4int fStandardVerboseLevel
 standard tracking verbose level
 
G4int fLoopVerboseLevel
 tracking verbose level for looping particles
 
G4int fLoopStepCounter
 counter of step in looping
 
G4bool fIsPairCut
 control of cut on e+e- pair
 
G4bool fCollectTracks
 control to collect Root tracks
 

Static Private Attributes

static G4ThreadLocal TG4SteppingActionfgInstance = 0
 this instance
 

Detailed Description

Actions at each step.

This class ensures the additional call to the sensitive detector when track crosses a geometrical boundary. It also enables to define a maximum number of steps and takes care of stopping of a track when this number is reached.

Author
I. Hrivnacova; IPN, Orsay

Definition at line 46 of file TG4SteppingAction.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private
Enumerator
kMaxNofSteps 
kMaxNofLoopSteps 

Definition at line 48 of file TG4SteppingAction.h.

Constructor & Destructor Documentation

◆ TG4SteppingAction() [1/2]

TG4SteppingAction::TG4SteppingAction ( )

Default constructor

Definition at line 41 of file TG4SteppingAction.cxx.

◆ ~TG4SteppingAction()

TG4SteppingAction::~TG4SteppingAction ( )
virtual

Destructor

Definition at line 68 of file TG4SteppingAction.cxx.

◆ TG4SteppingAction() [2/2]

TG4SteppingAction::TG4SteppingAction ( const TG4SteppingAction & right)
private

Not implemented.

Member Function Documentation

◆ Instance()

◆ ProcessTrackIfGeneralProcess()

void TG4SteppingAction::ProcessTrackIfGeneralProcess ( const G4Step * step)

Make sure that the creator process (of the secondary tracks of the current step) is the same as the one that limited the step. These can be different in case of using wrapper processes e.g. G4GammaGeneralProcess or G4HepEm, etc.

Definition at line 284 of file TG4SteppingAction.cxx.

Referenced by TG4StepManager::ProdProcess(), TG4StepManager::StepProcesses(), and UserSteppingAction().

◆ LateInitialize()

void TG4SteppingAction::LateInitialize ( )

Definition at line 319 of file TG4SteppingAction.cxx.

Referenced by TG4RunManager::LateInitialize().

◆ SteppingAction()

void TG4SteppingAction::SteppingAction ( const G4Step * step)
inlinevirtual

Dummy stepping action that can be overriden in a user defined class

Definition at line 152 of file TG4SteppingAction.h.

Referenced by UserSteppingAction().

◆ UserSteppingAction()

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

Called by G4 kernel at the end of each step. This method should not be overridden in a Geant4 VMC user class; there is defined SteppingAction(const G4Step* step) method for this purpose.

Definition at line 331 of file TG4SteppingAction.cxx.

◆ SetLoopVerboseLevel()

void TG4SteppingAction::SetLoopVerboseLevel ( G4int level)
inline

Set loop verbose level (applied when a track is looping)

Definition at line 158 of file TG4SteppingAction.h.

Referenced by TG4ActionInitialization::Build(), and TG4SteppingActionMessenger::SetNewValue().

◆ SetMaxNofSteps()

void TG4SteppingAction::SetMaxNofSteps ( G4int number)
inline

Set maximum number of steps allowed

Definition at line 164 of file TG4SteppingAction.h.

Referenced by TG4ActionInitialization::Build(), TG4StepManager::SetMaxNStep(), and TG4SteppingActionMessenger::SetNewValue().

◆ SetSpecialControls()

void TG4SteppingAction::SetSpecialControls ( TG4SpecialControlsV2 * specialControls)
inline

Set special controls manager

Definition at line 170 of file TG4SteppingAction.h.

Referenced by TG4ActionInitialization::Build().

◆ SetIsPairCut()

void TG4SteppingAction::SetIsPairCut ( G4bool isPairCut)
inline

Set control for e+e- pair cut

Definition at line 177 of file TG4SteppingAction.h.

◆ SetCollectTracks()

void TG4SteppingAction::SetCollectTracks ( G4bool collectTracks)
inline

(In)Activate collecting Root tracks

Definition at line 183 of file TG4SteppingAction.h.

Referenced by TG4StepManager::SetCollectTracks().

◆ GetLoopVerboseLevel()

G4int TG4SteppingAction::GetLoopVerboseLevel ( ) const
inline

Get loop verbose level (applied when a track is looping)

Definition at line 195 of file TG4SteppingAction.h.

Referenced by TG4ActionInitialization::Build().

◆ GetMaxNofSteps()

G4int TG4SteppingAction::GetMaxNofSteps ( ) const
inline

Get maximum number of steps allowed

Definition at line 189 of file TG4SteppingAction.h.

Referenced by TG4ActionInitialization::Build(), and TG4StepManager::GetMaxNStep().

◆ GetIsPairCut()

G4bool TG4SteppingAction::GetIsPairCut ( ) const
inline

Return control for saving secondaries in the VMC stack

Definition at line 201 of file TG4SteppingAction.h.

◆ GetCollectTracks()

G4bool TG4SteppingAction::GetCollectTracks ( ) const
inline

Return the info if collecting Root tracks is activated

Definition at line 207 of file TG4SteppingAction.h.

Referenced by TG4StepManager::IsCollectTracks().

◆ PrintTrackInfo()

void TG4SteppingAction::PrintTrackInfo ( const G4Track * track) const
protected

Print the track info, taken from private G4TrackingManager::Verbose(), and the standard header for verbose tracking, taken from G4SteppingVerbose::TrackingStarted().

Definition at line 234 of file TG4SteppingAction.cxx.

Referenced by ProcessTrackIfLooping(), and ProcessTrackIfOutOfRegion().

◆ operator=()

TG4SteppingAction & TG4SteppingAction::operator= ( const TG4SteppingAction & right)
private

Not implemented.

◆ ProcessTrackIfLooping()

void TG4SteppingAction::ProcessTrackIfLooping ( const G4Step * step)
private

Stop track if maximum number of steps has been reached.

Definition at line 80 of file TG4SteppingAction.cxx.

Referenced by UserSteppingAction().

◆ ProcessTrackIfOutOfRegion()

void TG4SteppingAction::ProcessTrackIfOutOfRegion ( const G4Step * step)
private

stop track if a user defined tracking region has been reached

Definition at line 131 of file TG4SteppingAction.cxx.

Referenced by UserSteppingAction().

◆ ProcessTrackIfBelowCut()

void TG4SteppingAction::ProcessTrackIfBelowCut ( const G4Step * step)
private

Flag e+e- secondary pair produced by muons for stop if its energy is below user cut (PPCUTM)

Definition at line 154 of file TG4SteppingAction.cxx.

Referenced by UserSteppingAction().

◆ ProcessTrackOnBoundary()

void TG4SteppingAction::ProcessTrackOnBoundary ( const G4Step * step)
private

Process actions on the boundary

Definition at line 184 of file TG4SteppingAction.cxx.

Referenced by UserSteppingAction().

Member Data Documentation

◆ fgInstance

G4ThreadLocal TG4SteppingAction * TG4SteppingAction::fgInstance = 0
staticprivate

this instance

Definition at line 93 of file TG4SteppingAction.h.

Referenced by Instance(), and TG4SteppingAction().

◆ fMessenger

TG4SteppingActionMessenger TG4SteppingAction::fMessenger
private

messenger

Definition at line 105 of file TG4SteppingAction.h.

◆ fGeoTrackManager

TG4GeoTrackManager TG4SteppingAction::fGeoTrackManager
private

manager for collecting TGeo tracks

Definition at line 108 of file TG4SteppingAction.h.

Referenced by UserSteppingAction().

◆ fSpecialControls

TG4SpecialControlsV2* TG4SteppingAction::fSpecialControls
private

the special controls manager

Definition at line 111 of file TG4SteppingAction.h.

Referenced by SetSpecialControls(), UserSteppingAction(), and ~TG4SteppingAction().

◆ fMCApplication

TVirtualMCApplication* TG4SteppingAction::fMCApplication
private

Cached pointer to thread-local VMC application.

Definition at line 114 of file TG4SteppingAction.h.

Referenced by LateInitialize(), and ProcessTrackIfOutOfRegion().

◆ fTrackManager

TG4TrackManager* TG4SteppingAction::fTrackManager
private

Cached pointer to thread-local track manager.

Definition at line 117 of file TG4SteppingAction.h.

Referenced by LateInitialize(), ProcessTrackIfBelowCut(), and UserSteppingAction().

◆ fStepManager

TG4StepManager* TG4SteppingAction::fStepManager
private

Cached pointer to thread-local step manager.

Definition at line 120 of file TG4SteppingAction.h.

Referenced by LateInitialize(), ProcessTrackIfBelowCut(), and ProcessTrackOnBoundary().

◆ fStackPopper

TG4StackPopper* TG4SteppingAction::fStackPopper
private

Cached pointer to thread-local stack popper.

Definition at line 123 of file TG4SteppingAction.h.

Referenced by LateInitialize(), and UserSteppingAction().

◆ fMaxNofSteps

G4int TG4SteppingAction::fMaxNofSteps
private

max number of allowed steps

Definition at line 126 of file TG4SteppingAction.h.

Referenced by GetMaxNofSteps(), ProcessTrackIfLooping(), and SetMaxNofSteps().

◆ fStandardVerboseLevel

G4int TG4SteppingAction::fStandardVerboseLevel
private

standard tracking verbose level

Definition at line 129 of file TG4SteppingAction.h.

Referenced by ProcessTrackIfLooping(), and ProcessTrackIfOutOfRegion().

◆ fLoopVerboseLevel

G4int TG4SteppingAction::fLoopVerboseLevel
private

tracking verbose level for looping particles

Definition at line 132 of file TG4SteppingAction.h.

Referenced by GetLoopVerboseLevel(), ProcessTrackIfLooping(), ProcessTrackIfOutOfRegion(), and SetLoopVerboseLevel().

◆ fLoopStepCounter

G4int TG4SteppingAction::fLoopStepCounter
private

counter of step in looping

Definition at line 135 of file TG4SteppingAction.h.

Referenced by ProcessTrackIfLooping().

◆ fIsPairCut

G4bool TG4SteppingAction::fIsPairCut
private

control of cut on e+e- pair

Definition at line 138 of file TG4SteppingAction.h.

Referenced by GetIsPairCut(), SetIsPairCut(), and UserSteppingAction().

◆ fCollectTracks

G4bool TG4SteppingAction::fCollectTracks
private

control to collect Root tracks

Definition at line 141 of file TG4SteppingAction.h.

Referenced by GetCollectTracks(), SetCollectTracks(), and UserSteppingAction().


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