Geant4 VMC Version 6.6
|
The class for storing G4 tracks in VMC sack. More...
#include <TG4TrackManager.h>
Public Member Functions | |
TG4TrackManager () | |
virtual | ~TG4TrackManager () |
void | LateInitialize () |
void | AddPrimaryParticleId (G4int id) |
void | AddParticleStatus (const TMCParticleStatus *particleStatus) |
TG4TrackInformation * | SetTrackInformation (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 () |
TG4TrackInformation * | GetTrackInformation (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 TG4TrackManager * | Instance () |
Private Member Functions | |
TG4TrackManager (const TG4TrackManager &right) | |
Not implemented. | |
TG4TrackManager & | operator= (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 |
TG4StackPopper * | fStackPopper |
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 TG4TrackManager * | fgInstance = 0 |
this instance | |
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
Definition at line 52 of file TG4TrackManager.h.
TG4TrackManager::TG4TrackManager | ( | ) |
Default constructor
Definition at line 46 of file TG4TrackManager.cxx.
|
virtual |
Destructor
Definition at line 81 of file TG4TrackManager.cxx.
|
private |
Not implemented.
|
inlinestatic |
Return this instance.
Definition at line 135 of file TG4TrackManager.h.
Referenced by TG4RunManager::CacheMCStack(), TG4PrimaryGeneratorAction::GeneratePrimaries(), TG4EventAction::LateInitialize(), TG4StepManager::LateInitialize(), TG4SteppingAction::LateInitialize(), and TG4TrackingActionMessenger::SetNewValue().
void TG4TrackManager::LateInitialize | ( | ) |
Cache thread-local pointers
Definition at line 93 of file TG4TrackManager.cxx.
Referenced by TG4TrackingAction::LateInitialize().
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().
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().
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().
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().
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().
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().
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().
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().
|
inline |
Set cached pointer to thread-local VMC stack
Definition at line 141 of file TG4TrackManager.h.
Referenced by TG4RunManager::CacheMCStack().
|
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().
|
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().
|
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().
|
inline |
Set number of tracks
Definition at line 167 of file TG4TrackManager.h.
Referenced by TG4TrackingAction::PrepareNewEvent().
|
inline |
Set G4 tracking manager
Definition at line 173 of file TG4TrackManager.h.
Referenced by TG4TrackingAction::PrepareNewEvent().
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().
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().
TG4TrackInformation * TG4TrackManager::GetTrackInformation | ( | const G4Track * | track | ) | const |
Return user track information.
Definition at line 468 of file TG4TrackManager.cxx.
Referenced by TG4StepManager::ForceDecayTime(), TG4StepManager::InterruptTrack(), IsUserTrack(), TG4VSpecialCuts::PostStepGetPhysicalInteractionLength(), TG4TrackingAction::PostUserTrackingAction(), TG4SteppingAction::ProcessTrackIfBelowCut(), SaveSecondaries(), SetBackPDGLifetime(), SetParentToTrackInformation(), SetTrackInformation(), and TG4StepManager::TrackPid().
|
inline |
Return control of saving secondaries
Definition at line 185 of file TG4TrackManager.h.
Referenced by TG4ActionInitialization::Build(), TG4TrackingAction::PrepareNewEvent(), TG4TrackingAction::PreUserTrackingAction(), and TG4SteppingAction::UserSteppingAction().
|
inline |
Return the control of saving dynamic charge of secondaries
Definition at line 191 of file TG4TrackManager.h.
Referenced by TG4ActionInitialization::Build().
|
inline |
Return track counter = current number of tracks (in event)
Definition at line 197 of file TG4TrackManager.h.
Referenced by TG4EventAction::EndOfEventAction().
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().
|
private |
Not implemented.
|
staticprivate |
this instance
Definition at line 100 of file TG4TrackManager.h.
Referenced by Instance(), TG4TrackManager(), and ~TG4TrackManager().
|
private |
G4 tracking manager.
Definition at line 103 of file TG4TrackManager.h.
Referenced by SetG4TrackingManager(), SetParentToTrackInformation(), and SetTrackInformation().
|
private |
The VMC stack primary particle Ids
Definition at line 104 of file TG4TrackManager.h.
Referenced by AddParticleStatus(), AddPrimaryParticleId(), LateInitialize(), ResetPrimaryParticleIds(), and SetTrackInformation().
|
private |
The VMC stack particles status information
Definition at line 106 of file TG4TrackManager.h.
Referenced by AddParticleStatus(), ResetParticlesStatus(), and SetTrackInformation().
|
private |
control of saving secondaries
Definition at line 109 of file TG4TrackManager.h.
Referenced by GetTrackSaveControl(), SetTrackInformation(), and SetTrackSaveControl().
|
private |
Cached pointer to thread-local VMC stack.
Definition at line 112 of file TG4TrackManager.h.
Referenced by PrimaryToStack(), SetMCStack(), and SetTrackInformation().
|
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().
|
private |
Cached pointer to thread-local stack popper.
Definition at line 119 of file TG4TrackManager.h.
Referenced by LateInitialize(), and SaveSecondaries().
|
private |
control of saving dynamic charge of secondaries
Definition at line 121 of file TG4TrackManager.h.
Referenced by GetSaveDynamicCharge(), PrimaryToStack(), and SetSaveDynamicCharge().
|
private |
tracks counter
Definition at line 123 of file TG4TrackManager.h.
Referenced by GetNofTracks(), SetNofTracks(), and SetTrackInformation().
|
private |
|
private |
number of secondaries already saved
Definition at line 125 of file TG4TrackManager.h.
Referenced by SaveSecondaries(), and SetParentToTrackInformation().