13 #ifndef Pythia8_FragmentationSystems_H
14 #define Pythia8_FragmentationSystems_H
16 #include "Pythia8/Basics.h"
17 #include "Pythia8/Event.h"
18 #include "Pythia8/FragmentationFlavZpT.h"
19 #include "Pythia8/Info.h"
20 #include "Pythia8/ParticleData.h"
21 #include "Pythia8/PythiaStdlib.h"
22 #include "Pythia8/Settings.h"
36 ColSinglet() : pSum(0., 0., 0., 0.), mass(0.), massExcess(0.),
37 hasJunction(false), isClosed(false), isCollected(false) {}
38 ColSinglet(vector<int>& iPartonIn, Vec4 pSumIn,
double massIn,
39 double massExcessIn,
bool hasJunctionIn =
false,
40 bool isClosedIn =
false,
bool isCollectedIn =
false)
41 : iParton(iPartonIn), pSum(pSumIn), mass(massIn),
42 massExcess(massExcessIn), hasJunction(hasJunctionIn),
43 isClosed(isClosedIn), isCollected(isCollectedIn) {}
46 int size()
const {
return iParton.size();}
51 double mass, massExcess;
52 bool hasJunction, isClosed, isCollected;
65 ColConfig() : infoPtr(), flavSelPtr(), mJoin(), mJoinJunction(),
66 mStringMin() {singlets.resize(0);}
69 void init(Info* infoPtrIn, StringFlav* flavSelPtrIn);
72 int size()
const {
return singlets.size();}
75 ColSinglet& operator[](
int iSub) {
return singlets[iSub];}
78 void clear() {singlets.resize(0);}
82 bool insert( vector<int>& iPartonIn,
Event& event);
86 bool simpleInsert( vector<int>& iPartonIn,
Event& event,
87 bool fixOrder =
false);
90 void erase(
int iSub) {singlets.erase(singlets.begin() + iSub);}
93 void collect(
int iSub,
Event& event,
bool skipTrivial =
true);
96 int findSinglet(
int i);
103 vector< vector< pair<double,double> > > rapPairs;
108 static const double CONSTITUENTMASS;
114 StringFlav* flavSelPtr;
117 double mJoin, mJoinJunction, mStringMin;
120 vector<ColSinglet> singlets;
123 bool joinJunction( vector<int>& iPartonIn,
Event& event,
124 double massExcessIn);
140 StringRegion() : isSetUp(false), isEmpty(true), w2(0.), xPosProj(0.),
141 xNegProj(0.), pxProj(0.), pyProj(0.), colPos(0), colNeg(0) {}
144 static const double MJOIN, TINY;
147 bool isSetUp, isEmpty;
148 Vec4 pPos, pNeg, eX, eY, pPosMass, pNegMass, massOffset;
149 double w2, xPosProj, xNegProj, pxProj, pyProj;
153 Vec4 gluonOffset(vector<int>& iSys,
Event& event,
int iPos,
int iNeg);
154 Vec4 gluonOffsetJRF(vector<int>& iSys,
Event& event,
int iPos,
int iNeg,
155 RotBstMatrix MtoJRF);
158 bool massiveOffset(
int iPos,
int iNeg,
int iMax,
int id1,
int id2,
159 double mc,
double mb);
162 void setUp(Vec4 p1, Vec4 p2,
int col1,
int col2,
bool isMassless =
false);
165 Vec4 pHad(
double xPosIn,
double xNegIn,
double pxIn,
double pyIn)
166 {
return xPosIn * pPos + xNegIn * pNeg + pxIn * eX + pyIn * eY; }
169 void project(Vec4 pIn);
170 void project(
double pxIn,
double pyIn,
double pzIn,
double eIn)
171 { project( Vec4( pxIn, pyIn, pzIn, eIn) ); }
172 double xPos()
const {
return xPosProj;}
173 double xNeg()
const {
return xNegProj;}
174 double px()
const {
return pxProj;}
175 double py()
const {
return pyProj;}
189 StringSystem() : sizePartons(), sizeStrings(), sizeRegions(), indxReg(),
190 iMax(), mJoin(), m2Join() {}
193 void setUp(vector<int>& iSys,
Event& event);
196 int iReg(
int iPos,
int iNeg)
const
197 {
return (iPos * (indxReg - iPos)) / 2 + iNeg;}
200 StringRegion& region(
int iPos,
int iNeg) {
return system[iReg(iPos, iNeg)];}
203 StringRegion& regionLowPos(
int iPos) {
204 return system[iReg(iPos, iMax - iPos)]; }
205 StringRegion& regionLowNeg(
int iNeg) {
206 return system[iReg(iMax - iNeg, iNeg)]; }
209 vector<StringRegion> system;
212 int sizePartons, sizeStrings, sizeRegions, indxReg, iMax;
213 double mJoin, m2Join;
227 StringVertex(
bool fromPosIn =
true,
int iRegPosIn = 0,
228 int iRegNegIn = 0,
double xRegPosIn = 0.,
double xRegNegIn = 0.)
229 : fromPos(fromPosIn), iRegPos(iRegPosIn), iRegNeg(iRegNegIn),
230 xRegPos(xRegPosIn), xRegNeg(xRegNegIn) { }
232 StringVertex(
const StringVertex& v): fromPos(v.fromPos),
233 iRegPos(v.iRegPos), iRegNeg(v.iRegNeg),
234 xRegPos(v.xRegPos), xRegNeg(v.xRegNeg) { }
236 StringVertex& operator = (
const StringVertex& v) {
if (
this != &v)
237 {fromPos = v.fromPos; iRegPos = v.iRegPos; iRegNeg = v.iRegNeg;
238 xRegPos = v.xRegPos; xRegNeg = v.xRegNeg;}
return *
this; }
242 int iRegPos, iRegNeg;
243 double xRegPos, xRegNeg;
251 #endif // Pythia8_FragmentationSystems_H