## Hadronization Variations

The hadronization variation framework allows a user to calculate reweighting factors taking a given event from one set of hadronization parameters to another, by changing the probability with which this specific event would occur given the altered parameter set. This feature is still experimental and is under active development, so use at your own risk. The method for reweighting the Lund string fragmentation function is documented in [Bie23], and the flavor reweighting method is documented in [Ass25]. Examples on how to use the hadronization variations can be found in the examples `main263`, `main264`, and `main265`. Users familiar with Parton Shower Variations will recognize much of the logic from there. It is currently possible to vary a number of parameters relating to kinematics and flavour selection, listed in the following. Currently this is a proof-of-concept feature, and it is expected that the selection of parameters will be extended going forward. Be particularly aware that the code will not warn you, in case you have no statistical coverage for the values you are attempting to reweight to. Use with caution.

`flag` VariationFrag:flav (`default = off`)
For the fragmentation flavor variations, it is possible to perform post-hoc reweighting without running the in-situ variations below. To enable post-hoc flavor reweighting, switch this flag on.

`flag` VariationFrag:z (`default = off`)
For the fragmentation variations that directly modify the sampling of `z` (`aLund`, `bLund`, `rFactC`, `rFactB`), it is possible to perform post-hoc reweighting. However, this increases the memory footprint of each event as information on the string breaks needs to be stored. Enabling this flag, stores this information so post-hoc kinematic reweighting can be performed.

`flag` VariationFrag:pT (`default = off`)
Same as for z but now for the sampling of p_T which depends on `ptSigma`.

`parm` VariationFrag:zHead (`default = 1.0`; `minimum = 0.0`; `maximum = 100.0`)
When sampling variations in z the maximum for the sampling function can be increased by this multiplicatve factor. This parameter is intended for cross-checks only.

`wvec` VariationFrag:list (`default = {}`)
Vector of uncertainty-variation strings defining groups of parameter variations for string fragmentation. The groups are separated by commas, and the elements of the group are separated by spaces, where the first element is the group name, and the following elements are the varied parameters of the form `parameter=value`.

For completeness, we note that an example command-file specification could look as follows:

        VariationFrag:List = {
            kinVars frag:ptsigma=0.3 frag:alund=0.6,
            flavVars frag:rho=0.2 frag:x=0.9 frag:y=0.04
        }

### List of Recognised Keywords for Hadronization Variations

The following keywords adjust the Lund string fragmentation function:

- `frag:aLund` : value for `StringZ:aLund`, the a parameter of the Lund symmetric fragmentation function.
- `frag:bLund` : value for `StringZ:bLund`, the b parameter of the Lund symmetric fragmentation function.
- `frag:rFactC` : value for `StringZ:rFactC`, r_c, i.e. the Bowler parameter for c quarks.
- `frag:rFactB` : value for `StringZ:rFactB`, r_c, i.e. the Bowler parameter for b quarks.
- `frag:ptSigma` : value for `StringPT:sigma`, the width sigma in the fragmentation process.

Flavour parameters can be adjusted with the following keywords:

- `frag:xi` : value for `StringFlav:probQQtoQ`, the suppression of diquark production relative to quark production, i.e. of baryon relative to meson production.
- `frag:rho` : value for `StringFlav:probStoUD`, the suppression of s quark production relative to ordinary u or d one.
- `frag:x` : value for `StringFlav:probSQtoQQ`, the suppression of strange diquark production relative to light diquark production, over and above the one already given by `StringFlav:probStoU`.
- `frag:y` : value for `StringFlav:probQQ1toQQ0`, the suppression of spin 1 diquark production relative to spin 0 one, apart from the factor of 3 enhancement of spin 1 from counting the number of states.