36 #include "G4UIdirectory.hh" 37 #include "G4UIcmdWithAString.hh" 38 #include "G4UIcmdWithAnInteger.hh" 39 #include "G4UIcmdWithADoubleAndUnit.hh" 40 #include "G4UIcmdWithoutParameter.hh" 46 :ExN03Detector(ExN03Det)
48 N03Dir =
new G4UIdirectory(
"/N03/");
49 N03Dir->SetGuidance(
"UI commands of this example");
51 detDir =
new G4UIdirectory(
"/N03/det/");
52 detDir->SetGuidance(
"detector control");
54 AbsMaterCmd =
new G4UIcmdWithAString(
"/N03/det/setAbsMat",
this);
55 AbsMaterCmd->SetGuidance(
"Select Material of the Absorber.");
57 AbsMaterCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
59 GapMaterCmd =
new G4UIcmdWithAString(
"/N03/det/setGapMat",
this);
60 GapMaterCmd->SetGuidance(
"Select Material of the Gap.");
62 GapMaterCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
64 AbsThickCmd =
new G4UIcmdWithADoubleAndUnit(
"/N03/det/setAbsThick",
this);
65 AbsThickCmd->SetGuidance(
"Set Thickness of the Absorber");
69 AbsThickCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
71 GapThickCmd =
new G4UIcmdWithADoubleAndUnit(
"/N03/det/setGapThick",
this);
72 GapThickCmd->SetGuidance(
"Set Thickness of the Gap");
76 GapThickCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
78 SizeYZCmd =
new G4UIcmdWithADoubleAndUnit(
"/N03/det/setSizeYZ",
this);
79 SizeYZCmd->SetGuidance(
"Set tranverse size of the calorimeter");
80 SizeYZCmd->SetParameterName(
"Size",
false);
83 SizeYZCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
85 NbLayersCmd =
new G4UIcmdWithAnInteger(
"/N03/det/setNbOfLayers",
this);
88 NbLayersCmd->SetRange(
"NbLayers>0 && NbLayers<500");
89 NbLayersCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
91 UpdateCmd =
new G4UIcmdWithoutParameter(
"/N03/det/update",
this);
92 UpdateCmd->SetGuidance(
"Update calorimeter geometry.");
93 UpdateCmd->SetGuidance(
"This command MUST be applied before \"beamOn\" ");
94 UpdateCmd->SetGuidance(
"if you changed geometrical value(s).");
95 UpdateCmd->AvailableForStates(G4State_Idle);
97 MagFieldCmd =
new G4UIcmdWithADoubleAndUnit(
"/N03/det/setField",
this);
99 MagFieldCmd->SetGuidance(
"Magnetic field will be in Z direction.");
101 MagFieldCmd->SetUnitCategory(
"Magnetic flux density");
102 MagFieldCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
130 ->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)