57 geodir->
SetGuidance(
"Geometry control commands." );
63 navdir->
SetGuidance(
"Geometry navigator control setup." );
66 resCmd->
SetGuidance(
"Reset navigator and navigation history." );
67 resCmd->
SetGuidance(
"NOTE: must be called only after kernel has been" );
68 resCmd->
SetGuidance(
" initialized once through the run manager!" );
72 verbCmd->
SetGuidance(
"Set run-time verbosity for the navigator." );
74 verbCmd->
SetGuidance(
" 1 : Display volume positioning and step lengths");
75 verbCmd->
SetGuidance(
" 2 : Display step/safety info on point location");
76 verbCmd->
SetGuidance(
" 3 : Display minimal state at -every- step");
77 verbCmd->
SetGuidance(
" 4 : Maximum verbosity (very detailed!)");
78 verbCmd->
SetGuidance(
"NOTE: this command has effect -only- if Geant4 has" );
79 verbCmd->
SetGuidance(
" been installed with the G4VERBOSE flag set!" );
82 verbCmd->
SetRange(
"level >=0 && level <=4");
85 chkCmd->
SetGuidance(
"Set navigator in -check_mode- state." );
86 chkCmd->
SetGuidance(
"This will cause extra checks to be applied during" );
87 chkCmd->
SetGuidance(
"navigation. More strict and less tolerant conditions" );
88 chkCmd->
SetGuidance(
"are applied. A run-time performance penalty may be" );
89 chkCmd->
SetGuidance(
"observed when the -check_mode- state is activated." );
90 chkCmd->
SetGuidance(
"NOTE: this command has effect -only- if Geant4 has" );
91 chkCmd->
SetGuidance(
" been installed with the G4VERBOSE flag set!" );
97 pchkCmd->
SetGuidance(
"Set navigator verbosity push notifications." );
98 pchkCmd->
SetGuidance(
"This allows one to disable/re-enable verbosity in" );
99 pchkCmd->
SetGuidance(
"navigation, when tracks may get stuck and require" );
100 pchkCmd->
SetGuidance(
"one artificial push along the direction by the" );
101 pchkCmd->
SetGuidance(
"navigator. Notification is active by default." );
102 pchkCmd->
SetGuidance(
"NOTE: this command has effect -only- if Geant4 has" );
103 pchkCmd->
SetGuidance(
" been installed with the G4VERBOSE flag set!" );
112 testdir->
SetGuidance(
"Geometry verification control setup." );
113 testdir->
SetGuidance(
"Helps in detecting possible overlapping regions." );
116 tolCmd->
SetGuidance(
"Define tolerance (in mm) by which overlaps reports" );
117 tolCmd->
SetGuidance(
"should be reported. By default, all overlaps are" );
118 tolCmd->
SetGuidance(
"reported, i.e. tolerance is set to: 0*mm." );
125 verCmd->
SetGuidance(
"Specify if running in verbosity mode or not." );
126 verCmd->
SetGuidance(
"By default verbosity is set to ON (TRUE)." );
132 rslCmd->
SetGuidance(
"Set the number of points on surface to be generated for" );
138 rcsCmd->
SetGuidance(
"Set the initial level in the geometry tree for recursion." );
139 rcsCmd->
SetGuidance(
"recursive_test will then start from the specified level." );
144 rcdCmd->
SetGuidance(
"Set the depth in the geometry tree for recursion." );
145 rcdCmd->
SetGuidance(
"recursive_test will then stop after reached the specified depth." );
146 rcdCmd->
SetGuidance(
"By default, recursion will proceed for the whole depth." );
151 errCmd->
SetGuidance(
"Set the maximum number of overlap errors to report" );
152 errCmd->
SetGuidance(
"for each single volume being checked." );
153 errCmd->
SetGuidance(
"Once reached the maximum number specified, overlaps" );
154 errCmd->
SetGuidance(
"affecting that volume further than that are simply ignored." );
159 recCmd->
SetGuidance(
"Start running the recursive overlap check." );
160 recCmd->
SetGuidance(
"Volumes are recursively asked to verify for overlaps" );
161 recCmd->
SetGuidance(
"for points generated on the surface against their" );
162 recCmd->
SetGuidance(
"respective mother volume and sisters at the same" );
163 recCmd->
SetGuidance(
"level, performing for all daughters and daughters of" );
165 recCmd->
SetGuidance(
"NOTE: it may take a very long time," );
166 recCmd->
SetGuidance(
" depending on the geometry complexity !");
175 delete verCmd;
delete recCmd;
delete rslCmd;
176 delete resCmd;
delete rcsCmd;
delete rcdCmd;
delete errCmd;
178 delete verbCmd;
delete pchkCmd;
delete chkCmd;
179 delete geodir;
delete navdir;
delete testdir;
187G4GeometryMessenger::Init()
191 if (tvolume ==
nullptr)
210 if (command == resCmd) {
213 else if (command == verbCmd) {
214 SetVerbosity( newValues );
216 else if (command == chkCmd) {
217 SetCheckMode( newValues );
219 else if (command == pchkCmd) {
220 SetPushFlag( newValues );
222 else if (command == tolCmd) {
228 else if (command == verCmd) {
232 else if (command == rslCmd) {
236 else if (command == rcsCmd) {
239 else if (command == rcdCmd) {
242 else if (command == errCmd) {
246 else if (command == recCmd) {
248 G4cout <<
"Running geometry overlaps check..." <<
G4endl;
249 RecursiveOverlapTest();
250 G4cout <<
"Geometry overlaps check completed !" <<
G4endl;
261 if (command == tolCmd)
272G4GeometryMessenger::CheckGeometry()
288G4GeometryMessenger::ResetNavigator()
305G4GeometryMessenger::SetVerbosity(
G4String input)
316G4GeometryMessenger::SetCheckMode(
G4String input)
322 if (pField !=
nullptr) { pField->
CheckMode(mode); }
329G4GeometryMessenger::SetPushFlag(
G4String input)
340G4GeometryMessenger::RecursiveOverlapTest()
G4GLOB_DLL std::ostream G4cout
void SetTolerance(G4double tolerance)
void SetVerbosity(G4bool verbosity)
void TestRecursiveOverlap(G4int sLevel=0, G4int depth=-1)
void SetResolution(G4int points)
void SetErrorsThreshold(G4int max)
static G4bool IsGeometryClosed()
static G4GeometryManager * GetInstance()
G4bool CloseGeometry(G4bool pOptimise=true, G4bool verbose=false, G4VPhysicalVolume *vol=nullptr)
void OpenGeometry(G4VPhysicalVolume *vol=nullptr)
void SetNewValue(G4UIcommand *command, G4String newValues)
G4String GetCurrentValue(G4UIcommand *command)
G4GeometryMessenger(G4TransportationManager *tman)
void SetVerboseLevel(G4int level)
void SetPushVerbosity(G4bool mode)
void CheckMode(G4bool mode)
virtual G4VPhysicalVolume * LocateGlobalPointAndSetup(const G4ThreeVector &point, const G4ThreeVector *direction=nullptr, const G4bool pRelativeSearch=true, const G4bool ignoreDirection=true)
G4VPhysicalVolume * GetWorldVolume() const
void CheckMode(G4bool mode)
G4PropagatorInField * GetPropagatorInField() const
G4Navigator * GetNavigatorForTracking() const
static G4bool GetNewBoolValue(const char *paramString)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetDefaultValue(G4bool defVal)
void SetDefaultValue(G4double defVal)
void SetUnitCategory(const char *unitCategory)
static G4double GetNewUnitValue(const char *paramString)
void SetDefaultUnit(const char *defUnit)
static G4double GetNewDoubleValue(const char *paramString)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
static G4int GetNewIntValue(const char *paramString)
void SetDefaultValue(G4int defVal)
static G4String ConvertToString(G4bool boolVal)
void SetGuidance(const char *aGuidance)
void SetRange(const char *rs)
void AvailableForStates(G4ApplicationState s1)