31 #ifdef G4LIB_USE_PYTHIA
39 #include "HepMCG4PythiaMessenger.hh"
40 #include "HepMCG4PythiaInterface.hh"
47 dir-> SetGuidance(
"Commands for Pythia event generation");
50 verbose-> SetGuidance(
"set verbose level");
51 verbose-> SetParameterName(
"verboseLevel",
false,
false);
52 verbose-> SetRange(
"verboseLevel>=0 && verboseLevel<=2");
55 mpylist-> SetGuidance(
"set argument of pylist (not called if mlist=0)");
56 mpylist-> SetParameterName(
"mlist",
false,
false);
57 mpylist-> SetRange(
"mlist>=0 && mlist<=3");
60 print-> SetGuidance(
"print user information.");
62 cpyinit=
new G4UIcommand(
"/generator/pythia/pyinit",
this);
63 cpyinit-> SetGuidance(
"call PYINIT");
66 cpyinit-> SetParameter(frame);
68 cpyinit-> SetParameter(beam);
70 cpyinit-> SetParameter(target);
72 cpyinit-> SetParameter(win);
75 cpystat-> SetGuidance(
"call PYSTAT");
76 cpystat-> SetParameterName(
"mstat",
false,
false);
77 cpystat-> SetRange(
"mstat>=1 && mstat<=5");
79 cpygive=
new G4UIcommand(
"/generator/pythia/pygive",
this);
80 cpygive-> SetGuidance(
"call PYGIVE");
82 cpygive-> SetParameter(parameter);
87 SetGuidance(
"Set user parameters in the Pythia common blocks");
90 setSeed-> SetGuidance(
"set initial seed.");
92 cpyrget=
new G4UIcommand(
"/generator/pythia/pyrget",
this);
93 cpyrget-> SetGuidance(
"call PYRGET");
96 cpyrget-> SetParameter(lun);
97 move=
new G4UIparameter(
"choice of adding a new record",
'i',
true);
98 move-> SetDefaultValue(-1);
99 cpyrget-> SetParameter(move);
101 cpyrset=
new G4UIcommand(
"/generator/pythia/pyrset",
this);
102 cpyrset-> SetGuidance(
"call PYRSET");
104 cpyrset-> SetParameter(lun);
105 move=
new G4UIparameter(
"choice of adding a new record",
'i',
true);
106 move-> SetDefaultValue(0);
107 cpyrset-> SetParameter(move);
111 printRandomStatus-> SetGuidance(
"print random number status.");
112 printRandomStatus-> SetParameterName(
"filename",
true,
false);
113 printRandomStatus-> SetDefaultValue(
"std::cout");
140 gen-> SetVerboseLevel(level);
142 }
else if (command ==
mpylist) {
144 gen-> SetPylist(mlist);
146 }
else if (command ==
print) {
149 }
else if (command ==
cpyinit) {
150 const char* strvaluelist= newValues.c_str();
151 std::istringstream is(strvaluelist);
153 is >> sframe >> sbeam >> starget >> dwin;
154 gen-> CallPyinit(sframe, sbeam, starget, dwin);
156 }
else if (command ==
cpystat) {
158 gen-> CallPystat(imod);
160 }
else if (command ==
cpygive) {
165 gen-> SetUserParameters();
167 }
else if (command ==
setSeed) {
169 gen-> SetRandomSeed(iseed);
171 }
else if (command ==
cpyrget) {
172 const char* strvaluelist= newValues.c_str();
173 std::istringstream is(strvaluelist);
176 gen-> CallPyrget(lun, move);
178 }
else if (command ==
cpyrset) {
179 const char* strvaluelist= newValues.c_str();
180 std::istringstream is(strvaluelist);
183 gen-> CallPyrset(lun, move);
187 if (newValues ==
"std::cout") {
188 gen-> PrintRandomStatus();
192 ofs.open(s.c_str(), std::ios::out);
194 ofs.setf(std::ios::fixed | std::ios::showpoint);
195 gen-> PrintRandomStatus(ofs);
207 }
else if (command ==
mpylist) {