20:myAction(mpga)
21{
23 G4bool omittable;
24 particleTable = G4ParticleTable::GetParticleTable();
25
26 generatorDirectory = new G4UIdirectory("/generator/");
27 generatorDirectory->SetGuidance("BESIII event gnerator");
28
29 gennamCmd = new G4UIcmdWithAString("/generator/name",this);
30 gennamCmd->SetGuidance("Select your event gerator: genbes or tester");
31 gennamCmd->SetGuidance("The default generator is tester");
32 gennamCmd->SetParameterName("name",true);
33 gennamCmd->SetDefaultValue("tester");
34 gennamCmd->SetCandidates("tester cosmic genbes");
35
36 genbesCmd = new G4UIcmdWithAString("/generator/genbes",this);
37 genbesCmd->SetGuidance("The BES data file");
38 genbesCmd->SetGuidance("directory/filename");
39 genbesCmd->SetParameterName("name",false);
40
41 testerCmd = new G4UIcommand("/generator/tester",this);
42 testerCmd->SetGuidance("The BES TESTER generator");
43 testerCmd->SetGuidance("NP PID Cosmin Cosmax phimin phimax p delp");
44
45 cosmicCmd = new G4UIcommand("/generator/cosmic",this);
46 cosmicCmd->SetGuidance("The cosmic generator");
47 cosmicCmd->SetGuidance("PID x y z");
48
49 parameter =
new G4UIparameter(
"np",
'i',omittable =
true);
50 parameter->SetGuidance(
"Number of particles in an event");
54
55 parameter =
new G4UIparameter(
"pname",
's',omittable =
true);
56 parameter->SetGuidance(
"Particle name in Geant4");
58 G4String candidatelist;
59 G4int nPtable = particleTable->entries();
60 for(G4int i=0;i<nPtable;i++)
61 {
62 candidatelist += particleTable->GetParticleName(i);
63 candidatelist += " ";
64 }
65 parameter->SetParameterCandidates(candidatelist);
67
68 parameter =
new G4UIparameter(
"cosmin",
'd',omittable =
true);
69 parameter->SetGuidance(
"Minimum cos(theta)");
70 parameter->SetParameterRange(
"cosmin >= -1. && cosmin <= 1.");
73
74 parameter =
new G4UIparameter(
"cosmax",
'd',omittable =
true);
75 parameter->SetGuidance(
"Maximum cos(theta)");
76 parameter->SetParameterRange(
"cosmax >= -1. && cosmax <= 1.");
79
80 parameter =
new G4UIparameter(
"phimin",
'd',omittable =
true);
81 parameter->SetGuidance(
"Minimum azimuthal angle in degree");
82 parameter->SetParameterRange(
"phimin >= 0. && phimin <= 360.");
85
86 parameter =
new G4UIparameter(
"phimax",
'd',omittable =
true);
87 parameter->SetGuidance(
"Maximum azimuthal angle in degree");
88 parameter->SetParameterRange(
"phimax >= 0. && phimax <= 360.");
91
92 parameter =
new G4UIparameter(
"pp",
'd',omittable =
true);
93 parameter->SetGuidance(
"Particle Momentum in GeV");
97
98 parameter =
new G4UIparameter(
"dp",
'd',omittable =
true);
99 parameter->SetGuidance(
"Particle Momentum range in GeV");
103
104 parameter =
new G4UIparameter(
"x",
'd',omittable =
true);
105 parameter->SetGuidance(
"Particle x position");
106 parameter->SetParameterRange(
"x >= -10000 && x <= 10000");
109
110 parameter =
new G4UIparameter(
"y",
'd',omittable =
true);
111 parameter->SetGuidance(
"Particle y position");
112 parameter->SetParameterRange(
"y >= -10000 && y <= 10000");
115
116 parameter =
new G4UIparameter(
"z",
'd',omittable =
true);
117 parameter->SetGuidance(
"Particle z position");
118 parameter->SetParameterRange(
"z >= -10000 && z <= 10000");
121
122 parameter =
new G4UIparameter(
"pname",
's',omittable =
true);
123 parameter->SetGuidance(
"Particle name in Geant4");
126
127 parameter =
new G4UIparameter(
"x",
'd',omittable =
true);
128 parameter->SetGuidance(
"Particle x position");
129 parameter->SetParameterRange(
"x >= -10000 && x <= 10000");
132
133 parameter =
new G4UIparameter(
"y",
'd',omittable =
true);
134 parameter->SetGuidance(
"Particle y position");
135 parameter->SetParameterRange(
"y >= -10000 && y <= 10000");
138
139 parameter =
new G4UIparameter(
"z",
'd',omittable =
true);
140 parameter->SetGuidance(
"Particle z position");
141 parameter->SetParameterRange(
"z >= -10000 && z <= 10000");
144
145}
double precision pisqo6 parameter(pi=3.14159265358979d0, pisq=pi *pi, pisqo6=pisq/6d0) double precision zip