4#include "G4UIdirectory.hh"
5#include "G4UIcmdWithAString.hh"
6#include "G4UIcmdWithAnInteger.hh"
7#include "G4UIcmdWithADouble.hh"
8#include "G4UIcmdWithADoubleAndUnit.hh"
9#include "G4UIcmdWithoutParameter.hh"
14 F01detDir=
new G4UIdirectory(
"/field/");
15 F01detDir->SetGuidance(
"Bes MagneticField tracking control.");
17 StepperCmd=
new G4UIcmdWithAnInteger(
"/field/SetStepperType",
this);
18 StepperCmd->SetGuidance(
"Select stepper type for magnetic field");
19 StepperCmd->SetParameterName(
"choice",
true);
20 StepperCmd->SetDefaultValue(4);
21 StepperCmd->SetRange(
"choice>=0&&choice<=9");
23 MinStepCmd=
new G4UIcmdWithADoubleAndUnit(
"/field/SetMinStep",
this);
24 MinStepCmd->SetGuidance(
"Please change it carefully,it is better keep it const");
25 MinStepCmd->SetParameterName(
"MinStep",
true);
26 MinStepCmd->SetDefaultUnit(
"mm");
27 MinStepCmd->SetDefaultValue(0.01);
28 MinStepCmd->SetRange(
"MinStep>=0&&MinStep<=1");
30 DeltaOneStepCmd=
new G4UIcmdWithADoubleAndUnit(
"/field/SetDeltaOneStep",
this);
31 DeltaOneStepCmd->SetGuidance(
"Set DeltaOneStep for tracking");
32 DeltaOneStepCmd->SetParameterName(
"DeltaOneStep",
true);
33 DeltaOneStepCmd->SetDefaultUnit(
"mm");
34 DeltaOneStepCmd->SetDefaultValue(0.01);
35 DeltaOneStepCmd->SetRange(
"DeltaOneStep>=0");
37 DeltaIntersectionCmd=
new G4UIcmdWithADoubleAndUnit(
"/field/SetDeltaIntersection",
this);
38 DeltaIntersectionCmd->SetGuidance(
"Set DeltaIntersection for tracking");
39 DeltaIntersectionCmd->SetParameterName(
"DeltaIntersection",
true);
40 DeltaIntersectionCmd->SetDefaultUnit(
"mm");
41 DeltaIntersectionCmd->SetDefaultValue(0.001);
42 DeltaIntersectionCmd->SetRange(
"DeltaIntersection>=0");
44 MinimumEpsilonStepCmd=
new G4UIcmdWithADouble(
"/field/SetMinimumEpsilonStep",
this);
45 MinimumEpsilonStepCmd->SetGuidance(
"Set Minimum Epsilon Step for tracking");
46 MinimumEpsilonStepCmd->SetParameterName(
"MinimumEpsilonStep",
true);
47 MinimumEpsilonStepCmd->SetDefaultValue(5.0e-5);
48 MinimumEpsilonStepCmd->SetRange(
"MinimumEpsilonStep>=0");
50 MaximumEpsilonStepCmd=
new G4UIcmdWithADouble(
"/field/SetMaximumEpsilonStep",
this);
51 MaximumEpsilonStepCmd->SetGuidance(
"Set Maximum Epsilon Step for tracking");
52 MaximumEpsilonStepCmd->SetParameterName(
"MaximumEpsilonStep",
true);
53 MaximumEpsilonStepCmd->SetDefaultValue(1.0e-3);
54 MaximumEpsilonStepCmd->SetRange(
"MaximumEpsilonStep>=0");
59 delete MaximumEpsilonStepCmd;
60 delete MinimumEpsilonStepCmd;
61 delete DeltaIntersectionCmd;
62 delete DeltaOneStepCmd;
71 if(command==StepperCmd)
73 fEMfieldSetup->
SetStepperType(StepperCmd->GetNewIntValue(newvalue));
76 if(command==MinStepCmd)
78 fEMfieldSetup->
SetMinStep(MinStepCmd->GetNewDoubleValue(newvalue));
81 if(command==DeltaOneStepCmd)
83 fEMfieldSetup->
SetDeltaOneStep(DeltaOneStepCmd->GetNewDoubleValue(newvalue));
85 if(command==DeltaIntersectionCmd)
89 if(command==MinimumEpsilonStepCmd)
93 if(command==MaximumEpsilonStepCmd)
~BesMagneticFieldMessenger()
BesMagneticFieldMessenger(BesMagneticField *)
void SetNewValue(G4UIcommand *, G4String)
void SetMaximumEpsilonStep(double newvalue)
void CreateStepperAndChordFinder()
void SetDeltaIntersection(double newvalue)
void SetStepperType(G4int i)
void SetMinimumEpsilonStep(double newvalue)
void SetMinStep(G4double s)
void SetDeltaOneStep(double newvalue)