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

Provides mapping between TDatabasePDG and Geant4 particles. More...

#include <TG4ParticlesManager.h>

Inheritance diagram for TG4ParticlesManager:

Public Types

typedef std::map< G4String, TG4UserIon * > UserIonMap
 The map of user ions by their names.
 
typedef std::vector< TG4UserParticle * > UserParticleVector
 The vector of user particles.
 

Public Member Functions

 TG4ParticlesManager ()
 
virtual ~TG4ParticlesManager ()
 
void DefineParticles ()
 
void AddParticle (Int_t pdg, const TString &name, TMCParticleType mcType, Double_t mass, Double_t charge, Double_t lifetime, const TString &pType, Double_t width, Int_t iSpin, Int_t iParity, Int_t iConjugation, Int_t iIsospin, Int_t iIsospinZ, Int_t gParity, Int_t lepton, Int_t baryon, Bool_t stable, Bool_t shortlived=kFALSE, const TString &subType="", Int_t antiEncoding=0, Double_t magMoment=0.0, Double_t excitation=0.0)
 
void AddIon (const G4String &name, G4int Z, G4int A, G4int Q, G4double excEnergy)
 
void SetUserDecay (Int_t pdg)
 
Bool_t SetDecayMode (Int_t pdg, Float_t bratio[6], Int_t mode[6][3])
 
G4int GetPDGEncoding (G4ParticleDefinition *particle)
 
TParticle * GetParticle (const TClonesArray *particles, G4int index) const
 
G4ParticleDefinitionGetParticleDefinition (const TParticle *particle, G4bool warn=true) const
 
G4DynamicParticle * CreateDynamicParticle (const TParticle *particle) const
 
G4ThreeVector GetParticlePosition (const TParticle *particle) const
 
G4ThreeVector GetParticleMomentum (const TParticle *particle) const
 
G4ThreeVector GetParticlePolarization (const TParticle *particle) const
 
TG4UserIonGetUserIon (const G4String &ionName, G4bool warn=true) const
 
G4int GetNofUserParticles () const
 
TG4UserParticleGetUserParticle (G4int index) 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 TG4ParticlesManagerInstance ()
 

Private Member Functions

 TG4ParticlesManager (const TG4ParticlesManager &right)
 Not implemented.
 
TG4ParticlesManageroperator= (const TG4ParticlesManager &right)
 Not implemented.
 
void AddParticleToPdgDatabase (const G4String &name, G4ParticleDefinition *particleDefinition)
 

Private Attributes

TG4NameMap fParticleNameMap
 the mapping between G4 particle names and TDatabasePDG names for special particles
 
UserIonMap fUserIonMap
 user defined ions mappped by their names
 
UserParticleVector fUserParticles
 vector of user defined particles
 
TG4ParticlesChecker fParticlesChecker
 particles checker
 

Static Private Attributes

static TG4ParticlesManagerfgInstance = 0
 this instance
 

Detailed Description

Provides mapping between TDatabasePDG and Geant4 particles.

Author
I. Hrivnacova; IPN Orsay

Definition at line 47 of file TG4ParticlesManager.h.

Member Typedef Documentation

◆ UserIonMap

The map of user ions by their names.

Definition at line 51 of file TG4ParticlesManager.h.

◆ UserParticleVector

The vector of user particles.

Definition at line 54 of file TG4ParticlesManager.h.

Constructor & Destructor Documentation

◆ TG4ParticlesManager() [1/2]

TG4ParticlesManager::TG4ParticlesManager ( )

Default constructor

Definition at line 56 of file TG4ParticlesManager.cxx.

◆ ~TG4ParticlesManager()

TG4ParticlesManager::~TG4ParticlesManager ( )
virtual

Destructor

Definition at line 75 of file TG4ParticlesManager.cxx.

◆ TG4ParticlesManager() [2/2]

TG4ParticlesManager::TG4ParticlesManager ( const TG4ParticlesManager & right)
private

Not implemented.

Member Function Documentation

◆ Instance()

◆ DefineParticles()

void TG4ParticlesManager::DefineParticles ( )

Add special particles with standard PDG = 0 to TDatabasePDG and map them to G4 particles objects.

Definition at line 144 of file TG4ParticlesManager.cxx.

Referenced by TG4PhysicsManager::DefineParticles().

◆ AddParticle()

void TG4ParticlesManager::AddParticle ( Int_t pdg,
const TString & name,
TMCParticleType mcType,
Double_t mass,
Double_t charge,
Double_t lifetime,
const TString & pType,
Double_t width,
Int_t iSpin,
Int_t iParity,
Int_t iConjugation,
Int_t iIsospin,
Int_t iIsospinZ,
Int_t gParity,
Int_t lepton,
Int_t baryon,
Bool_t stable,
Bool_t shortlived = kFALSE,
const TString & subType = "",
Int_t antiEncoding = 0,
Double_t magMoment = 0.0,
Double_t excitation = 0.0 )

Add the user defined particle with specified characteristics.

Definition at line 267 of file TG4ParticlesManager.cxx.

Referenced by TG4PhysicsManager::DefineParticle().

◆ AddIon()

void TG4ParticlesManager::AddIon ( const G4String & name,
G4int Z,
G4int A,
G4int Q,
G4double excEnergy )

Add the ion with specified characteristics.

Definition at line 324 of file TG4ParticlesManager.cxx.

Referenced by TG4PhysicsManager::DefineIon().

◆ SetUserDecay()

void TG4ParticlesManager::SetUserDecay ( Int_t pdg)

Force the decay of particle with given PDG to be done with user defined decay or external decayer Set the decay table to zero. Do not delete the existing table as it may be used somewhere else.

Definition at line 436 of file TG4ParticlesManager.cxx.

Referenced by TG4PhysicsManager::SetUserDecay().

◆ SetDecayMode()

Bool_t TG4ParticlesManager::SetDecayMode ( Int_t pdg,
Float_t bratio[6],
Int_t mode[6][3] )

Set a user phase space decay for a particle

Definition at line 370 of file TG4ParticlesManager.cxx.

Referenced by TG4PhysicsManager::SetDecayMode().

◆ GetPDGEncoding()

G4int TG4ParticlesManager::GetPDGEncoding ( G4ParticleDefinition * particle)

Return the PDG code of particle; if standard PDG code is not defined the TDatabasePDG is used.

Definition at line 463 of file TG4ParticlesManager.cxx.

Referenced by TG4ExtDecayer::ImportDecayProducts(), TG4TrackManager::PrimaryToStack(), TG4StepManager::TrackPid(), and TG4TrackManager::TrackToStack().

◆ GetParticle()

TParticle * TG4ParticlesManager::GetParticle ( const TClonesArray * particles,
G4int index ) const

Retrive particle with given index from TClonesArray and check type.

Definition at line 507 of file TG4ParticlesManager.cxx.

Referenced by GetPDGEncoding(), and TG4ExtDecayer::ImportDecayProducts().

◆ GetParticleDefinition()

G4ParticleDefinition * TG4ParticlesManager::GetParticleDefinition ( const TParticle * particle,
G4bool warn = true ) const

Return G4 particle definition for given TParticle

Definition at line 530 of file TG4ParticlesManager.cxx.

Referenced by CreateDynamicParticle(), TG4PrimaryGeneratorAction::TransformPrimaries(), and TG4PrimaryGeneratorAction::TransformTracks().

◆ CreateDynamicParticle()

G4DynamicParticle * TG4ParticlesManager::CreateDynamicParticle ( const TParticle * particle) const

Create G4DynamicParticle.

Definition at line 563 of file TG4ParticlesManager.cxx.

Referenced by TG4ExtDecayer::ImportDecayProducts(), and TG4StackPopper::PostStepDoIt().

◆ GetParticlePosition()

G4ThreeVector TG4ParticlesManager::GetParticlePosition ( const TParticle * particle) const

Return particle vertex position.

Definition at line 587 of file TG4ParticlesManager.cxx.

Referenced by TG4StackPopper::PostStepDoIt(), and TG4PrimaryGeneratorAction::TransformPrimaries().

◆ GetParticleMomentum()

G4ThreeVector TG4ParticlesManager::GetParticleMomentum ( const TParticle * particle) const

Return particle momentum.

Definition at line 599 of file TG4ParticlesManager.cxx.

Referenced by CreateDynamicParticle(), and TG4PrimaryGeneratorAction::TransformPrimaries().

◆ GetParticlePolarization()

G4ThreeVector TG4ParticlesManager::GetParticlePolarization ( const TParticle * particle) const

Return particle polarization.

Definition at line 610 of file TG4ParticlesManager.cxx.

Referenced by CreateDynamicParticle().

◆ GetUserIon()

TG4UserIon * TG4ParticlesManager::GetUserIon ( const G4String & ionName,
G4bool warn = true ) const

Return the user defined ion properties

Definition at line 622 of file TG4ParticlesManager.cxx.

Referenced by TG4PrimaryGeneratorAction::GetProperCharge().

◆ GetNofUserParticles()

G4int TG4ParticlesManager::GetNofUserParticles ( ) const

Return the number of user defined particles

Definition at line 638 of file TG4ParticlesManager.cxx.

Referenced by TG4UserParticlesPhysics::ConstructProcess().

◆ GetUserParticle()

TG4UserParticle * TG4ParticlesManager::GetUserParticle ( G4int index) const

Return the index-th user particle

Definition at line 646 of file TG4ParticlesManager.cxx.

Referenced by TG4UserParticlesPhysics::ConstructProcess().

◆ operator=()

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

Not implemented.

◆ AddParticleToPdgDatabase()

void TG4ParticlesManager::AddParticleToPdgDatabase ( const G4String & name,
G4ParticleDefinition * particleDefinition )
private

Add the particle definition in TDatabasePDG

Definition at line 97 of file TG4ParticlesManager.cxx.

Referenced by AddIon(), and GetPDGEncoding().

Member Data Documentation

◆ fgInstance

TG4ParticlesManager * TG4ParticlesManager::fgInstance = 0
staticprivate

this instance

Definition at line 106 of file TG4ParticlesManager.h.

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

◆ fParticleNameMap

TG4NameMap TG4ParticlesManager::fParticleNameMap
private

the mapping between G4 particle names and TDatabasePDG names for special particles

Definition at line 113 of file TG4ParticlesManager.h.

Referenced by DefineParticles(), GetParticleDefinition(), and GetPDGEncoding().

◆ fUserIonMap

UserIonMap TG4ParticlesManager::fUserIonMap
private

user defined ions mappped by their names

Definition at line 116 of file TG4ParticlesManager.h.

Referenced by AddIon(), and GetUserIon().

◆ fUserParticles

UserParticleVector TG4ParticlesManager::fUserParticles
private

vector of user defined particles

Definition at line 119 of file TG4ParticlesManager.h.

Referenced by AddParticle(), GetNofUserParticles(), and GetUserParticle().

◆ fParticlesChecker

TG4ParticlesChecker TG4ParticlesManager::fParticlesChecker
private

particles checker

Definition at line 122 of file TG4ParticlesManager.h.


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