10 #ifndef Pythia8_StringFragmentation_H
11 #define Pythia8_StringFragmentation_H
13 #include "Pythia8/Basics.h"
14 #include "Pythia8/Event.h"
15 #include "Pythia8/Info.h"
16 #include "Pythia8/FragmentationFlavZpT.h"
17 #include "Pythia8/FragmentationSystems.h"
18 #include "Pythia8/ParticleData.h"
19 #include "Pythia8/PythiaStdlib.h"
20 #include "Pythia8/Settings.h"
38 void init( ParticleData* particleDataPtrIn, StringFlav* flavSelPtrIn,
39 StringPT* pTSelPtrIn, StringZ* zSelPtrIn) {
40 particleDataPtr = particleDataPtrIn; flavSelPtr = flavSelPtrIn;
41 pTSelPtr = pTSelPtrIn; zSelPtr = zSelPtrIn;}
44 void setUp(
bool fromPosIn,
int iEndIn,
int idOldIn,
int iMaxIn,
45 double pxIn,
double pyIn,
double GammaIn,
double xPosIn,
double xNegIn);
52 Vec4 kinematicsHadron(StringSystem& system);
58 static const double TINY, PT2SAME;
61 ParticleData* particleDataPtr;
64 StringFlav* flavSelPtr;
70 int iEnd, iMax, idHad, iPosOld, iNegOld, iPosNew, iNegNew;
71 double pxOld, pyOld, pxNew, pyNew, pxHad, pyHad, mHad, mT2Had, zHad,
72 GammaOld, GammaNew, xPosOld, xPosNew, xPosHad, xNegOld, xNegNew,
74 FlavContainer flavOld, flavNew;
84 class StringFragmentation {
89 StringFragmentation() {}
92 void init(Info* infoPtrIn, Settings& settings,
93 ParticleData* particleDataPtrIn, Rndm* rndmPtrIn,
94 StringFlav* flavSelPtrIn, StringPT* pTSelPtrIn, StringZ* zSelPtrIn);
97 bool fragment(
int iSub, ColConfig& colConfig,
Event& event);
100 RotBstMatrix junctionRestFrame(Vec4& p0, Vec4& p1, Vec4& p2);
105 static const int NTRYFLAV, NTRYJOIN, NSTOPMASS, NTRYJNREST,
106 NTRYJNMATCH, NTRYJRFEQ;
107 static const double FACSTOPMASS, CLOSEDM2MAX, CLOSEDM2FRAC, EXPMAX,
108 MATCHPOSNEG, EJNWEIGHTMAX, CONVJNREST, M2MAXJRF,
109 EEXTRAJNMATCH, MDIQUARKMIN, CONVJRFEQ;
115 ParticleData* particleDataPtr;
121 StringFlav* flavSelPtr;
126 double stopMass, stopNewFlav, stopSmear, eNormJunction,
127 eBothLeftJunction, eMaxLeftJunction, eMinLeftJunction,
131 bool hasJunction, isClosed;
133 double w2Rem, stopMassNow;
134 Vec4 pSum, pRem, pJunctionHadrons;
143 StringSystem system, systemMin, systemMid;
146 StringEnd posEnd, negEnd;
149 vector<int> findFirstRegion(vector<int>& iPartonIn,
Event& event);
152 void setStartEnds(
int idPos,
int idNeg, StringSystem systemNow);
155 bool energyUsedUp(
bool fromPos);
158 bool finalTwo(
bool fromPos);
161 StringRegion finalRegion();
164 void store(
Event& event);
167 bool fragmentToJunction(
Event& event);
170 int extraJoin(
double facExtra,
Event& event);
178 #endif // Pythia8_StringFragmentation_H