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 84 of file TG4GeometryManager.cxx.
Referenced by Instance(), operator=(), and TG4GeometryManager().
|
virtual |
Destructor
Definition at line 128 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 791 of file TG4GeometryManager.cxx.
|
inline |
Return the optical geometry manager
Definition at line 195 of file TG4GeometryManager.h.
|
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 805 of file TG4GeometryManager.cxx.
Referenced by TG4DetConstruction::Construct().
void TG4GeometryManager::ConstructSDandField | ( | ) |
Construct Geant4 geometry depending on user geometry source
Definition at line 827 of file TG4GeometryManager.cxx.
Referenced by TG4DetConstruction::ConstructSDandField().
void TG4GeometryManager::FinishGeometry | ( | ) |
Finish geometry construction after G4 run initialization
Definition at line 856 of file TG4GeometryManager.cxx.
Referenced by 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 880 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 903 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 914 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 927 of file TG4GeometryManager.cxx.
Referenced by TG4RunManager::LateInitialize().
void TG4GeometryManager::SetIsLocalField | ( | G4bool | isLocalField | ) |
(In)Activate use of local magnetic field(s)
Definition at line 990 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 1002 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 1014 of file TG4GeometryManager.cxx.
Referenced by TG4DetConstructionMessenger::SetNewValue().
void TG4GeometryManager::SetIsMaxStepInLowDensityMaterials | ( | G4bool | isMaxStep | ) |
(In)Activate the max step defined in low density materials
Definition at line 1026 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 1038 of file TG4GeometryManager.cxx.
Referenced by TG4RunManager::ConfigureRunManager().
void TG4GeometryManager::SetUserPostDetConstruction | ( | TG4VUserPostDetConstruction * | userPostDetConstruction | ) |
Set user region construction
Definition at line 1047 of file TG4GeometryManager.cxx.
Referenced by TG4RunManager::ConfigureRunManager().
void TG4GeometryManager::SetUserEquationOfMotion | ( | G4EquationOfMotion * | equation, |
G4String | volumeName = "" ) |
Definition at line 1056 of file TG4GeometryManager.cxx.
void TG4GeometryManager::SetUserStepper | ( | G4MagIntegratorStepper * | stepper, |
G4String | volumeName = "" ) |
Definition at line 1073 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 1090 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 154 of file TG4GeometryManager.cxx.
Referenced by TG4GeometryManager().
|
private |
Create G4 geometry objects according to the G3VolTable
Definition at line 171 of file TG4GeometryManager.cxx.
Referenced by ConstructG4Geometry().
|
private |
Convert Root geometry to G4 geometry objects using roottog4 convertor.
Definition at line 223 of file TG4GeometryManager.cxx.
Referenced by ConstructG4Geometry().
|
private |
Construct Geant4 geometry depending on user geometry source
Definition at line 278 of file TG4GeometryManager.cxx.
Referenced by ConstructGeometry().
|
private |
Map G3 tracking medium IDs to volumes names.
Definition at line 346 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 418 of file TG4GeometryManager.cxx.
Referenced by FillMediumMap().
|
private |
Map Root tracking media in the medium map
Definition at line 457 of file TG4GeometryManager.cxx.
Referenced by FillMediumMap().
|
private |
Fill medium map depending on user geometry source
Definition at line 556 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 715 of file TG4GeometryManager.cxx.
Referenced by ConstructLocalFields(), SetUserEquationOfMotion(), and SetUserStepper().
|
private |
Create magnetic, electromagnetic or gravity field
Definition at line 571 of file TG4GeometryManager.cxx.
Referenced by ConstructGlobalField(), and ConstructLocalFields().
|
private |
Construct Geant4 global magnetic field from the field set to gMC
Definition at line 609 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 646 of file TG4GeometryManager.cxx.
Referenced by ConstructGlobalField().
|
private |
Construct Geant4 local magnetic field from Root geometry.
Definition at line 736 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.
Referenced by TG4GeometryManager().
|
staticprivate |
default max allowed step in materials with density < fLimitDensity
Definition at line 129 of file TG4GeometryManager.h.
Referenced by TG4GeometryManager().
|
private |
|
private |
geometry services
Definition at line 133 of file TG4GeometryManager.h.
Referenced by ConstructG4Geometry(), ConstructG4GeometryViaVGM(), ConstructG4GeometryViaVMC(), FillMediumMapFromG3(), FillMediumMapFromG4(), FillMediumMapFromRoot(), FinishGeometry(), SetUserLimits(), TG4GeometryManager(), and ~TG4GeometryManager().
|
private |
VirtualMC geometry.
Definition at line 134 of file TG4GeometryManager.h.
Referenced by CreateMCGeometry(), GetMCGeometry(), and TG4GeometryManager().
|
private |
Root detector construction.
Definition at line 135 of file TG4GeometryManager.h.
Referenced by FillMediumMapFromRoot(), SetRootDetectorConstruction(), and TG4GeometryManager().
|
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(), FillMediumMap(), and TG4GeometryManager().
|
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(), SetUserRegionConstruction(), and TG4GeometryManager().
|
private |
User post detector construction.
Definition at line 163 of file TG4GeometryManager.h.
Referenced by ConstructSDandField(), SetUserPostDetConstruction(), and TG4GeometryManager().
|
private |
option to activate getting local magnetic fields from Root geometry
Definition at line 166 of file TG4GeometryManager.h.
Referenced by ConstructSDandField(), SetIsLocalField(), and TG4GeometryManager().
|
private |
option to activate propagating 'ifield = 0' defined in tracking media
Definition at line 169 of file TG4GeometryManager.h.
Referenced by ConstructGlobalField(), SetIsZeroField(), and TG4GeometryManager().
|
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(), SetUserLimits(), and TG4GeometryManager().
|
private |
option to activate max step defined in low density materials
Definition at line 178 of file TG4GeometryManager.h.
Referenced by SetIsMaxStepInLowDensityMaterials(), SetUserLimits(), and TG4GeometryManager().
|
private |
material density limit for setting max allowed step
Definition at line 181 of file TG4GeometryManager.h.
Referenced by SetLimitDensity(), SetUserLimits(), and TG4GeometryManager().
|
private |
max allowed step in materials with density < fLimitDensity
Definition at line 184 of file TG4GeometryManager.h.
Referenced by SetMaxStepInLowDensityMaterials(), SetUserLimits(), and TG4GeometryManager().