16 #include "G4UIdirectory.hh" 17 #include "G4UIcmdWithAString.hh" 18 #include "G4UIcmdWithAnInteger.hh" 19 #include "G4UIcmdWithADouble.hh" 20 #include "G4UIcmdWithADoubleAndUnit.hh" 21 #include "G4UIcmdWith3VectorAndUnit.hh" 22 #include "G4UIcmdWith3Vector.hh" 23 #include "G4UIcmdWithoutParameter.hh" 53 :ActarSimDetector(ActarSimDet) {
56 ActarSimDir->SetGuidance(
"UI commands of ActarSim program");
58 detDir =
new G4UIdirectory(
"/ActarSim/det/");
59 detDir->SetGuidance(
"Detector control");
101 worldSizeXCmd =
new G4UIcmdWithADoubleAndUnit(
"/ActarSim/det/setWorldSizeX",
this);
102 worldSizeXCmd->SetGuidance(
"Select the half-length X dimension of the World.");
106 worldSizeXCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
108 worldSizeYCmd =
new G4UIcmdWithADoubleAndUnit(
"/ActarSim/det/setWorldSizeY",
this);
109 worldSizeYCmd->SetGuidance(
"Select the half-length Y dimension of the World.");
113 worldSizeYCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
115 worldSizeZCmd =
new G4UIcmdWithADoubleAndUnit(
"/ActarSim/det/setWorldSizeZ",
this);
116 worldSizeZCmd->SetGuidance(
"Select the half-length Z dimension of the World.");
120 worldSizeZCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
122 chamberSizeXCmd =
new G4UIcmdWithADoubleAndUnit(
"/ActarSim/det/setXLengthGasChamber",
this);
123 chamberSizeXCmd->SetGuidance(
"Select the half-length X dimension of the Gas Chamber.");
129 chamberSizeYCmd =
new G4UIcmdWithADoubleAndUnit(
"/ActarSim/det/setYLengthGasChamber",
this);
130 chamberSizeYCmd->SetGuidance(
"Select the half-length Y dimension of the Gas Chamber.");
136 chamberSizeZCmd =
new G4UIcmdWithADoubleAndUnit(
"/ActarSim/det/setZLengthGasChamber",
this);
137 chamberSizeZCmd->SetGuidance(
"Select the half-length Z dimension of the Gas Chamber.");
143 chamberCenterXCmd =
new G4UIcmdWithADoubleAndUnit(
"/ActarSim/det/setXCenterChamber",
this);
149 chamberCenterYCmd =
new G4UIcmdWithADoubleAndUnit(
"/ActarSim/det/setYCenterChamber",
this);
155 chamberCenterZCmd =
new G4UIcmdWithADoubleAndUnit(
"/ActarSim/det/setZCenterChamber",
this);
162 gasGeoIncludedFlagCmd->SetGuidance(
"Includes the geometry of the gas volume in the simulation (default on).");
170 silGeoIncludedFlagCmd->SetGuidance(
"Includes the geometry of the silicons in the simulation (default off).");
178 sciGeoIncludedFlagCmd->SetGuidance(
"Includes the geometry of the scintillator in the simulation (default off).");
192 chamberMaterialCmd->SetGuidance(
"Select Material in the Chamber (but not in the gas!).");
197 eleFieldCmd =
new G4UIcmdWith3Vector(
"/ActarSim/det/setEleField",
this);
198 eleFieldCmd->SetGuidance(
"Define electric field.");
199 eleFieldCmd->SetGuidance(
"Usage: /ActarSim/det/setEleField Ex Ey Ez (in MV/mm)");
200 eleFieldCmd->SetGuidance(
"Use the command update after setting a field.");
201 eleFieldCmd->SetParameterName(
"Ex",
"Ey",
"Ez",
false,
false);
204 eleFieldCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
206 magFieldCmd =
new G4UIcmdWith3VectorAndUnit(
"/ActarSim/det/setMagField",
this);
207 magFieldCmd->SetGuidance(
"Define magnetic field.");
208 magFieldCmd->SetGuidance(
"Usage: /ActarSim/det/setMagField Bx By Bz unit");
209 magFieldCmd->SetGuidance(
"Use the command update after setting a field.");
210 magFieldCmd->SetParameterName(
"Bx",
"By",
"Bz",
false,
false);
211 magFieldCmd->SetUnitCategory(
"Magnetic flux density");
212 magFieldCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
214 updateCmd =
new G4UIcmdWithoutParameter(
"/ActarSim/det/update",
this);
215 updateCmd->SetGuidance(
"Update geometry.");
216 updateCmd->SetGuidance(
"This command MUST be applied before \"beamOn\" ");
217 updateCmd->SetGuidance(
"if you changed geometrical value(s).");
218 updateCmd->AvailableForStates(G4State_Idle);
220 printCmd =
new G4UIcmdWithoutParameter(
"/ActarSim/det/print",
this);
221 printCmd->SetGuidance(
"Prints geometry.");
222 printCmd->AvailableForStates(G4State_Idle);
void SetMagField(G4ThreeVector mVector)
Setting the uniform magnetic field vector.
G4UIcmdWithADoubleAndUnit * chamberCenterXCmd
Select the X offset of the Chamber center.
void SetChamberSizeY(G4double val)
ActarSimDetectorConstruction * ActarSimDetector
Pointer to detector class.
void SetChamberSizeZ(G4double val)
~ActarSimDetectorMessenger()
Destructor.
G4UIcmdWithAString * chamberMaterialCmd
Select Material in the Chamber (but not in the gas!).
G4UIcmdWithAString * silGeoIncludedFlagCmd
Includes the geometry of the silicons in the simulation (default off).
void SetNewValue(G4UIcommand *, G4String)
Setting the values using the ActarSimDetectorConstruction interface.
ActarSimDetectorMessenger(ActarSimDetectorConstruction *)
G4UIcmdWithADoubleAndUnit * chamberSizeXCmd
Select the half-length X dimension of the Gas Chamber.
G4UIcmdWithAString * mediumMaterialCmd
Select Material outside the Chamber.
void SetSpecMATGeoIncludedFlag(G4String val)
G4UIcmdWithAString * MaikoGeoIncludedFlagCmd
Includes the Maiko geometry in the simulation (default off).
G4UIcmdWithAString * SpecMATGeoIncludedFlagCmd
Includes the SpecMAT geometry in the simulation (default off).
G4UIcmdWith3VectorAndUnit * magFieldCmd
Define magnetic field.
G4UIcmdWithAString * sciGeoIncludedFlagCmd
Includes the geometry of the scintillator in the simulation (default off).
G4UIcmdWithADoubleAndUnit * chamberCenterZCmd
Select the Z offset of the Chamber center.
void SetWorldSizeX(G4double val)
G4UIcmdWithADoubleAndUnit * chamberSizeYCmd
Select the half-length Y dimension of the Gas Chamber.
void SetOthersGeoIncludedFlag(G4String val)
G4UIcmdWithADoubleAndUnit * worldSizeXCmd
Select the half-length X dimension of the World.
void SetChamberMaterial(G4String)
Sets the material the chamber is made of (the same as GasBox)
G4UIcmdWithAString * ACTARTPCGeoIncludedFlagCmd
Includes the ACTARTPC geometry in the simulation (default off).
G4UIcmdWith3Vector * eleFieldCmd
Define electric field.
void SetMaikoGeoIncludedFlag(G4String val)
G4UIcmdWithADoubleAndUnit * worldSizeYCmd
Select the half-length Y dimension of the World.
G4UIcmdWithADoubleAndUnit * chamberCenterYCmd
Select the Y offset of the Chamber center.
void SetACTARTPCGeoIncludedFlag(G4String val)
G4UIcmdWithADoubleAndUnit * chamberSizeZCmd
Select the half-length Z dimension of the Gas Chamber.
void SetWorldSizeY(G4double val)
void UpdateGeometry()
Updates any change on the geometry of the detectors.
G4UIcmdWithoutParameter * updateCmd
Update geometry.
void SetSilGeoIncludedFlag(G4String val)
void SetMediumMaterial(G4String)
Sets the material the medium is made of.
G4UIcmdWithAString * ACTARTPCDEMOGeoIncludedFlagCmd
Includes the ACTARTPC Demonstrator geometry in the simulation (default off).
void SetChamberSizeX(G4double val)
void PrintDetectorParameters()
Print current detector parameters.
G4UIcmdWithAString * OthersGeoIncludedFlagCmd
Includes Other geometries in the simulation (default off).
G4UIcmdWithADoubleAndUnit * worldSizeZCmd
Select the half-length Z dimension of the World.
G4UIcmdWithAString * gasGeoIncludedFlagCmd
Includes the geometry of the gas volume in the simulation (default on).
void UpdateEMField()
Setting the uniform EM field.
void SetSciGeoIncludedFlag(G4String val)
G4UIdirectory * ActarSimDir
Directory in messenger structure.
void SetACTARTPCDEMOGeoIncludedFlag(G4String val)
G4UIdirectory * detDir
Directory in messenger structure.
G4UIcmdWithoutParameter * printCmd
Prints geometry.
void SetEleField(G4ThreeVector eVector)
void SetGasGeoIncludedFlag(G4String val)
void SetWorldSizeZ(G4double val)