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

Actions at the beginnig and at the end of track. More...

#include <TG4TrackingAction.h>

Inheritance diagram for TG4TrackingAction:

Public Member Functions

 TG4TrackingAction ()
 
virtual ~TG4TrackingAction ()
 
void LateInitialize ()
 
virtual void PrepareNewEvent ()
 
virtual void PreTrackingAction (const G4Track *aTrack)
 
virtual void PostTrackingAction (const G4Track *aTrack)
 
virtual void PreUserTrackingAction (const G4Track *aTrack)
 
virtual void PostUserTrackingAction (const G4Track *aTrack)
 
void FinishPrimaryTrack ()
 
void SetMCStack (TVirtualMCStack *mcStack)
 
void SetNewVerboseLevel (G4int level)
 
void SetNewVerboseTrackID (G4int trackID)
 
void SetSpecialControls (TG4SpecialControlsV2 *specialControls)
 
G4int GetNewVerboseLevel () const
 
G4int GetNewVerboseTrackID () const
 
TG4TrackManagerGetTrackManager () const
 
- Public Member Functions inherited from TG4Verbose
 TG4Verbose (const G4String &cmdName)
 
 TG4Verbose (const G4String &cmdName, G4int verboseLevel)
 
virtual ~TG4Verbose ()
 
virtual void VerboseLevel (G4int level)
 
virtual G4int VerboseLevel () const
 

Static Public Member Functions

static TG4TrackingActionInstance ()
 

Private Member Functions

 TG4TrackingAction (const TG4TrackingAction &right)
 Not implemented.
 
TG4TrackingActionoperator= (const TG4TrackingAction &right)
 Not implemented.
 
void UserProcessHits (const G4Track *aTrack)
 
void Verbose () const
 

Private Attributes

TG4TrackingActionMessenger fMessenger
 messenger
 
TG4SpecialControlsV2fSpecialControls
 the special controls manager
 
TG4TrackManagerfTrackManager
 track manager
 
TVirtualMCApplication * fMCApplication
 Cached pointer to thread-local VMC application.
 
TVirtualMCStack * fMCStack
 Cached pointer to thread-local VMC stack.
 
TG4StepManagerfStepManager
 Cached pointer to thread-local step manager.
 
TG4StackPopperfStackPopper
 Cached pointer to thread-local stack popper.
 
G4int fPrimaryTrackID
 current primary track ID
 
G4int fCurrentTrackID
 current track ID
 
TG4TrackSaveControl fTrackSaveControl
 control of saving secondary tracks
 
G4bool fOverwriteLastTrack
 control of saving current track
 
G4int fNewVerboseLevel
 new /tracking/verbose level
 
G4int fNewVerboseTrackID
 track ID for which the new verbose level is applied
 
G4bool fDoFinishPrimary
 

Static Private Attributes

static G4ThreadLocal TG4TrackingActionfgInstance = 0
 this instance
 

Detailed Description

Actions at the beginnig and at the end of track.

Class that ensures calling sensitive detector before track starts stepping. It also takes care of setting step status (kVertex) and passing G4Track to TG4StepManager.

Author
I. Hrivnacova; IPN, Orsay

Definition at line 45 of file TG4TrackingAction.h.

Constructor & Destructor Documentation

◆ TG4TrackingAction() [1/2]

TG4TrackingAction::TG4TrackingAction ( )

Default constructor

Definition at line 41 of file TG4TrackingAction.cxx.

◆ ~TG4TrackingAction()

TG4TrackingAction::~TG4TrackingAction ( )
virtual

Destructor

Definition at line 72 of file TG4TrackingAction.cxx.

◆ TG4TrackingAction() [2/2]

TG4TrackingAction::TG4TrackingAction ( const TG4TrackingAction & right)
private

Not implemented.

Member Function Documentation

◆ Instance()

TG4TrackingAction * TG4TrackingAction::Instance ( )
inlinestatic

Return this instance.

Definition at line 138 of file TG4TrackingAction.h.

Referenced by TG4RunManager::CacheMCStack(), TG4EventAction::LateInitialize(), and TG4RunManager::LateInitialize().

◆ LateInitialize()

void TG4TrackingAction::LateInitialize ( )

Cache thread-local pointers

Definition at line 133 of file TG4TrackingAction.cxx.

Referenced by TG4RunManager::LateInitialize().

◆ PrepareNewEvent()

void TG4TrackingAction::PrepareNewEvent ( )
virtual

Called by G4 kernel at the beginning of event.

Definition at line 145 of file TG4TrackingAction.cxx.

Referenced by TG4EventAction::BeginOfEventAction().

◆ PreTrackingAction()

void TG4TrackingAction::PreTrackingAction ( const G4Track * aTrack)
inlinevirtual

Dummy pre-tracking action that can be overriden in a user defined class

Definition at line 144 of file TG4TrackingAction.h.

Referenced by PreUserTrackingAction().

◆ PostTrackingAction()

void TG4TrackingAction::PostTrackingAction ( const G4Track * aTrack)
inlinevirtual

Dummy post-tracking action that can be overriden in a user defined class

Definition at line 150 of file TG4TrackingAction.h.

Referenced by PostUserTrackingAction().

◆ PreUserTrackingAction()

void TG4TrackingAction::PreUserTrackingAction ( const G4Track * aTrack)
virtual

Called by G4 kernel before starting tracking.

Definition at line 163 of file TG4TrackingAction.cxx.

◆ PostUserTrackingAction()

void TG4TrackingAction::PostUserTrackingAction ( const G4Track * aTrack)
virtual

Called by G4 kernel after finishing tracking.

Definition at line 260 of file TG4TrackingAction.cxx.

◆ FinishPrimaryTrack()

void TG4TrackingAction::FinishPrimaryTrack ( )

Call VMC application to finish a primary track.
!! This method has to be also called from the EventAction::EndOfEventAction() for storing the last primary track of the current event.

Definition at line 312 of file TG4TrackingAction.cxx.

Referenced by TG4EventAction::EndOfEventAction(), and PreUserTrackingAction().

◆ SetMCStack()

void TG4TrackingAction::SetMCStack ( TVirtualMCStack * mcStack)
inline

Set cached pointer to thread-local VMC stack

Definition at line 156 of file TG4TrackingAction.h.

Referenced by TG4RunManager::CacheMCStack().

◆ SetNewVerboseLevel()

void TG4TrackingAction::SetNewVerboseLevel ( G4int level)

Set the new verbose level that will be set when the track with specified track ID (fNewVerboseTrackID) starts tracking.

Definition at line 341 of file TG4TrackingAction.cxx.

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

◆ SetNewVerboseTrackID()

void TG4TrackingAction::SetNewVerboseTrackID ( G4int trackID)

Set the trackID for which the new verbose level (fNewVerboseLevel) will be applied.

Definition at line 350 of file TG4TrackingAction.cxx.

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

◆ SetSpecialControls()

void TG4TrackingAction::SetSpecialControls ( TG4SpecialControlsV2 * specialControls)
inline

Return special controls manager

Definition at line 162 of file TG4TrackingAction.h.

Referenced by TG4ActionInitialization::Build().

◆ GetNewVerboseLevel()

G4int TG4TrackingAction::GetNewVerboseLevel ( ) const

Return new /tracking/verbose level

Definition at line 359 of file TG4TrackingAction.cxx.

Referenced by TG4ActionInitialization::Build().

◆ GetNewVerboseTrackID()

G4int TG4TrackingAction::GetNewVerboseTrackID ( ) const

Return track ID for which the new verbose level is applied

Definition at line 367 of file TG4TrackingAction.cxx.

Referenced by TG4ActionInitialization::Build().

◆ GetTrackManager()

TG4TrackManager * TG4TrackingAction::GetTrackManager ( ) const

Return track manager

Definition at line 375 of file TG4TrackingAction.cxx.

Referenced by TG4ActionInitialization::Build().

◆ operator=()

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

Not implemented.

◆ UserProcessHits()

void TG4TrackingAction::UserProcessHits ( const G4Track * aTrack)
private

Let sensitive detector process the vertex step (this ensures compatibility with G3 that makes first step of zero length)

Definition at line 86 of file TG4TrackingAction.cxx.

Referenced by PreUserTrackingAction().

◆ Verbose()

void TG4TrackingAction::Verbose ( ) const
private

Print primary track ID with a frequence defined by verbose level.

Definition at line 115 of file TG4TrackingAction.cxx.

Referenced by FinishPrimaryTrack().

Member Data Documentation

◆ fgInstance

G4ThreadLocal TG4TrackingAction * TG4TrackingAction::fgInstance = 0
staticprivate

this instance

Definition at line 87 of file TG4TrackingAction.h.

Referenced by Instance(), TG4TrackingAction(), and ~TG4TrackingAction().

◆ fMessenger

TG4TrackingActionMessenger TG4TrackingAction::fMessenger
private

messenger

Definition at line 93 of file TG4TrackingAction.h.

◆ fSpecialControls

TG4SpecialControlsV2* TG4TrackingAction::fSpecialControls
private

the special controls manager

Definition at line 96 of file TG4TrackingAction.h.

Referenced by PostUserTrackingAction(), PreUserTrackingAction(), and SetSpecialControls().

◆ fTrackManager

TG4TrackManager* TG4TrackingAction::fTrackManager
private

◆ fMCApplication

TVirtualMCApplication* TG4TrackingAction::fMCApplication
private

Cached pointer to thread-local VMC application.

Definition at line 102 of file TG4TrackingAction.h.

Referenced by FinishPrimaryTrack(), LateInitialize(), PostUserTrackingAction(), and PreUserTrackingAction().

◆ fMCStack

TVirtualMCStack* TG4TrackingAction::fMCStack
private

Cached pointer to thread-local VMC stack.

Definition at line 105 of file TG4TrackingAction.h.

Referenced by PostUserTrackingAction(), PrepareNewEvent(), PreUserTrackingAction(), and SetMCStack().

◆ fStepManager

TG4StepManager* TG4TrackingAction::fStepManager
private

Cached pointer to thread-local step manager.

Definition at line 108 of file TG4TrackingAction.h.

Referenced by FinishPrimaryTrack(), LateInitialize(), PostUserTrackingAction(), PrepareNewEvent(), PreUserTrackingAction(), and UserProcessHits().

◆ fStackPopper

TG4StackPopper* TG4TrackingAction::fStackPopper
private

Cached pointer to thread-local stack popper.

Definition at line 111 of file TG4TrackingAction.h.

Referenced by LateInitialize(), and PreUserTrackingAction().

◆ fPrimaryTrackID

G4int TG4TrackingAction::fPrimaryTrackID
private

current primary track ID

Definition at line 114 of file TG4TrackingAction.h.

Referenced by FinishPrimaryTrack(), PreUserTrackingAction(), and Verbose().

◆ fCurrentTrackID

G4int TG4TrackingAction::fCurrentTrackID
private

current track ID

Definition at line 117 of file TG4TrackingAction.h.

Referenced by PrepareNewEvent(), and PreUserTrackingAction().

◆ fTrackSaveControl

TG4TrackSaveControl TG4TrackingAction::fTrackSaveControl
private

control of saving secondary tracks

Definition at line 120 of file TG4TrackingAction.h.

Referenced by PreUserTrackingAction().

◆ fOverwriteLastTrack

G4bool TG4TrackingAction::fOverwriteLastTrack
private

control of saving current track

Definition at line 123 of file TG4TrackingAction.h.

Referenced by PostUserTrackingAction(), and PreUserTrackingAction().

◆ fNewVerboseLevel

G4int TG4TrackingAction::fNewVerboseLevel
private

new /tracking/verbose level

Definition at line 126 of file TG4TrackingAction.h.

Referenced by GetNewVerboseLevel(), PreUserTrackingAction(), and SetNewVerboseLevel().

◆ fNewVerboseTrackID

G4int TG4TrackingAction::fNewVerboseTrackID
private

track ID for which the new verbose level is applied

Definition at line 129 of file TG4TrackingAction.h.

Referenced by GetNewVerboseTrackID(), PreUserTrackingAction(), and SetNewVerboseTrackID().

◆ fDoFinishPrimary

G4bool TG4TrackingAction::fDoFinishPrimary
private

Flag whether for a newly picked up particle the TVirtualMCApplication::FinishPrimary should be called

Definition at line 133 of file TG4TrackingAction.h.

Referenced by FinishPrimaryTrack(), PostUserTrackingAction(), and PreUserTrackingAction().


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