47 #include "G4UIdirectory.hh"
48 #include "G4UIcmdWithABool.hh"
49 #include "G4UIcmdWithAString.hh"
50 #include "G4UIcmdWithAnInteger.hh"
51 #include "G4UIcmdWith3Vector.hh"
52 #include "G4UIcmdWithADoubleAndUnit.hh"
53 #include "G4UIcmdWithoutParameter.hh"
61 ftestDir =
new G4UIdirectory(
"/testhadr/");
62 ftestDir->SetGuidance(
" Hadronic Extended Example.");
64 fmatCmd =
new G4UIcmdWithAString(
"/testhadr/TargetMat",
this);
65 fmatCmd->SetGuidance(
"Select Material for the target");
66 fmatCmd->SetParameterName(
"tMaterial",
false);
67 fmatCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
69 fmat1Cmd =
new G4UIcmdWithAString(
"/testhadr/WorldMat",
this);
70 fmat1Cmd->SetGuidance(
"Select Material for world");
71 fmat1Cmd->SetParameterName(
"wMaterial",
false);
72 fmat1Cmd->AvailableForStates(G4State_PreInit,G4State_Idle);
74 frCmd =
new G4UIcmdWithADoubleAndUnit(
"/testhadr/TargetRadius",
this);
75 frCmd->SetGuidance(
"Set radius of the target");
76 frCmd->SetParameterName(
"radius",
false);
77 frCmd->SetUnitCategory(
"Length");
78 frCmd->SetRange(
"radius>0");
79 frCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
81 flCmd =
new G4UIcmdWithADoubleAndUnit(
"/testhadr/TargetLength",
this);
82 flCmd->SetGuidance(
"Set length of the target");
83 flCmd->SetParameterName(
"length",
false);
84 flCmd->SetUnitCategory(
"Length");
85 flCmd->SetRange(
"length>0");
86 flCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
88 fbinCmd =
new G4UIcmdWithAnInteger(
"/testhadr/nBinsE",
this);
89 fbinCmd->SetGuidance(
"Set number of bins for energy");
90 fbinCmd->SetParameterName(
"NEbins",
false);
91 fbinCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
93 fnOfAbsCmd =
new G4UIcmdWithAnInteger(
"/testhadr/nBinsP",
this);
94 fnOfAbsCmd->SetGuidance(
"Set number of bins for momentum");
96 fnOfAbsCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
98 fupdateCmd =
new G4UIcmdWithoutParameter(
"/testhadr/update",
this);
100 fupdateCmd->SetGuidance(
"This command MUST be applied before \"beamOn\" ");
101 fupdateCmd->SetGuidance(
"if you changed geometrical value(s)");
102 fupdateCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
104 fpartCmd =
new G4UIcmdWithAString(
"/testhadr/particle",
this);
105 fpartCmd->SetGuidance(
"Set particle name");
106 fpartCmd->SetParameterName(
"Particle",
false);
107 fpartCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
109 fcsCmd =
new G4UIcmdWithAString(
"/testhadr/targetElm",
this);
110 fcsCmd->SetGuidance(
"Set element name");
111 fcsCmd->SetParameterName(
"Elm",
false);
112 fcsCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
114 fe1Cmd =
new G4UIcmdWithADoubleAndUnit(
"/testhadr/minEnergy",
this);
115 fe1Cmd->SetGuidance(
"Set min kinetic energy");
116 fe1Cmd->SetParameterName(
"eMin",
false);
117 fe1Cmd->SetUnitCategory(
"Energy");
118 fe1Cmd->AvailableForStates(G4State_PreInit,G4State_Idle);
120 fe2Cmd =
new G4UIcmdWithADoubleAndUnit(
"/testhadr/maxEnergy",
this);
121 fe2Cmd->SetGuidance(
"Set max kinetic energy");
122 fe2Cmd->SetParameterName(
"eMax",
false);
123 fe2Cmd->SetUnitCategory(
"Energy");
124 fe2Cmd->AvailableForStates(G4State_PreInit,G4State_Idle);
126 fp1Cmd =
new G4UIcmdWithADoubleAndUnit(
"/testhadr/minMomentum",
this);
127 fp1Cmd->SetGuidance(
"Set min momentum");
128 fp1Cmd->SetParameterName(
"pMin",
false);
129 fp1Cmd->SetUnitCategory(
"Energy");
130 fp1Cmd->AvailableForStates(G4State_PreInit,G4State_Idle);
132 fp2Cmd =
new G4UIcmdWithADoubleAndUnit(
"/testhadr/maxMomentum",
this);
133 fp2Cmd->SetGuidance(
"Set max momentum");
134 fp2Cmd->SetParameterName(
"pMax",
false);
135 fp2Cmd->SetUnitCategory(
"Energy");
136 fp2Cmd->AvailableForStates(G4State_PreInit,G4State_Idle);
138 fverbCmd =
new G4UIcmdWithAnInteger(
"/testhadr/verbose",
this);
139 fverbCmd->SetGuidance(
"Set verbose for ");
140 fverbCmd->SetParameterName(
"verb",
false);
141 fverbCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
173 }
else if( command ==
frCmd ) {
175 }
else if( command ==
flCmd ) {
179 }
else if( command ==
fbinCmd ) {
187 }
else if( command ==
fcsCmd ) {
189 }
else if( command ==
fe1Cmd ) {
191 }
else if( command ==
fe2Cmd ) {
193 }
else if( command ==
fp1Cmd ) {
195 }
else if( command ==
fp2Cmd ) {
void SetParticleName(const G4String &)
G4UIcmdWithADoubleAndUnit * fe2Cmd
void SetNumberOfBinsP(G4int val)
G4UIcmdWithADoubleAndUnit * frCmd
void SetMaxKinEnergy(G4double val)
G4UIcmdWithADoubleAndUnit * fp1Cmd
G4UIcmdWithAString * fpartCmd
G4UIcmdWithAString * fcsCmd
void SetTargetMaterial(const G4String &)
void SetWorldMaterial(const G4String &)
void SetTargetRadius(G4double val)
virtual ~DetectorMessenger()
G4UIcmdWithADoubleAndUnit * fp2Cmd
void SetMinMomentum(G4double val)
DetectorMessenger(DetectorConstruction *)
void SetMaxMomentum(G4double val)
G4UIcmdWithADoubleAndUnit * flCmd
G4UIcmdWithAnInteger * fverbCmd
void SetVerbose(G4int val)
G4UIcmdWithAString * fmat1Cmd
G4UIcmdWithAnInteger * fnOfAbsCmd
G4UIcmdWithAString * fmatCmd
G4UIcmdWithADoubleAndUnit * fe1Cmd
void SetMinKinEnergy(G4double val)
G4UIcmdWithoutParameter * fupdateCmd
G4UIcmdWithAnInteger * fbinCmd
DetectorConstruction * fDetector
virtual void SetNewValue(G4UIcommand *, G4String)
void SetTargetLength(G4double val)
static HistoManager * GetPointer()
void SetElementName(const G4String &)
void SetNumberOfBinsE(G4int val)