9 #ifndef Pythia8_Pythia_H
10 #define Pythia8_Pythia_H
12 #include "Pythia8/Analysis.h"
13 #include "Pythia8/Basics.h"
14 #include "Pythia8/BeamParticle.h"
15 #include "Pythia8/BeamShape.h"
16 #include "Pythia8/Event.h"
17 #include "Pythia8/FragmentationFlavZpT.h"
18 #include "Pythia8/HadronLevel.h"
19 #include "Pythia8/History.h"
20 #include "Pythia8/Info.h"
21 #include "Pythia8/LesHouches.h"
22 #include "Pythia8/PartonLevel.h"
23 #include "Pythia8/ParticleData.h"
24 #include "Pythia8/PartonDistributions.h"
25 #include "Pythia8/PartonSystems.h"
26 #include "Pythia8/ProcessLevel.h"
27 #include "Pythia8/PythiaStdlib.h"
28 #include "Pythia8/ResonanceWidths.h"
29 #include "Pythia8/RHadrons.h"
30 #include "Pythia8/Settings.h"
31 #include "Pythia8/SigmaTotal.h"
32 #include "Pythia8/SpaceShower.h"
33 #include "Pythia8/StandardModel.h"
34 #include "Pythia8/SLHAinterface.h"
35 #include "Pythia8/TimeShower.h"
36 #include "Pythia8/UserHooks.h"
37 #include "Pythia8/MergingHooks.h"
38 #include "Pythia8/Merging.h"
51 Pythia(
string xmlDir =
"../xmldoc",
bool printBanner =
true);
57 bool readString(
string,
bool warn =
true);
60 bool readFile(
string fileName,
bool warn =
true,
61 int subrun = SUBRUNDEFAULT);
62 bool readFile(
string fileName,
int subrun) {
63 return readFile(fileName,
true, subrun);}
64 bool readFile(istream& is = cin,
bool warn =
true,
65 int subrun = SUBRUNDEFAULT);
66 bool readFile(istream& is,
int subrun) {
67 return readFile(is,
true, subrun);}
70 bool setPDFPtr( PDF* pdfAPtrIn, PDF* pdfBPtrIn, PDF* pdfHardAPtrIn = 0,
71 PDF* pdfHardBPtrIn = 0, PDF* pdfPomAPtrIn = 0, PDF* pdfPomBPtrIn = 0);
74 bool setLHAupPtr( LHAup* lhaUpPtrIn) {lhaUpPtr = lhaUpPtrIn;
return true;}
77 bool setDecayPtr( DecayHandler* decayHandlePtrIn,
78 vector<int> handledParticlesIn) {decayHandlePtr = decayHandlePtrIn;
79 handledParticles.resize(0);
80 for(
int i = 0; i < int(handledParticlesIn.size()); ++i)
81 handledParticles.push_back( handledParticlesIn[i] );
return true;}
84 bool setRndmEnginePtr( RndmEngine* rndmEnginePtrIn)
85 {
return rndm.rndmEnginePtr( rndmEnginePtrIn);}
88 bool setUserHooksPtr( UserHooks* userHooksPtrIn)
89 { userHooksPtr = userHooksPtrIn;
return true;}
92 bool setMergingHooksPtr( MergingHooks* mergingHooksPtrIn)
93 { mergingHooksPtr = mergingHooksPtrIn;
return true;}
96 bool setBeamShapePtr( BeamShape* beamShapePtrIn)
97 { beamShapePtr = beamShapePtrIn;
return true;}
100 bool setSigmaPtr( SigmaProcess* sigmaPtrIn)
101 { sigmaPtrs.push_back( sigmaPtrIn);
return true;}
104 bool setResonancePtr( ResonanceWidths* resonancePtrIn)
105 { resonancePtrs.push_back( resonancePtrIn);
return true;}
108 bool setShowerPtr( TimeShower* timesDecPtrIn,
109 TimeShower* timesPtrIn = 0, SpaceShower* spacePtrIn = 0)
110 { timesDecPtr = timesDecPtrIn; timesPtr = timesPtrIn;
111 spacePtr = spacePtrIn;
return true;}
117 bool init(
int idAin,
int idBin,
double eCMin);
120 bool init(
int idAin,
int idBin,
double eAin,
double eBin);
123 bool init(
int idAin,
int idBin,
double pxAin,
double pyAin,
124 double pzAin,
double pxBin,
double pyBin,
double pzBin);
127 bool init(
string LesHouchesEventFile,
bool skipInit =
false);
130 bool init( LHAup* lhaUpPtrIn);
136 int forceTimeShower(
int iBeg,
int iEnd,
double pTmax,
int nBranchMax = 0)
137 { info.setScalup( 0, pTmax);
138 return timesDecPtr->shower( iBeg, iEnd, event, pTmax, nBranchMax); }
141 bool forceHadronLevel(
bool findJunctions =
true);
144 bool moreDecays() {
return hadronLevel.moreDecays(event);}
147 bool forceRHadronDecays() {
return doRHadronDecays();}
150 void LHAeventList(ostream& os = cout) {
151 if (lhaUpPtr != 0) lhaUpPtr->listEvent(os);}
154 bool LHAeventSkip(
int nSkip) {
155 if (lhaUpPtr != 0)
return lhaUpPtr->skipEvent(nSkip);
return false;}
161 void statistics(
bool all =
false,
bool reset =
false);
164 bool flag(
string key) {
return settings.flag(key);}
165 int mode(
string key) {
return settings.mode(key);}
166 double parm(
string key) {
return settings.parm(key);}
167 string word(
string key) {
return settings.word(key);}
170 PDF* getPDFPtr(
int idIn,
int sequence = 1);
185 ParticleData particleData;
192 Couplings* couplingsPtr;
195 SLHAinterface slhaInterface;
198 PartonSystems partonSystems;
205 MergingHooks* mergingHooksPtr;
210 Pythia(
const Pythia&);
211 Pythia& operator=(
const Pythia&);
214 static const double VERSIONNUMBERCODE;
215 static const int NTRY, SUBRUNDEFAULT;
219 bool doProcessLevel, doPartonLevel, doHadronLevel, doDiffraction,
220 doResDec, doFSRinRes, decayRHadrons, abortIfVeto, checkEvent,
223 double epTolErr, epTolWarn;
226 bool isConstructed, isInit, isUnresolvedA, isUnresolvedB, showSaV,
228 int idA, idB, frameType, boostType, nCount, nShowLHA, nShowInfo,
230 double mA, mB, pxA, pxB, pyA, pyB, pzA, pzB, eA, eB,
231 pzAcm, pzBcm, eCM, betaZ, gammaZ;
232 Vec4 pAinit, pBinit, pAnow, pBnow;
233 RotBstMatrix MfromCM, MtoCM;
237 vector<int> iErrId, iErrCol, iErrEpm, iErrNan, iErrNanVtx;
252 bool useNewPdfA, useNewPdfB, useNewPdfHard, useNewPdfPomA, useNewPdfPomB;
259 BeamParticle beamPomA;
260 BeamParticle beamPomB;
263 bool doLHA, useNewLHA;
267 DecayHandler* decayHandlePtr;
268 vector<int> handledParticles;
271 UserHooks* userHooksPtr;
272 bool hasUserHooks, doVetoProcess, doVetoPartons, retryPartonLevel;
275 BeamShape* beamShapePtr;
276 bool useNewBeamShape, doMomentumSpread, doVertexSpread;
279 vector<SigmaProcess*> sigmaPtrs;
282 vector<ResonanceWidths*> resonancePtrs;
285 TimeShower* timesDecPtr;
286 TimeShower* timesPtr;
287 SpaceShower* spacePtr;
288 bool useNewTimes, useNewSpace;
291 ProcessLevel processLevel;
294 PartonLevel partonLevel;
297 PartonLevel trialPartonLevel;
300 bool hasMergingHooks, hasOwnMergingHooks, doMerging;
303 HadronLevel hadronLevel;
312 void banner(ostream& os = cout);
315 int readSubrun(
string line,
bool warn =
true, ostream& os = cout);
318 int readCommented(
string line);
321 void checkSettings();
327 bool initKinematics();
333 void nextKinematics();
336 void boostAndVertex(
bool toLab,
bool setVertex);
339 bool doRHadronDecays();
342 bool check(ostream& os = cout);
353 #endif // Pythia8_Pythia_H