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

The manager class for building Geant4 geometry depending on a selected user input. More...

#include <TG4GeometryManager.h>

Inheritance diagram for TG4GeometryManager:

Public Member Functions

 TG4GeometryManager (const TString &userGeometry)
 
virtual ~TG4GeometryManager ()
 
TVirtualMCGeometryGetMCGeometry () const
 
TG4OpGeometryManagerGetOpManager () const
 
TG4ModelConfigurationManagerGetFastModelsManager () const
 
TG4ModelConfigurationManagerGetEmModelsManager () const
 
void ConstructGeometry ()
 
void ConstructSDandField ()
 
void FinishGeometry ()
 
void UpdateField ()
 
void CreateFieldParameters (const G4String &fieldVolName)
 
TG4RadiatorDescriptionCreateRadiator (const G4String &volName)
 
void SetUserLimits (const TG4G3CutVector &cuts, const TG4G3ControlVector &controls) const
 
void SetIsLocalField (G4bool isLocalField)
 
void SetIsZeroField (G4bool isZeroField)
 
void SetIsUserMaxStep (G4bool isUserMaxStep)
 
void SetIsMaxStepInLowDensityMaterials (G4bool isMaxStep)
 
void SetRootDetectorConstruction (TG4RootDetectorConstruction *rootDetectorConstruction)
 
void SetUserRegionConstruction (TG4VUserRegionConstruction *userRegionConstruction)
 
void SetUserPostDetConstruction (TG4VUserPostDetConstruction *userPostDetConstruction)
 
void SetUserEquationOfMotion (G4EquationOfMotion *equation, G4String volumeName="")
 
void SetUserStepper (G4MagIntegratorStepper *stepper, G4String volumeName="")
 
void SetLimitDensity (G4double density)
 
void SetMaxStepInLowDensityMaterials (G4double maxStep)
 
void PrintFieldStatistics () const
 
const std::vector< TG4RadiatorDescription * > & GetRadiators () 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 TG4GeometryManagerInstance ()
 

Private Member Functions

 TG4GeometryManager (const TG4GeometryManager &right)
 Not implemented.
 
TG4GeometryManageroperator= (const TG4GeometryManager &right)
 Not implemented.
 
void CreateMCGeometry ()
 
void ConstructG4GeometryViaVMC ()
 
void ConstructG4GeometryViaVGM ()
 
void ConstructG4Geometry ()
 
void FillMediumMapFromG3 ()
 
void FillMediumMapFromG4 ()
 
void FillMediumMapFromRoot ()
 
void FillMediumMap ()
 
TG4FieldParametersGetOrCreateFieldParameters (const G4String &volumeName)
 
void CreateField (TVirtualMagField *magField, TG4FieldParameters *fieldParameters, G4LogicalVolume *lv)
 
void ConstructGlobalField ()
 
void ConstructZeroFields ()
 
void ConstructLocalFields ()
 

Private Attributes

TG4DetConstructionMessenger fMessenger
 messenger
 
TG4GeometryServicesfGeometryServices
 geometry services
 
TVirtualMCGeometryfMCGeometry
 VirtualMC geometry.
 
TG4RootDetectorConstruction * fRootDetectorConstruction
 Root detector construction.
 
TG4OpGeometryManagerfOpManager
 optical geometry manager
 
TG4ModelConfigurationManagerfFastModelsManager
 Fast simulation models manager.
 
TG4ModelConfigurationManagerfEmModelsManager
 EM models manager.
 
TG4BiasingManagerfBiasingManager
 Biasing manager.
 
G4String fUserGeometry
 User geometry input.
 
std::vector< TG4FieldParameters * > fFieldParameters
 Field parameters.
 
std::vector< TG4RadiatorDescription * > fRadiators
 Radiators.
 
TG4VUserRegionConstructionfUserRegionConstruction
 User region construction.
 
TG4VUserPostDetConstructionfUserPostDetConstruction
 User post detector construction.
 
G4bool fIsLocalField
 option to activate getting local magnetic fields from Root geometry
 
G4bool fIsZeroField
 option to activate propagating 'ifield = 0' defined in tracking media
 
G4bool fIsCachedMagneticField
 info if a cached magnetic field is in use
 
G4bool fIsUserMaxStep
 option to activate max step defined in tracking media
 
G4bool fIsMaxStepInLowDensityMaterials
 option to activate max step defined in low density materials
 
G4double fLimitDensity
 material density limit for setting max allowed step
 
G4double fMaxStepInLowDensityMaterials
 max allowed step in materials with density < fLimitDensity
 

Static Private Attributes

static TG4GeometryManagerfgInstance = 0
 this instance
 
static const G4double fgDefaultLimitDensity = 0.001 * (g / cm3)
 default material density limit for setting max allowed step
 
static const G4double fgDefaultMaxStep = 10 * cm
 default max allowed step in materials with density < fLimitDensity
 
static G4ThreadLocal std::vector< TG4Field * > * fgFields = 0
 Fields.
 

Detailed Description

The manager class for building Geant4 geometry depending on a selected user input.

Author
I. Hrivnacova; IPN, Orsay

Definition at line 50 of file TG4GeometryManager.h.

Constructor & Destructor Documentation

◆ TG4GeometryManager() [1/2]

TG4GeometryManager::TG4GeometryManager ( const TString & userGeometry)

Standard constructor

Definition at line 81 of file TG4GeometryManager.cxx.

◆ ~TG4GeometryManager()

TG4GeometryManager::~TG4GeometryManager ( )
virtual

Destructor

Definition at line 125 of file TG4GeometryManager.cxx.

◆ TG4GeometryManager() [2/2]

TG4GeometryManager::TG4GeometryManager ( const TG4GeometryManager & right)
private

Not implemented.

Member Function Documentation

◆ Instance()

◆ GetMCGeometry()

◆ GetOpManager()

◆ GetFastModelsManager()

TG4ModelConfigurationManager * TG4GeometryManager::GetFastModelsManager ( ) const
inline

Return fast simulation models manager

Definition at line 202 of file TG4GeometryManager.h.

Referenced by TG4FastSimulationPhysics::ConstructProcess(), and TG4VUserFastSimulation::TG4VUserFastSimulation().

◆ GetEmModelsManager()

TG4ModelConfigurationManager * TG4GeometryManager::GetEmModelsManager ( ) const
inline

Return fast simulation models manager

Definition at line 209 of file TG4GeometryManager.h.

Referenced by TG4EmModelPhysics::ConstructProcess().

◆ ConstructGeometry()

void TG4GeometryManager::ConstructGeometry ( )

Construct Geant4 geometry depending on user geometry source

Definition at line 800 of file TG4GeometryManager.cxx.

Referenced by TG4DetConstruction::Construct().

◆ ConstructSDandField()

void TG4GeometryManager::ConstructSDandField ( )

Construct Geant4 geometry depending on user geometry source

Definition at line 822 of file TG4GeometryManager.cxx.

Referenced by TG4DetConstruction::ConstructSDandField().

◆ FinishGeometry()

void TG4GeometryManager::FinishGeometry ( )

Finish geometry construction after G4 run initialization

Definition at line 851 of file TG4GeometryManager.cxx.

Referenced by TGeant4::FinishGeometry(), and TG4RunManager::Initialize().

◆ UpdateField()

void TG4GeometryManager::UpdateField ( )

Update magnetic field. This function must be called if the field parameters were changed in other than PreInit> phase.

Definition at line 875 of file TG4GeometryManager.cxx.

Referenced by TG4DetConstructionMessenger::SetNewValue().

◆ CreateFieldParameters()

void TG4GeometryManager::CreateFieldParameters ( const G4String & fieldVolName)

Create local magnetic field parameters which can be then configured by the user via UI commands. The parameters are used in geometry only if a local magnetic field is associated with the volumes with the given name

Definition at line 898 of file TG4GeometryManager.cxx.

Referenced by TG4DetConstructionMessenger::SetNewValue().

◆ CreateRadiator()

TG4RadiatorDescription * TG4GeometryManager::CreateRadiator ( const G4String & volName)

Create radiator description with the given volume name

Definition at line 909 of file TG4GeometryManager.cxx.

Referenced by TG4DetConstructionMessenger::SetNewValue().

◆ SetUserLimits()

void TG4GeometryManager::SetUserLimits ( const TG4G3CutVector & cuts,
const TG4G3ControlVector & controls ) const

Set user limits defined in G3MedTable for all logical volumes.

Definition at line 922 of file TG4GeometryManager.cxx.

Referenced by TG4RunManager::LateInitialize().

◆ SetIsLocalField()

void TG4GeometryManager::SetIsLocalField ( G4bool isLocalField)

(In)Activate use of local magnetic field(s)

Definition at line 985 of file TG4GeometryManager.cxx.

Referenced by TG4DetConstructionMessenger::SetNewValue().

◆ SetIsZeroField()

void TG4GeometryManager::SetIsZeroField ( G4bool isZeroField)

(In)Activate propagating 'ifield = 0' parameter defined in tracking media

Definition at line 997 of file TG4GeometryManager.cxx.

Referenced by TG4DetConstructionMessenger::SetNewValue().

◆ SetIsUserMaxStep()

void TG4GeometryManager::SetIsUserMaxStep ( G4bool isUserMaxStep)

(In)Activate the max step defined by user in tracking media

Definition at line 1009 of file TG4GeometryManager.cxx.

Referenced by TG4DetConstructionMessenger::SetNewValue(), and TGeant4::SetUserParameters().

◆ SetIsMaxStepInLowDensityMaterials()

void TG4GeometryManager::SetIsMaxStepInLowDensityMaterials ( G4bool isMaxStep)

(In)Activate the max step defined in low density materials

Definition at line 1021 of file TG4GeometryManager.cxx.

Referenced by TG4DetConstructionMessenger::SetNewValue().

◆ SetRootDetectorConstruction()

void TG4GeometryManager::SetRootDetectorConstruction ( TG4RootDetectorConstruction * rootDetectorConstruction)
inline

Set Root detector construction

Definition at line 215 of file TG4GeometryManager.h.

◆ SetUserRegionConstruction()

void TG4GeometryManager::SetUserRegionConstruction ( TG4VUserRegionConstruction * userRegionConstruction)

Set user region construction

Definition at line 1033 of file TG4GeometryManager.cxx.

Referenced by TG4RunManager::ConfigureRunManager().

◆ SetUserPostDetConstruction()

void TG4GeometryManager::SetUserPostDetConstruction ( TG4VUserPostDetConstruction * userPostDetConstruction)

Set user region construction

Definition at line 1042 of file TG4GeometryManager.cxx.

Referenced by TG4RunManager::ConfigureRunManager().

◆ SetUserEquationOfMotion()

void TG4GeometryManager::SetUserEquationOfMotion ( G4EquationOfMotion * equation,
G4String volumeName = "" )

Definition at line 1051 of file TG4GeometryManager.cxx.

◆ SetUserStepper()

void TG4GeometryManager::SetUserStepper ( G4MagIntegratorStepper * stepper,
G4String volumeName = "" )

Definition at line 1068 of file TG4GeometryManager.cxx.

◆ SetLimitDensity()

void TG4GeometryManager::SetLimitDensity ( G4double density)
inline

Set the material density limit for setting max allowed step

Definition at line 222 of file TG4GeometryManager.h.

Referenced by TG4DetConstructionMessenger::SetNewValue().

◆ SetMaxStepInLowDensityMaterials()

void TG4GeometryManager::SetMaxStepInLowDensityMaterials ( G4double maxStep)
inline

Set max allowed step value in materials with density < fLimitDensity

Definition at line 228 of file TG4GeometryManager.h.

Referenced by TG4DetConstructionMessenger::SetNewValue().

◆ PrintFieldStatistics()

void TG4GeometryManager::PrintFieldStatistics ( ) const

Print field statistics. Currently only the cached field prints the caching statistics.

Definition at line 1085 of file TG4GeometryManager.cxx.

Referenced by TG4RunManager::FinishRun().

◆ GetRadiators()

const std::vector< TG4RadiatorDescription * > & TG4GeometryManager::GetRadiators ( ) const
inline

Return the vectpr of defined radiators

Definition at line 236 of file TG4GeometryManager.h.

Referenced by TG4TransitionRadiationPhysics::ConstructProcess().

◆ operator=()

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

Not implemented.

◆ CreateMCGeometry()

void TG4GeometryManager::CreateMCGeometry ( )
private

Create MC geometry

Definition at line 151 of file TG4GeometryManager.cxx.

Referenced by TG4GeometryManager().

◆ ConstructG4GeometryViaVMC()

void TG4GeometryManager::ConstructG4GeometryViaVMC ( )
private

Create G4 geometry objects according to the G3VolTable

Definition at line 168 of file TG4GeometryManager.cxx.

Referenced by ConstructG4Geometry().

◆ ConstructG4GeometryViaVGM()

void TG4GeometryManager::ConstructG4GeometryViaVGM ( )
private

Convert Root geometry to G4 geometry objects using roottog4 convertor.

Definition at line 220 of file TG4GeometryManager.cxx.

Referenced by ConstructG4Geometry().

◆ ConstructG4Geometry()

void TG4GeometryManager::ConstructG4Geometry ( )
private

Construct Geant4 geometry depending on user geometry source

Definition at line 275 of file TG4GeometryManager.cxx.

Referenced by ConstructGeometry().

◆ FillMediumMapFromG3()

void TG4GeometryManager::FillMediumMapFromG3 ( )
private

Map G3 tracking medium IDs to volumes names.

Definition at line 343 of file TG4GeometryManager.cxx.

Referenced by FillMediumMap().

◆ FillMediumMapFromG4()

void TG4GeometryManager::FillMediumMapFromG4 ( )
private

Map G4 materials in the medium map; the materialIndex is used to define medium ID.

Definition at line 415 of file TG4GeometryManager.cxx.

Referenced by FillMediumMap().

◆ FillMediumMapFromRoot()

void TG4GeometryManager::FillMediumMapFromRoot ( )
private

Map Root tracking media in the medium map

Definition at line 454 of file TG4GeometryManager.cxx.

Referenced by FillMediumMap().

◆ FillMediumMap()

void TG4GeometryManager::FillMediumMap ( )
private

Fill medium map depending on user geometry source

Definition at line 551 of file TG4GeometryManager.cxx.

Referenced by ConstructGeometry(), and FinishGeometry().

◆ GetOrCreateFieldParameters()

TG4FieldParameters * TG4GeometryManager::GetOrCreateFieldParameters ( const G4String & volumeName)
private

Get field parameters with the given volumeName or create them if they do not exist yet

Definition at line 710 of file TG4GeometryManager.cxx.

Referenced by ConstructLocalFields(), SetUserEquationOfMotion(), and SetUserStepper().

◆ CreateField()

void TG4GeometryManager::CreateField ( TVirtualMagField * magField,
TG4FieldParameters * fieldParameters,
G4LogicalVolume * lv )
private

Create magnetic, electromagnetic or gravity field

Definition at line 566 of file TG4GeometryManager.cxx.

Referenced by ConstructGlobalField(), and ConstructLocalFields().

◆ ConstructGlobalField()

void TG4GeometryManager::ConstructGlobalField ( )
private

Construct Geant4 global magnetic field from the field set to gMC

Definition at line 604 of file TG4GeometryManager.cxx.

Referenced by ConstructSDandField().

◆ ConstructZeroFields()

void TG4GeometryManager::ConstructZeroFields ( )
private

Loop over all logical volumes and set zero magnetic if the volume is associated with a tracking medium with ifield value = 0. This function is invoked only when a global magnetic field is defined.

Definition at line 641 of file TG4GeometryManager.cxx.

Referenced by ConstructGlobalField().

◆ ConstructLocalFields()

void TG4GeometryManager::ConstructLocalFields ( )
private

Construct Geant4 local magnetic field from Root geometry.

Definition at line 731 of file TG4GeometryManager.cxx.

Referenced by ConstructSDandField().

Member Data Documentation

◆ fgInstance

TG4GeometryManager * TG4GeometryManager::fgInstance = 0
staticprivate

this instance

Definition at line 123 of file TG4GeometryManager.h.

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

◆ fgDefaultLimitDensity

const G4double TG4GeometryManager::fgDefaultLimitDensity = 0.001 * (g / cm3)
staticprivate

default material density limit for setting max allowed step

Definition at line 126 of file TG4GeometryManager.h.

◆ fgDefaultMaxStep

const G4double TG4GeometryManager::fgDefaultMaxStep = 10 * cm
staticprivate

default max allowed step in materials with density < fLimitDensity

Definition at line 129 of file TG4GeometryManager.h.

◆ fMessenger

TG4DetConstructionMessenger TG4GeometryManager::fMessenger
private

messenger

Definition at line 132 of file TG4GeometryManager.h.

◆ fGeometryServices

◆ fMCGeometry

TVirtualMCGeometry* TG4GeometryManager::fMCGeometry
private

VirtualMC geometry.

Definition at line 134 of file TG4GeometryManager.h.

Referenced by CreateMCGeometry(), and GetMCGeometry().

◆ fRootDetectorConstruction

TG4RootDetectorConstruction* TG4GeometryManager::fRootDetectorConstruction
private

Root detector construction.

Definition at line 135 of file TG4GeometryManager.h.

Referenced by FillMediumMapFromRoot(), and SetRootDetectorConstruction().

◆ fOpManager

TG4OpGeometryManager* TG4GeometryManager::fOpManager
private

optical geometry manager

Definition at line 136 of file TG4GeometryManager.h.

Referenced by GetOpManager(), TG4GeometryManager(), and ~TG4GeometryManager().

◆ fFastModelsManager

TG4ModelConfigurationManager* TG4GeometryManager::fFastModelsManager
private

Fast simulation models manager.

Definition at line 139 of file TG4GeometryManager.h.

Referenced by ConstructSDandField(), GetFastModelsManager(), TG4GeometryManager(), and ~TG4GeometryManager().

◆ fEmModelsManager

TG4ModelConfigurationManager* TG4GeometryManager::fEmModelsManager
private

EM models manager.

Definition at line 142 of file TG4GeometryManager.h.

Referenced by ConstructSDandField(), GetEmModelsManager(), TG4GeometryManager(), and ~TG4GeometryManager().

◆ fBiasingManager

TG4BiasingManager* TG4GeometryManager::fBiasingManager
private

Biasing manager.

Definition at line 145 of file TG4GeometryManager.h.

Referenced by ConstructSDandField(), TG4GeometryManager(), and ~TG4GeometryManager().

◆ fUserGeometry

G4String TG4GeometryManager::fUserGeometry
private

User geometry input.

Definition at line 148 of file TG4GeometryManager.h.

Referenced by ConstructG4Geometry(), ConstructLocalFields(), CreateMCGeometry(), and FillMediumMap().

◆ fFieldParameters

std::vector<TG4FieldParameters*> TG4GeometryManager::fFieldParameters
private

◆ fgFields

G4ThreadLocal std::vector< TG4Field * > * TG4GeometryManager::fgFields = 0
staticprivate

Fields.

Definition at line 154 of file TG4GeometryManager.h.

Referenced by CreateField(), PrintFieldStatistics(), UpdateField(), and ~TG4GeometryManager().

◆ fRadiators

std::vector<TG4RadiatorDescription*> TG4GeometryManager::fRadiators
private

Radiators.

Definition at line 157 of file TG4GeometryManager.h.

Referenced by CreateRadiator(), and GetRadiators().

◆ fUserRegionConstruction

TG4VUserRegionConstruction* TG4GeometryManager::fUserRegionConstruction
private

User region construction.

Definition at line 160 of file TG4GeometryManager.h.

Referenced by ConstructGeometry(), and SetUserRegionConstruction().

◆ fUserPostDetConstruction

TG4VUserPostDetConstruction* TG4GeometryManager::fUserPostDetConstruction
private

User post detector construction.

Definition at line 163 of file TG4GeometryManager.h.

Referenced by ConstructSDandField(), and SetUserPostDetConstruction().

◆ fIsLocalField

G4bool TG4GeometryManager::fIsLocalField
private

option to activate getting local magnetic fields from Root geometry

Definition at line 166 of file TG4GeometryManager.h.

Referenced by ConstructSDandField(), and SetIsLocalField().

◆ fIsZeroField

G4bool TG4GeometryManager::fIsZeroField
private

option to activate propagating 'ifield = 0' defined in tracking media

Definition at line 169 of file TG4GeometryManager.h.

Referenced by ConstructGlobalField(), and SetIsZeroField().

◆ fIsCachedMagneticField

G4bool TG4GeometryManager::fIsCachedMagneticField
private

info if a cached magnetic field is in use

Definition at line 172 of file TG4GeometryManager.h.

◆ fIsUserMaxStep

G4bool TG4GeometryManager::fIsUserMaxStep
private

option to activate max step defined in tracking media

Definition at line 175 of file TG4GeometryManager.h.

Referenced by SetIsUserMaxStep(), and SetUserLimits().

◆ fIsMaxStepInLowDensityMaterials

G4bool TG4GeometryManager::fIsMaxStepInLowDensityMaterials
private

option to activate max step defined in low density materials

Definition at line 178 of file TG4GeometryManager.h.

Referenced by SetIsMaxStepInLowDensityMaterials(), and SetUserLimits().

◆ fLimitDensity

G4double TG4GeometryManager::fLimitDensity
private

material density limit for setting max allowed step

Definition at line 181 of file TG4GeometryManager.h.

Referenced by SetLimitDensity(), and SetUserLimits().

◆ fMaxStepInLowDensityMaterials

G4double TG4GeometryManager::fMaxStepInLowDensityMaterials
private

max allowed step in materials with density < fLimitDensity

Definition at line 184 of file TG4GeometryManager.h.

Referenced by SetMaxStepInLowDensityMaterials(), and SetUserLimits().


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