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 parCmd->
SetGuidance(
"Check for overlaps in parallel worlds." );
160 parCmd->
SetGuidance(
"By default, overlaps are only checked in the mass world (FALSE)." );
165 recCmd->
SetGuidance(
"Start running the recursive overlap check." );
166 recCmd->
SetGuidance(
"Volumes are recursively asked to verify for overlaps" );
167 recCmd->
SetGuidance(
"for points generated on the surface against their" );
168 recCmd->
SetGuidance(
"respective mother volume and sisters at the same" );
169 recCmd->
SetGuidance(
"level, performing for all daughters and daughters of" );
171 recCmd->
SetGuidance(
"NOTE: it may take a very long time," );
172 recCmd->
SetGuidance(
" depending on the geometry complexity !");
181 delete verCmd;
delete recCmd;
delete rslCmd;
182 delete resCmd;
delete rcsCmd;
delete rcdCmd;
delete errCmd;
184 delete verbCmd;
delete pchkCmd;
delete chkCmd;
185 delete geodir;
delete navdir;
delete testdir;
186 for(
auto* tvolume: tvolumes) {
195G4GeometryMessenger::Init()
199 if (tvolumes.empty())
205 for(
size_t i=0;i<noWorlds;++i)
220 if (command == resCmd) {
223 else if (command == verbCmd) {
224 SetVerbosity( newValues );
226 else if (command == chkCmd) {
227 SetCheckMode( newValues );
229 else if (command == pchkCmd) {
230 SetPushFlag( newValues );
232 else if (command == tolCmd) {
236 for(
auto* tvolume: tvolumes)
238 tvolume->SetTolerance(tol);
241 else if (command == verCmd) {
243 for(
auto* tvolume: tvolumes)
248 else if (command == rslCmd) {
250 for(
auto* tvolume: tvolumes)
255 else if (command == rcsCmd) {
258 else if (command == rcdCmd) {
261 else if (command == errCmd) {
263 for(
auto* tvolume: tvolumes)
268 else if (command == recCmd) {
270 G4cout <<
"Running geometry overlaps check..." <<
G4endl;
271 RecursiveOverlapTest();
272 G4cout <<
"Geometry overlaps check completed !" <<
G4endl;
283 if (command == tolCmd)
294G4GeometryMessenger::CheckGeometry()
310G4GeometryMessenger::ResetNavigator()
327G4GeometryMessenger::SetVerbosity(
G4String input)
338G4GeometryMessenger::SetCheckMode(
G4String input)
344 if (pField !=
nullptr) { pField->
CheckMode(mode); }
351G4GeometryMessenger::SetPushFlag(
G4String input)
362G4GeometryMessenger::RecursiveOverlapTest()
370 if (checkParallelWorlds)
372 for(
auto* tvolume: tvolumes)
374 tvolume->TestRecursiveOverlap( recLevel, recDepth );
379 tvolumes.front()->TestRecursiveOverlap( recLevel, recDepth );
G4GLOB_DLL std::ostream G4cout
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)
void CheckMode(G4bool mode)
G4PropagatorInField * GetPropagatorInField() const
std::vector< G4VPhysicalVolume * >::iterator GetWorldsIterator()
G4Navigator * GetNavigatorForTracking() const
std::size_t GetNoWorlds() 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)