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

Geant4 implementation of the TVirtualMC interface methods for building Geant4 physics and access to it. More...

#include <TG4PhysicsManager.h>

Inheritance diagram for TG4PhysicsManager:

Public Member Functions

 TG4PhysicsManager ()
 
virtual ~TG4PhysicsManager ()
 
void Gstpar (Int_t itmed, const char *param, Float_t parval)
 
Bool_t SetCut (const char *cutName, Float_t cutValue)
 
Bool_t SetProcess (const char *controlName, Int_t controlValue)
 
Bool_t DefineParticle (Int_t pdg, const char *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)
 
Bool_t DefineIon (const char *name, Int_t Z, Int_t A, Int_t Q, Double_t excEnergy, Double_t mass)
 
void SetUserDecay (Int_t pdg)
 
Bool_t SetDecayMode (Int_t pdg, Float_t bratio[6], Int_t mode[6][3])
 
Float_t Xsec (char *reac, Float_t energy, Int_t part, Int_t mate)
 
Int_t IdFromPDG (Int_t pdgID) const
 
Int_t PDGFromId (Int_t mcID) const
 
TString ParticleName (Int_t pdg) const
 
Double_t ParticleMass (Int_t pdg) const
 
Double_t ParticleCharge (Int_t pdg) const
 
Double_t ParticleLifeTime (Int_t pdg) const
 
TMCParticleType ParticleMCType (Int_t pdg) const
 
void DefineParticles ()
 
void SetProcessActivation ()
 
void RetrieveOpBoundaryProcess ()
 
TMCProcess GetMCProcess (const G4VProcess *process)
 
TMCProcess GetOpBoundaryStatus ()
 
void SetCutForGamma (G4double cut)
 
void SetCutForElectron (G4double cut)
 
void SetCutForPositron (G4double cut)
 
void SetCutForProton (G4double cut)
 
G4double GetCutForGamma () const
 
G4double GetCutForElectron () const
 
G4double GetCutForPositron () const
 
G4double GetCutForProton () const
 
G4bool IsOpBoundaryProcess () 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 TG4PhysicsManagerInstance ()
 

Private Member Functions

 TG4PhysicsManager (const TG4PhysicsManager &right)
 Not implemented.
 
TG4PhysicsManageroperator= (const TG4PhysicsManager &right)
 Not implemented.
 
void GstparCut (G4int itmed, TG4G3Cut par, G4double parval)
 
void GstparControl (G4int itmed, TG4G3Control control, TG4G3ControlValue parval)
 
G4ParticleDefinitionGetParticleDefinition (G4int pdgEncoding) const
 
G4VProcessGetProcess (G4ProcessManager *processManager, G4int subType) const
 
void SetProcessActivation (G4ProcessManager *processManager, G4int processId, G4bool activation)
 
void SetSpecialControlsActivation ()
 
void SetSpecialCutsActivation ()
 

Private Attributes

TG4ParticlesManagerfParticlesManager
 particles manager
 
TG4G3PhysicsManagerfG3PhysicsManager
 G3 physics manager.
 
std::set< TString > fNotImplParNames
 set of not implemented Gstpar parameters
 
G4double fCutForGamma
 range cut for gamma
 
G4double fCutForElectron
 range cut for electron
 
G4double fCutForPositron
 range cut for positron
 
G4double fCutForProton
 range cut for proton
 
G4OpBoundaryProcess * fOpBoundaryProcess
 optical boundary process
 

Static Private Attributes

static TG4PhysicsManagerfgInstance = 0
 this instance
 
static const G4double fgkDefautCut = 1. * mm
 the default range cut value
 
static TG4ProcessMapfgProcessMap = 0
 the mapping between G4 processes and G3 process controls
 

Detailed Description

Geant4 implementation of the TVirtualMC interface methods for building Geant4 physics and access to it.

Author
I. Hrivnacova; IPN Orsay

Definition at line 51 of file TG4PhysicsManager.h.

Constructor & Destructor Documentation

◆ TG4PhysicsManager() [1/2]

TG4PhysicsManager::TG4PhysicsManager ( )

Default constructor

Definition at line 62 of file TG4PhysicsManager.cxx.

◆ ~TG4PhysicsManager()

TG4PhysicsManager::~TG4PhysicsManager ( )
virtual

Destructor

Definition at line 98 of file TG4PhysicsManager.cxx.

◆ TG4PhysicsManager() [2/2]

TG4PhysicsManager::TG4PhysicsManager ( const TG4PhysicsManager & right)
private

Not implemented.

Member Function Documentation

◆ Instance()

◆ Gstpar()

void TG4PhysicsManager::Gstpar ( Int_t itmed,
const char * param,
Float_t parval )

Passe the tracking medium parameter to TG4Limits. The tracking medium parameter is set only in case its value is different from the "global" physics setup. When any cut/control parameter is set in limits the physics manager is locked and the physics setup cannot be changed.
Applying this TG4Limits to particles and physical processes is still in development.

Geant3 desription:
==================
To change the value of cut or mechanism "CHPAR" to a new value PARVAL for tracking medium ITMED The data structure JTMED contains the standard tracking parameters (CUTS and flags to control the physics processes) which are used by default for all tracking media. It is possible to redefine individually with GSTPAR any of these parameters for a given tracking medium.

  • ITMED tracking medium number
  • CHPAR is a character string (variable name)
  • PARVAL must be given as a floating point.

Definition at line 392 of file TG4PhysicsManager.cxx.

Referenced by TGeant4::Gstpar().

◆ SetCut()

Bool_t TG4PhysicsManager::SetCut ( const char * cutName,
Float_t cutValue )

Set the specified cut.

Definition at line 451 of file TG4PhysicsManager.cxx.

Referenced by TGeant4::SetCut().

◆ SetProcess()

Bool_t TG4PhysicsManager::SetProcess ( const char * controlName,
Int_t controlValue )

Set the specified process control.

Definition at line 480 of file TG4PhysicsManager.cxx.

Referenced by TGeant4::SetProcess().

◆ DefineParticle()

Bool_t TG4PhysicsManager::DefineParticle ( Int_t pdg,
const char * 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 )

Check if particle with specified pdg is available in Geant4; if not let particles manager to create a new user particle.

Definition at line 505 of file TG4PhysicsManager.cxx.

Referenced by TGeant4::DefineParticle().

◆ DefineIon()

Bool_t TG4PhysicsManager::DefineIon ( const char * name,
Int_t Z,
Int_t A,
Int_t Q,
Double_t excEnergy,
Double_t mass )

Keep user defined ion properties in order to be able to use them later as a primary particle.

Definition at line 570 of file TG4PhysicsManager.cxx.

Referenced by TGeant4::DefineIon().

◆ SetUserDecay()

void TG4PhysicsManager::SetUserDecay ( Int_t pdg)

Force the decay of particle with given PDG to be done with user defined decay or external decayer

Definition at line 550 of file TG4PhysicsManager.cxx.

Referenced by TGeant4::SetUserDecay().

◆ SetDecayMode()

Bool_t TG4PhysicsManager::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 559 of file TG4PhysicsManager.cxx.

Referenced by TGeant4::SetDecayMode().

◆ Xsec()

Float_t TG4PhysicsManager::Xsec ( char * reac,
Float_t energy,
Int_t part,
Int_t mate )

Not yet implemented -> give exception.

Definition at line 585 of file TG4PhysicsManager.cxx.

Referenced by TGeant4::Xsec().

◆ IdFromPDG()

Int_t TG4PhysicsManager::IdFromPDG ( Int_t pdgID) const

G4 does not use the integer particle identifiers Id <-> PDG is identity.

Definition at line 596 of file TG4PhysicsManager.cxx.

Referenced by TGeant4::IdFromPDG().

◆ PDGFromId()

Int_t TG4PhysicsManager::PDGFromId ( Int_t mcID) const

G4 does not use integer particle identifiers Id <-> PDG is identity.

Definition at line 605 of file TG4PhysicsManager.cxx.

Referenced by TGeant4::PDGFromId().

◆ ParticleName()

TString TG4PhysicsManager::ParticleName ( Int_t pdg) const

Return name of G4 particle specified by pdg.

Definition at line 614 of file TG4PhysicsManager.cxx.

Referenced by TGeant4::ParticleName().

◆ ParticleMass()

Double_t TG4PhysicsManager::ParticleMass ( Int_t pdg) const

Return mass of G4 particle specified by pdg.

Definition at line 627 of file TG4PhysicsManager.cxx.

Referenced by TGeant4::ParticleMass().

◆ ParticleCharge()

Double_t TG4PhysicsManager::ParticleCharge ( Int_t pdg) const

Return charge (in e units) of G4 particle specified by pdg.

Definition at line 640 of file TG4PhysicsManager.cxx.

Referenced by TGeant4::ParticleCharge().

◆ ParticleLifeTime()

Double_t TG4PhysicsManager::ParticleLifeTime ( Int_t pdg) const

Return life time of G4 particle specified by pdg.

Definition at line 653 of file TG4PhysicsManager.cxx.

Referenced by TGeant4::ParticleLifeTime().

◆ ParticleMCType()

TMCParticleType TG4PhysicsManager::ParticleMCType ( Int_t pdg) const

Return VMC type of G4 particle specified by pdg.

Definition at line 666 of file TG4PhysicsManager.cxx.

Referenced by TGeant4::ParticleMCType().

◆ DefineParticles()

void TG4PhysicsManager::DefineParticles ( )

Add particles with standard PDG = 0 and user defined particles to TDatabasePDG and maps them to G4 particles objects.

Definition at line 682 of file TG4PhysicsManager.cxx.

Referenced by TG4RunManager::LateInitialize().

◆ SetProcessActivation() [1/2]

void TG4PhysicsManager::SetProcessActivation ( )

(In)Activate built processes according to the setup in TG4G3PhysicsManager::fControlVector.

Definition at line 695 of file TG4PhysicsManager.cxx.

Referenced by TG4RunManager::LateInitialize(), and SetSpecialControlsActivation().

◆ RetrieveOpBoundaryProcess()

void TG4PhysicsManager::RetrieveOpBoundaryProcess ( )

Retrieve the G4OpBoundaryProcess

Definition at line 714 of file TG4PhysicsManager.cxx.

Referenced by TG4RunManager::LateInitialize().

◆ GetMCProcess()

TMCProcess TG4PhysicsManager::GetMCProcess ( const G4VProcess * process)

Return the TMCProcess code of the specified G4 process.

Definition at line 733 of file TG4PhysicsManager.cxx.

Referenced by TG4StepManager::Edep(), TG4StepManager::ProdProcess(), TG4StepManager::StepProcesses(), and TG4TrackManager::TrackToStack().

◆ GetOpBoundaryStatus()

TMCProcess TG4PhysicsManager::GetOpBoundaryStatus ( )

Return the TMCProcess code according to the OpBoundary process status.

Definition at line 743 of file TG4PhysicsManager.cxx.

Referenced by TG4StepManager::Edep(), and TG4StepManager::StepProcesses().

◆ SetCutForGamma()

void TG4PhysicsManager::SetCutForGamma ( G4double cut)
inline

Set range cut value for gamma

Definition at line 186 of file TG4PhysicsManager.h.

Referenced by TG4ComposedPhysicsMessenger::SetNewValue().

◆ SetCutForElectron()

void TG4PhysicsManager::SetCutForElectron ( G4double cut)
inline

Set range cut value for electron

Definition at line 192 of file TG4PhysicsManager.h.

Referenced by TG4ComposedPhysicsMessenger::SetNewValue().

◆ SetCutForPositron()

void TG4PhysicsManager::SetCutForPositron ( G4double cut)
inline

Set range cut value for positron

Definition at line 198 of file TG4PhysicsManager.h.

Referenced by TG4ComposedPhysicsMessenger::SetNewValue().

◆ SetCutForProton()

void TG4PhysicsManager::SetCutForProton ( G4double cut)
inline

Set range cut value for proton

Definition at line 204 of file TG4PhysicsManager.h.

Referenced by TG4ComposedPhysicsMessenger::SetNewValue().

◆ GetCutForGamma()

G4double TG4PhysicsManager::GetCutForGamma ( ) const
inline

Return range cut for gamma

Definition at line 210 of file TG4PhysicsManager.h.

Referenced by TG4RegionsManager::DefineRegions(), and TG4ComposedPhysicsList::SetCuts().

◆ GetCutForElectron()

G4double TG4PhysicsManager::GetCutForElectron ( ) const
inline

Return range cut for electron

Definition at line 216 of file TG4PhysicsManager.h.

Referenced by TG4RegionsManager::DefineRegions(), and TG4ComposedPhysicsList::SetCuts().

◆ GetCutForPositron()

G4double TG4PhysicsManager::GetCutForPositron ( ) const
inline

Return range cut for positron

Definition at line 222 of file TG4PhysicsManager.h.

Referenced by TG4RegionsManager::DefineRegions(), and TG4ComposedPhysicsList::SetCuts().

◆ GetCutForProton()

G4double TG4PhysicsManager::GetCutForProton ( ) const
inline

Return range cut for proton

Definition at line 228 of file TG4PhysicsManager.h.

Referenced by TG4RegionsManager::DefineRegions(), and TG4ComposedPhysicsList::SetCuts().

◆ IsOpBoundaryProcess()

G4bool TG4PhysicsManager::IsOpBoundaryProcess ( ) const
inline

Return true if optical boundary process is defined

Definition at line 234 of file TG4PhysicsManager.h.

Referenced by TG4StepManager::StepProcesses().

◆ operator=()

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

Not implemented.

◆ GstparCut()

void TG4PhysicsManager::GstparCut ( G4int itmed,
TG4G3Cut par,
G4double parval )
private

Set special tracking medium parameter. It is applied to all logical volumes that use the specified tracking medium.

Definition at line 117 of file TG4PhysicsManager.cxx.

Referenced by Gstpar().

◆ GstparControl()

void TG4PhysicsManager::GstparControl ( G4int itmed,
TG4G3Control control,
TG4G3ControlValue parval )
private

Set special tracking medium parameter. It is applied to all logical volumes that use the specified tracking medium.

Definition at line 163 of file TG4PhysicsManager.cxx.

Referenced by Gstpar().

◆ GetParticleDefinition()

G4ParticleDefinition * TG4PhysicsManager::GetParticleDefinition ( G4int pdgEncoding) const
private

Return G4 particle definition for given PDG encoding.

Definition at line 205 of file TG4PhysicsManager.cxx.

Referenced by ParticleCharge(), ParticleLifeTime(), ParticleMass(), ParticleMCType(), and ParticleName().

◆ GetProcess()

G4VProcess * TG4PhysicsManager::GetProcess ( G4ProcessManager * processManager,
G4int subType ) const
private

Find the process in the particle process manager which name contains subName

Definition at line 224 of file TG4PhysicsManager.cxx.

Referenced by SetSpecialCutsActivation().

◆ SetProcessActivation() [2/2]

void TG4PhysicsManager::SetProcessActivation ( G4ProcessManager * processManager,
G4int processId,
G4bool activation )
private

Set process activation for the given process.

Definition at line 240 of file TG4PhysicsManager.cxx.

◆ SetSpecialControlsActivation()

void TG4PhysicsManager::SetSpecialControlsActivation ( )
private

(In)Activate built processes according to the setup in TG4G3PhysicsManager::fControlVector.

Definition at line 259 of file TG4PhysicsManager.cxx.

Referenced by SetProcessActivation().

◆ SetSpecialCutsActivation()

void TG4PhysicsManager::SetSpecialCutsActivation ( )
private

(In)Activate built special cut processes according to the setup in TG4G3PhysicsManager

Definition at line 342 of file TG4PhysicsManager.cxx.

Referenced by SetProcessActivation().

Member Data Documentation

◆ fgInstance

TG4PhysicsManager * TG4PhysicsManager::fgInstance = 0
staticprivate

this instance

Definition at line 138 of file TG4PhysicsManager.h.

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

◆ fgkDefautCut

const G4double TG4PhysicsManager::fgkDefautCut = 1. * mm
staticprivate

the default range cut value

Definition at line 140 of file TG4PhysicsManager.h.

◆ fgProcessMap

TG4ProcessMap * TG4PhysicsManager::fgProcessMap = 0
staticprivate

the mapping between G4 processes and G3 process controls

Definition at line 143 of file TG4PhysicsManager.h.

Referenced by GetMCProcess(), TG4PhysicsManager(), and ~TG4PhysicsManager().

◆ fParticlesManager

TG4ParticlesManager* TG4PhysicsManager::fParticlesManager
private

◆ fG3PhysicsManager

TG4G3PhysicsManager* TG4PhysicsManager::fG3PhysicsManager
private

G3 physics manager.

Definition at line 152 of file TG4PhysicsManager.h.

Referenced by Gstpar(), GstparControl(), GstparCut(), SetCut(), SetProcess(), TG4PhysicsManager(), and ~TG4PhysicsManager().

◆ fNotImplParNames

std::set<TString> TG4PhysicsManager::fNotImplParNames
private

set of not implemented Gstpar parameters

Definition at line 155 of file TG4PhysicsManager.h.

Referenced by Gstpar(), SetCut(), and SetProcess().

◆ fCutForGamma

G4double TG4PhysicsManager::fCutForGamma
private

range cut for gamma

Definition at line 158 of file TG4PhysicsManager.h.

Referenced by GetCutForGamma(), and SetCutForGamma().

◆ fCutForElectron

G4double TG4PhysicsManager::fCutForElectron
private

range cut for electron

Definition at line 161 of file TG4PhysicsManager.h.

Referenced by GetCutForElectron(), and SetCutForElectron().

◆ fCutForPositron

G4double TG4PhysicsManager::fCutForPositron
private

range cut for positron

Definition at line 164 of file TG4PhysicsManager.h.

Referenced by GetCutForPositron(), and SetCutForPositron().

◆ fCutForProton

G4double TG4PhysicsManager::fCutForProton
private

range cut for proton

Definition at line 167 of file TG4PhysicsManager.h.

Referenced by GetCutForProton(), and SetCutForProton().

◆ fOpBoundaryProcess

G4OpBoundaryProcess* TG4PhysicsManager::fOpBoundaryProcess
private

optical boundary process

Definition at line 170 of file TG4PhysicsManager.h.

Referenced by GetOpBoundaryStatus(), IsOpBoundaryProcess(), and RetrieveOpBoundaryProcess().


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