37 #include "G4UIdirectory.hh" 38 #include "G4UIcmdWithAString.hh" 39 #include "G4UIcmdWithAnInteger.hh" 40 #include "G4UIcmdWithADoubleAndUnit.hh" 41 #include "G4UIcmdWithoutParameter.hh" 47 :ExN03Detector(ExN03Det)
49 N03Dir =
new G4UIdirectory(
"/N03/");
50 N03Dir->SetGuidance(
"UI commands of this example");
52 detDir =
new G4UIdirectory(
"/N03/det/");
53 detDir->SetGuidance(
"detector control");
55 AbsMaterCmd =
new G4UIcmdWithAString(
"/N03/det/setAbsMat",
this);
56 AbsMaterCmd->SetGuidance(
"Select Material of the Absorber.");
58 AbsMaterCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
60 GapMaterCmd =
new G4UIcmdWithAString(
"/N03/det/setGapMat",
this);
61 GapMaterCmd->SetGuidance(
"Select Material of the Gap.");
63 GapMaterCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
65 AbsThickCmd =
new G4UIcmdWithADoubleAndUnit(
"/N03/det/setAbsThick",
this);
66 AbsThickCmd->SetGuidance(
"Set Thickness of the Absorber");
70 AbsThickCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
72 GapThickCmd =
new G4UIcmdWithADoubleAndUnit(
"/N03/det/setGapThick",
this);
73 GapThickCmd->SetGuidance(
"Set Thickness of the Gap");
77 GapThickCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
79 SizeYZCmd =
new G4UIcmdWithADoubleAndUnit(
"/N03/det/setSizeYZ",
this);
80 SizeYZCmd->SetGuidance(
"Set tranverse size of the calorimeter");
81 SizeYZCmd->SetParameterName(
"Size",
false);
84 SizeYZCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
86 NbLayersCmd =
new G4UIcmdWithAnInteger(
"/N03/det/setNbOfLayers",
this);
89 NbLayersCmd->SetRange(
"NbLayers>0 && NbLayers<500");
90 NbLayersCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
92 UpdateCmd =
new G4UIcmdWithoutParameter(
"/N03/det/update",
this);
93 UpdateCmd->SetGuidance(
"Update calorimeter geometry.");
94 UpdateCmd->SetGuidance(
"This command MUST be applied before \"beamOn\" ");
95 UpdateCmd->SetGuidance(
"if you changed geometrical value(s).");
96 UpdateCmd->AvailableForStates(G4State_Idle);
98 MagFieldCmd =
new G4UIcmdWithADoubleAndUnit(
"/N03/det/setField",
this);
100 MagFieldCmd->SetGuidance(
"Magnetic field will be in Z direction.");
102 MagFieldCmd->SetUnitCategory(
"Magnetic flux density");
103 MagFieldCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
131 ->GetNewDoubleValue(newValue));}
G4UIcmdWithADoubleAndUnit * AbsThickCmd
void SetGapThickness(G4double)
void SetCalorSizeYZ(G4double)
G4UIcmdWithAnInteger * NbLayersCmd
void SetNewValue(G4UIcommand *, G4String)
G4UIcmdWithADoubleAndUnit * SizeYZCmd
G4UIcmdWithoutParameter * UpdateCmd
ExN03DetectorConstruction * ExN03Detector
void SetGapMaterial(G4String)
G4UIcmdWithAString * AbsMaterCmd
void SetAbsorberThickness(G4double)
G4UIcmdWithAString * GapMaterCmd
G4UIcmdWithADoubleAndUnit * GapThickCmd
void SetMagField(G4double)
void SetNbOfLayers(G4int)
~ExN03DetectorMessenger()
ExN03DetectorMessenger(ExN03DetectorConstruction *)
G4UIcmdWithADoubleAndUnit * MagFieldCmd
void SetAbsorberMaterial(G4String)