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);
56 class LHAupPowheg :
public LHAupFortran {
61 LHAupPowheg(Pythia *pythiaIn =
nullptr);
78 char cwd[FILENAME_MAX];
86 LHAupPowheg::LHAupPowheg(Pythia *pythia) : dir(
"./") {
88 if (pythia && pythia->settings.isWord(
"POWHEG:dir"))
89 dir = pythia->settings.word(
"POWHEG:dir");
90 if (pythia && pythia->settings.flag(
"POWHEG:pythiaRandom"))
92 mkdir(dir.c_str(), 0777);
100 bool LHAupPowheg::fillHepRup() {
103 getcwd(cwd,
sizeof(cwd));
105 strcpy(pwhg_rnd_.rnd_cwhichseed,
"none");
111 resetcnt_(
"upper bound failure in inclusive cross section", 46);
112 resetcnt_(
"vetoed calls in inclusive cross section", 39);
113 resetcnt_(
"upper bound failures in generation of radiation", 47);
114 resetcnt_(
"vetoed radiation", 16);
124 bool LHAupPowheg::fillHepEup() {
127 getcwd(cwd,
sizeof(cwd));
131 if (rndm !=
nullptr) {
134 r48st1_.c = rndm->flat();
135 for (
int i = 0; i < 97; ++i) r48st1_.u[i] = rndm->flat();
151 LHAupPowheg* newLHAup(Pythia *pythia) {
return new LHAupPowheg(pythia);}
153 void deleteLHAup(LHAupPowheg* lha) {
delete lha;}
161 #endif // Pythia8_LHAPowheg_H