3 #include "G4UIdirectory.hh"
4 #include "G4UIcmdWithAString.hh"
8 :myAction(pointerToAction)
13 genCmd =
new G4UIcmdWithAString(
"/mygen/generator",
this);
14 genCmd->SetGuidance(
"Select primary generator.");
16 genCmd->SetGuidance(
" Available generators : muline, gun, laser, gps, radioactive, radon");
17 genCmd->SetParameterName(
"generator",
true);
18 genCmd->SetDefaultValue(
"muline");
20 genCmd->SetCandidates(
"muline gun laser gps radioactive radon");
22 fileNameCmd =
new G4UIcmdWithAString(
"/mygen/vecfile",
this);
23 fileNameCmd->SetGuidance(
"Select the file of vectors.");
24 fileNameCmd->SetGuidance(
" Enter the file name of the vector file");
28 timeUnitCmd =
new G4UIcmdWithAString(
"/mygen/time_unit",
this);
29 timeUnitCmd->SetGuidance(
"Define the units used for tme in the input file.");
30 timeUnitCmd->SetGuidance(
"Can be picosecond, ps, ns, nanosecond, ms, millisecond, s, sec or second");
31 timeUnitCmd->SetGuidance(
"Default if not set is nanosecond");
40 isotopeCmd =
new G4UIcmdWithAString(
"/mygen/isotope",
this);
41 isotopeCmd->SetGuidance(
"Select properties of radioactive isotope");
42 isotopeCmd->SetGuidance(
"[usage] /mygen/isotope ISOTOPE LOCATION ACTIVITY");
43 isotopeCmd->SetGuidance(
" ISOTOPE : Tl208, Bi214, K40");
44 isotopeCmd->SetGuidance(
" LOCATION : water PMT");
45 isotopeCmd->SetGuidance(
" ACTIVITY : (int) activity of isotope (Bq) ");
47 param =
new G4UIparameter(
"ISOTOPE",
's',
true);
48 param->SetDefaultValue(
"Tl208");
50 param =
new G4UIparameter(
"LOCATION",
's',
true);
51 param->SetDefaultValue(
"water");
53 param =
new G4UIparameter(
"ACTIVITY",
'd',
true);
54 param->SetDefaultValue(
"0");
62 param =
new G4UIparameter(
"SCENARIO",
's',
true);
63 param->SetDefaultValue(
"C");
66 radonGeoSymCmd =
new G4UIcmdWithAnInteger(
"/mygen/radon_symmetry",
this);
70 param =
new G4UIparameter(
"SYMMETRY",
'd',
true);
71 param->SetDefaultValue(
"1");
85 if (newValue ==
"muline")
94 else if ( newValue ==
"gun")
103 else if ( newValue ==
"laser")
112 else if ( newValue ==
"gps")
121 else if ( newValue ==
"radioactive")
130 else if ( newValue ==
"radon" )
144 G4cout <<
"Input vector file set to " << newValue << G4endl;
170 G4cout <<
"Time unit set to " << newValue << G4endl;
199 G4Tokenizer next( newValue );
201 G4String isotope = next();
202 G4String location = next();
203 G4double activity = StoD(next());
210 G4Tokenizer next( newValue );
212 G4String scenario = next();
215 if ( scenario ==
"A" ) iScenario = 1;
216 if ( scenario ==
"B" ) iScenario = 2;
217 if ( scenario ==
"C" ) iScenario = 3;
void SetGPSEvtGenerator(G4bool choice)
G4UIcmdWithAString * fileNameCmd
void SetNewValue(G4UIcommand *command, G4String newValues)
G4UIcmdWithAString * timeUnitCmd
void SetRadioactiveEvtGenerator(G4bool choice)
void SetTimeUnit(G4String choice)
void RadonScalingCommand(G4String newValue)
WCSimPrimaryGeneratorMessenger(WCSimPrimaryGeneratorAction *mpga)
G4UIcmdWithAString * radonScalingCmd
void SetMulineEvtGenerator(G4bool choice)
G4bool IsUsingMulineEvtGenerator()
void SetRadonSymmetry(G4int choice)
G4bool IsUsingGunEvtGenerator()
~WCSimPrimaryGeneratorMessenger()
G4UIcmdWithADouble * radioactive_time_window_Cmd
G4UIcmdWithAnInteger * radonGeoSymCmd
G4UIcmdWithAString * isotopeCmd
G4bool IsUsingLaserEvtGenerator()
void SetRadonEvtGenerator(G4bool choice)
WCSimPrimaryGeneratorAction * myAction
G4String GetCurrentValue(G4UIcommand *command)
void OpenVectorFile(G4String fileName)
void SetGunEvtGenerator(G4bool choice)
G4bool IsUsingGPSEvtGenerator()
G4bool IsUsingRadonEvtGenerator()
void IsotopeCommand(G4String newValue)
void AddRadioactiveSource(G4String IsotopeName, G4String IsotopeLocation, G4double IsotopeActivity)
void SetRadonScenario(G4int choice)
G4UIcmdWithAString * genCmd
G4UIdirectory * mydetDirectory
void SetRadioactiveTimeWindow(G4double choice)
void SetLaserEvtGenerator(G4bool choice)