Constructor and Destructor.
55 : tmanager(tman)
56{
57 geodir = new G4UIdirectory( "/geometry/" );
58 geodir->SetGuidance( "Geometry control commands." );
59
60
61
62
63 navdir = new G4UIdirectory( "/geometry/navigator/" );
64 navdir->SetGuidance( "Geometry navigator control setup." );
65
66 resCmd = new G4UIcmdWithoutParameter( "/geometry/navigator/reset", this );
67 resCmd->SetGuidance( "Reset navigator and navigation history." );
68 resCmd->SetGuidance( "NOTE: must be called only after kernel has been" );
69 resCmd->SetGuidance( " initialized once through the run manager!" );
71
72 verbCmd = new G4UIcmdWithAnInteger( "/geometry/navigator/verbose", this );
73 verbCmd->SetGuidance( "Set run-time verbosity for the navigator." );
74 verbCmd->SetGuidance(" 0 : Silent (default)");
75 verbCmd->SetGuidance(" 1 : Display volume positioning and step lengths");
76 verbCmd->SetGuidance(" 2 : Display step/safety info on point location");
77 verbCmd->SetGuidance(" 3 : Display minimal state at -every- step");
78 verbCmd->SetGuidance(" 4 : Maximum verbosity (very detailed!)");
79 verbCmd->SetGuidance( "NOTE: this command has effect -only- if Geant4 has" );
80 verbCmd->SetGuidance( " been installed with the G4VERBOSE flag set!" );
81 verbCmd->SetParameterName("level",true);
82 verbCmd->SetDefaultValue(0);
83 verbCmd->SetRange("level >=0 && level <=4");
84
85 chkCmd = new G4UIcmdWithABool( "/geometry/navigator/check_mode", this );
86 chkCmd->SetGuidance( "Set navigator in -check_mode- state." );
87 chkCmd->SetGuidance( "This will cause extra checks to be applied during" );
88 chkCmd->SetGuidance( "navigation. More strict and less tolerant conditions" );
89 chkCmd->SetGuidance( "are applied. A run-time performance penalty may be" );
90 chkCmd->SetGuidance( "observed when the -check_mode- state is activated." );
91 chkCmd->SetGuidance( "NOTE: this command has effect -only- if Geant4 has" );
92 chkCmd->SetGuidance( " been installed with the G4VERBOSE flag set!" );
93 chkCmd->SetParameterName("checkFlag",true);
94 chkCmd->SetDefaultValue(false);
96
97 pchkCmd = new G4UIcmdWithABool( "/geometry/navigator/push_notify", this );
98 pchkCmd->SetGuidance( "Set navigator verbosity push notifications." );
99 pchkCmd->SetGuidance( "This allows one to disable/re-enable verbosity in" );
100 pchkCmd->SetGuidance( "navigation, when tracks may get stuck and require" );
101 pchkCmd->SetGuidance( "one artificial push along the direction by the" );
102 pchkCmd->SetGuidance( "navigator. Notification is active by default." );
103 pchkCmd->SetGuidance( "NOTE: this command has effect -only- if Geant4 has" );
104 pchkCmd->SetGuidance( " been installed with the G4VERBOSE flag set!" );
105 pchkCmd->SetParameterName("pushFlag",true);
106 pchkCmd->SetDefaultValue(true);
108
109
110
111
112 testdir = new G4UIdirectory( "/geometry/test/" );
113 testdir->SetGuidance( "Geometry verification control setup." );
114 testdir->SetGuidance( "Helps in detecting possible overlapping regions." );
115
116 tolCmd = new G4UIcmdWithADoubleAndUnit( "/geometry/test/tolerance",this );
117 tolCmd->SetGuidance( "Define tolerance (in mm) by which overlaps reports" );
118 tolCmd->SetGuidance( "should be reported. By default, all overlaps are" );
119 tolCmd->SetGuidance( "reported, i.e. tolerance is set to: 0*mm." );
120 tolCmd->SetParameterName( "Tolerance", true, true );
121 tolCmd->SetDefaultValue( 0 );
122 tolCmd->SetDefaultUnit( "mm" );
123 tolCmd->SetUnitCategory( "Length" );
124
125 verCmd = new G4UIcmdWithABool( "/geometry/test/verbosity", this );
126 verCmd->SetGuidance( "Specify if running in verbosity mode or not." );
127 verCmd->SetGuidance( "By default verbosity is set to ON (TRUE)." );
128 verCmd->SetParameterName("verbosity",true);
129 verCmd->SetDefaultValue(true);
131
132 rslCmd = new G4UIcmdWithAnInteger( "/geometry/test/resolution", this );
133 rslCmd->SetGuidance( "Set the number of points on surface to be generated for" );
134 rslCmd->SetGuidance( "checking overlaps." );
135 rslCmd->SetParameterName("resolution",true);
136 rslCmd->SetDefaultValue(10000);
137
138 rcsCmd = new G4UIcmdWithAnInteger( "/geometry/test/recursion_start", this );
139 rcsCmd->SetGuidance( "Set the initial level in the geometry tree for recursion." );
140 rcsCmd->SetGuidance( "recursive_test will then start from the specified level." );
141 rcsCmd->SetParameterName("initial_level",true);
142 rcsCmd->SetDefaultValue(0);
143
144 rcdCmd = new G4UIcmdWithAnInteger( "/geometry/test/recursion_depth", this );
145 rcdCmd->SetGuidance( "Set the depth in the geometry tree for recursion." );
146 rcdCmd->SetGuidance( "recursive_test will then stop after reached the specified depth." );
147 rcdCmd->SetGuidance( "By default, recursion will proceed for the whole depth." );
148 rcdCmd->SetParameterName("recursion_depth",true);
149 rcdCmd->SetDefaultValue(-1);
150
151 errCmd = new G4UIcmdWithAnInteger( "/geometry/test/maximum_errors", this );
152 errCmd->SetGuidance( "Set the maximum number of overlap errors to report" );
153 errCmd->SetGuidance( "for each single volume being checked." );
154 errCmd->SetGuidance( "Once reached the maximum number specified, overlaps" );
155 errCmd->SetGuidance( "affecting that volume further than that are simply ignored." );
156 errCmd->SetParameterName("maximum_errors",true);
157 errCmd->SetDefaultValue(1);
158
159 parCmd = new G4UIcmdWithABool( "/geometry/test/check_parallel", this );
160 parCmd->SetGuidance( "Check for overlaps in parallel worlds." );
161 parCmd->SetGuidance( "By default, overlaps are only checked in the mass world (FALSE)." );
162 parCmd->SetParameterName("check_parallel",true);
163 parCmd->SetDefaultValue(true);
164
165 recCmd = new G4UIcmdWithAString( "/geometry/test/run", this );
166 recCmd->SetGuidance( "Start running the recursive overlap check." );
167 recCmd->SetGuidance( "Volumes are recursively asked to verify for overlaps" );
168 recCmd->SetGuidance( "for points generated on the surface against their" );
169 recCmd->SetGuidance( "respective mother volume and sisters at the same" );
170 recCmd->SetGuidance( "level, performing for all daughters and daughters of" );
171 recCmd->SetGuidance( "daughters, etc." );
172 recCmd->SetGuidance( "NOTE: it may take a very long time," );
173 recCmd->SetGuidance( " depending on the geometry complexity !");
174 recCmd->SetGuidance("Specify the overlap check mode.");
175 recCmd->SetGuidance(" placed: Check overlaps in all placed volumes (default)");
176 recCmd->SetGuidance(" This includes every instance of repeated placements");
177 recCmd->SetGuidance(" logical: Check overlaps only among daughters of each logical volume.");
178 recCmd->SetGuidance(" This avoids duplicate reports and improves performance.");
179 recCmd->SetParameterName("check_mode",true);
180
181 const std::string candidates_list = OverlapMode::placed
182 + " " + OverlapMode::logical;
183
184 recCmd->SetCandidates(candidates_list.c_str());
185 recCmd->SetDefaultValue(OverlapMode::placed.c_str());
187}