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

The class for storing G4 tracks in VMC sack. More...

#include <TG4TrackManager.h>

Inheritance diagram for TG4TrackManager:

Public Member Functions

 TG4TrackManager ()
 
virtual ~TG4TrackManager ()
 
void LateInitialize ()
 
void AddPrimaryParticleId (G4int id)
 
void AddParticleStatus (const TMCParticleStatus *particleStatus)
 
TG4TrackInformationSetTrackInformation (const G4Track *aTrack, G4bool overWrite=false)
 
void SetParentToTrackInformation (const G4Track *aTrack)
 
void SetBackPDGLifetime (const G4Track *aTrack)
 
void TrackToStack (const G4Track *track, G4bool overWrite=false)
 
void PrimaryToStack (const G4PrimaryVertex *vertex, const G4PrimaryParticle *particle)
 
void SaveSecondaries (const G4Track *track, const G4TrackVector *secondaries)
 
void SetMCStack (TVirtualMCStack *mcStack)
 
void SetMCManagerStack (TMCManagerStack *mcManagerStack)
 
void SetTrackSaveControl (TG4TrackSaveControl control)
 
void SetSaveDynamicCharge (G4bool saveDynamicCharge)
 
void SetNofTracks (G4int nofTracks)
 
void SetG4TrackingManager (G4TrackingManager *trackingManager)
 
void ResetPrimaryParticleIds ()
 
void ResetParticlesStatus ()
 
TG4TrackInformationGetTrackInformation (const G4Track *track) const
 
TG4TrackSaveControl GetTrackSaveControl () const
 
G4bool GetSaveDynamicCharge () const
 
G4int GetNofTracks () const
 
G4bool IsUserTrack (const G4Track *track) 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 TG4TrackManagerInstance ()
 

Private Member Functions

 TG4TrackManager (const TG4TrackManager &right)
 Not implemented.
 
TG4TrackManageroperator= (const TG4TrackManager &right)
 Not implemented.
 

Private Attributes

G4TrackingManager * fG4TrackingManager
 G4 tracking manager.
 
std::vector< G4int > fPrimaryParticleIds
 
std::vector< TMCParticleStatus * > fParticlesStatus
 
TG4TrackSaveControl fTrackSaveControl
 control of saving secondaries
 
TVirtualMCStack * fMCStack
 Cached pointer to thread-local VMC stack.
 
TMCManagerStack * fMCManagerStack
 
TG4StackPopperfStackPopper
 Cached pointer to thread-local stack popper.
 
G4bool fSaveDynamicCharge
 
G4int fTrackCounter
 tracks counter
 
G4int fCurrentTrackID
 current track ID
 
G4int fNofSavedSecondaries
 number of secondaries already saved
 

Static Private Attributes

static G4ThreadLocal TG4TrackManagerfgInstance = 0
 this instance
 

Detailed Description

The class for storing G4 tracks in VMC sack.

It provides methods for storing G4 primary particles and secondary tracks and utility functions for updating TG4TrackInformation, which hold the info about correspondence between Geant4 and VMC stack numbering

Author
I. Hrivnacova; IPN, Orsay

Definition at line 52 of file TG4TrackManager.h.

Constructor & Destructor Documentation

◆ TG4TrackManager() [1/2]

TG4TrackManager::TG4TrackManager ( )

Default constructor

Definition at line 46 of file TG4TrackManager.cxx.

◆ ~TG4TrackManager()

TG4TrackManager::~TG4TrackManager ( )
virtual

Destructor

Definition at line 81 of file TG4TrackManager.cxx.

◆ TG4TrackManager() [2/2]

TG4TrackManager::TG4TrackManager ( const TG4TrackManager & right)
private

Not implemented.

Member Function Documentation

◆ Instance()

◆ LateInitialize()

void TG4TrackManager::LateInitialize ( )

Cache thread-local pointers

Definition at line 93 of file TG4TrackManager.cxx.

Referenced by TG4TrackingAction::LateInitialize().

◆ AddPrimaryParticleId()

void TG4TrackManager::AddPrimaryParticleId ( G4int id)

Puts the given id in fPrimaryParticleIds. This is then used to keep the primary track Ids identical with Ids in VMC stack.

Definition at line 112 of file TG4TrackManager.cxx.

Referenced by TG4PrimaryGeneratorAction::TransformPrimaries().

◆ AddParticleStatus()

void TG4TrackManager::AddParticleStatus ( const TMCParticleStatus * particleStatus)

Adds the given VMC track ID along with particle status info to the TG4TrackManager

Definition at line 122 of file TG4TrackManager.cxx.

Referenced by TG4PrimaryGeneratorAction::TransformTracks().

◆ SetTrackInformation()

TG4TrackInformation * TG4TrackManager::SetTrackInformation ( const G4Track * aTrack,
G4bool overWrite = false )

Set track index in VMC stack to track information and return its value

Definition at line 131 of file TG4TrackManager.cxx.

Referenced by TG4TrackingAction::PreUserTrackingAction(), and SaveSecondaries().

◆ SetParentToTrackInformation()

void TG4TrackManager::SetParentToTrackInformation ( const G4Track * aTrack)

Set parent track particle index to the secondary tracks.

Definition at line 211 of file TG4TrackManager.cxx.

Referenced by TG4TrackingAction::PostUserTrackingAction(), TG4SteppingAction::ProcessTrackIfBelowCut(), and SaveSecondaries().

◆ SetBackPDGLifetime()

void TG4TrackManager::SetBackPDGLifetime ( const G4Track * aTrack)

Set back the PDG lifetime to the G4ParticleDefinition, if it has been modified by user

Definition at line 258 of file TG4TrackManager.cxx.

Referenced by TG4TrackingAction::PostUserTrackingAction().

◆ TrackToStack()

void TG4TrackManager::TrackToStack ( const G4Track * track,
G4bool overWrite = false )

Get all needed parameters from G4track and pass them to the VMC stack.

Definition at line 277 of file TG4TrackManager.cxx.

Referenced by TG4TrackingAction::PreUserTrackingAction(), and SaveSecondaries().

◆ PrimaryToStack()

void TG4TrackManager::PrimaryToStack ( const G4PrimaryVertex * vertex,
const G4PrimaryParticle * particle )

Add primary particle to VMC stack

Definition at line 359 of file TG4TrackManager.cxx.

Referenced by TG4EventAction::BeginOfEventAction().

◆ SaveSecondaries()

void TG4TrackManager::SaveSecondaries ( const G4Track * track,
const G4TrackVector * secondaries )

Save the secondary particles on VMC stack

Definition at line 414 of file TG4TrackManager.cxx.

Referenced by TG4SteppingAction::UserSteppingAction().

◆ SetMCStack()

void TG4TrackManager::SetMCStack ( TVirtualMCStack * mcStack)
inline

Set cached pointer to thread-local VMC stack

Definition at line 141 of file TG4TrackManager.h.

Referenced by TG4RunManager::CacheMCStack().

◆ SetMCManagerStack()

void TG4TrackManager::SetMCManagerStack ( TMCManagerStack * mcManagerStack)
inline

Set cached pointer to thread-local TMCManagerStack with additional info on current transport status

Definition at line 147 of file TG4TrackManager.h.

Referenced by TG4RunManager::CacheMCStack().

◆ SetTrackSaveControl()

void TG4TrackManager::SetTrackSaveControl ( TG4TrackSaveControl control)
inline

Set control for saving secondaries in the VMC stack

Definition at line 154 of file TG4TrackManager.h.

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

◆ SetSaveDynamicCharge()

void TG4TrackManager::SetSaveDynamicCharge ( G4bool saveDynamicCharge)
inline

Set control of saving dynamic charge of secondaries (in TParticle::fStatus)

Definition at line 160 of file TG4TrackManager.h.

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

◆ SetNofTracks()

void TG4TrackManager::SetNofTracks ( G4int nofTracks)
inline

Set number of tracks

Definition at line 167 of file TG4TrackManager.h.

Referenced by TG4TrackingAction::PrepareNewEvent().

◆ SetG4TrackingManager()

void TG4TrackManager::SetG4TrackingManager ( G4TrackingManager * trackingManager)
inline

Set G4 tracking manager

Definition at line 173 of file TG4TrackManager.h.

Referenced by TG4TrackingAction::PrepareNewEvent().

◆ ResetPrimaryParticleIds()

void TG4TrackManager::ResetPrimaryParticleIds ( )

Clear the vector with the VMC stack primary particle Ids

Definition at line 452 of file TG4TrackManager.cxx.

Referenced by TG4PrimaryGeneratorAction::GeneratePrimaries().

◆ ResetParticlesStatus()

void TG4TrackManager::ResetParticlesStatus ( )

Clear the vector with the VMC stack primary particle Ids

Definition at line 460 of file TG4TrackManager.cxx.

Referenced by TG4PrimaryGeneratorAction::GeneratePrimaries().

◆ GetTrackInformation()

◆ GetTrackSaveControl()

TG4TrackSaveControl TG4TrackManager::GetTrackSaveControl ( ) const
inline

◆ GetSaveDynamicCharge()

G4bool TG4TrackManager::GetSaveDynamicCharge ( ) const
inline

Return the control of saving dynamic charge of secondaries

Definition at line 191 of file TG4TrackManager.h.

Referenced by TG4ActionInitialization::Build().

◆ GetNofTracks()

G4int TG4TrackManager::GetNofTracks ( ) const
inline

Return track counter = current number of tracks (in event)

Definition at line 197 of file TG4TrackManager.h.

Referenced by TG4EventAction::EndOfEventAction().

◆ IsUserTrack()

G4bool TG4TrackManager::IsUserTrack ( const G4Track * track) const

Return true if the secondary track was defined by user

Definition at line 493 of file TG4TrackManager.cxx.

Referenced by TG4TrackingAction::PreUserTrackingAction(), and SaveSecondaries().

◆ operator=()

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

Not implemented.

Member Data Documentation

◆ fgInstance

G4ThreadLocal TG4TrackManager * TG4TrackManager::fgInstance = 0
staticprivate

this instance

Definition at line 100 of file TG4TrackManager.h.

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

◆ fG4TrackingManager

G4TrackingManager* TG4TrackManager::fG4TrackingManager
private

G4 tracking manager.

Definition at line 103 of file TG4TrackManager.h.

Referenced by SetG4TrackingManager(), SetParentToTrackInformation(), and SetTrackInformation().

◆ fPrimaryParticleIds

std::vector<G4int> TG4TrackManager::fPrimaryParticleIds
private

The VMC stack primary particle Ids

Definition at line 104 of file TG4TrackManager.h.

Referenced by AddParticleStatus(), AddPrimaryParticleId(), LateInitialize(), ResetPrimaryParticleIds(), and SetTrackInformation().

◆ fParticlesStatus

std::vector<TMCParticleStatus*> TG4TrackManager::fParticlesStatus
private

The VMC stack particles status information

Definition at line 106 of file TG4TrackManager.h.

Referenced by AddParticleStatus(), ResetParticlesStatus(), and SetTrackInformation().

◆ fTrackSaveControl

TG4TrackSaveControl TG4TrackManager::fTrackSaveControl
private

control of saving secondaries

Definition at line 109 of file TG4TrackManager.h.

Referenced by GetTrackSaveControl(), SetTrackInformation(), and SetTrackSaveControl().

◆ fMCStack

TVirtualMCStack* TG4TrackManager::fMCStack
private

Cached pointer to thread-local VMC stack.

Definition at line 112 of file TG4TrackManager.h.

Referenced by PrimaryToStack(), SetMCStack(), and SetTrackInformation().

◆ fMCManagerStack

TMCManagerStack* TG4TrackManager::fMCManagerStack
private

Cached pointer to thread-local TMCManagerStack with additional info on current transport status

Definition at line 116 of file TG4TrackManager.h.

Referenced by SetMCManagerStack().

◆ fStackPopper

TG4StackPopper* TG4TrackManager::fStackPopper
private

Cached pointer to thread-local stack popper.

Definition at line 119 of file TG4TrackManager.h.

Referenced by LateInitialize(), and SaveSecondaries().

◆ fSaveDynamicCharge

G4bool TG4TrackManager::fSaveDynamicCharge
private

control of saving dynamic charge of secondaries

Definition at line 121 of file TG4TrackManager.h.

Referenced by GetSaveDynamicCharge(), PrimaryToStack(), and SetSaveDynamicCharge().

◆ fTrackCounter

G4int TG4TrackManager::fTrackCounter
private

tracks counter

Definition at line 123 of file TG4TrackManager.h.

Referenced by GetNofTracks(), SetNofTracks(), and SetTrackInformation().

◆ fCurrentTrackID

G4int TG4TrackManager::fCurrentTrackID
private

current track ID

Definition at line 124 of file TG4TrackManager.h.

Referenced by SaveSecondaries().

◆ fNofSavedSecondaries

G4int TG4TrackManager::fNofSavedSecondaries
private

number of secondaries already saved

Definition at line 125 of file TG4TrackManager.h.

Referenced by SaveSecondaries(), and SetParentToTrackInformation().


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