49 : fFieldParameters(fieldParameters)
55 directoryName.append(fieldParameters->GetVolumeName());
56 directoryName.append(
"/");
57 fDirectory = new G4UIdirectory(directoryName);
58 fDirectory->SetGuidance(
"Magnetic field control commands.");
61 G4String commandName = directoryName;
62 commandName.append(
"fieldType");
64 G4String guidance =
"Select type of the field";
65 fFieldTypeCmd->SetGuidance(guidance);
66 fFieldTypeCmd->SetParameterName(
"FieldType",
false);
73 fFieldTypeCmd->SetCandidates(candidates);
74 fFieldTypeCmd->AvailableForStates(
77 commandName = directoryName;
78 commandName.append(
"equationType");
80 guidance =
"Select type of the equation of motion of a particle in a field";
81 fEquationTypeCmd->SetGuidance(guidance);
82 fEquationTypeCmd->SetParameterName(
"EquationType",
false);
89 fEquationTypeCmd->SetCandidates(candidates);
90 fEquationTypeCmd->AvailableForStates(
93 commandName = directoryName;
94 commandName.append(
"stepperType");
97 "Select type of the the integrator of particle's equation of motion in a "
99 fStepperTypeCmd->SetGuidance(guidance);
100 fStepperTypeCmd->SetParameterName(
"StepperType",
false);
108 fStepperTypeCmd->SetCandidates(candidates);
109 fStepperTypeCmd->AvailableForStates(
112 commandName = directoryName;
113 commandName.append(
"setMinimumStep");
115 fSetMinimumStepCmd->SetGuidance(
"Set minimum step in G4ChordFinder");
116 fSetMinimumStepCmd->SetParameterName(
"StepMinimum",
false);
117 fSetMinimumStepCmd->SetDefaultUnit(
"mm");
118 fSetMinimumStepCmd->SetUnitCategory(
"Length");
119 fSetMinimumStepCmd->AvailableForStates(
122 commandName = directoryName;
123 commandName.append(
"setDeltaChord");
125 fSetDeltaChordCmd->SetGuidance(
"Set delta chord in G4ChordFinder");
126 fSetDeltaChordCmd->SetParameterName(
"DeltaChord",
false);
127 fSetDeltaChordCmd->SetDefaultUnit(
"mm");
128 fSetDeltaChordCmd->SetUnitCategory(
"Length");
129 fSetDeltaChordCmd->AvailableForStates(
132 commandName = directoryName;
133 commandName.append(
"setDeltaOneStep");
135 fSetDeltaOneStepCmd->SetGuidance(
136 "Set delta one step in global field manager");
137 fSetDeltaOneStepCmd->SetParameterName(
"DeltaOneStep",
false);
138 fSetDeltaOneStepCmd->SetDefaultUnit(
"mm");
139 fSetDeltaOneStepCmd->SetUnitCategory(
"Length");
140 fSetDeltaOneStepCmd->AvailableForStates(
143 commandName = directoryName;
144 commandName.append(
"setDeltaIntersection");
146 fSetDeltaIntersectionCmd->SetGuidance(
147 "Set delta intersection in global field manager");
148 fSetDeltaIntersectionCmd->SetParameterName(
"DeltaIntersection",
false);
149 fSetDeltaIntersectionCmd->SetDefaultUnit(
"mm");
150 fSetDeltaIntersectionCmd->SetUnitCategory(
"Length");
151 fSetDeltaIntersectionCmd->AvailableForStates(
154 commandName = directoryName;
155 commandName.append(
"setMinimumEpsilonStep");
157 fSetMinimumEpsilonStepCmd->SetGuidance(
158 "Set minimum epsilon step in global field manager");
159 fSetMinimumEpsilonStepCmd->SetParameterName(
"MinimumEpsilonStep",
false);
160 fSetMinimumEpsilonStepCmd->AvailableForStates(
163 commandName = directoryName;
164 commandName.append(
"setMaximumEpsilonStep");
166 fSetMaximumEpsilonStepCmd->SetGuidance(
167 "Set maximum epsilon step in global field manager");
168 fSetMaximumEpsilonStepCmd->SetParameterName(
"MaximumEpsilonStep",
false);
169 fSetMaximumEpsilonStepCmd->AvailableForStates(
172 commandName = directoryName;
173 commandName.append(
"setConstDistance");
175 fSetConstDistanceCmd->SetGuidance(
176 "Set the distance within which the field is considered constant.");
177 fSetConstDistanceCmd->SetGuidance(
178 "Non-zero value will trigger creating a cached magnetic field.");
179 fSetConstDistanceCmd->SetParameterName(
"ConstDistance",
false);
180 fSetConstDistanceCmd->SetDefaultUnit(
"mm");
181 fSetConstDistanceCmd->SetUnitCategory(
"Length");
182 fSetConstDistanceCmd->SetRange(
"ConstDistance >= 0");
185 commandName = std::move(directoryName);
186 commandName.append(
"printParameters");
188 fPrintParametersCmd->SetGuidance(
"Prints all accuracy parameters.");
189 fPrintParametersCmd->AvailableForStates(
221 if (command == fFieldTypeCmd) {
225 fFieldParameters->SetFieldType(ft);
232 if (command == fEquationTypeCmd) {
236 fFieldParameters->SetEquationType(et);
243 if (command == fStepperTypeCmd) {
247 fFieldParameters->SetStepperType(st);
254 if (command == fSetMinimumStepCmd) {
255 fFieldParameters->SetMinimumStep(
256 fSetMinimumStepCmd->GetNewDoubleValue(newValues));
260 if (command == fSetDeltaChordCmd) {
261 fFieldParameters->SetDeltaChord(
262 fSetDeltaChordCmd->GetNewDoubleValue(newValues));
266 if (command == fSetDeltaOneStepCmd) {
267 fFieldParameters->SetDeltaOneStep(
268 fSetDeltaOneStepCmd->GetNewDoubleValue(newValues));
272 if (command == fSetDeltaIntersectionCmd) {
273 fFieldParameters->SetDeltaIntersection(
274 fSetDeltaIntersectionCmd->GetNewDoubleValue(newValues));
278 if (command == fSetMinimumEpsilonStepCmd) {
279 fFieldParameters->SetMinimumEpsilonStep(
280 fSetMinimumEpsilonStepCmd->GetNewDoubleValue(newValues));
284 if (command == fSetMaximumEpsilonStepCmd) {
285 fFieldParameters->SetMaximumEpsilonStep(
286 fSetMaximumEpsilonStepCmd->GetNewDoubleValue(newValues));
290 if (command == fSetConstDistanceCmd) {
291 fFieldParameters->SetConstDistance(
292 fSetConstDistanceCmd->GetNewDoubleValue(newValues));
296 if (command == fPrintParametersCmd) {
297 fFieldParameters->PrintParameters();