Geant4 VMC Version 6.6
|
Provides mapping between TDatabasePDG and Geant4 particles. More...
#include <TG4ParticlesManager.h>
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 |
G4ParticleDefinition * | GetParticleDefinition (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 |
TG4UserIon * | GetUserIon (const G4String &ionName, G4bool warn=true) const |
G4int | GetNofUserParticles () const |
TG4UserParticle * | GetUserParticle (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 TG4ParticlesManager * | Instance () |
Private Member Functions | |
TG4ParticlesManager (const TG4ParticlesManager &right) | |
Not implemented. | |
TG4ParticlesManager & | operator= (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 TG4ParticlesManager * | fgInstance = 0 |
this instance | |
Provides mapping between TDatabasePDG and Geant4 particles.
Definition at line 47 of file TG4ParticlesManager.h.
std::map<G4String, TG4UserIon*> TG4ParticlesManager::UserIonMap |
The map of user ions by their names.
Definition at line 51 of file TG4ParticlesManager.h.
std::vector<TG4UserParticle*> TG4ParticlesManager::UserParticleVector |
The vector of user particles.
Definition at line 54 of file TG4ParticlesManager.h.
TG4ParticlesManager::TG4ParticlesManager | ( | ) |
Default constructor
Definition at line 56 of file TG4ParticlesManager.cxx.
|
virtual |
Destructor
Definition at line 75 of file TG4ParticlesManager.cxx.
|
private |
Not implemented.
|
inlinestatic |
Return this instance
Definition at line 127 of file TG4ParticlesManager.h.
Referenced by TG4UserParticlesPhysics::ConstructProcess(), TG4PrimaryGeneratorAction::GeneratePrimaries(), TG4StackPopper::PostStepDoIt(), TG4TrackManager::PrimaryToStack(), TG4StepManager::TrackPid(), and TG4TrackManager::TrackToStack().
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().
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().
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().
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().
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().
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().
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().
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().
G4DynamicParticle * TG4ParticlesManager::CreateDynamicParticle | ( | const TParticle * | particle | ) | const |
Create G4DynamicParticle.
Definition at line 563 of file TG4ParticlesManager.cxx.
Referenced by TG4ExtDecayer::ImportDecayProducts(), and TG4StackPopper::PostStepDoIt().
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().
G4ThreeVector TG4ParticlesManager::GetParticleMomentum | ( | const TParticle * | particle | ) | const |
Return particle momentum.
Definition at line 599 of file TG4ParticlesManager.cxx.
Referenced by CreateDynamicParticle(), and TG4PrimaryGeneratorAction::TransformPrimaries().
G4ThreeVector TG4ParticlesManager::GetParticlePolarization | ( | const TParticle * | particle | ) | const |
Return particle polarization.
Definition at line 610 of file TG4ParticlesManager.cxx.
Referenced by CreateDynamicParticle().
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().
G4int TG4ParticlesManager::GetNofUserParticles | ( | ) | const |
Return the number of user defined particles
Definition at line 638 of file TG4ParticlesManager.cxx.
Referenced by TG4UserParticlesPhysics::ConstructProcess().
TG4UserParticle * TG4ParticlesManager::GetUserParticle | ( | G4int | index | ) | const |
Return the index-th user particle
Definition at line 646 of file TG4ParticlesManager.cxx.
Referenced by TG4UserParticlesPhysics::ConstructProcess().
|
private |
Not implemented.
|
private |
Add the particle definition in TDatabasePDG
Definition at line 97 of file TG4ParticlesManager.cxx.
Referenced by AddIon(), and GetPDGEncoding().
|
staticprivate |
this instance
Definition at line 106 of file TG4ParticlesManager.h.
Referenced by Instance(), TG4ParticlesManager(), and ~TG4ParticlesManager().
|
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().
|
private |
user defined ions mappped by their names
Definition at line 116 of file TG4ParticlesManager.h.
Referenced by AddIon(), and GetUserIon().
|
private |
vector of user defined particles
Definition at line 119 of file TG4ParticlesManager.h.
Referenced by AddParticle(), GetNofUserParticles(), and GetUserParticle().
|
private |
particles checker
Definition at line 122 of file TG4ParticlesManager.h.