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() {singlets.resize(0);}
68 void init(Info* infoPtrIn, Settings& settings, StringFlav* flavSelPtrIn);
71 int size()
const {
return singlets.size();}
74 ColSinglet& operator[](
int iSub) {
return singlets[iSub];}
77 void clear() {singlets.resize(0);}
81 bool insert( vector<int>& iPartonIn,
Event& event);
84 void erase(
int iSub) {singlets.erase(singlets.begin() + iSub);}
87 void collect(
int iSub,
Event& event,
bool skipTrivial =
true);
90 int findSinglet(
int i);
97 vector< vector< pair<double,double> > > rapPairs;
102 static const double CONSTITUENTMASS;
108 StringFlav* flavSelPtr;
111 double mJoin, mJoinJunction, mStringMin;
114 vector<ColSinglet> singlets;
117 bool joinJunction( vector<int>& iPartonIn,
Event& event,
118 double massExcessIn);
134 StringRegion() : isSetUp(false), isEmpty(true), w2(0.), xPosProj(0.),
135 xNegProj(0.), pxProj(0.), pyProj(0.) {}
138 static const double MJOIN, TINY;
141 bool isSetUp, isEmpty;
142 Vec4 pPos, pNeg, eX, eY, pPosMass, pNegMass, massOffset;
143 double w2, xPosProj, xNegProj, pxProj, pyProj;
146 Vec4 gluonOffset(vector<int>& iSys,
Event& event,
int iPos,
int iNeg);
147 Vec4 gluonOffsetJRF(vector<int>& iSys,
Event& event,
int iPos,
int iNeg,
148 RotBstMatrix MtoJRF);
151 bool massiveOffset(
int iPos,
int iNeg,
int iMax,
int id1,
int id2,
152 double mc,
double mb);
155 void setUp(Vec4 p1, Vec4 p2,
bool isMassless =
false);
158 Vec4 pHad(
double xPosIn,
double xNegIn,
double pxIn,
double pyIn)
159 {
return xPosIn * pPos + xNegIn * pNeg + pxIn * eX + pyIn * eY; }
162 void project(Vec4 pIn);
163 void project(
double pxIn,
double pyIn,
double pzIn,
double eIn)
164 { project( Vec4( pxIn, pyIn, pzIn, eIn) ); }
165 double xPos()
const {
return xPosProj;}
166 double xNeg()
const {
return xNegProj;}
167 double px()
const {
return pxProj;}
168 double py()
const {
return pyProj;}
185 void setUp(vector<int>& iSys,
Event& event);
188 int iReg(
int iPos,
int iNeg)
const
189 {
return (iPos * (indxReg - iPos)) / 2 + iNeg;}
192 StringRegion& region(
int iPos,
int iNeg) {
return system[iReg(iPos, iNeg)];}
195 StringRegion& regionLowPos(
int iPos) {
196 return system[iReg(iPos, iMax - iPos)]; }
197 StringRegion& regionLowNeg(
int iNeg) {
198 return system[iReg(iMax - iNeg, iNeg)]; }
201 vector<StringRegion> system;
204 int sizePartons, sizeStrings, sizeRegions, indxReg, iMax;
205 double mJoin, m2Join;
220 int iRegNegIn = 0,
double xRegPosIn = 0.,
double xRegNegIn = 0.)
221 : fromPos(fromPosIn), iRegPos(iRegPosIn), iRegNeg(iRegNegIn),
222 xRegPos(xRegPosIn), xRegNeg(xRegNegIn) { }
225 iRegPos(v.iRegPos), iRegNeg(v.iRegNeg),
226 xRegPos(v.xRegPos), xRegNeg(v.xRegNeg) { }
229 {fromPos = v.fromPos; iRegPos = v.iRegPos; iRegNeg = v.iRegNeg;
230 xRegPos = v.xRegPos; xRegNeg = v.xRegNeg;}
return *
this; }
234 int iRegPos, iRegNeg;
235 double xRegPos, xRegNeg;
243 #endif // Pythia8_FragmentationSystems_H