43 :passiveProton(beamLine)
47 changeTheBeamLineDir -> SetGuidance(
"Command to change the transport beam line");
49 changeTheBeamLineNameCmd =
new G4UIcmdWithAString(
"/ChangeBeamLine/beamLineName",
this);
50 changeTheBeamLineNameCmd -> SetGuidance(
"Insert the name of the beam line you want simulate");
51 changeTheBeamLineNameCmd -> SetParameterName(
"List",
false);
55 modulatorDir -> SetGuidance(
"Command to rotate the modulator wheel");
58 beamLineDir -> SetGuidance(
"set specification of range shifter");
60 rangeShifterDir =
new G4UIdirectory(
"/beamLine/RangeShifter/");
61 rangeShifterDir -> SetGuidance(
"set specification of range shifter");
63 firstScatteringFoilDir =
new G4UIdirectory(
"/beamLine/ScatteringFoil1/");
64 firstScatteringFoilDir -> SetGuidance(
"set specification of first scattering foil");
66 secondScatteringFoilDir =
new G4UIdirectory(
"/beamLine/ScatteringFoil2/");
67 secondScatteringFoilDir -> SetGuidance(
"set specification of second scattering foil");
70 rangeStopperDir -> SetGuidance(
"set specification of stopper");
72 finalCollimatorDir =
new G4UIdirectory(
"/beamLine/FinalCollimator/");
73 finalCollimatorDir -> SetGuidance(
"set specification of final collimator");
76 modulatorAngleCmd -> SetGuidance(
"Set Modulator Angle");
77 modulatorAngleCmd -> SetParameterName(
"Size",
false);
78 modulatorAngleCmd -> SetRange(
"Size>=0.");
79 modulatorAngleCmd -> SetUnitCategory(
"Angle");
83 rangeShifterMatCmd -> SetGuidance(
"Set material of range shifter");
84 rangeShifterMatCmd -> SetParameterName(
"choice",
false);
88 rangeShifterXSizeCmd -> SetGuidance(
"Set half of the thickness of range shifter along X axis");
89 rangeShifterXSizeCmd -> SetParameterName(
"Size",
false);
90 rangeShifterXSizeCmd -> SetDefaultUnit(
"mm");
91 rangeShifterXSizeCmd -> SetUnitCandidates(
"mm cm m");
92 rangeShifterXSizeCmd -> AvailableForStates(
G4State_Idle);
95 rangeShifterXPositionCmd -> SetGuidance(
"Set position of range shifter");
96 rangeShifterXPositionCmd -> SetParameterName(
"Size",
false);
97 rangeShifterXPositionCmd -> SetDefaultUnit(
"mm");
98 rangeShifterXPositionCmd -> SetUnitCandidates(
"mm cm m");
99 rangeShifterXPositionCmd -> AvailableForStates(
G4State_Idle);
102 firstScatteringFoilXSizeCmd -> SetGuidance(
"Set half thickness of first scattering foil");
103 firstScatteringFoilXSizeCmd -> SetParameterName(
"Size",
false);
104 firstScatteringFoilXSizeCmd -> SetDefaultUnit(
"mm");
105 firstScatteringFoilXSizeCmd -> SetUnitCandidates(
"mm cm m");
106 firstScatteringFoilXSizeCmd -> AvailableForStates(
G4State_Idle);
109 secondScatteringFoilXSizeCmd -> SetGuidance(
"Set half thickness of second scattering foil");
110 secondScatteringFoilXSizeCmd -> SetParameterName(
"Size",
false);
111 secondScatteringFoilXSizeCmd -> SetDefaultUnit(
"mm");
112 secondScatteringFoilXSizeCmd -> SetUnitCandidates(
"mm cm m");
113 secondScatteringFoilXSizeCmd -> AvailableForStates(
G4State_Idle);
116 outerRadiusStopperCmd -> SetGuidance(
"Set size of outer radius");
117 outerRadiusStopperCmd -> SetParameterName(
"Size",
false);
118 outerRadiusStopperCmd -> SetDefaultUnit(
"mm");
119 outerRadiusStopperCmd -> SetUnitCandidates(
"mm cm m");
120 outerRadiusStopperCmd -> AvailableForStates(
G4State_Idle);
123 innerRadiusFinalCollimatorCmd -> SetGuidance(
"Set size of inner radius ( max 21.5 mm)");
124 innerRadiusFinalCollimatorCmd -> SetParameterName(
"Size",
false);
125 innerRadiusFinalCollimatorCmd -> SetDefaultUnit(
"mm");
126 innerRadiusFinalCollimatorCmd -> SetUnitCandidates(
"mm cm m");
127 innerRadiusFinalCollimatorCmd -> AvailableForStates(
G4State_Idle);
132 delete innerRadiusFinalCollimatorCmd;
133 delete outerRadiusStopperCmd;
134 delete secondScatteringFoilXSizeCmd;
135 delete firstScatteringFoilXSizeCmd;
136 delete rangeShifterXPositionCmd;
137 delete rangeShifterXSizeCmd;
138 delete rangeShifterMatCmd;
139 delete modulatorAngleCmd;
140 delete finalCollimatorDir;
141 delete rangeStopperDir;
142 delete secondScatteringFoilDir;
143 delete firstScatteringFoilDir;
144 delete rangeShifterDir;
154 if( command == modulatorAngleCmd )
155 { passiveProton -> SetModulatorAngle
156 (modulatorAngleCmd -> GetNewDoubleValue(newValue));}
158 else if( command == rangeShifterMatCmd )
159 { passiveProton -> SetRSMaterial(newValue);}
161 else if( command == rangeShifterXSizeCmd )
162 { passiveProton -> SetRangeShifterXSize
163 (rangeShifterXSizeCmd -> GetNewDoubleValue(newValue));}
165 else if( command == rangeShifterXPositionCmd )
166 { passiveProton -> SetRangeShifterXPosition
167 (rangeShifterXPositionCmd -> GetNewDoubleValue(newValue));}
169 else if( command == firstScatteringFoilXSizeCmd )
170 { passiveProton -> SetFirstScatteringFoilXSize
171 (firstScatteringFoilXSizeCmd -> GetNewDoubleValue(newValue));}
173 else if( command == secondScatteringFoilXSizeCmd )
174 { passiveProton -> SetSecondScatteringFoilXSize
175 (secondScatteringFoilXSizeCmd -> GetNewDoubleValue(newValue));}
177 else if( command == outerRadiusStopperCmd )
178 { passiveProton -> SetOuterRadiusStopper(
179 outerRadiusStopperCmd -> GetNewDoubleValue(newValue));}
181 else if( command == innerRadiusFinalCollimatorCmd )
182 { passiveProton -> SetInnerRadiusFinalCollimator
183 (innerRadiusFinalCollimatorCmd -> GetNewDoubleValue(newValue));}