12 #ifndef Pythia8_FragmentationSystems_H
13 #define Pythia8_FragmentationSystems_H
15 #include "Pythia8/Basics.h"
16 #include "Pythia8/Event.h"
17 #include "Pythia8/FragmentationFlavZpT.h"
18 #include "Pythia8/Info.h"
19 #include "Pythia8/ParticleData.h"
20 #include "Pythia8/PythiaStdlib.h"
21 #include "Pythia8/Settings.h"
35 ColSinglet() : pSum(0., 0., 0., 0.), mass(0.), massExcess(0.),
36 hasJunction(false), isClosed(false), isCollected(false) {}
37 ColSinglet(vector<int>& iPartonIn, Vec4 pSumIn,
double massIn,
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;
64 ColConfig() {singlets.resize(0);}
67 void init(Info* infoPtrIn, Settings& settings, StringFlav* flavSelPtrIn);
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;
103 StringFlav* flavSelPtr;
106 double mJoin, mJoinJunction, mStringMin;
109 vector<ColSinglet> singlets;
112 bool joinJunction( vector<int>& iPartonIn,
Event& event,
113 double massExcessIn);
129 StringRegion() : isSetUp(false), isEmpty(true) {}
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)];}
180 StringRegion& regionLowPos(
int iPos) {
181 return system[iReg(iPos, iMax - iPos)]; }
182 StringRegion& regionLowNeg(
int iNeg) {
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