7 #ifndef Pythia8_LHAPowheg_H
8 #define Pythia8_LHAPowheg_H
10 #include "Pythia8Plugins/LHAFortran.h"
24 int rnd_numseeds, rnd_initialseed, rnd_iwhichseed;
25 char rnd_cwhichseed[4];
40 void resetcnt_(
const char *
string,
int length);
46 double powheginput_(
const char *
string,
int length);
83 char cwd[FILENAME_MAX];
91 LHAupPowheg::LHAupPowheg(
Pythia *pythiaIn) : dir(
"./") {
94 if (pythia && pythia->settings.isWord(
"POWHEG:dir"))
95 dir = pythia->settings.word(
"POWHEG:dir");
96 if (pythia && pythia->settings.isFlag(
"POWHEG:pythiaRandom"))
97 random = pythia->settings.flag(
"POWHEG:pythiaRandom");
98 mkdir(dir.c_str(), 0777);
106 bool LHAupPowheg::fillHepRup() {
109 if (!pythia)
return false;
110 getcwd(cwd,
sizeof(cwd));
112 strcpy(pwhg_rnd_.rnd_cwhichseed,
"none");
118 resetcnt_(
"upper bound failure in inclusive cross section", 46);
119 resetcnt_(
"vetoed calls in inclusive cross section", 39);
120 resetcnt_(
"upper bound failures in generation of radiation", 47);
121 resetcnt_(
"vetoed radiation", 16);
131 bool LHAupPowheg::fillHepEup() {
134 if (!pythia)
return false;
135 getcwd(cwd,
sizeof(cwd));
142 r48st1_.c = pythia->rndm.flat();
143 for (
int i = 0; i < 97; ++i) r48st1_.u[i] = pythia->rndm.flat();
159 LHAupPowheg* newLHAupPowheg(Pythia *PythiaIn) {
160 return new LHAupPowheg(PythiaIn);}
162 void deleteLHAupPowheg(LHAupPowheg *lhaupIn) {
delete lhaupIn;}
170 #endif // Pythia8_LHAPowheg_H