13 : fEMfieldSetup( pEMfieldSetup ) {
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" );
70 if ( command == StepperCmd )
72 fEMfieldSetup->SetStepperType( StepperCmd->GetNewIntValue( newvalue ) );
73 fEMfieldSetup->CreateStepperAndChordFinder();
75 if ( command == MinStepCmd )
77 fEMfieldSetup->SetMinStep( MinStepCmd->GetNewDoubleValue( newvalue ) );
78 fEMfieldSetup->CreateStepperAndChordFinder();
80 if ( command == DeltaOneStepCmd )
81 { fEMfieldSetup->SetDeltaOneStep( DeltaOneStepCmd->GetNewDoubleValue( newvalue ) ); }
82 if ( command == DeltaIntersectionCmd )
84 fEMfieldSetup->SetDeltaIntersection( DeltaIntersectionCmd->GetNewDoubleValue( newvalue ) );
86 if ( command == MinimumEpsilonStepCmd )
88 fEMfieldSetup->SetMinimumEpsilonStep(
89 MinimumEpsilonStepCmd->GetNewDoubleValue( newvalue ) );
91 if ( command == MaximumEpsilonStepCmd )
93 fEMfieldSetup->SetMaximumEpsilonStep(
94 MaximumEpsilonStepCmd->GetNewDoubleValue( newvalue ) );