File indexing completed on 2025-01-18 10:06:24
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013 #ifndef Pythia8_FragmentationSystems_H
0014 #define Pythia8_FragmentationSystems_H
0015
0016 #include "Pythia8/Basics.h"
0017 #include "Pythia8/Event.h"
0018 #include "Pythia8/FragmentationFlavZpT.h"
0019 #include "Pythia8/Info.h"
0020 #include "Pythia8/ParticleData.h"
0021 #include "Pythia8/PythiaStdlib.h"
0022 #include "Pythia8/Settings.h"
0023
0024 namespace Pythia8 {
0025
0026
0027
0028
0029
0030
0031 class ColSinglet {
0032
0033 public:
0034
0035
0036 ColSinglet() : pSum(0., 0., 0., 0.), mass(0.), massExcess(0.),
0037 hasJunction(false), isClosed(false), isCollected(false) {}
0038 ColSinglet(vector<int>& iPartonIn, Vec4 pSumIn, double massIn,
0039 double massExcessIn, bool hasJunctionIn = false,
0040 bool isClosedIn = false, bool isCollectedIn = false)
0041 : iParton(iPartonIn), pSum(pSumIn), mass(massIn),
0042 massExcess(massExcessIn), hasJunction(hasJunctionIn),
0043 isClosed(isClosedIn), isCollected(isCollectedIn) {}
0044
0045
0046 int size() const { return iParton.size();}
0047
0048
0049 vector<int> iParton;
0050 Vec4 pSum;
0051 double mass, massExcess;
0052 bool hasJunction, isClosed, isCollected;
0053
0054 };
0055
0056
0057
0058
0059
0060 class ColConfig {
0061
0062 public:
0063
0064
0065 ColConfig() : loggerPtr(), flavSelPtr(), mJoin(), mJoinJunction(),
0066 mStringMin() {singlets.resize(0);}
0067
0068
0069 void init(Info* infoPtrIn, StringFlav* flavSelPtrIn);
0070
0071
0072 int size() const {return singlets.size();}
0073
0074
0075 ColSinglet& operator[](int iSub) {return singlets[iSub];}
0076 const ColSinglet& operator[](int iSub) const {return singlets[iSub];}
0077
0078
0079 void clear() {singlets.resize(0);}
0080
0081
0082
0083 bool insert( vector<int>& iPartonIn, Event& event);
0084
0085
0086
0087 bool simpleInsert( vector<int>& iPartonIn, Event& event,
0088 bool fixOrder = false);
0089
0090
0091 void erase(int iSub) {singlets.erase(singlets.begin() + iSub);}
0092
0093
0094 void collect(int iSub, Event& event, bool skipTrivial = true);
0095
0096
0097 int findSinglet(int i);
0098
0099
0100 void list() const;
0101
0102
0103
0104 vector< vector< pair<double,double> > > rapPairs;
0105
0106 private:
0107
0108
0109 static const double CONSTITUENTMASS;
0110
0111
0112 Logger* loggerPtr;
0113
0114
0115 StringFlav* flavSelPtr;
0116
0117
0118 double mJoin, mJoinJunction, mStringMin;
0119
0120
0121 vector<ColSinglet> singlets;
0122
0123
0124 bool joinJunction( vector<int>& iPartonIn, Event& event,
0125 double massExcessIn);
0126
0127 };
0128
0129
0130
0131
0132
0133
0134
0135
0136 class StringRegion {
0137
0138 public:
0139
0140
0141 StringRegion() : isSetUp(false), isEmpty(true), w2(0.), xPosProj(0.),
0142 xNegProj(0.), pxProj(0.), pyProj(0.), colPos(0), colNeg(0) {}
0143
0144
0145 static const double MJOIN, TINY;
0146
0147
0148 bool isSetUp, isEmpty;
0149 Vec4 pPos, pNeg, eX, eY, pPosMass, pNegMass, massOffset;
0150 double w2, xPosProj, xNegProj, pxProj, pyProj;
0151 int colPos, colNeg;
0152
0153
0154 Vec4 gluonOffset(vector<int>& iSys, Event& event, int iPos, int iNeg);
0155 Vec4 gluonOffsetJRF(vector<int>& iSys, Event& event, int iPos, int iNeg,
0156 RotBstMatrix MtoJRF);
0157
0158
0159 bool massiveOffset(int iPos, int iNeg, int iMax, int id1, int id2,
0160 double mc, double mb);
0161
0162
0163 void setUp(Vec4 p1, Vec4 p2, int col1, int col2, bool isMassless = false);
0164
0165
0166 Vec4 pHad( double xPosIn, double xNegIn, double pxIn, double pyIn) const
0167 { return xPosIn * pPos + xNegIn * pNeg + pxIn * eX + pyIn * eY; }
0168
0169
0170 void project(Vec4 pIn);
0171 void project( double pxIn, double pyIn, double pzIn, double eIn)
0172 { project( Vec4( pxIn, pyIn, pzIn, eIn) ); }
0173 double xPos() const {return xPosProj;}
0174 double xNeg() const {return xNegProj;}
0175 double px() const {return pxProj;}
0176 double py() const {return pyProj;}
0177
0178 };
0179
0180
0181
0182
0183
0184
0185 class StringSystem {
0186
0187 public:
0188
0189
0190 StringSystem() : sizePartons(), sizeStrings(), sizeRegions(), indxReg(),
0191 iMax(), mJoin(), m2Join() {}
0192
0193
0194 void setUp(const vector<int>& iSys, const Event& event);
0195
0196
0197 int iReg( int iPos, int iNeg) const
0198 {return (iPos * (indxReg - iPos)) / 2 + iNeg;}
0199
0200
0201 StringRegion& region(int iPos, int iNeg) {return system[iReg(iPos, iNeg)];}
0202
0203
0204 const StringRegion& regionLowPos(int iPos) const {
0205 return system[iReg(iPos, iMax - iPos)]; }
0206 const StringRegion& regionLowNeg(int iNeg) const {
0207 return system[iReg(iMax - iNeg, iNeg)]; }
0208
0209
0210 vector<StringRegion> system;
0211
0212
0213 int sizePartons, sizeStrings, sizeRegions, indxReg, iMax;
0214 double mJoin, m2Join;
0215
0216 };
0217
0218
0219
0220
0221
0222
0223 class StringVertex {
0224
0225 public:
0226
0227
0228 StringVertex() : fromPos(false), iRegPos(0), iRegNeg(0),
0229 xRegPos(0.), xRegNeg(0.) { }
0230
0231 StringVertex(bool fromPosIn, int iRegPosIn,
0232 int iRegNegIn, double xRegPosIn, double xRegNegIn)
0233 : fromPos(fromPosIn), iRegPos(iRegPosIn), iRegNeg(iRegNegIn),
0234 xRegPos(xRegPosIn), xRegNeg(xRegNegIn) { }
0235
0236 StringVertex(const StringVertex& v): fromPos(v.fromPos),
0237 iRegPos(v.iRegPos), iRegNeg(v.iRegNeg),
0238 xRegPos(v.xRegPos), xRegNeg(v.xRegNeg) { }
0239
0240 StringVertex& operator = (const StringVertex& v) {if (this != &v)
0241 {fromPos = v.fromPos; iRegPos = v.iRegPos; iRegNeg = v.iRegNeg;
0242 xRegPos = v.xRegPos; xRegNeg = v.xRegNeg;} return *this; }
0243
0244
0245 void store(bool fromPosIn, int iRegPosIn, int iRegNegIn,
0246 double xRegPosIn, double xRegNegIn) {
0247 fromPos = fromPosIn; iRegPos = iRegPosIn; iRegNeg = iRegNegIn;
0248 xRegPos = xRegPosIn; xRegNeg = xRegNegIn; }
0249
0250
0251 bool fromPos;
0252 int iRegPos, iRegNeg;
0253 double xRegPos, xRegNeg;
0254
0255 };
0256
0257
0258
0259 }
0260
0261 #endif