<chapter name="ZSelection"> 
 
<h2>z Selection</h2> 
 
The <code>StringZ</code> class handles the choice of longitudinal 
lightcone fraction <ei>z</ei>. 
<ul> 
<li>For light quark flavours, only the Lund Symmetric Fragmentation 
Function (or Lund FF for short) is available in PYTHIA, with several 
different options for parameterization and parameter values. See the 
section on <a href="#lundFF">light quark flavours</a> below.</li> 
<li>For massive quarks (and exotic coloured particles), the Bowler 
modification to the Lund FF is the default choice, but the 
Peterson/SLAC fragmentation function is also available as an 
alternative. See the section on <a href="#massiveQuarks">massive quark 
flavours</a> below.</li> 
</ul> 
 
<a name="lundFF"></a> 
<h3>The fragmentation function for light quark flavours</h3> 
 
<p/> 
The Lund symmetric fragmentation function <ref>And83</ref> is the only 
option for light quark (and diquark) flavours and is of the form 
<eq> 
    f(z) = (1/z) * (1-z)^a * exp(-b m_T^2 / z) 
</eq> 
with the two main free parameters <ei>a</ei> and <ei>b</ei> to be 
tuned to data. They are set with the following two parameters. 
 
<parm name="StringZ:aLund" default="0.68" min="0.0" max="2.0"> 
The <ei>a</ei> parameter of the Lund symmetric fragmentation function. 
</parm> 
 
<parm name="StringZ:bLund" default="0.98" min="0.2" max="2.0"> 
The <ei>b</ei> parameter of the Lund symmetric fragmentation function. 
</parm> 
 
<p/> 
In principle, each flavour can have a different <ei>a</ei>. Then, 
for going from an old flavour <ei>i</ei> to a new <ei>j</ei> one 
the shape is 
<eq> 
    f(z) = (1/z) * z^{a_i} * ((1-z)/z)^{a_j} * exp(-b * m_T^2 / z) 
</eq> 
This is only implemented for s quarks and diquarks relative to normal quarks: 
 
<parm name="StringZ:aExtraSQuark" default="0.0" min="-1.0" max="2.0"> 
allows a different <ei>a</ei> for s quarks, with total 
<ei>a = aLund + aExtraSQuark</ei>. For negative values, 
note that the resulting <ei>a</ei> for strange quarks is not allowed 
to be smaller than zero. 
</parm> 
 
<parm name="StringZ:aExtraDiquark" default="0.97" min="0.0" max="2.0"> 
allows a larger <ei>a</ei> for diquarks, with total 
<ei>a = aLund + aExtraDiquark</ei>. 
</parm> 
 
<h4>An important bug fix</h4> 
 
<flag name="StringZ:useOldAExtra" default="off"> 
flag which, when on, reproduces an old incorrect behavior of updating 
<code>aExtra</code>. This bug was introduced in the transition from 
Pythia 6 to Pythia 8, and fixed in Pythia 8.315, when also this flag 
was introduced. Inadvertently, the type of the old and new strange quark 
or diquark was flipped in the <ei>(1-z)^a</ei> factor when updating 
<code>aExtra</code> between string breaks. This flag has now been 
set to <code>on</code> for all past tunes distributed with Pythia, 
to ensure that these tunes still are valid, since they were tuned 
with this old behavior. All future tunes should be made with 
this flag set to <code>off</code> (the default value). 
<note>Note:</note> If you are using an old custom tune file with 
Pythia 8.315 or beyond, you should include 
<code>StringZ:useOldAExtra = on</code> to ensure that such a tune 
remains valid. Conversely, if you are using an old tune but want to 
study how it would be impacted by a correct <ei>z</ei> selection, 
you need to set <code>StringZ:useOldAExtra = off</code> to 
annul the change from the default <code>off</code> to <code>on</code> 
when the tune is read. 
</flag> 
 
<h4>An alternative way to set <ei>a</ei> and <ei>b</ei></h4> 
 
In the context of fits to experimental data, the <ei>a</ei> 
and <ei>b</ei> parameters typically exhibit a very high degree of 
correlation. An option for choosing alternative parameterizations of 
the Lund FF is therefore provided, whereby the user can specify a 
desired mean of the fragmentation function instead of the 
<ei>b</ei> parameter. Optionally, the <ei>a</ei> 
parameter can also be derived, from a user-specified root-mean-square 
(RMS) width of the FF. And, finally, the 
<ei>aExtraDiquark</ei> and <ei>aExtraSQuark</ei> parameters can also 
be recast in terms of multiplicative (rather than additive) 
parameters. These options can be enabled via the following switch: 
 
<modepick name="StringZ:deriveLundPars" default="0" min="0" max="4"> 
<option value="0">The standard parameterization of the Lund FF is 
used, in terms of <code>aLund</code>, <code>bLund</code>, 
<code>aExtraDiquark</code>, and <code>aExtraSQuark</code>. 
</option> 
<option value="1">The <code>avgZLund</code> parameter below is 
used. The <code>bLund</code> parameter is treated as a derived 
quantity which is determined during program initialization. 
</option> 
<option value="2">The <code>avgZLund</code> and 
<code>rmsZLund</code> parameters below are used. Both 
<code>aLund</code> and <code>bLund</code> are treated 
as derived quantities which are determined during program initialization. 
</option> 
<option value="3">As for option <code>2</code> but also the 
<code>facALundDiquark</code> parameter below is used instead of 
<code>aExtraDiquark</code>. 
</option> 
<option value="4">As for option <code>3</code> but also the 
<code>facALundSQuark</code> parameter below is used instead of 
<code>aExtraSQuark</code>. 
</option> 
</modepick> 
 
<p/> 
with parameters: 
 
<parm name="StringZ:avgZLund" default="0.550" min="0.375" max="0.615"> 
For <code>StringZ:deriveLundPars >= 1</code>, this parameter specifies 
the average of the fragmentation function for primary rho mesons, 
evaluated at <ei>mT^2 = mRho^2 + 2<code>StringPT:sigma</code>^2</ei>. 
The appropriate <ei>b</ei>-parameter value is computed automatically 
during initialization and the <code>StringZ:bLund</code> parameter is 
updated accordingly. Note that the derived value is allowed to exceed 
the nominal limits given for <code>bLund</code> above. This is 
intended to allow fits to see the functional behaviour even outside 
the nominal limits. 
</parm> 
 
<parm name="StringZ:rmsZLund" default="0.197" min="0.165" max="0.225"> 
For <code>StringZ:deriveLundPars >= 2</code>, this parameter specifies 
the width of the fragmentation function for primary rho mesons, in 
terms of the root-mean-square deviation (RMSD), <ei>rmsZ = sqrt( 
&lt;z^2&gt; - &lt;z&gt;^2 )</ei>, of the fragmentation function for 
primary rho mesons. The appropriate <ei>a</ei>-parameter value is 
computed automatically during initialization and the 
<code>StringZ:aLund</code> parameter is updated accordingly. Note that 
the derived value is allowed to exceed the nominal limits given for 
<code>aLund</code> above. This is intended to allow fits to see the 
functional behaviour even outside the nominal limits. Note however 
that the initialization step will produce an error if a value for 
<code>aLund</code> less than zero would be required for the requested 
combination of <code>avgZLund</code> and <code>rmsZLund</code>. The 
The <code>min</code> and <code>max</code> values for the 
<code>avgZLund</code> and <code>rmsZLund</code> parameters have been 
chosen such that this should not happen when these parameters are 
chosen inside their nominal ranges. 
</parm> 
 
<parm name="StringZ:facALundDiquark" default="2.430" min="1.000" max="4.000"> 
For <code>StringZ:deriveLundPars >= 3</code>, this parameter specifies 
the ratio of the Lund <ei>a</ei> parameter for diquarks to that for 
quarks. The appropriate <ei>aExtraDiquark</ei>-parameter value is 
computed automatically during initialization and the 
<code>StringZ:aExtraDiquark</code> parameter is updated 
accordingly. Note that the derived value is allowed to exceed the 
nominal limits given for <code>aExtraDiquark</code> above. This is 
intended to allow fits to see the functional behaviour even outside 
the nominal limits. 
</parm> 
 
<parm name="StringZ:facALundSQuark" default="1.0" min="0.0" max="2.0"> 
For <code>StringZ:deriveLundPars = 4</code>, this parameter specifies 
the ratio of the Lund <ei>a</ei> parameter for strange quarks to that 
for up and down quarks. The appropriate 
<ei>aExtraSQuark</ei>-parameter value is computed automatically during 
initialization and the <code>StringZ:aExtraSQuark</code> parameter is 
updated accordingly. Note that the derived value is allowed to exceed 
the nominal limits given for <code>aExtraSQuark</code> above. This is 
intended to allow fits to see the functional behaviour even outside 
the nominal limits. 
</parm> 
 
<a name="massiveQuarks"></a> 
<h3>Fragmentation functions for massive quarks and exotics</h3> 
 
<h4>The Lund-Bowler FF for massive quark flavours</h4> 
<p/> 
The Bowler modification <ref>Bow81</ref> introduces an extra 
factor 
<eq> 
    1/z^{r_Q * b * m_Q^2} 
</eq> 
on the Lund FF for heavy quarks (and/or exotic coloured particles). 
To keep some flexibility, a multiplicative factor <ei>r_Q</ei> is 
introduced, which ought to be unity (provided that quark masses were 
uniquely defined) but can be set in 
 
<parm name="StringZ:rFactC" default="1.32" min="0.0" max="2.0"> 
<ei>r_c</ei>, i.e. the above parameter for <ei>c</ei> quarks. 
</parm> 
 
<parm name="StringZ:rFactB" default="0.855" min="0.0" max="2.0"> 
<ei>r_b</ei>, i.e. the above parameter for <ei>b</ei> quarks. 
</parm> 
 
<parm name="StringZ:rFactH" default="1.0" min="0.0" max="2.0"> 
<ei>r_h</ei>, i.e. the above parameter for heavier hypothetical quarks, 
or in general any new coloured particle long-lived enough to hadronize. 
</parm> 
 
<h4>Options for non-universal bLund parameters for massive quark flavours</h4> 
<p/> 
Within the string framework, the <ei>b</ei> parameter is universal, 
i.e. common for all flavours. Nevertheless, for fits to experimental 
data, better agreement can be obtained if both <ei>a_Q</ei> and 
<ei>b_Q</ei> can be set freely in a general expression 
<eq> 
    f(z) = 1/z^{1 + r_Q * b_Q * m_Q^2} * (1-z)^a_Q * exp(-b_Q m_T^2 / z) 
</eq> 
The below switches and values can be used to achieve this. They should 
be used with caution and constitute clear deviations from the Lund 
philosophy. 
 
<flag name="StringZ:useNonstandardC" default="off"> 
use the above nonstandard Lund ansatz for <ei>c</ei> quarks. 
</flag> 
 
<flag name="StringZ:useNonstandardB" default="off"> 
use the above nonstandard Lund ansatz for <ei>b</ei> quarks. 
</flag> 
 
<flag name="StringZ:useNonstandardH" default="off"> 
use the above nonstandard Lund ansatz for hypothetical heavier 
coloured particles. 
</flag> 
 
<parm name="StringZ:aNonstandardC" default="0.3" min="0.0" max="2.0"> 
The <ei>a</ei> parameter in the nonstandard Lund ansatz for 
 <ei>c</ei> quarks. 
</parm> 
 
<parm name="StringZ:aNonstandardB" default="0.3" min="0.0" max="2.0"> 
The <ei>a</ei> parameter in the nonstandard Lund ansatz for 
 <ei>b</ei> quarks. 
</parm> 
 
<parm name="StringZ:aNonstandardH" default="0.3" min="0.0" max="2.0"> 
The <ei>a</ei> parameter in the nonstandard Lund ansatz for 
hypothetical heavier coloured particles. 
</parm> 
 
<parm name="StringZ:bNonstandardC" default="0.8" min="0.2" max="2.0"> 
The <ei>b</ei> parameter in the nonstandard Lund ansatz for 
<ei>c</ei> quarks. 
</parm> 
 
<parm name="StringZ:bNonstandardB" default="0.8" min="0.2" max="2.0"> 
The <ei>b</ei> parameter in the nonstandard Lund ansatz for 
<ei>b</ei> quarks. 
</parm> 
 
<parm name="StringZ:bNonstandardH" default="0.8" min="0.2" max="2.0"> 
The <ei>b</ei> parameter in the nonstandard Lund ansatz for 
hypothetical heavier coloured particles. 
</parm> 
 
<h4>The Peterson/SLAC FF for massive quark flavours</h4> 
<p/> 
As another nonstandard alternative, it is possible to switch over to the 
Peterson/SLAC formula <ref>Pet83</ref> 
<eq> 
     f(z) = 1 / ( z * (1 - 1/z - epsilon/(1-z))^2 ) 
</eq> 
for charm, bottom and heavier (defined as above) by the three flags 
 
<flag name="StringZ:usePetersonC" default="off"> 
use Peterson for <ei>c</ei> quarks. 
</flag> 
 
<flag name="StringZ:usePetersonB" default="off"> 
use Peterson for <ei>b</ei> quarks. 
</flag> 
 
<flag name="StringZ:usePetersonH" default="off"> 
use Peterson for hypothetical heavier coloured particles. 
</flag> 
 
<p/> 
When switched on, the corresponding epsilon values are chosen to be 
 
<parm name="StringZ:epsilonC" default="0.05" min="0.01" max="0.25"> 
<ei>epsilon_c</ei>, i.e. the above parameter for <ei>c</ei> quarks. 
</parm> 
 
<parm name="StringZ:epsilonB" default="0.005" min="0.001" max="0.025"> 
<ei>epsilon_b</ei>, i.e. the above parameter for <ei>b</ei> quarks. 
</parm> 
 
<parm name="StringZ:epsilonH" default="0.005" min="0.0001" max="0.25"> 
<ei>epsilon_h</ei>, i.e. the above parameter for hypothetical heavier 
(and exotic) flavours, normalized to the case where <ei>m_h = 
m_b</ei>. The actually  used parameter is then <ei>epsilon = epsilon_h 
* (m_b^2 / m_h^2)</ei>. This allows a sensible scaling to a particle 
with an unknown higher mass without the need for a user intervention. 
</parm> 
 
</chapter> 
 
<!-- Copyright (C) 2026 Torbjorn Sjostrand --> 
