12 #ifndef Pythia8_FragmentationSystems_H
13 #define Pythia8_FragmentationSystems_H
17 #include "FragmentationFlavZpT.h"
19 #include "ParticleData.h"
20 #include "PythiaStdlib.h"
35 ColSinglet() : pSum(0., 0., 0., 0.), mass(0.), massExcess(0.),
36 hasJunction(
false), isClosed(
false), isCollected(
false) {}
38 double massExcessIn,
bool hasJunctionIn =
false,
39 bool isClosedIn =
false,
bool isCollectedIn =
false)
40 : iParton(iPartonIn), pSum(pSumIn), mass(massIn),
41 massExcess(massExcessIn), hasJunction(hasJunctionIn),
42 isClosed(isClosedIn), isCollected(isCollectedIn) {}
45 int size()
const {
return iParton.size();}
50 double mass, massExcess;
51 bool hasJunction, isClosed, isCollected;
70 int size()
const {
return singlets.size();}
73 ColSinglet& operator[](
int iSub) {
return singlets[iSub];}
76 void clear() {singlets.resize(0);}
80 bool insert( vector<int>& iPartonIn,
Event& event);
83 void erase(
int iSub) {singlets.erase(singlets.begin() + iSub);}
86 void collect(
int iSub,
Event& event,
bool skipTrivial =
true);
89 int findSinglet(
int i);
92 void list(ostream& os = cout)
const;
97 static const double CONSTITUENTMASS;
106 double mJoin, mJoinJunction, mStringMin;
109 vector<ColSinglet> singlets;
112 bool joinJunction( vector<int>& iPartonIn,
Event& event,
113 double massExcessIn);
132 static const double MJOIN, TINY;
135 bool isSetUp, isEmpty;
136 Vec4 pPos, pNeg, eX, eY;
137 double w2, xPosProj, xNegProj, pxProj, pyProj;
140 void setUp(
Vec4 p1,
Vec4 p2,
bool isMassless =
false);
143 Vec4 pHad(
double xPosIn,
double xNegIn,
double pxIn,
double pyIn)
144 {
return xPosIn * pPos + xNegIn * pNeg + pxIn * eX + pyIn * eY; }
147 void project(
Vec4 pIn);
148 void project(
double pxIn,
double pyIn,
double pzIn,
double eIn)
149 { project(
Vec4( pxIn, pyIn, pzIn, eIn) ); }
150 double xPos()
const {
return xPosProj;}
151 double xNeg()
const {
return xNegProj;}
152 double px()
const {
return pxProj;}
153 double py()
const {
return pyProj;}
170 void setUp(vector<int>& iSys,
Event& event);
173 int iReg(
int iPos,
int iNeg)
const
174 {
return (iPos * (indxReg - iPos)) / 2 + iNeg;}
177 StringRegion& region(
int iPos,
int iNeg) {
return system[iReg(iPos, iNeg)];}
181 return system[iReg(iPos, iMax - iPos)]; }
183 return system[iReg(iMax - iNeg, iNeg)]; }
186 vector<StringRegion> system;
189 int sizePartons, sizeStrings, sizeRegions, indxReg, iMax;
190 double mJoin, m2Join;
198 #endif // Pythia8_FragmentationSystems_H