PYTHIA  8.312
Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
StringFlav Class Reference

The StringFlav class is used to select quark and hadron flavours. More...

#include <FragmentationFlavZpT.h>

Inheritance diagram for StringFlav:
PhysicsBase HVStringFlav

Public Member Functions

 StringFlav ()
 Constructor.
 
virtual ~StringFlav ()
 Destructor.
 
virtual void init ()
 Initialize data members. More...
 
virtual void init (double kappaRatio, double strangeFac, double probQQmod)
 Initialise parameters when using close packing. More...
 
int pickLightQ ()
 Pick a light d, u or s quark according to fixed ratios.
 
virtual FlavContainer pick (FlavContainer &flavOld, double pT=-1.0, double kappaRatio=0.0, bool allowPop=true)
 
virtual FlavContainer pickGauss (FlavContainer &flavOld, bool allowPop=true)
 
virtual FlavContainer pickThermal (FlavContainer &flavOld, double pT, double kappaRatio)
 
virtual int combine (FlavContainer &flav1, FlavContainer &flav2)
 Combine two flavours (including diquarks) to produce a hadron. More...
 
virtual int combineId (int id1, int id2, bool keepTrying=true)
 Ditto, simplified input argument for simple configurations.
 
virtual pair< int, int > combineDiquarkJunction (int id1, int id2, int id3)
 Combine three (di-) quark flavours into two hadrons. More...
 
virtual int combineToLightest (int id1, int id2)
 Combine two flavours to produce a hadron with lowest possible mass. More...
 
virtual int idLightestNeutralMeson ()
 Lightest flavour-neutral meson.
 
virtual int getHadronIDwin ()
 Return chosen hadron in case of thermal model.
 
virtual int combineLastThermal (FlavContainer &flav1, FlavContainer &flav2, double pT, double kappaRatio)
 
virtual int getHadronID (FlavContainer &flav1, FlavContainer &flav2, double pT=-1.0, double kappaRatio=0, bool finalTwo=false)
 
virtual double getHadronMassWin (int idHad)
 Return hadron mass. Used one if present, pick otherwise.
 
void assignPopQ (FlavContainer &flav)
 Assign popcorn quark inside an original (= rank 0) diquark. More...
 
int makeDiquark (int id1, int id2, int idHad=0)
 Combine two quarks to produce a diquark. More...
 
void addQuarkDiquark (vector< pair< int, int > > &quarkCombis, int qID, int diqID, int hadronID)
 Check if quark-diquark combination should be added. If so add.
 
int getMesonSpinCounter (int hadronID)
 Get spin counter for mesons.
 
double getFlavourSpinRatios (int i, int j)
 
void variations (int idIn, bool early, bool noChoice)
 Calculate the flavor variations. More...
 
- Public Member Functions inherited from PhysicsBase
void initInfoPtr (Info &infoPtrIn)
 This function is called from above for physics objects used in a run. More...
 
virtual ~PhysicsBase ()
 Empty virtual destructor.
 
bool flag (string key) const
 Shorthand to read settings values.
 
int mode (string key) const
 
double parm (string key) const
 
string word (string key) const
 
vector< bool > fvec (string key) const
 
vector< int > mvec (string key) const
 
vector< double > pvec (string key) const
 
vector< string > wvec (string key) const
 

Protected Member Functions

virtual void initDerived ()
 Initialise derived parameters. More...
 
- Protected Member Functions inherited from PhysicsBase
 PhysicsBase ()
 Default constructor.
 
virtual void onInitInfoPtr ()
 
virtual void onBeginEvent ()
 This function is called in the very beginning of each Pythia::next call.
 
virtual void onEndEvent (Status)
 
virtual void onStat ()
 This function is called from the Pythia::stat() call.
 
void registerSubObject (PhysicsBase &pb)
 Register a sub object that should have its information in sync with this.
 

Protected Attributes

bool suppressLeadingB
 Settings for Gaussian model.
 
bool mT2suppression
 
bool useWidthPre
 
double probQQtoQ
 
double probStoUD
 
double probSQtoQQ
 
double probQQ1toQQ0
 
double probQandQQ
 
double probQandS
 
double probQandSinQQ
 
double probQQ1corr
 
double probQQ1corrInv
 
double probQQ1norm
 
double probQQ1join [4]
 
double mesonRate [4][6]
 
double mesonRateSum [4]
 
double mesonMix1 [2][6]
 
double mesonMix2 [2][6]
 
double etaSup
 
double etaPrimeSup
 
double decupletSup
 
double baryonCGSum [6]
 
double baryonCGMax [6]
 
double popcornRate
 
double popcornSpair
 
double popcornSmeson
 
double barCGMax [8]
 
double scbBM [3]
 
double popFrac
 
double popS [3]
 
double dWT [3][7]
 
double lightLeadingBSup
 
double heavyLeadingBSup
 
bool qqKappa
 
double closePackingFacPT2
 
double closePackingFacQQ2
 
double probStoUDSav
 
double probQQtoQSav
 
double probSQtoQQSav
 
double probQQ1toQQ0Sav
 
double alphaQQSav
 
double sigmaHad
 
double widthPreStrange
 
double widthPreDiquark
 
bool thermalModel
 Settings for thermal model.
 
bool mesonNonetL1
 
double temperature
 
double tempPreFactor
 
int nNewQuark
 
double mesMixRate1 [2][6]
 
double mesMixRate2 [2][6]
 
double mesMixRate3 [2][6]
 
double baryonOctWeight [6][6][6][2]
 
double baryonDecWeight [6][6][6][2]
 
bool closePacking
 Settings used by both models.
 
double exponentMPI
 
double exponentNSP
 
map< int, vector< pair< int, int > > > hadronConstIDs
 Key = hadron id, value = list of constituent ids.
 
map< int, vector< pair< int, int > > > possibleHadrons
 
map< int, vector< double > > possibleRatePrefacs
 Key = initial (di)quark id, value = prefactor to multiply rate.
 
map< pair< int, int >, vector< pair< int, int > > > possibleHadronsLast
 Similar, but for combining the last two (di)quarks. Key = (di)quark pair.
 
map< pair< int, int >, vector< double > > possibleRatePrefacsLast
 
int hadronIDwin
 Selection in thermal model.
 
int idNewWin
 
double hadronMassWin
 
- Protected Attributes inherited from PhysicsBase
InfoinfoPtr = {}
 
SettingssettingsPtr = {}
 Pointer to the settings database.
 
ParticleDataparticleDataPtr = {}
 Pointer to the particle data table.
 
LoggerloggerPtr = {}
 Pointer to logger.
 
HadronWidthshadronWidthsPtr = {}
 Pointer to the hadron widths data table.
 
RndmrndmPtr = {}
 Pointer to the random number generator.
 
CoupSMcoupSMPtr = {}
 Pointers to SM and SUSY couplings.
 
CoupSUSYcoupSUSYPtr = {}
 
BeamSetupbeamSetupPtr = {}
 
BeamParticlebeamAPtr = {}
 
BeamParticlebeamBPtr = {}
 
BeamParticlebeamPomAPtr = {}
 
BeamParticlebeamPomBPtr = {}
 
BeamParticlebeamGamAPtr = {}
 
BeamParticlebeamGamBPtr = {}
 
BeamParticlebeamVMDAPtr = {}
 
BeamParticlebeamVMDBPtr = {}
 
PartonSystemspartonSystemsPtr = {}
 Pointer to information on subcollision parton locations.
 
SigmaTotalsigmaTotPtr = {}
 Pointers to the total/elastic/diffractive cross sections.
 
SigmaCombinedsigmaCmbPtr = {}
 
set< PhysicsBase * > subObjects
 
UserHooksPtr userHooksPtr
 

Static Protected Attributes

static const int mesonMultipletCode [6] = { 1, 3, 10003, 10001, 20003, 5}
 Constants: could only be changed in the code itself. More...
 
static const double baryonCGOct [6] = { 0.75, 0.5, 0., 0.1667, 0.0833, 0.1667}
 
static const double baryonCGDec [6] = { 0., 0., 1., 0.3333, 0.6667, 0.3333}
 

Additional Inherited Members

- Public Types inherited from PhysicsBase
enum  Status {
  INCOMPLETE = -1, COMPLETE = 0, CONSTRUCTOR_FAILED, INIT_FAILED,
  LHEF_END, LOWENERGY_FAILED, PROCESSLEVEL_FAILED, PROCESSLEVEL_USERVETO,
  MERGING_FAILED, PARTONLEVEL_FAILED, PARTONLEVEL_USERVETO, HADRONLEVEL_FAILED,
  CHECK_FAILED, OTHER_UNPHYSICAL, HEAVYION_FAILED, HADRONLEVEL_USERVETO
}
 Enumerate the different status codes the event generation can have.
 

Detailed Description

The StringFlav class is used to select quark and hadron flavours.

Member Function Documentation

void assignPopQ ( FlavContainer flav)

Assign popcorn quark inside an original (= rank 0) diquark.

Safety check that intended to do something.

Make choice of popcorn quark.

Agrees with Patrik code, but opposite to intention??

Also determine if to produce popcorn meson.

int combine ( FlavContainer flav1,
FlavContainer flav2 
)
virtual

Combine two flavours (including diquarks) to produce a hadron.

Combine two flavours (including diquarks) to produce a hadron. The weighting of the combination may fail, giving output 0.

Recognize largest and smallest flavour.

Construct a meson.

Popcorn meson: use only vertex quarks. Fail if none.

Pick spin state and preliminary code.

For nondiagonal mesons distinguish particle/antiparticle.

For light diagonal mesons include uubar - ddbar - ssbar mixing.

Additional suppression of eta and eta' may give failure.

Finished for mesons.

SU(6) factors for baryon production may give failure.

Order quarks to form baryon. Pick spin.

Distinguish Lambda- and Sigma-like.

Form baryon code and return with sign.

Reimplemented in HVStringFlav.

pair< int, int > combineDiquarkJunction ( int  id1,
int  id2,
int  id3 
)
virtual

Combine three (di-) quark flavours into two hadrons.

Combine three (di-)quark flavours into two hadrons. Note that at least one of the id's must be a diquark.

Order the junction ends in an increasing |id| sequence.

If the first is a diquark then all are diquarks. Then split the first. Combine its two quarks with the other diquarks into two baryons.

Otherwise the first is an antiquark. If the second is a diquark, also the third is it. Then split the second. Let one of its quarks form a meson with the first antiquark, and the other a baryon with the third diquark.

Finally, if the first two are antiquarks, then split the third diquark and form two mesons.

If there was no diquark to split something is wrong.

Randomize the flavours of the split diquark and return the two hadrons.

int combineLastThermal ( FlavContainer flav1,
FlavContainer flav2,
double  pT,
double  kappaRatio 
)
virtual

Combine two flavours into hadron for last two remaining flavours for thermal model.

Combine two flavours (including diquarks) to produce a hadron. Function called in case of combining the two remaining flavours into last hadron.

Decide randomly on whether to treat flav1 or flav2 as incoming.

Temperature increase to work against asymmetry. Apply for s/c/b and diquarks.

Enhanced-rate prefactor for MPIs and/or nearby string pieces.

Get Gaussian width in case of mT2 suppression.

Prefactor for strange quarks and diquarks.

Enhanced-rate prefactor for MPIs and/or nearby string pieces.

Get the list of allowed hadrons and constituents for that combination of (di)quarks. First parameter of pair is hadron ID, second is nr of hadron constituents in the list.

Vector with hadron masses. Is -1.0 if m0 is use for calculating the suppression rate and mSel if mSel is used.

Calculate rates/suppression factors for given pT.

Pick mass and calculate suppression factor.

mT2 suppression with Gaussian pT?

Multiply rate with prefactor.

Save rate and add to sum

Normalize rates

Get accumulated rates

Random number to decide which hadron to pick

Save hadron.

Done.

int combineToLightest ( int  id1,
int  id2 
)
virtual

Combine two flavours to produce a hadron with lowest possible mass.

Combine two flavours (including diquarks) to produce the lightest hadron allowed for that flavour content. No popcorn flavours.

Recognize largest and smallest flavour.

Quark-antiquark to meson.

For nondiagonal mesons distinguish particle/antiparticle.

For light diagonal mesons pick pi0 or eta.

Finished for mesons.

Quark-diquark to baryon

Create baryon. Special cases with spin 3/2 and lambdalike.

Finished for baryons.

double getFlavourSpinRatios ( int  i,
int  j 
)
inline

Get the flavour and spin ratios calculated from the diquark weights. i: (0) q -> B B, (1) q -> B M B, (2) qq -> M B j: (0) s/u popcorn ratio, (1/2) s/u ratio for vertex quark if popcorn quark is u/d or s, (3) q/q' vertex quark ratio if popcorn quark is light and = q, (4/5/6) (spin 1)/(spin 0) ratio for su, us and ud

virtual int getHadronID ( FlavContainer flav1,
FlavContainer flav2,
double  pT = -1.0,
double  kappaRatio = 0,
bool  finalTwo = false 
)
inlinevirtual

General function, decides whether to just return the hadron id if thermal model was use or whether to combine the two flavours.

void init ( )
virtual

Initialize data members.

Initialize data members of the flavour generation.

Basic parameters for generation of new flavour.

Spin parameters for combining two quarks to a diquark.

Parameters for normal meson production.

Parameters for L=1 excited-meson production.

Store sum over multiplets for Monte Carlo generation.

Parameters for uubar - ddbar - ssbar meson mixing.

Fill in (flavour, spin)-dependent probability of producing the lightest or the lightest two mesons of the nonet.

Fill in rates for multiplication.

Additional suppression of eta and etaPrime.

Sum of baryon octet and decuplet weights.

Maximum SU(6) weight for ud0, ud1, uu1 types.

Popcorn baryon parameters.

Suppression of leading (= first-rank) baryons.

Use Gaussian model but with mT2 suppression?

Enhanced-rate prefactor for MPIs and/or nearby string pieces.

Save "vacuum" parameters for closepacking init() function.

Calculate derived parameters.

Use thermal model?

Temperature parameters for thermal model.

Hadron multiplets in thermal model.

Fill list of possible hadrons that are allowed to be produced. Also include a list of "emergency" hadrons that are needed to get rid of all possible endpoint (di)quarks.

Baryon octet and decuplet.

Check how many heavy baryons to include.

Only include lightest combinations.

Only include lightest combinations.

Antibaryons.

Mesons nonets. Take pseudoscalar PDG codes as basis.

Check how many heavy mesons to include. If not included in ordinary production, fill minimal list with "emergency" hadrons

Include all possible combinations, only pseudoscalar as they are the lightest ones.

Include all possible combinations, only pseudoscalar as they are the lightest ones.

Pseudoscalar nonet J=0, S=0, L=0.

Vector nonet J=1, S=1, L=0.

Include L=1 nonets?

Pseudovector nonet J=1, S=0, L=1.

Scalar nonet J=0, S=1, L=1.

Pseudovector nonet J=1, S=1, L=1.

Tensor nonet J=2, S=1, L=1.

Fill list of all hadrons ids (ordinary and "emergency").

Fill map with IDs of hadron constituents for all hadrons.

Baryon can be split into q + qq in several different ways.

Baryon octet J=1/2.

Add (q2+q3)_0/1 + q1. if (q2 < q3) (q2+q3)_0 and if (q2 > q3) (q2+q3)_1.

Add other combinations. Can be both, J=0 or J=1.

(q1+q3)j + q2

(q1+q2)j + q3

Quarks with the same flavour form J=1, all other combinations can be both, J=0 or J=1.

(q1+q2)1 + q3

(q1+q3)1 + q2

(q2+q3)1 + q1

Baryon decuplet J=3/2.

All quark pairs form diquarks with J=1. (q1+q2)1 + q3

(q1+q3)1 + q2

(q2+q3)1 + q1

Mesons usually have a trivial subdivision into quark + antiquark. Mixing of diagonal mesons is taken into account later.

id > 0: downtype+uptype: up = quark, down = antiquark (default) id > 0: same type -> larger id decides

Copy into smaller versions (one for ordinary production, two for "emergency")

List with all possible initial (di)quarks we could get.

If we include heavy quark hadrons we include the following diquarks in addition.

Loop over list with all possible initial (di)quarks. Fill map possibleHadrons with key = initial (di)quark id, value = list of possible hadron ids

  • nr in hadronConstIDs.

For heavy quarks add "emergency" list, if needed.

Fill list: first parameter of pair is hadron ID, second is nr of hadron constituents in the list.

Loop through list with hadrons and their (di)quark content, check if possible to produce given the choice of initial (di)quark.

Loop over constituent IDs.

To include uubar-ddbar-ssbar mixing include all diagonal mesons.

Calculate baryon octet and decuplet weighting factors based on Clebsch-Gordan coefficients and spin counting. Parameters: qDi1 qDi2 q3 spin. Zero for flavour=0 and same flavour diquarks with J=0.

qq0 + r

qq0 + r

Clebsch-Gordon for the rest.

qq1 + q

qq1 + r

qr0 + q

rq0 + q

qr1 + q

rq1 + q

qr0 + s

qr1 + s

Spin 1 diquarks get extra factor of 3. And all factors get relative baryon-to-meson ratio.

Go through the list of possible hadrons and calculate the prefactor that will multiply the rate.

Get hadron and constituents.

Extra suppression factor for s/c/b quarks.

Extra factor according to last digit for spin counting.

Include correct uubar-ddbar-ssbar mixing factor;

Get spin used as counter for the different multiplets

Check if baryon is octet or decuplet.

Make sure ID2 is diquark.

Extract quark flavours and spin from diquark.

Single quark.

Find Clebsch-Gordan: q1 in DQ | q2 in DQ | q3 | S of DQ

Special cases for Lamda (312) and Sigma (321) or the like.

Extract the two lightest quarks from hadron.

Extract the two quarks from the diquark.

Don't do anything if (12) or (21) is diquark.

Sigma (321)

Lamda (312)

Save prefactor.

Now the same again for joining the last two (di)quarks into hadron.

Loop over possible partners, start with next quark.

Skip all combinations with two diquarks.

Skip all combinations with two quarks or two antiquarks.

Skip all combinations with quark-antidiquark and antiquark-diquark. (1 = diquark, 2 = quark not possible).

If we are not including heavy quarks skip combinations of heavy quark - diquark with heavy quark.

Now decide which list of possible hadrons to use. As we might have to use the special list for heavy quarks we use the maximum of the absolute ids in case of two quarks and check the maximum flavour in case of quark - diquark pair.

quark - quark

quark - diquark

Check if diquark contains a heavier flavour than the quark.

New list to fill.

Now loop over possible hadrons and check if other (di)quark in constituents matches idIn2.

Get constituents.

Can take this combination.

Save.

Initialize winning parameters.

Reimplemented in HVStringFlav.

void init ( double  kappaRatio,
double  strangeFac,
double  probQQmod 
)
virtual

Initialise parameters when using close packing.

Altered probabilities with close packing.

If allowing effective kappa to enhance baryon production, do this.

Diquark scaling power controlled by closePackingFacQQ.

Probability of a diquark being formed can scale with the probability of a fluctuation on a string to not connect (and break) a nearby string. for x probability of reconnection, probability of diquark survival scales with 1/2 * [(1-x)^nG + (1-x)^nB]

Calculate derived parameters.

void initDerived ( )
protectedvirtual

Initialise derived parameters.

Initialise the derived parameters.

Parameters derived from init calls.

Enumerate distinguishable diquark types (in diquark first is popcorn q).

Maximum SU(6) weight by diquark type.

Diquark SU(6) survival = Sum_quark (quark tunnel weight) * SU(6).

Tunneling factors for diquark production; only half a pair = sqrt.

spin * (vertex factor) * (half-tunneling factor above).

Combine above two into total diquark weight for q -> B Bbar.

Suppression from having strange popcorn meson.

Suppression for a heavy quark of a diquark to fit into a baryon on the other side of popcorn meson: (0) s/u for q -> B M; (1) s/u for rank 0 diquark su -> M B; (2) ditto for s -> c/b.

Include maximum of Clebsch-Gordan coefficients.

Popcorn fraction for normal diquark production.

Popcorn fraction for rank 0 diquarks, depending on number of s quarks.

Recombine diquark weights to flavour and spin ratios. Second index: 0 = s/u popcorn quark ratio. 1, 2 = s/u ratio for vertex quark if popcorn quark is u/d or s. 3 = q/q' vertex quark ratio if popcorn quark is light and = q. 4, 5, 6 = (spin 1)/(spin 0) ratio for su, us and ud.

Case 0: q -> B B.

Case 1: q -> B M B.

Case 2: qq -> M B; diquark inside chain.

int makeDiquark ( int  id1,
int  id2,
int  idHad = 0 
)

Combine two quarks to produce a diquark.

Combine two quarks to produce a diquark. Normally according to production composition, but nonvanishing idHad means diquark from known hadron content, so use SU(6) wave function.

Initial values.

Select spin of diquark formed from two valence quarks in proton. (More hadron cases??)

Else select spin of diquark according to assumed spin-1 suppression.

Combined diquark code.

virtual FlavContainer pick ( FlavContainer flavOld,
double  pT = -1.0,
double  kappaRatio = 0.0,
bool  allowPop = true 
)
inlinevirtual

Pick a new flavour (including diquarks) given an incoming one, either by old standard Gaussian or new alternative exponential.

Reimplemented in HVStringFlav.

FlavContainer pickGauss ( FlavContainer flavOld,
bool  allowPop = true 
)
virtual

Pick a new flavour (including diquarks) given an incoming one for Gaussian pTq^2 distribution.

Initial values for new flavour.

For original diquark assign popcorn quark and whether popcorn meson.

Diquark exists, to be forced into baryon now.

Diquark exists, but do meson now.

Newly created diquark gives baryon now, antibaryon later.

Choose whether to generate a new meson or a new baryon.

Optional suppression of first-rank baryon.

Single quark for new meson or for baryon where diquark already exists.

Caclulate variations, then done for simple-quark case.

Case: 0 = q -> B B, 1 = q -> B M B, 2 = qq -> M B.

Flavour of popcorn quark (= q shared between B and Bbar).

Flavour of vertex quark.

Special case for light flavours, possibly identical.

Pick 2 * spin + 1.

Form outgoing diquark. Calculate variations. Done.

FlavContainer pickThermal ( FlavContainer flavOld,
double  pT,
double  kappaRatio 
)
virtual

Pick a hadron, based on generated pT value and initial (di)quark. Check all possible hadrons and calculate their relative suppression based on exp(-mThadron/T), possibly multiplied by spin counting, meson mixing or baryon weighting factors. First return value is hadron ID, second new (di)quark ID.

Initial values for new flavour.

Temperature increase to work against asymmetry. Apply for s/c/b and diquarks.

Enhanced-rate prefactor for MPIs and/or nearby string pieces.

Get Gaussian width in case of mT2 suppression.

Prefactor for strange quarks and diquarks.

Enhanced-rate prefactor for MPIs and/or nearby string pieces.

Get the list of allowed hadrons and constituents for that initial (di)quark. First parameter of pair is hadron ID, second is nr of hadron constituents in the list.

Vector with hadron masses. Is -1.0 if m0 is use for calculating the suppression rate and mSel if mSel is used.

Calculate rates/suppression factors for given pT.

Pick mass and calculate suppression factor.

mT2 suppression with Gaussian pT?

Multiply rate with prefactor.

Save rate and add to sum

Normalize rates

Get accumulated rates

Random number to decide which hadron to pick

Get flavour of (di)quark to use next time.

Mesons

Special case for diagonal meson, flavour remains

Baryons

Save new flavour and hadron.

id used to build hadron

id used in next step

Done.

void variations ( int  idIn,
bool  early,
bool  noChoice 
)

Calculate the flavor variations.

Loop over the variation parameters.

No diquark break from a diquark mother

If early is true, this is a quark-pair.

Include additional factor for s quark.

Additional pieces for diquark probabilities.

Member Data Documentation

const double baryonCGOct = { 0.75, 0.5, 0., 0.1667, 0.0833, 0.1667}
staticprotected

Clebsch-Gordan coefficients for baryon octet and decuplet are fixed once and for all, so only weighted sum needs to be edited. Order: ud0 + u, ud0 + s, uu1 + u, uu1 + d, ud1 + u, ud1 + s.

const int mesonMultipletCode = { 1, 3, 10003, 10001, 20003, 5}
staticprotected

Constants: could only be changed in the code itself.

The StringFlav class.

Constants: could be changed here if desired, but normally should not. These are of technical nature, as described for each. Offset for different meson multiplet id values.

map< int, vector< pair<int,int> > > possibleHadrons
protected

Key = initial (di)quark id, value = list of possible hadron ids

  • nr in hadronConstIDs.

The documentation for this class was generated from the following files: