10 #ifndef Pythia8_StringFragmentation_H 11 #define Pythia8_StringFragmentation_H 13 #include "Pythia8/FragmentationModel.h" 30 iNegOld(), iPosNew(), iNegNew(), iPosNewTmp(), iNegNewTmp(),
31 hadSoFar(), colOld(), colNew(),
32 pxOld(), pyOld(), pxNew(), pyNew(), pxHad(), pyHad(), mHad(),
33 mT2Had(), zHad(), GammaOld(), GammaNew(), xPosOld(), xPosNew(),
34 xPosHad(), xNegOld(), xNegNew(), xNegHad(), aLund(), bLund(),
35 iPosOldPrev(), iNegOldPrev(), colOldPrev(), pxOldPrev(),
36 pyOldPrev(), GammaOldPrev(), xPosOldPrev(), xNegOldPrev(),
37 mVecRatio(1.), tinyEq(), pT2tiny() {}
45 bLund = zSelPtr->bAreaLund(); aLund = zSelPtr->
aAreaLund();
46 closePacking = settings.
flag(
"ClosePacking:doClosePacking"); }
49 void setUp(
bool fromPosIn,
int iEndIn,
int idOldIn,
int iMaxIn,
50 double pxIn,
double pyIn,
double GammaIn,
double xPosIn,
51 double xNegIn,
int colIn,
double mVecRatioIn);
54 void newHadron(
double kappaModifier,
bool forbidPopcornNow =
false,
55 double strangeJunc = 0.,
double probQQmod = 1.);
88 int iEnd, iMax, idHad, iPosOld, iNegOld, iPosNew, iNegNew, iPosNewTmp,
89 iNegNewTmp, hadSoFar, colOld, colNew;
90 double pxOld, pyOld, pxNew, pyNew, pxHad, pyHad, mHad, mT2Had, zHad,
91 GammaOld, GammaNew, xPosOld, xPosNew, xPosHad, xNegOld, xNegNew,
92 xNegHad, aLund, bLund;
93 int iPosOldPrev, iNegOldPrev, colOldPrev;
94 double pxOldPrev, pyOldPrev, GammaOldPrev, xPosOldPrev, xNegOldPrev,
95 mVecRatio, tinyEq, pT2tiny;
113 closePacking(), setVertices(), constantTau(), smearOn(),
114 traceColours(false), hadronVertex(), stopMass(), stopNewFlav(),
115 stopSmear(), pNormJunction(), pMaxJunction(), eJunctionCutoff(),
116 mJunctionCutoff(), eBothLeftJunction(),
117 eMaxLeftJunction(), eMinLeftJunction(), mJoin(), bLund(),
118 closePackingFluxRatio(1.), closePackingPT20(1.), pT20(),
119 xySmear(), maxSmear(), maxTau(), kappaVtx(), mc(), mb(),
120 hasJunction(), isClosed(), iPos(), iNeg(), nExtraJoin(),
121 w2Rem(), stopMassNow(), mVecRatio(1.),
122 idDiquark(), legMin(), legMid() {}
130 StringZ* zSelPtrIn =
nullptr, FragModPtr fragModPtrIn =
nullptr)
override;
134 bool isDiff =
false,
bool systemRecoil =
true)
override;
141 const bool angleCheck =
true)
const;
149 static const int NTRYFLAV, NTRYJOIN, NSTOPMASS,
150 NTRYJNMATCH, NTRYJRFEQ, NTRYSMEAR, MAXVETOFINTWO;
151 static const double FACSTOPMASS, CLOSEDM2MAX, CLOSEDM2FRAC, EXPMAX,
152 MATCHPOSNEG, M2MINJRF, EMINJRF, EEXTRAJNMATCH,
153 MDIQUARKMIN, CONVJRFEQ, CHECKPOS;
156 FragModPtr flavRopePtr;
159 bool doFlavBeforePT, closePacking, setVertices, constantTau, smearOn,
160 traceColours, hardRemn, doStrangeJunc;
162 double stopMass, stopNewFlav, stopSmear, pNormJunction, pMaxJunction,
163 eJunctionCutoff, mJunctionCutoff,
164 eBothLeftJunction, eMaxLeftJunction, eMinLeftJunction,
165 mJoin, bLund, closePackingFluxRatio, closePackingPT20,
166 qqSupPar, qqSupAnti, pT20, xySmear, maxSmear, maxTau,
167 kappaVtx, mc, mb, dampPopcorn, aRemn, bRemn, strangeJuncParm;
170 bool hasJunction, isClosed;
171 int iPos, iNeg, nExtraJoin;
172 double w2Rem, stopMassNow, kappaModifier, probQQmod, mVecRatio;
173 Vec4 pSum, pRem, pJunctionHadrons;
176 bool doChangeFragPar =
false, doVetoFrag =
false;
179 vector<int> iParton, iPartonMinLeg, iPartonMidLeg, iPartonMax;
182 vector<StringVertex> stringVertices, legMinVertices, legMidVertices;
186 vector<Vec4> listJRF;
187 vector<double> weightJRF;
188 int iLeg[3], idLeg[3], legEnd[3];
189 double weightSum, pSumJRF, m2Leg[3];
191 bool lastJRF, endpoint[3];
200 Vec4 pMinEnd, pMidEnd;
210 StringEnd posEnd, negEnd, posEndSave, negEndSave;
213 vector<int> findFirstRegion(
int iSub,
const ColConfig& colConfig,
214 const Event& event)
const;
217 void setStartEnds(
int idPos,
int idNeg,
const StringSystem& systemNow,
221 bool energyUsedUp(
bool fromPos);
224 bool finalTwo(
bool fromPos,
const Event& event,
bool usedPosJun,
228 Vec4 pPosFinalReg, pNegFinalReg, eXFinalReg, eYFinalReg;
231 bool setHadronVertices(
Event& event);
237 void store(
Event& event);
240 bool fragmentToJunction(
Event& event,
241 vector< vector< pair<double,double> > >& rapPairs);
247 bool collinearPair(
Event& event);
248 bool perturbedJRF(
Event& event);
249 int updateLegs(
Event& event,
Vec4 vJunIn,
bool juncCoM =
false);
250 double updateWeights(
double pSmall,
Vec4 vJunIn);
251 void nextParton(
Event& event,
int leg);
254 int extraJoin(
double facExtra,
Event& event);
259 vector< vector< pair<double,double> > >& rapPairs,
262 double yMax(
Particle pIn,
double mTiny) {
263 double temp = log( ( pIn.e() + abs(pIn.pz()) ) / max( mTiny, pIn.mT()) );
264 return (pIn.pz() > 0) ? temp : -temp; }
266 double yMax(
Vec4 pIn,
double mTiny) {
267 double mTemp = pIn.m2Calc() + pIn.pT2();
268 mTemp = (mTemp >= 0.) ? sqrt(mTemp) : -sqrt(-mTemp);
269 double temp = log( ( pIn.e() + abs(pIn.pz()) ) / max( mTiny, mTemp) );
270 return (pIn.pz() > 0) ? temp : -temp; }
Definition: FragmentationSystems.h:225
void setFlavBeforePT(bool doFlavBeforePTin)
Set order of flavour and pT selection in StringEnd.
Definition: StringFragmentation.h:125
bool flag(string keyIn)
Give back current value, with check that key exists.
Definition: Settings.cc:1613
virtual double aAreaLund()
a and b fragmentation parameters needed in some operations.
Definition: FragmentationFlavZpT.h:254
The Event class holds all info on the generated event.
Definition: Event.h:408
void init(ParticleData *particleDataPtrIn, StringFlav *flavSelPtrIn, StringPT *pTSelPtrIn, StringZ *zSelPtrIn, Settings &settings, bool doFlavBeforePTin=true)
Save pointers.
Definition: StringFragmentation.h:40
Vec4 kinematicsHadron(StringSystem &system, StringVertex &newVertex, double zHadIn)
Definition: StringFragmentation.cc:131
void newHadron(double kappaModifier, bool forbidPopcornNow=false, double strangeJunc=0., double probQQmod=1.)
Fragment off one hadron from the string system, in flavour and pT.
Definition: StringFragmentation.cc:67
void setUp(bool fromPosIn, int iEndIn, int idOldIn, int iMaxIn, double pxIn, double pyIn, double GammaIn, double xPosIn, double xNegIn, int colIn, double mVecRatioIn)
Set up initial endpoint values from input.
Definition: StringFragmentation.cc:39
The StringPT class is used to select select transverse momenta.
Definition: FragmentationFlavZpT.h:284
static const double PT2SAME
Assume two (eX, eY) regions are related if pT2 differs by less.
Definition: StringFragmentation.h:73
StringFlav * flavSelPtr
Pointers to classes for flavour, pT and z generation.
Definition: StringFragmentation.h:79
ParticleData * particleDataPtr
Pointer to the particle data table.
Definition: StringFragmentation.h:76
Definition: StringFragmentation.h:106
Definition: FragmentationSystems.h:186
StringFragmentation()
Constructor.
Definition: StringFragmentation.h:111
Definition: FragmentationSystems.h:136
bool doFlavBeforePT
Data members.
Definition: StringFragmentation.h:87
StringEnd()
Constructor.
Definition: StringFragmentation.h:28
The StringZ class is used to sample the fragmentation function f(z).
Definition: FragmentationFlavZpT.h:219
void updateToPrev()
Update string end information to previous string break.
Definition: StringFragmentation.cc:567
Definition: StringFragmentation.h:23
Vec4 kinematicsHadronTmp(StringSystem system, Vec4 pRem, double phi, double mult)
Definition: StringFragmentation.cc:320
void storePrev()
Store old string end information.
Definition: StringFragmentation.cc:549
StringFlav flavSelNow
Local copy of flavSelPtr for modified flavour selection.
Definition: StringFragmentation.h:84
The ColConfig class describes the colour configuration of the whole event.
Definition: FragmentationSystems.h:60
void update()
Update string end information after a hadron has been removed.
Definition: StringFragmentation.cc:531
void setMVecRatio(double mVecRatioIn)
Set the vector mass ratio.
Definition: StringFragmentation.h:144
Definition: FragmentationFlavZpT.h:33
FragmentationModel is the base class for handling fragmentation algorithms.
Definition: FragmentationModel.h:28
double phi(const Vec4 &v1, const Vec4 &v2)
phi is azimuthal angle between v1 and v2 around z axis.
Definition: Basics.cc:703
Header for classes to set beam momentum and interaction vertex spread.
Definition: Analysis.h:20
The StringFlav class is used to select quark and hadron flavours.
Definition: FragmentationFlavZpT.h:76
StringFlav flavSelNow
Local copy of flavSelPtr for modified flavour selection.
Definition: StringFragmentation.h:137
static const double MEANMMIN
Definition: StringFragmentation.h:73
This class holds a map of all ParticleDataEntries.
Definition: ParticleData.h:423
static const double TINY
Constants: could only be changed in the code itself.
Definition: StringFragmentation.h:73
Definition: Settings.h:196