22 #ifndef Pythia8_GeneratorInput_H 23 #define Pythia8_GeneratorInput_H 26 #include "Pythia8/Pythia.h" 43 bool parse(
const string paramStr);
50 return (params.find(paramIn) == params.end()) ?
false :
true; }
55 return (
haveParam(paramIn)) ? params[paramIn] : 0.; }
56 int getParamAsInt(
const string ¶mIn) {
57 return (
haveParam(paramIn)) ? int(params[paramIn]) : 0.; }
65 void warnParamOverwrite(
const string ¶mIn,
double val);
68 static string trim(
string s);
71 map<string,double> params;
74 static const double ZEROTHRESHOLD;
99 void printParticles();
104 bool addResonances();
107 bool rescaleMomenta();
110 string baseFN, parFN, unwFN;
113 double ebmupA, ebmupB;
118 vector<LHAParticle> myParticles;
121 static const bool LHADEBUG, LHADEBUGRESCALE;
122 static const double ZEROTHRESHOLD, EWARNTHRESHOLD, PTWARNTHRESHOLD,
142 bool initAfterBeams();
147 shared_ptr<LHAupAlpgen> LHAagPtr;
164 bool parse(
const string paramStr);
171 return (params.find(paramIn) == params.end()) ?
false :
true; }
176 return (
haveParam(paramIn)) ? params[paramIn] : 0.; }
177 int getParamAsInt(
const string ¶mIn) {
178 return (
haveParam(paramIn)) ? int(params[paramIn]) : 0.; }
186 void warnParamOverwrite(
const string ¶mIn,
double val);
189 static string trim(
string s);
192 map<string,double> params;
195 static const double ZEROTHRESHOLD;
211 const double AlpgenPar::ZEROTHRESHOLD = 1e-10;
227 stringstream paramStream(paramStr);
229 while (getline(paramStream, line)) {
232 if (line.find(
"run parameters") != string::npos) {
236 }
else if (line.find(
"end parameters") != string::npos) {
240 }
else if (block == 0) {
259 size_t idx = line.rfind(
"!");
260 if (idx == string::npos)
return;
261 string paramName = trim(line.substr(idx + 1));
262 string paramVal = trim(line.substr(0, idx));
263 istringstream iss(paramVal);
267 if (paramName ==
"hard process code") {
269 warnParamOverwrite(
"hpc", val);
273 }
else if (paramName.find(
"Crosssection") == 0) {
275 iss >> val >> xerrup;
276 warnParamOverwrite(
"xsecup", val);
277 warnParamOverwrite(
"xerrup", val);
278 params[
"xsecup"] = val;
279 params[
"xerrup"] = xerrup;
282 }
else if (paramName.find(
"unwtd events") == 0) {
284 iss >> nevent >> val;
285 warnParamOverwrite(
"nevent", val);
286 warnParamOverwrite(
"lum", val);
287 params[
"nevent"] = nevent;
291 }
else if (paramName.find(
",") != string::npos) {
295 istringstream issName(paramName);
296 while (getline(issName, paramNameNow,
',')) {
298 warnParamOverwrite(paramNameNow, val);
299 params[paramNameNow] = val;
305 iss >> paramIdx >> val;
306 warnParamOverwrite(paramName, val);
307 params[paramName] = val;
318 cout << fixed << setprecision(3) << endl
319 <<
" *------- Alpgen parameters -------*" << endl;
320 for (map < string, double >::iterator it = params.begin();
321 it != params.end(); ++it)
322 cout <<
" | " << left << setw(13) << it->first
323 <<
" | " << right << setw(13) << it->second
325 cout <<
" *-----------------------------------*" << endl;
332 inline void AlpgenPar::warnParamOverwrite(
const string ¶mIn,
double val) {
336 abs(
getParam(paramIn) - val) > ZEROTHRESHOLD) {
337 cout <<
"Warning in LHAupAlpgen::warnParamOverwrite:" 338 <<
" overwriting existing parameter" << paramIn << endl;
346 inline string AlpgenPar::trim(
string s) {
350 if ((i = s.find_last_not_of(
" \t\r\n")) != string::npos)
351 s = s.substr(0, i + 1);
352 if ((i = s.find_first_not_of(
" \t\r\n")) != string::npos)
369 const bool LHAupAlpgen::LHADEBUG =
false;
372 const bool LHAupAlpgen::LHADEBUGRESCALE =
false;
375 const double LHAupAlpgen::ZEROTHRESHOLD = 1e-10;
378 const double LHAupAlpgen::EWARNTHRESHOLD = 3e-3;
379 const double LHAupAlpgen::PTWARNTHRESHOLD = 1e-3;
382 const double LHAupAlpgen::INCOMINGMIN = 1e-3;
389 : baseFN(baseFNin), alpgenPar(), isUnw(nullptr) {
393 unwFN = baseFN +
".unw.gz";
394 isUnw =
openFile(unwFN.c_str(), ifsUnw);
395 if (!ifsUnw.is_open())
closeFile(isUnw, ifsUnw);
397 if (isUnw ==
nullptr) {
398 unwFN = baseFN +
".unw";
399 isUnw =
openFile(unwFN.c_str(), ifsUnw);
400 if (!ifsUnw.is_open()) {
401 cout <<
"Error in LHAupAlpgen::LHAupAlpgen: " 402 <<
"cannot open event file " << unwFN << endl;
417 istream* isPar =
nullptr;
421 parFN = baseFN +
"_unw.par.gz";
422 isPar =
openFile(parFN.c_str(), ifsPar);
423 if (!ifsPar.is_open())
closeFile(isPar, ifsPar);
425 if (isPar ==
nullptr) {
426 parFN = baseFN +
"_unw.par";
427 isPar =
openFile(parFN.c_str(), ifsPar);
428 if (!ifsPar.is_open()) {
429 cout <<
"Error in LHAupAlpgen::LHAupAlpgen: " 430 <<
"cannot open parameter file " << parFN << endl;
437 string paramStr((std::istreambuf_iterator<char>(isPar->rdbuf())),
438 std::istreambuf_iterator<char>());
442 cout <<
"Error in LHAupAlpgen::LHAupAlpgen: " 443 <<
"cannot read parameter file " << parFN << endl;
449 alpgenPar.
parse(paramStr);
456 cout <<
"Error in LHAupAlpgen::setInit: " 457 <<
"missing input parameters" << endl;
462 int ih2 = alpgenPar.getParamAsInt(
"ih2");
464 int idbmupB = (ih2 == 1) ? 2212 : -2212;
467 double ebeam = alpgenPar.
getParam(
"ebeam");
472 int pdfgupA = 0, pdfsupA = 0;
473 int pdfgupB = 0, pdfsupB = 0;
480 lprup = alpgenPar.getParamAsInt(
"hpc");
483 if (lprup == 7 || lprup == 8 || lprup == 13) {
484 cout <<
"Error in LHAupAlpgen::setInit: " 485 <<
"process not implemented" << endl;
494 if (lprup == 6 || lprup == 7 || lprup == 8 || lprup == 16) {
496 cout <<
"Error in LHAupAlpgen::setInit: " 497 <<
"heavy flavour information not present" << endl;
500 ihvy1 = alpgenPar.getParamAsInt(
"ihvy");
505 cout <<
"Error in LHAupAlpgen::setInit: " 506 <<
"heavy flavour information not present" << endl;
509 ihvy2 = alpgenPar.getParamAsInt(
"ihvy2");
515 cout <<
"Error in LHAupAlpgen::setInit: " 516 <<
"heavy flavour information not present" << endl;
523 setBeamA(idbmupA, ebmupA, pdfgupA, pdfsupA);
524 setBeamB(idbmupB, ebmupB, pdfgupB, pdfsupB);
528 double xsecup = alpgenPar.
getParam(
"xsecup");
529 double xerrup = alpgenPar.
getParam(
"xerrup");
531 xSecSumSave = xsecup;
532 xErrSumSave = xerrup;
546 int nEvent, iProc, nParton;
549 if (!getline(*isUnw, line)) {
552 cout <<
"Error in LHAupAlpgen::setEvent: " 553 <<
"could not read events from file" << endl;
557 cout <<
"Error in LHAupAlpgen::setEvent: " 558 <<
"end of file reached" << endl;
561 istringstream iss1(line);
562 iss1 >> nEvent >> iProc >> nParton >> Swgt >> Sq;
565 double wgtT = Swgt, scaleT = Sq;
572 int idT, statusT, mother1T, mother2T, col1T, col2T;
573 double pxT, pyT, pzT, eT, mT;
575 double tauT = 0., spinT = 9.;
581 for (
int i = 0; i < nParton; i++) {
583 if (!getline(*isUnw, line)) {
584 cout <<
"Error in LHAupAlpgen::setEvent: " 585 <<
"could not read events from file" << endl;
588 istringstream iss2(line);
594 iss2 >> idT >> col1T >> col2T >> pzT;
596 mother1T = mother2T = 0;
602 pzT = (i == 0) ? INCOMINGMIN : -INCOMINGMIN;
610 iss2 >> idT >> col1T >> col2T >> pxT >> pyT >> pzT >> mT;
614 eT = sqrt(max(0., pxT*pxT + pyT*pyT + pzT*pzT + mT*mT));
619 idT, statusT, mother1T, mother2T, col1T, col2T,
620 pxT, pyT, pzT, eT, mT, tauT, spinT,-1.));
624 if (!addResonances())
return false;
628 if (!rescaleMomenta())
return false;
631 for (
size_t i = 0; i < myParticles.size(); i++)
635 id1T = myParticles[0].idPart;
636 x1T = myParticles[0].ePart / ebmupA;
637 id2T = myParticles[1].idPart;
638 x2T = myParticles[1].ePart / ebmupA;
639 setIdX(id1T, id2T, x1T, x2T);
640 setPdf(id1T, id2T, x1T, x2T, 0., 0., 0.,
false);
650 cout << endl <<
"---- LHAupAlpgen particle listing begin ----" << endl;
651 cout << scientific << setprecision(6);
652 for (
int i = 0; i < int(myParticles.size()); i++) {
654 << setw(5) << myParticles[i].idPart
655 << setw(5) << myParticles[i].statusPart
656 << setw(15) << myParticles[i].pxPart
657 << setw(15) << myParticles[i].pyPart
658 << setw(15) << myParticles[i].pzPart
659 << setw(15) << myParticles[i].ePart
660 << setw(15) << myParticles[i].mPart
661 << setw(5) << myParticles[i].mother1Part - 1
662 << setw(5) << myParticles[i].mother2Part - 1
663 << setw(5) << myParticles[i].col1Part
664 << setw(5) << myParticles[i].col2Part
667 cout <<
"---- LHAupAlpgen particle listing end ----" << endl;
675 inline bool LHAupAlpgen::addResonances() {
678 int idT, statusT, mother1T, mother2T, col1T, col2T;
679 double pxT, pyT, pzT, eT, mT;
681 double tauT = 0., spinT = 9.;
694 if (lprup <= 4 || lprup == 10 || lprup == 14 || lprup == 15) {
696 int i1 = myParticles.size() - 1, i2 = i1 - 1;
699 if (myParticles[i1].idPart + myParticles[i2].idPart == 0)
702 idT = - (myParticles[i1].idPart % 2) - (myParticles[i2].idPart % 2);
703 idT = (idT > 0) ? 24 : (idT < 0) ? -24 : 23;
706 if (lprup == 2 || lprup == 4) {
709 <<
"LHAupAlpgen::addResonances: wrong resonance type in event" 716 if (abs(idT) != 24) {
718 <<
"LHAupAlpgen::addResonances: wrong resonance type in event" 729 pxT = myParticles[i1].pxPart + myParticles[i2].pxPart;
730 pyT = myParticles[i1].pyPart + myParticles[i2].pyPart;
731 pzT = myParticles[i1].pzPart + myParticles[i2].pzPart;
732 eT = myParticles[i1].ePart + myParticles[i2].ePart;
733 mT = sqrt(eT*eT - pxT*pxT - pyT*pyT - pzT*pzT);
735 idT, statusT, mother1T, mother2T, col1T, col2T,
736 pxT, pyT, pzT, eT, mT, tauT, spinT, -1.));
739 myParticles[i1].mother1Part = myParticles[i2].mother1Part =
741 myParticles[i1].mother2Part = myParticles[i2].mother2Part = 0;
767 }
else if ( ((lprup == 6 || lprup == 8 || lprup == 16) && ihvy1 == 6) ||
768 lprup == 5 || lprup == 13) {
771 int idx = myParticles.size() - 1;
772 for (
int i = myParticles.size() - 1; i > -1; i--) {
775 if (myParticles[i].idPart == 23 ||
776 abs(myParticles[i].idPart) == 24) {
780 if (myParticles[idx].idPart + myParticles[idx - 1].idPart == 0)
783 flav = - (myParticles[idx].idPart % 2)
784 - (myParticles[idx - 1].idPart % 2);
785 flav = (flav > 0) ? 24 : (flav < 0) ? -24 : 23;
786 if (flav != myParticles[i].idPart) {
788 loggerPtr->ERROR_MSG(
"resonance does not match decay products");
793 myParticles[i].statusPart = 2;
794 myParticles[idx ].mother1Part = i + 1;
795 myParticles[idx--].mother2Part = 0;
796 myParticles[idx ].mother1Part = i + 1;
797 myParticles[idx--].mother2Part = 0;
800 }
else if (abs(myParticles[i].idPart) == 6) {
804 if (myParticles[idx].idPart + myParticles[idx - 1].idPart == 0)
807 flav = - (myParticles[idx].idPart % 2)
808 - (myParticles[idx - 1].idPart % 2);
809 flav = (flav > 0) ? 24 : (flav < 0) ? -24 : 23;
811 bool outOfOrder =
false, wrongFlavour =
false;;
812 if ( abs(flav) != 24 ||
813 (flav == 24 && myParticles[i].idPart != 6) ||
814 (flav == -24 && myParticles[i].idPart != -6) ) {
817 if (lprup == 5 || lprup == 13) {
825 if (myParticles[idx].idPart + myParticles[idx - 1].idPart == 0)
828 flav = - (myParticles[idx].idPart % 2)
829 - (myParticles[idx - 1].idPart % 2);
830 flav = (flav > 0) ? 24 : (flav < 0) ? -24 : 23;
833 if ( abs(flav) != 24 ||
834 (flav == 24 && myParticles[i].idPart != 6) ||
835 (flav == -24 && myParticles[i].idPart != -6) )
837 else outOfOrder =
true;
843 loggerPtr->ERROR_MSG(
"resonance does not match decay products");
849 myParticles[i].statusPart = 2;
857 pxT = myParticles[idx].pxPart + myParticles[idx - 1].pxPart;
858 pyT = myParticles[idx].pyPart + myParticles[idx - 1].pyPart;
859 pzT = myParticles[idx].pzPart + myParticles[idx - 1].pzPart;
860 eT = myParticles[idx].ePart + myParticles[idx - 1].ePart;
861 mT = sqrt(eT*eT - pxT*pxT - pyT*pyT - pzT*pzT);
863 idT, statusT, mother1T, mother2T, col1T, col2T,
864 pxT, pyT, pzT, eT, mT, tauT, spinT, -1.));
867 myParticles[idx ].mother1Part = myParticles.size();
868 myParticles[idx--].mother2Part = 0;
869 myParticles[idx ].mother1Part = myParticles.size();
870 myParticles[idx--].mother2Part = 0;
873 idT = (flav == 24) ? 5 : -5;
876 col1T = myParticles[i].col1Part;
877 col2T = myParticles[i].col2Part;
879 pxT = myParticles[i].pxPart - myParticles.back().pxPart;
880 pyT = myParticles[i].pyPart - myParticles.back().pyPart;
881 pzT = myParticles[i].pzPart - myParticles.back().pzPart;
882 eT = myParticles[i].ePart - myParticles.back().ePart;
883 mT = sqrt(eT*eT - pxT*pxT - pyT*pyT - pzT*pzT);
885 idT, statusT, mother1T, mother2T, col1T, col2T,
886 pxT, pyT, pzT, eT, mT, tauT, spinT, -1.));
890 if (outOfOrder) idx += 4;
901 }
else if (lprup == 7 || lprup == 9 || lprup == 11 || lprup == 12) {
906 if (lprup == 13)
for (
int i = 0; i < 2; i++)
907 if (abs(myParticles[i].idPart) == 5) {
908 myParticles[i].mPart = mb;
909 myParticles[i].ePart = sqrt(
pow2(myParticles[i].pzPart) +
pow2(mb));
932 inline bool LHAupAlpgen::rescaleMomenta() {
937 for (
int i = 0; i < int(myParticles.size()); i++) {
938 Vec4 pNow =
Vec4(myParticles[i].pxPart, myParticles[i].pyPart,
939 myParticles[i].pzPart, myParticles[i].ePart);
940 if (i < 2) pIn += pNow;
941 else if (myParticles[i].statusPart == 1) {
949 if (abs(pOut.pT() - pIn.pT()) > ZEROTHRESHOLD) {
951 double pxDiff = (pOut.px() - pIn.px()) / nOut,
952 pyDiff = (pOut.py() - pIn.py()) / nOut;
955 if (pxDiff > PTWARNTHRESHOLD || pyDiff > PTWARNTHRESHOLD) {
956 cout <<
"Warning in LHAupAlpgen::setEvent: " 957 <<
"large pT imbalance in incoming event" << endl;
960 if (LHADEBUGRESCALE) {
962 cout <<
"pxDiff = " << pxDiff <<
", pyDiff = " << pyDiff << endl;
968 for (
int i = 2; i < int(myParticles.size()); i++) {
969 if (myParticles[i].statusPart != 1)
continue;
970 myParticles[i].pxPart -= pxDiff;
971 myParticles[i].pyPart -= pyDiff;
972 myParticles[i].ePart = sqrt(max(0.,
pow2(myParticles[i].pxPart) +
973 pow2(myParticles[i].pyPart) +
pow2(myParticles[i].pzPart) +
974 pow2(myParticles[i].mPart)));
975 pOut +=
Vec4(myParticles[i].pxPart, myParticles[i].pyPart,
976 myParticles[i].pzPart, myParticles[i].ePart);
981 double de = (pOut.e() - pIn.e());
982 double dp = (pOut.pz() - pIn.pz());
983 double a = 1 + (de + dp) / 2. / myParticles[0].ePart;
984 double b = 1 + (de - dp) / 2. / myParticles[1].ePart;
991 if (abs(a - 1.) * myParticles[0].ePart > EWARNTHRESHOLD ||
992 abs(b - 1.) * myParticles[1].ePart > EWARNTHRESHOLD) {
993 cout <<
"Warning in LHAupAlpgen::setEvent: " 994 <<
"large rescaling factor" << endl;
997 if (LHADEBUGRESCALE) {
999 cout <<
"de = " << de <<
", dp = " << dp
1000 <<
", a = " << a <<
", b = " << b << endl
1001 <<
"Absolute energy change for incoming 0 = " 1002 << abs(a - 1.) * myParticles[0].ePart << endl
1003 <<
"Absolute energy change for incoming 1 = " 1004 << abs(b - 1.) * myParticles[1].ePart << endl;
1007 myParticles[0].ePart *= a;
1008 myParticles[0].pzPart *= a;
1009 myParticles[1].ePart *= b;
1010 myParticles[1].pzPart *= b;
1013 for (
int i = 0; i < int(myParticles.size()); i++) {
1014 if (myParticles[i].statusPart != 2)
continue;
1018 for (
int j = 0; j < int(myParticles.size()); j++) {
1019 if (myParticles[j].mother1Part - 1 != i)
continue;
1020 resVec +=
Vec4(myParticles[j].pxPart, myParticles[j].pyPart,
1021 myParticles[j].pzPart, myParticles[j].ePart);
1024 myParticles[i].pxPart = resVec.px();
1025 myParticles[i].pyPart = resVec.py();
1026 myParticles[i].pzPart = resVec.pz();
1027 myParticles[i].ePart = resVec.e();
1047 string agFile = pythia.
settings.word(
"Alpgen:file");
1048 if (agFile !=
"void") {
1049 LHAagPtr = make_shared<LHAupAlpgen>(agFile.c_str());
1050 pythia.
settings.mode(
"Beams:frameType", 5);
1066 bool setLightMasses = settingsPtr->flag(
"Alpgen:setLightMasses");
1067 bool setHeavyMasses = settingsPtr->flag(
"Alpgen:setHeavyMasses");
1068 bool setNjet = settingsPtr->flag(
"Alpgen:setNjet");
1069 bool setMLM = settingsPtr->flag(
"Alpgen:setMLM");
1074 if (!parStr.empty()) {
1080 if (setLightMasses) {
1084 if (setHeavyMasses) {
1094 settingsPtr->mode(
"JetMatching:nJet", par.getParamAsInt(
"njets"));
1096 cout <<
"Warning in AlpgenHooks:init: " 1097 <<
"no ALPGEN nJet parameter found" << endl;
1104 double ptjmin = par.
getParam(
"ptjmin");
1105 ptjmin = max(ptjmin + 5., 1.2 * ptjmin);
1106 settingsPtr->parm(
"JetMatching:eTjetMin", ptjmin);
1107 settingsPtr->parm(
"JetMatching:coneRadius", par.
getParam(
"drjmin"));
1108 settingsPtr->parm(
"JetMatching:etaJetMax", par.
getParam(
"etajmax"));
1112 cout <<
"Warning in AlpgenHooks:init: " 1113 <<
"no ALPGEN merging parameters found" << endl;
1133 const double MadgraphPar::ZEROTHRESHOLD = 1e-10;
1142 stringstream paramStream(paramStr);
1144 while ( getline(paramStream, line) ) extractRunParam(line);
1156 size_t idz = line.find(
"#");
1157 if ( !(idz == string::npos) )
return;
1158 size_t idx = line.find(
"=");
1159 size_t idy = line.find(
"!");
1160 if (idy == string::npos) idy = line.size();
1161 if (idx == string::npos)
return;
1162 string paramName = trim( line.substr( idx + 1, idy - idx - 1) );
1163 string paramVal = trim( line.substr( 0, idx) );
1164 replace( paramVal.begin(), paramVal.end(),
'd',
'e');
1167 istringstream iss(paramVal);
1169 if (paramName.find(
",") != string::npos) {
1170 string paramNameNow;
1171 istringstream issName( paramName);
1172 while ( getline(issName, paramNameNow,
',') ) {
1174 warnParamOverwrite( paramNameNow, val);
1175 params[paramNameNow] = val;
1181 warnParamOverwrite( paramName, val);
1182 params[paramName] = val;
1194 <<
" *-------- Madgraph parameters --------*" << endl;
1195 for (map<string,double>::iterator it = params.begin();
1196 it != params.end(); ++it)
1197 cout <<
" | " << left << setw(15) << it->first
1198 <<
" | " << right << setw(15) << it->second
1200 cout <<
" *---------------------------------------*" << endl;
1207 inline void MadgraphPar::warnParamOverwrite(
const string ¶mIn,
1211 if (haveParam(paramIn) &&
1212 abs(getParam(paramIn) - val) > ZEROTHRESHOLD) {
1213 cout <<
"Warning in LHAupAlpgen::" 1214 <<
"warnParamOverwrite: overwriting existing parameter" 1223 inline string MadgraphPar::trim(
string s) {
1227 if ( (i = s.find_last_not_of(
" \t\r\n")) != string::npos)
1228 s = s.substr(0, i + 1);
1229 if ( (i = s.find_first_not_of(
" \t\r\n")) != string::npos)
void setBeamA(int idIn, double eIn, int pdfGroupIn=0, int pdfSetIn=0)
Input beam info.
Definition: LesHouches.h:222
void addProcess(int idProcIn, double xSecIn=1., double xErrIn=0., double xMaxIn=1.)
Input process info.
Definition: LesHouches.h:233
constexpr double pow2(const double &x)
Powers of small integers - for balance speed/code clarity.
Definition: PythiaStdlib.h:182
void printParams()
Print parameters read from the '.par' file.
Definition: GeneratorInput.h:315
void setStrategy(int strategyIn)
Input process weight strategy.
Definition: LesHouches.h:230
istream * openFile(const char *fn, ifstream &ifs)
Definition: LesHouches.cc:648
bool parse(const string paramStr)
Parse as incoming ALPGEN parameter file (passed as string)
Definition: GeneratorInput.h:218
void setIdX(int id1In, int id2In, double x1In, double x2In)
Input info on flavour and x values of hard-process initiators.
Definition: LesHouches.h:263
A class for the particles stored in LHAup.
Definition: LesHouches.h:48
Settings settings
Settings: databases of flags/modes/parms/words to control run.
Definition: Pythia.h:332
bool initAfterBeams()
Override initAfterBeams routine from UserHooks.
Definition: GeneratorInput.h:1063
AlpgenHooks(Pythia &pythia)
Constructor and destructor.
Definition: GeneratorInput.h:1044
bool setLHAupPtr(LHAupPtr lhaUpPtrIn)
Possibility to pass in pointer to external LHA-interfaced generator.
Definition: Pythia.h:133
LHAupAlpgen(const char *baseFNin)
Constructor and destructor.
Definition: GeneratorInput.h:388
string header(const string &key) const
Return an LHEF header.
Definition: Info.h:353
double getParam(const string ¶mIn)
Definition: GeneratorInput.h:54
bool setInit()
Override setInit/setEvent routines from LHAup.
Definition: GeneratorInput.h:413
Definition: LesHouches.h:78
void addParticle(LHAParticle particleIn)
Input particle info, one particle at the time.
Definition: LesHouches.h:252
bool haveParam(const string ¶mIn)
Check if a parameter exists.
Definition: GeneratorInput.h:49
void setProcess(int idProcIn=0, double weightIn=1., double scaleIn=0., double alphaQEDIn=0.0073, double alphaQCDIn=0.12)
Input info on the selected process.
Definition: LesHouches.h:243
AlpgenPar()
Constructor.
Definition: GeneratorInput.h:40
bool setEvent(int)
Definition: GeneratorInput.h:543
void setPdf(int id1pdfIn, int id2pdfIn, double x1pdfIn, double x2pdfIn, double scalePDFIn, double pdf1In, double pdf2In, bool pdfIsSetIn)
Optionally input info on parton density values of event.
Definition: LesHouches.h:267
Definition: GeneratorInput.h:133
bool parse(const string paramStr)
Parse an incoming Madgraph parameter file string.
Definition: GeneratorInput.h:1139
Definition: GeneratorInput.h:35
void extractRunParam(string line)
Parse an incoming parameter line.
Definition: GeneratorInput.h:1153
void printParams()
Print parameters read from the '.par' file.
Definition: GeneratorInput.h:1190
Definition: GeneratorInput.h:83
void printParticles()
Print list of particles; mainly intended for debugging.
Definition: GeneratorInput.h:648
Header for classes to set beam momentum and interaction vertex spread.
Definition: Analysis.h:20
The Pythia class contains the top-level routines to generate an event.
Definition: Pythia.h:71
void setInfoHeader(const string &key, const string &val)
Definition: LesHouches.h:294
Info * infoPtr
Pointer to various information on the generation.
Definition: LesHouches.h:218
UserHooks is base class for user access to program execution.
Definition: UserHooks.h:32
bool haveParam(const string ¶mIn)
Check if a parameter exists.
Definition: GeneratorInput.h:170
Definition: GeneratorInput.h:156
MadgraphPar()
Constructor.
Definition: GeneratorInput.h:161
double getParam(const string ¶mIn)
Definition: GeneratorInput.h:175
void closeFile(istream *&is, ifstream &ifs)
Definition: LesHouches.cc:659
void reset()
Member functions for input.
Definition: Basics.h:46
bool fileFound()
Override fileFound routine from LHAup.
Definition: GeneratorInput.h:92
void extractRunParam(string line)
Parse an incoming parameter line.
Definition: GeneratorInput.h:256