37 :passiveProton(beamLine)
41 changeTheBeamLineDir -> SetGuidance(
"Command to change the transport beam line");
43 changeTheBeamLineNameCmd =
new G4UIcmdWithAString(
"/ChangeBeamLine/beamLineName",
this);
44 changeTheBeamLineNameCmd -> SetGuidance(
"Insert the name of the beam line you want simulate");
45 changeTheBeamLineNameCmd -> SetParameterName(
"List",
false);
49 modulatorDir -> SetGuidance(
"Command to rotate the modulator wheel");
52 beamLineDir -> SetGuidance(
"set specification of range shifter");
54 rangeShifterDir =
new G4UIdirectory(
"/beamLine/RangeShifter/");
55 rangeShifterDir -> SetGuidance(
"set specification of range shifter");
57 firstScatteringFoilDir =
new G4UIdirectory(
"/beamLine/ScatteringFoil1/");
58 firstScatteringFoilDir -> SetGuidance(
"set specification of first scattering foil");
60 secondScatteringFoilDir =
new G4UIdirectory(
"/beamLine/ScatteringFoil2/");
61 secondScatteringFoilDir -> SetGuidance(
"set specification of second scattering foil");
64 rangeStopperDir -> SetGuidance(
"set specification of stopper");
66 finalCollimatorDir =
new G4UIdirectory(
"/beamLine/FinalCollimator/");
67 finalCollimatorDir -> SetGuidance(
"set specification of final collimator");
70 modulatorAngleCmd -> SetGuidance(
"Set Modulator Angle");
71 modulatorAngleCmd -> SetParameterName(
"Size",
false);
72 modulatorAngleCmd -> SetRange(
"Size>=0.");
73 modulatorAngleCmd -> SetUnitCategory(
"Angle");
77 rangeShifterMatCmd -> SetGuidance(
"Set material of range shifter");
78 rangeShifterMatCmd -> SetParameterName(
"choice",
false);
82 rangeShifterXSizeCmd -> SetGuidance(
"Set half of the thickness of range shifter along X axis");
83 rangeShifterXSizeCmd -> SetParameterName(
"Size",
false);
84 rangeShifterXSizeCmd -> SetDefaultUnit(
"mm");
85 rangeShifterXSizeCmd -> SetUnitCandidates(
"mm cm m");
86 rangeShifterXSizeCmd -> AvailableForStates(
G4State_Idle);
89 rangeShifterXPositionCmd -> SetGuidance(
"Set position of range shifter");
90 rangeShifterXPositionCmd -> SetParameterName(
"Size",
false);
91 rangeShifterXPositionCmd -> SetDefaultUnit(
"mm");
92 rangeShifterXPositionCmd -> SetUnitCandidates(
"mm cm m");
93 rangeShifterXPositionCmd -> AvailableForStates(
G4State_Idle);
96 firstScatteringFoilXSizeCmd -> SetGuidance(
"Set half thickness of first scattering foil");
97 firstScatteringFoilXSizeCmd -> SetParameterName(
"Size",
false);
98 firstScatteringFoilXSizeCmd -> SetDefaultUnit(
"mm");
99 firstScatteringFoilXSizeCmd -> SetUnitCandidates(
"mm cm m");
100 firstScatteringFoilXSizeCmd -> AvailableForStates(
G4State_Idle);
103 secondScatteringFoilXSizeCmd -> SetGuidance(
"Set half thickness of second scattering foil");
104 secondScatteringFoilXSizeCmd -> SetParameterName(
"Size",
false);
105 secondScatteringFoilXSizeCmd -> SetDefaultUnit(
"mm");
106 secondScatteringFoilXSizeCmd -> SetUnitCandidates(
"mm cm m");
107 secondScatteringFoilXSizeCmd -> AvailableForStates(
G4State_Idle);
110 outerRadiusStopperCmd -> SetGuidance(
"Set size of outer radius");
111 outerRadiusStopperCmd -> SetParameterName(
"Size",
false);
112 outerRadiusStopperCmd -> SetDefaultUnit(
"mm");
113 outerRadiusStopperCmd -> SetUnitCandidates(
"mm cm m");
114 outerRadiusStopperCmd -> AvailableForStates(
G4State_Idle);
117 innerRadiusFinalCollimatorCmd -> SetGuidance(
"Set size of inner radius ( max 21.5 mm)");
118 innerRadiusFinalCollimatorCmd -> SetParameterName(
"Size",
false);
119 innerRadiusFinalCollimatorCmd -> SetDefaultUnit(
"mm");
120 innerRadiusFinalCollimatorCmd -> SetUnitCandidates(
"mm cm m");
121 innerRadiusFinalCollimatorCmd -> AvailableForStates(
G4State_Idle);
126 delete innerRadiusFinalCollimatorCmd;
127 delete outerRadiusStopperCmd;
128 delete secondScatteringFoilXSizeCmd;
129 delete firstScatteringFoilXSizeCmd;
130 delete rangeShifterXPositionCmd;
131 delete rangeShifterXSizeCmd;
132 delete rangeShifterMatCmd;
133 delete modulatorAngleCmd;
134 delete finalCollimatorDir;
135 delete rangeStopperDir;
136 delete secondScatteringFoilDir;
137 delete firstScatteringFoilDir;
138 delete rangeShifterDir;
148 if( command == modulatorAngleCmd )
149 { passiveProton -> SetModulatorAngle
150 (modulatorAngleCmd -> GetNewDoubleValue(newValue));}
152 else if( command == rangeShifterMatCmd )
153 { passiveProton -> SetRSMaterial(newValue);}
155 else if( command == rangeShifterXSizeCmd )
156 { passiveProton -> SetRangeShifterXSize
157 (rangeShifterXSizeCmd -> GetNewDoubleValue(newValue));}
159 else if( command == rangeShifterXPositionCmd )
160 { passiveProton -> SetRangeShifterXPosition
161 (rangeShifterXPositionCmd -> GetNewDoubleValue(newValue));}
163 else if( command == firstScatteringFoilXSizeCmd )
164 { passiveProton -> SetFirstScatteringFoilXSize
165 (firstScatteringFoilXSizeCmd -> GetNewDoubleValue(newValue));}
167 else if( command == secondScatteringFoilXSizeCmd )
168 { passiveProton -> SetSecondScatteringFoilXSize
169 (secondScatteringFoilXSizeCmd -> GetNewDoubleValue(newValue));}
171 else if( command == outerRadiusStopperCmd )
172 { passiveProton -> SetOuterRadiusStopper(
173 outerRadiusStopperCmd -> GetNewDoubleValue(newValue));}
175 else if( command == innerRadiusFinalCollimatorCmd )
176 { passiveProton -> SetInnerRadiusFinalCollimator
177 (innerRadiusFinalCollimatorCmd -> GetNewDoubleValue(newValue));}
PassiveProtonBeamLineMessenger(PassiveProtonBeamLine *)
void SetNewValue(G4UIcommand *, G4String)
~PassiveProtonBeamLineMessenger()