9 #ifndef Pythia8_Pythia_H
10 #define Pythia8_Pythia_H
14 #include "BeamParticle.h"
15 #include "BeamShape.h"
17 #include "FragmentationFlavZpT.h"
18 #include "HadronLevel.h"
21 #include "LesHouches.h"
22 #include "MergingHooks.h"
23 #include "PartonLevel.h"
24 #include "ParticleData.h"
25 #include "PartonDistributions.h"
26 #include "PartonSystems.h"
27 #include "ProcessLevel.h"
28 #include "PythiaStdlib.h"
29 #include "ResonanceWidths.h"
32 #include "SigmaTotal.h"
33 #include "SpaceShower.h"
34 #include "StandardModel.h"
35 #include "SusyLesHouches.h"
36 #include "TimeShower.h"
37 #include "UserHooks.h"
50 Pythia(
string xmlDir =
"../xmldoc");
56 bool readString(
string,
bool warn =
true);
59 bool readFile(
string fileName,
bool warn =
true,
60 int subrun = SUBRUNDEFAULT);
61 bool readFile(
string fileName,
int subrun) {
62 return readFile(fileName,
true, subrun);}
63 bool readFile(istream& is = cin,
bool warn =
true,
64 int subrun = SUBRUNDEFAULT);
65 bool readFile(istream& is,
int subrun) {
66 return readFile(is,
true, subrun);}
69 bool setPDFPtr(
PDF* pdfAPtrIn,
PDF* pdfBPtrIn,
PDF* pdfHardAPtrIn = 0,
70 PDF* pdfHardBPtrIn = 0,
PDF* pdfPomAPtrIn = 0,
PDF* pdfPomBPtrIn = 0);
73 bool setLHAupPtr(
LHAup* lhaUpPtrIn) {lhaUpPtr = lhaUpPtrIn;
return true;}
77 vector<int> handledParticlesIn) {decayHandlePtr = decayHandlePtrIn;
78 handledParticles.resize(0);
79 for(
int i = 0; i < int(handledParticlesIn.size()); ++i)
80 handledParticles.push_back( handledParticlesIn[i] );
return true;}
83 bool setRndmEnginePtr(
RndmEngine* rndmEnginePtrIn)
84 {
return rndm.rndmEnginePtr( rndmEnginePtrIn);}
87 bool setUserHooksPtr(
UserHooks* userHooksPtrIn)
88 { userHooksPtr = userHooksPtrIn;
return true;}
91 bool setMergingHooksPtr(
MergingHooks* mergingHooksPtrIn)
92 { mergingHooksPtr = mergingHooksPtrIn;
return true;}
95 bool setBeamShapePtr(
BeamShape* beamShapePtrIn)
96 { beamShapePtr = beamShapePtrIn;
return true;}
100 { sigmaPtrs.push_back( sigmaPtrIn);
return true;}
104 { resonancePtrs.push_back( resonancePtrIn);
return true;}
109 { timesDecPtr = timesDecPtrIn; timesPtr = timesPtrIn;
110 spacePtr = spacePtrIn;
return true;}
116 bool init(
int idAin,
int idBin,
double eCMin);
119 bool init(
int idAin,
int idBin,
double eAin,
double eBin);
122 bool init(
int idAin,
int idBin,
double pxAin,
double pyAin,
123 double pzAin,
double pxBin,
double pyBin,
double pzBin);
126 bool init(
string LesHouchesEventFile,
bool skipInit =
false);
129 bool init(
LHAup* lhaUpPtrIn);
135 int forceTimeShower(
int iBeg,
int iEnd,
double pTmax,
int nBranchMax = 0)
136 {
return timesDecPtr->shower( iBeg, iEnd, event, pTmax, nBranchMax); }
139 bool forceHadronLevel(
bool findJunctions =
true);
142 bool moreDecays() {
return hadronLevel.moreDecays(event);}
145 bool forceRHadronDecays() {
return doRHadronDecays();}
148 void LHAeventList(ostream& os = cout) {
149 if (lhaUpPtr !=
nullptr) lhaUpPtr->listEvent(os);}
152 bool LHAeventSkip(
int nSkip) {
153 if (lhaUpPtr !=
nullptr)
return lhaUpPtr->skipEvent(nSkip);
return false;}
159 void statistics(
bool all =
false,
bool reset =
false);
162 bool flag(
string key) {
return settings.flag(key);}
163 int mode(
string key) {
return settings.mode(key);}
164 double parm(
string key) {
return settings.parm(key);}
165 string word(
string key) {
return settings.word(key);}
199 static const int NTRY, SUBRUNDEFAULT;
203 bool doProcessLevel, doPartonLevel, doHadronLevel, abortIfVeto,
204 checkEvent, doDiffraction, decayRHadrons;
206 double epTolErr, epTolWarn;
209 bool isConstructed, isInit, isUnresolvedA, isUnresolvedB, showSaV,
211 int idA, idB, frameType, boostType, nCount, nShowLHA, nShowInfo,
213 double mA, mB, pxA, pxB, pyA, pyB, pzA, pzB, eA, eB,
214 pzAcm, pzBcm, eCM, betaZ, gammaZ;
215 Vec4 pAinit, pBinit, pAnow, pBnow;
220 vector<int> iErrId, iErrCol, iErrNan, iErrNanVtx;
235 bool useNewPdfA, useNewPdfB, useNewPdfHard, useNewPdfPomA, useNewPdfPomB;
246 bool doLHA, useNewLHA;
251 vector<int> handledParticles;
255 bool hasUserHooks, doVetoProcess, doVetoPartons;
259 bool useNewBeamShape, doMomentumSpread, doVertexSpread;
262 vector<SigmaProcess*> sigmaPtrs;
265 vector<ResonanceWidths*> resonancePtrs;
271 bool useNewTimes, useNewSpace;
284 bool hasMergingHooks, hasOwnMergingHooks, doUserMerging,
285 doMGMerging, doKTMerging, doMerging;
297 void banner(ostream& os = cout);
300 int readSubrun(
string line,
bool warn =
true, ostream& os = cout);
303 void checkSettings();
309 bool initKinematics();
315 void nextKinematics();
318 void boostAndVertex(
bool toLab,
bool setVertex);
321 bool doRHadronDecays();
324 bool check(ostream& os = cout);
327 PDF* getPDFPtr(
int idIn,
int sequence = 1);
341 #endif // Pythia8_Pythia_H