16 #include "G4RunManager.hh" 22 #include "G4UIcommand.hh" 23 #include "G4UIdirectory.hh" 24 #include "G4UIcmdWithAString.hh" 25 #include "G4UIcmdWithAnInteger.hh" 26 #include "G4UIcmdWithADoubleAndUnit.hh" 27 #include "G4UIcmdWith3VectorAndUnit.hh" 28 #include "G4UIcmdWithoutParameter.hh" 29 #include "G4Tokenizer.hh" 58 :ActarSimDetector(ActarSimDet), ActarSimGasDetector(ActarSimGasDet){
63 detDir =
new G4UIdirectory(
"/ActarSim/det/gas/");
64 detDir->SetGuidance(
"gas detector control");
66 gasMaterCmd =
new G4UIcmdWithAString(
"/ActarSim/det/gas/setGasMat",
this);
67 gasMaterCmd->SetGuidance(
"Select Material of the Gas (for the Gas box and the Chamber).");
70 gasMaterCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
72 gasPresCmd =
new G4UIcmdWithADoubleAndUnit(
"/ActarSim/det/gas/setGasPressure",
this);
73 gasPresCmd->SetGuidance(
"Select the Gas Pressure (for the Gas box and the Chamber).");
74 gasPresCmd->SetParameterName(
"gasPressure",
false);
79 gasPresCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
81 gasTempCmd =
new G4UIcmdWithADoubleAndUnit(
"/ActarSim/det/gas/setGasTemperature",
this);
82 gasTempCmd->SetGuidance(
"Select the Gas Temperature (for the Gas box and the Chamber).");
83 gasTempCmd->SetParameterName(
"gasTemperature",
false);
88 gasTempCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
90 beamShieldMaterCmd =
new G4UIcmdWithAString(
"/ActarSim/det/gas/setBeamShieldMat",
this);
103 setBeamShieldCmd =
new G4UIcmdWithAString(
"/ActarSim/det/gas/setBeamShield",
this);
104 setBeamShieldCmd->SetGuidance(
"Sets a beam shield and selects the geometry.");
110 gasBoxSizeXCmd =
new G4UIcmdWithADoubleAndUnit(
"/ActarSim/det/gas/setXLengthGasBox",
this);
111 gasBoxSizeXCmd->SetGuidance(
"Select the half-length X dimension of the Gas Box.");
117 gasBoxSizeYCmd =
new G4UIcmdWithADoubleAndUnit(
"/ActarSim/det/gas/setYLengthGasBox",
this);
118 gasBoxSizeYCmd->SetGuidance(
"Select the half-length Y dimension of the Gas Box.");
124 gasBoxSizeZCmd =
new G4UIcmdWithADoubleAndUnit(
"/ActarSim/det/gas/setZLengthGasBox",
this);
125 gasBoxSizeZCmd->SetGuidance(
"Select the half-length Z dimension of the Gas Box.");
131 gasBoxCenterXCmd =
new G4UIcmdWithADoubleAndUnit(
"/ActarSim/det/gas/setXCenterGasBox",
this);
132 gasBoxCenterXCmd->SetGuidance(
"Select the X offset of the Gas Box center.");
137 gasBoxCenterYCmd =
new G4UIcmdWithADoubleAndUnit(
"/ActarSim/det/gas/setYCenterGasBox",
this);
138 gasBoxCenterYCmd->SetGuidance(
"Select the Y offset of the Gas Box center.");
143 gasBoxCenterZCmd =
new G4UIcmdWithADoubleAndUnit(
"/ActarSim/det/gas/setZCenterGasBox",
this);
144 gasBoxCenterZCmd->SetGuidance(
"Select the Z offset of the Gas Box center.");
149 radiusGasTubCmd =
new G4UIcmdWithADoubleAndUnit(
"/ActarSim/det/gas/setRadiusGasTub",
this);
150 radiusGasTubCmd->SetGuidance(
"Select the external radius of the Gas Tube.");
156 lengthGasTubCmd =
new G4UIcmdWithADoubleAndUnit(
"/ActarSim/det/gas/setLengthGasTub",
this);
157 lengthGasTubCmd->SetGuidance(
"Select the half-length of the Gas Tube.");
184 printCmd =
new G4UIcmdWithoutParameter(
"/ActarSim/det/gas/print",
this);
185 printCmd->SetGuidance(
"Prints geometry.");
186 printCmd->AvailableForStates(G4State_Idle);
188 detDirMix =
new G4UIdirectory(
"/ActarSim/det/gas/mixture/");
189 detDirMix->SetGuidance(
"gas mixture control");
191 gasMixtureFlagCmd =
new G4UIcmdWithAnInteger(
"/ActarSim/det/gas/mixture/GasMixture",
this);
192 gasMixtureFlagCmd->SetGuidance(
"Set a Gas Mixture with N number of elements (default 0).");
201 gasMixtureCmd =
new G4UIcommand(
"/ActarSim/det/gas/mixture/setGasMix",
this);
202 gasMixtureCmd->SetGuidance(
"Set a Gas Mixture (for the Gas box and the Chamber).");
203 gasMixtureCmd->SetGuidance(
"[usage] /ActarSim/det/gas/setGasMix GasNum GasMat GasRatio");
204 gasMixtureCmd->SetGuidance(
" GasNum:(int) GasNumber (from 1 to 7)");
205 gasMixtureCmd->SetGuidance(
" GasMat:(string) Gas Material from the list");
206 gasMixtureCmd->SetGuidance(
" GasRatio:(double) Gas Ratio in Mixture (from 0 to 1)");
208 G4UIparameter* gasMixtureParam;
209 gasMixtureParam =
new G4UIparameter(
"GasNum",
'i',
false);
210 gasMixtureParam->SetDefaultValue(
"1");
211 gasMixtureParam->SetParameterRange(
"GasNum>0");
212 gasMixtureParam->SetParameterRange(
"GasNum<10");
214 gasMixtureParam =
new G4UIparameter(
"GasMat",
's',
false);
215 gasMixtureParam->SetDefaultValue(
"D2");
216 gasMixtureParam->SetParameterCandidates(
"H2 D2 He Ar CF4 CH4 iC4H10");
218 gasMixtureParam =
new G4UIparameter(
"GasRatio",
'd',
false);
219 gasMixtureParam->SetDefaultValue(
"0");
220 gasMixtureParam->SetParameterRange(
"GasRatio>=0.");
221 gasMixtureParam->SetParameterRange(
"GasRatio<=1.");
327 G4Tokenizer next( newValues );
G4UIcmdWithADoubleAndUnit * gasBoxCenterZCmd
Select the Z offset of the Gas Box center.
G4UIcmdWithADoubleAndUnit * gasBoxCenterYCmd
Select the Y offset of the Gas Box center.
ActarSimGasDetectorMessenger(ActarSimDetectorConstruction *, ActarSimGasDetectorConstruction *)
void SetGasPressure(G4double val)
void SetGasBoxSizeZ(G4double val)
G4UIcmdWithAString * detectorGeometryCmd
Select the geometry of the detector.
void SetBeamShieldMaterial(G4String)
Sets the material the medium is made of.
void SetGasMaterial(G4String)
G4UIcmdWithADoubleAndUnit * lengthGasTubCmd
Select the half-length of the Gas Tube.
void GasMixtureCommand(G4String newValues)
Selection of the mixture gases.
void PrintDetectorParameters()
Prints Gas volume detector parameters.
void SetLengthGasTub(G4double val)
G4UIcmdWithoutParameter * printCmd
Prints geometry.
G4UIcmdWithADoubleAndUnit * gasBoxSizeXCmd
Select the half-length X dimension of the Gas Box.
void SetInnerRadiusBeamShieldTub(G4double val)
G4UIcmdWithADoubleAndUnit * radiusGasTubCmd
Select the external radius of the Gas Tube.
void SetBeamShieldGeometry(G4String)
Sets the geometry of the detector (box or tube)
G4int fGasNumber
Gas mixture parameters: number.
void SetOuterRadiusBeamShieldTub(G4double val)
G4UIcmdWithAnInteger * gasMixtureFlagCmd
Set a Gas Mixture with N number of elements (default 0).
G4UIcmdWithADoubleAndUnit * gasBoxSizeYCmd
Select the half-length Y dimension of the Gas Box.
G4UIcmdWithAString * beamShieldMaterCmd
Select Material of the beam shield.
void SetGasBoxCenterZ(G4double val)
G4UIcmdWithADoubleAndUnit * gasBoxCenterXCmd
Select the X offset of the Gas Box center.
G4double fGasRatio
Gas mixture parameters: ratio.
void SetDetectorGeometry(G4String)
Sets the geometry of the detector (box or tube)
void SetRadiusGasTub(G4double val)
G4UIdirectory * detDir
Directory.
void SetGasBoxSizeY(G4double val)
G4UIcmdWithADoubleAndUnit * gasTempCmd
Select the Gas Temperature (for the Gas box and the Chamber).
void SetNewValue(G4UIcommand *, G4String)
Setting the new values and connecting to actions.
G4UIcmdWithAString * setBeamShieldCmd
Sets a beam shield and selects the geometry.
G4UIcmdWithAString * gasMaterCmd
Select Material of the Gas (for the Gas box and the Chamber).
void SetGasMixture(G4int val)
G4UIcmdWithADoubleAndUnit * gasBoxSizeZCmd
Select the half-length Z dimension of the Gas Box.
G4UIcmdWithADoubleAndUnit * outerRadiusBeamShieldTubCmd
Select the external radius of the Gas Tube.
void SetGasTemperature(G4double val)
G4UIcmdWithADoubleAndUnit * gasPresCmd
Select the Gas Pressure (for the Gas box and the Chamber).
G4UIcmdWithADoubleAndUnit * lengthBeamShieldTubCmd
Select the half-length of the Gas Tube.
ActarSimDetectorConstruction * ActarSimDetector
Pointer to main detector geometry class.
ActarSimGasDetectorConstruction * ActarSimGasDetector
Pointer to main gas detector geometry class.
G4UIcommand * gasMixtureCmd
Set a Gas Mixture (for the Gas box and the Chamber).
~ActarSimGasDetectorMessenger()
Destructor.
void SetGasMixMaterial(G4int GasNum, G4String GasMat, G4double GasRatio)
G4String fGasMaterial
Gas mixture parameters: material.
G4UIdirectory * detDirMix
Directory for gas mix.
G4UIcmdWithADoubleAndUnit * innerRadiusBeamShieldTubCmd
Select the internal radius of the Gas Tube.
void SetGasBoxCenterY(G4double val)
void SetGasBoxSizeX(G4double val)
void SetLengthBeamShieldTub(G4double val)