Geant4 VMC Version 6.6
|
The manager class for building Geant4 geometry depending on a selected user input. More...
#include <TG4GeometryManager.h>
Public Member Functions | |
TG4GeometryManager (const TString &userGeometry) | |
virtual | ~TG4GeometryManager () |
TVirtualMCGeometry * | GetMCGeometry () const |
TG4OpGeometryManager * | GetOpManager () const |
TG4ModelConfigurationManager * | GetFastModelsManager () const |
TG4ModelConfigurationManager * | GetEmModelsManager () const |
void | ConstructGeometry () |
void | ConstructSDandField () |
void | FinishGeometry () |
void | UpdateField () |
void | CreateFieldParameters (const G4String &fieldVolName) |
TG4RadiatorDescription * | CreateRadiator (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 TG4GeometryManager * | Instance () |
Private Member Functions | |
TG4GeometryManager (const TG4GeometryManager &right) | |
Not implemented. | |
TG4GeometryManager & | operator= (const TG4GeometryManager &right) |
Not implemented. | |
void | CreateMCGeometry () |
void | ConstructG4GeometryViaVMC () |
void | ConstructG4GeometryViaVGM () |
void | ConstructG4Geometry () |
void | FillMediumMapFromG3 () |
void | FillMediumMapFromG4 () |
void | FillMediumMapFromRoot () |
void | FillMediumMap () |
TG4FieldParameters * | GetOrCreateFieldParameters (const G4String &volumeName) |
void | CreateField (TVirtualMagField *magField, TG4FieldParameters *fieldParameters, G4LogicalVolume *lv) |
void | ConstructGlobalField () |
void | ConstructZeroFields () |
void | ConstructLocalFields () |
Private Attributes | |
TG4DetConstructionMessenger | fMessenger |
messenger | |
TG4GeometryServices * | fGeometryServices |
geometry services | |
TVirtualMCGeometry * | fMCGeometry |
VirtualMC geometry. | |
TG4RootDetectorConstruction * | fRootDetectorConstruction |
Root detector construction. | |
TG4OpGeometryManager * | fOpManager |
optical geometry manager | |
TG4ModelConfigurationManager * | fFastModelsManager |
Fast simulation models manager. | |
TG4ModelConfigurationManager * | fEmModelsManager |
EM models manager. | |
TG4BiasingManager * | fBiasingManager |
Biasing manager. | |
G4String | fUserGeometry |
User geometry input. | |
std::vector< TG4FieldParameters * > | fFieldParameters |
Field parameters. | |
std::vector< TG4RadiatorDescription * > | fRadiators |
Radiators. | |
TG4VUserRegionConstruction * | fUserRegionConstruction |
User region construction. | |
TG4VUserPostDetConstruction * | fUserPostDetConstruction |
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 TG4GeometryManager * | fgInstance = 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. | |
The manager class for building Geant4 geometry depending on a selected user input.
Definition at line 50 of file TG4GeometryManager.h.
TG4GeometryManager::TG4GeometryManager | ( | const TString & | userGeometry | ) |
Standard constructor
Definition at line 81 of file TG4GeometryManager.cxx.
|
virtual |
Destructor
Definition at line 125 of file TG4GeometryManager.cxx.
|
private |
Not implemented.
|
inlinestatic |
Return this instance
Definition at line 189 of file TG4GeometryManager.h.
Referenced by TG4RunManager::ConfigureRunManager(), TG4DetConstruction::Construct(), TG4EmModelPhysics::ConstructProcess(), TG4FastSimulationPhysics::ConstructProcess(), TG4TransitionRadiationPhysics::ConstructProcess(), TG4DetConstruction::ConstructSDandField(), TG4RunManager::FinishRun(), TG4RunManager::Initialize(), TG4RunManager::LateInitialize(), TG4DetConstructionMessenger::SetNewValue(), and TG4VUserFastSimulation::TG4VUserFastSimulation().
TVirtualMCGeometry * TG4GeometryManager::GetMCGeometry | ( | ) | const |
Return the instance of MC geometry; give exception if no object is instantiated
Definition at line 786 of file TG4GeometryManager.cxx.
Referenced by TGeant4::GetMaterial(), TGeant4::GetMedium(), TGeant4::GetShape(), TGeant4::GetTransformation(), TGeant4::Gsbool(), TGeant4::Gsdvn(), TGeant4::Gsdvn2(), TGeant4::Gsdvt(), TGeant4::Gsdvt2(), TGeant4::Gsord(), TGeant4::Gspos(), TGeant4::Gsposp(), TGeant4::Gsposp(), TGeant4::Gsvolu(), TGeant4::Gsvolu(), TGeant4::Material(), TGeant4::Material(), TGeant4::Matrix(), TGeant4::Medium(), TGeant4::Medium(), TGeant4::MediumId(), TGeant4::Mixture(), and TGeant4::Mixture().
|
inline |
Return the optical geometry manager
Definition at line 195 of file TG4GeometryManager.h.
Referenced by TGeant4::DefineOpSurface(), TGeant4::GetMaterial(), TGeant4::Gfmate(), TGeant4::Gfmate(), TGeant4::SetBorderSurface(), TGeant4::SetCerenkov(), TGeant4::SetCerenkov(), TGeant4::SetMaterialProperty(), TGeant4::SetMaterialProperty(), TGeant4::SetMaterialProperty(), and TGeant4::SetSkinSurface().
|
inline |
Return fast simulation models manager
Definition at line 202 of file TG4GeometryManager.h.
Referenced by TG4FastSimulationPhysics::ConstructProcess(), and TG4VUserFastSimulation::TG4VUserFastSimulation().
|
inline |
Return fast simulation models manager
Definition at line 209 of file TG4GeometryManager.h.
Referenced by TG4EmModelPhysics::ConstructProcess().
void TG4GeometryManager::ConstructGeometry | ( | ) |
Construct Geant4 geometry depending on user geometry source
Definition at line 800 of file TG4GeometryManager.cxx.
Referenced by TG4DetConstruction::Construct().
void TG4GeometryManager::ConstructSDandField | ( | ) |
Construct Geant4 geometry depending on user geometry source
Definition at line 822 of file TG4GeometryManager.cxx.
Referenced by TG4DetConstruction::ConstructSDandField().
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().
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().
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().
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().
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().
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().
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().
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().
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().
|
inline |
Set Root detector construction
Definition at line 215 of file TG4GeometryManager.h.
void TG4GeometryManager::SetUserRegionConstruction | ( | TG4VUserRegionConstruction * | userRegionConstruction | ) |
Set user region construction
Definition at line 1033 of file TG4GeometryManager.cxx.
Referenced by TG4RunManager::ConfigureRunManager().
void TG4GeometryManager::SetUserPostDetConstruction | ( | TG4VUserPostDetConstruction * | userPostDetConstruction | ) |
Set user region construction
Definition at line 1042 of file TG4GeometryManager.cxx.
Referenced by TG4RunManager::ConfigureRunManager().
void TG4GeometryManager::SetUserEquationOfMotion | ( | G4EquationOfMotion * | equation, |
G4String | volumeName = "" ) |
Definition at line 1051 of file TG4GeometryManager.cxx.
void TG4GeometryManager::SetUserStepper | ( | G4MagIntegratorStepper * | stepper, |
G4String | volumeName = "" ) |
Definition at line 1068 of file TG4GeometryManager.cxx.
|
inline |
Set the material density limit for setting max allowed step
Definition at line 222 of file TG4GeometryManager.h.
Referenced by TG4DetConstructionMessenger::SetNewValue().
|
inline |
Set max allowed step value in materials with density < fLimitDensity
Definition at line 228 of file TG4GeometryManager.h.
Referenced by TG4DetConstructionMessenger::SetNewValue().
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().
|
inline |
Return the vectpr of defined radiators
Definition at line 236 of file TG4GeometryManager.h.
Referenced by TG4TransitionRadiationPhysics::ConstructProcess().
|
private |
Not implemented.
|
private |
Create MC geometry
Definition at line 151 of file TG4GeometryManager.cxx.
Referenced by TG4GeometryManager().
|
private |
Create G4 geometry objects according to the G3VolTable
Definition at line 168 of file TG4GeometryManager.cxx.
Referenced by ConstructG4Geometry().
|
private |
Convert Root geometry to G4 geometry objects using roottog4 convertor.
Definition at line 220 of file TG4GeometryManager.cxx.
Referenced by ConstructG4Geometry().
|
private |
Construct Geant4 geometry depending on user geometry source
Definition at line 275 of file TG4GeometryManager.cxx.
Referenced by ConstructGeometry().
|
private |
Map G3 tracking medium IDs to volumes names.
Definition at line 343 of file TG4GeometryManager.cxx.
Referenced by FillMediumMap().
|
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().
|
private |
Map Root tracking media in the medium map
Definition at line 454 of file TG4GeometryManager.cxx.
Referenced by FillMediumMap().
|
private |
Fill medium map depending on user geometry source
Definition at line 551 of file TG4GeometryManager.cxx.
Referenced by ConstructGeometry(), and FinishGeometry().
|
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().
|
private |
Create magnetic, electromagnetic or gravity field
Definition at line 566 of file TG4GeometryManager.cxx.
Referenced by ConstructGlobalField(), and ConstructLocalFields().
|
private |
Construct Geant4 global magnetic field from the field set to gMC
Definition at line 604 of file TG4GeometryManager.cxx.
Referenced by ConstructSDandField().
|
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().
|
private |
Construct Geant4 local magnetic field from Root geometry.
Definition at line 731 of file TG4GeometryManager.cxx.
Referenced by ConstructSDandField().
|
staticprivate |
this instance
Definition at line 123 of file TG4GeometryManager.h.
Referenced by Instance(), TG4GeometryManager(), and ~TG4GeometryManager().
|
staticprivate |
default material density limit for setting max allowed step
Definition at line 126 of file TG4GeometryManager.h.
|
staticprivate |
default max allowed step in materials with density < fLimitDensity
Definition at line 129 of file TG4GeometryManager.h.
|
private |
messenger
Definition at line 132 of file TG4GeometryManager.h.
|
private |
geometry services
Definition at line 133 of file TG4GeometryManager.h.
Referenced by ConstructG4Geometry(), ConstructG4GeometryViaVGM(), ConstructG4GeometryViaVMC(), FillMediumMapFromG3(), FillMediumMapFromG4(), FillMediumMapFromRoot(), FinishGeometry(), SetUserLimits(), and ~TG4GeometryManager().
|
private |
VirtualMC geometry.
Definition at line 134 of file TG4GeometryManager.h.
Referenced by CreateMCGeometry(), and GetMCGeometry().
|
private |
Root detector construction.
Definition at line 135 of file TG4GeometryManager.h.
Referenced by FillMediumMapFromRoot(), and SetRootDetectorConstruction().
|
private |
optical geometry manager
Definition at line 136 of file TG4GeometryManager.h.
Referenced by GetOpManager(), TG4GeometryManager(), and ~TG4GeometryManager().
|
private |
Fast simulation models manager.
Definition at line 139 of file TG4GeometryManager.h.
Referenced by ConstructSDandField(), GetFastModelsManager(), TG4GeometryManager(), and ~TG4GeometryManager().
|
private |
EM models manager.
Definition at line 142 of file TG4GeometryManager.h.
Referenced by ConstructSDandField(), GetEmModelsManager(), TG4GeometryManager(), and ~TG4GeometryManager().
|
private |
Biasing manager.
Definition at line 145 of file TG4GeometryManager.h.
Referenced by ConstructSDandField(), TG4GeometryManager(), and ~TG4GeometryManager().
|
private |
User geometry input.
Definition at line 148 of file TG4GeometryManager.h.
Referenced by ConstructG4Geometry(), ConstructLocalFields(), CreateMCGeometry(), and FillMediumMap().
|
private |
Field parameters.
Definition at line 151 of file TG4GeometryManager.h.
Referenced by ConstructGlobalField(), CreateFieldParameters(), GetOrCreateFieldParameters(), SetUserEquationOfMotion(), SetUserStepper(), TG4GeometryManager(), UpdateField(), and ~TG4GeometryManager().
|
staticprivate |
Fields.
Definition at line 154 of file TG4GeometryManager.h.
Referenced by CreateField(), PrintFieldStatistics(), UpdateField(), and ~TG4GeometryManager().
|
private |
Radiators.
Definition at line 157 of file TG4GeometryManager.h.
Referenced by CreateRadiator(), and GetRadiators().
|
private |
User region construction.
Definition at line 160 of file TG4GeometryManager.h.
Referenced by ConstructGeometry(), and SetUserRegionConstruction().
|
private |
User post detector construction.
Definition at line 163 of file TG4GeometryManager.h.
Referenced by ConstructSDandField(), and SetUserPostDetConstruction().
|
private |
option to activate getting local magnetic fields from Root geometry
Definition at line 166 of file TG4GeometryManager.h.
Referenced by ConstructSDandField(), and SetIsLocalField().
|
private |
option to activate propagating 'ifield = 0' defined in tracking media
Definition at line 169 of file TG4GeometryManager.h.
Referenced by ConstructGlobalField(), and SetIsZeroField().
|
private |
info if a cached magnetic field is in use
Definition at line 172 of file TG4GeometryManager.h.
|
private |
option to activate max step defined in tracking media
Definition at line 175 of file TG4GeometryManager.h.
Referenced by SetIsUserMaxStep(), and SetUserLimits().
|
private |
option to activate max step defined in low density materials
Definition at line 178 of file TG4GeometryManager.h.
Referenced by SetIsMaxStepInLowDensityMaterials(), and SetUserLimits().
|
private |
material density limit for setting max allowed step
Definition at line 181 of file TG4GeometryManager.h.
Referenced by SetLimitDensity(), and SetUserLimits().
|
private |
max allowed step in materials with density < fLimitDensity
Definition at line 184 of file TG4GeometryManager.h.
Referenced by SetMaxStepInLowDensityMaterials(), and SetUserLimits().