## Update History

These update notes describe major updates relative to the PYTHIA 8.243 version, which was the starting point for PYTHIA 8.3. The step from 8.2 to 8.3 gave an occasion to break backwards compatibility. The main change is that C++11 is now assumed. The impact on existing used code should be mild, however.

### 8.317: 20 January 2026

- Joni Laulainen joins the author team.
- Introduced a multiplicative NLO matching scheme for neutral-current DIS, accessible with the flag `SigmaProcess:reweightNLO = on`. This setup reweights the Born-level events to inclusive NLO accuracy, assuming the existence of matrix-element-corrected first emission and preserved Born kinematics. Currently only available for incoming charged lepton and hadron.
- Added matrix-element corrections q + gamma → q + g and `g + gamma → q + qbar` to the simple shower and VINCIA for DIS processes.
- The code for production of t-tbar pairs in hadron collisions near the threshold, introduced in 8.316, has been further developed, see Top Processes.
  - Two simplified options have been removed, making the previous number 4 become option 2. Further flexibility has been added, notably for the top width, where the usage in Breit-Wigners and in bound-state matrix-element calculations has been separated, making it possible to reduce doublecounting.
  - The `main368.cc` to `main371.cc` main programs have been updated.
  - New code has been introduced for the angular correlations in the decay sequence t tbar → b W^+ bbar W^- → 6 fermions, assuming that the t tbar system is in a pseudoscalar state. The new `main372.cc` example illustrates how to study this behaviour.
  - Related to this, `eps4` has been introduced to give the fully antisymmetric product of four four-vectors.
- Post-hoc kinematic fragmentation reweighting has been implemented, see `main265` for details. Note, 5 doubles, and 2 integers must be stored per string break (both accepted and rejected) to enable post-hoc reweighting. This can result in a substantial increase in the memory used by the event record.
- Several bug fixes and improvements for Angantyr related to beam switching and the simulation of cosmic ray cascades.
  - Angantyr can now handle very low energies using the `NaiveSubCollisionModel`, the new parameter `HeavyIon:eCMLowEnergy` specifies below which energy Angantyr enters this low energy mode. This also requires the `LowEnergyQCD` processes in Pythia to be switched on.
  - The generation of nucleon positions in a nucleus in Angantyr can now be cached and reused to save CPU cycles. The number of configurations cached is controlled by the setting `HeavyIon:WScacheSize`. In addition the positions of the nucleons are now three-dimensional, rather than only specified in impact parameter.
  - A new collision model (`Angantyr:CollisionModel = 6`) has been introduced, which improves the handling of double diffraction compared to the default model. This will become the default in an upcoming release.
  - A new option for generating secondary absorptive sub-collisions has been introduced (`Angantyr:SASDmode = -1`). Rather that using modified single diffraction events, Angantyr now takes normal non-diffractive events where cuts are applied on the MPI and shower emissions to obtain the same effect. Thanks to Carl Rosenkvist who wrote the original code for this. This will become the default in a future release.
  - Angantyr does not handle elastic sub-collisions correctly. There is now a new setting (`Angantyr:elasticMode`) which allows the user to switch off elastic sub-collisions completely.
  - Improved handling of nucleus remnants. Fixing a bug where energy and momentum was not conserved when all nucleons in a nucleus had interracted.
  - Removed printout of Glauber statistics in `Pythia:stat()` for cases where it is not relevant, e.g., when using the `NaiveSubCollisionModel` or when constantly switching beam types and energies.
  - Better handling of switching between different nuclei and energies. Angantyr will now calculate an overestimated cross section for each nucleus listed in `Angantyr:cascadeMediumIons`. These cross sections are now available in `vector<double> HIInfo::mediumXSecs()`.
  - A new mode for using Angantyr for hadronic cascades in a medium has been introduced: `Angantyr:cascadeMode`. It assumes that the user generates a next interaction point in the medium using the overestimated cross sections in `HIInfo::mediumXSecs()`. The call to `Pythia::next()` will then return `true/false` to indicate that the user should accept the generated interaction point or generate a new one (starting from the old one). This allows Angantyr to generate the different cross sections on-the fly.
- Several changes in the `PythiaCascade` code for the simulation of cosmic ray cascades.
  - To adhere closer to the normal Angantyr event generation, elastic scatterings are no longer simulated, only inelastic ones.
  - For the same reason, the handling of secondary hadron-nucleon subcollisions in a hadron-nucleus one is somewhat updated. The new `enhanceSDtarget` initialization input argument sets the fraction of collisions that are handled as target-side single diffraction, while the rest are shared according to the normal mixture of inelastic processes. Default is 0.5, and a lower or higher value can be used to obtain a higher or lower multiplicity.
  - The list of input variables to the `init(...)` call has been reorganized, including some removed and some new. The new setup is documented in the `PythiaCascade.h` file.
  - MPI grid parameters generated with `main424.cc` are always used; the old option to generate the MPI files at initialization has been removed. By default the file stored in `share/Pythia8/setups/InitDefaultMPI.cmnd` is used.
  - Rearranged handling of boosts between fixed-target and CM frame for better numerical precision.
  - Reject secondary collisions with CM energies below sum of on-shell masses of incoming "beam" particles (which here may be off-shell).
  - Some other smaller changes, such as possibility to let mu+-, pi+-, K+- and K0L decay or not, and a few new information methods.
- Also some updates for the simulation of cosmic ray cascades that affect both Angantyr and `PythiaCascade`.
  - The `main424.cc` grids, central in the simulation of varying beam energy and hadron cascades, have been expanded up to 10^7 GeV CM energy, for the highest-energy cosmic rays. (Event generation validation at the new higher energies remains to be done.) More MPI energy grid points and statistics is used; and `Beams:eCM` is not written to output. It is possible to generate either MPI grids, nuclear geometry fits, or both. A common `main424.cmnd` file is updated accordingly. Two separate files are stored in `share/Pythia8/setups/InitDefaultMPI.cmnd` and `share/Pythia8/setups/InitDefaultAngantyr.cmnd`, respectively.
  - Updated `main484.cc`, `main485.cc` and `main487.cc` example codes. The last one has been further extended and serves as the main example of cosmic-ray evolution in the atmosphere, comparing Angantyr with `PythiaCascade`. The `main483.cc` example has become superfluous and is removed.
- Thanks to Chloe Gaudu for valuable input, notably the encoding of nuclear isotope data for all stable nuclear isotopes up to iron.
- Extra check to ensure that leptoquark decay products are arranged with the quark flavour first and the lepton one second. Thanks to Junichi Tanaka and Andy Buckley.
- Updated `Makefile` to allow the static library archive tool to be changed. Thanks to A. Neuwirth.
- Correct the handling of the `procType` argument in the `Pythia::next` method.
- A simpleminded procedure for momentum sharing in a beam remnant, applied when the normal one has failed, reduces the failure rate.
- New default behaviour of the `Pythia::moreDecays(...)` methods, where e.g. an Upsilon now decays directly to hadrons rather than to partons; see further Initialization and Program Flow.
- Slightly increased lower mass limit for the f_0(500) meson to avoid failed decays.
- A new user hook allows to set an enhancement factor in the impact-parameter-dependent handling of MPIs.
- A new switch `LowEnergyQCD:inelastic` to allow all low-energy QCD processes except elastic.
- A new `Hist::makeCumulative` method iteratively adds the contents of the previous histogram bin to the current one, thereby providing an integrated version of the original histogram.
- The check for FORCE= statements in Settings has been made more robust. It is now only performed for modes and parameters. This fixes issues e.g. with file names that contain the word force. Thanks to Wolfgang Waltenberger for reporting this issue.

### 8.316: 03 October 2025

- As announced in 8.314, the DIRE parton shower is no longer supported and consequently has been removed in this release. The last version of Pythia including DIRE is 8.315.
- The reorganization of fragmentation models, begun in 8.313, continues.
  - The thermal string fragmentation model has been broken out into a set of new derived classes, rather than being integrated into the normal Lund string fragmentation ones.
  - A new mode `Fragmentation:model` has been created to enumerate available fragmentation models. It takes over from the more constrained `StringPT:thermalModel` switch. Currently the only two options are normal and thermal string fragmentation.
  - The html documentation on hadronization methods and options have been reorganized and extended, with a new overview, a separate page for thermal string fragmentation, a cleaner separation of flavour, pT and z selection in the Lund string fragmentation, and some more.
  - Changes to the toy fragmentation variations introduced in [Fis16]. The parameter `StringPT:widthPreStrange` has been kept while the previous `StringPT:widthPreDiquark` parameter has been split into two new ones, `StringPT:widthPreQQ0` and `StringPT:widthPreQQ1`, to provide more flexibility in the baryon sector. The `StringPT:mT2suppression` has been removed. Note that these parameters are only implemented for the Gaussian pT model, not the thermal one.
  - The `main443.c` example has been updated to the new conditions.
- New code for the cross section of the production of t-tbar pairs in hadron collisions near the threshold, both above and below it. Equations are taken from [Fad90], complemented by a few alternative prescriptions how to handle the below-threshold part in practice. See further the Top Processes page, and the four new main programs `main368.cc`, `main369.cc`, `main370.cc`, and `main371.cc`.
- New options to add non-singular and higher-order terms to the splitting kernels for timelike showers, see Timelike Showers, along with a new example program `main303.cc`.
- New options to regulate the running of alphaS in the infrared, by freezing it at a maximum value, and/or by shifting the argument by a number of order LambdaQCD.
- Improved version of DIS kinematics reconstruction. Namely the lepton mass is appropriately accounted and phase-space cut for Q2min accounts also masses for final-state partons. A cut for Q2max has been added.
- Introduction of parameters `StringFragmentation:eJunctionCutoff` and `StringFragmentation:mJunctionCutoff` allows for the modification of stopping conditions on the fragmentation of the first two junction legs.
- The default value of `StringFragmentation:stopMass` has been changed from 1.0 GeV to 0.8 GeV, the same value as used in PYTHIA 6.4. This slightly improves the smoothness of the `finalTwo` joining step. Also improved description of the joining-step parameters on the String Fragmentation page. Thanks to Jade Abidi.
- Added the Detroit tune ([Agu22]) to the list of available tune presets in Pythia. Thanks to Jennifer Roloff for pointing us to this.
- The `RandomState` of the random-number generator is now saved before the generation of each event starts. The saved information can be written to file via `Info::dumpRandomState` and read in via `Info:readRandomState`. Mainly for debug purposes.
- Support has been added for parallel running of plugins. This includes the ability to aggregate plugin results from threads via an `onStat` method, as well as locking between threads via a `mutex` instance available to all `PhysicsBase` objects. See the Parallelism page for more details. Note, this does not guarantee that plugins are thread safe; rather, this allows plugins to be written to be thread safe.
- New `RivetHooks` plugin allows for Rivet analyses to be run via the plugin structure with `Init:plugins = {libpythia8rivet.so::RivetHooks}`, including in parallel. An example is given in `main144.cc`.
- The new plugin `HepMC3Hooks` allows users to write output to HepMC3 by loading. See `main225` as an example.
- Added the ability to include purely Pythonic code in the `pythia8` Python module. Also streamlined how Awkward arrays are included in the Python interface.
- Some updates to the `Hist` class:
  - Introduced new methods: `getBinCenter(int iBin)`, `getBinError(int iBin)`, and `getBinError2()`. Equivalent versions `getBinCenters()`, etc., return a vector of doubles for all bins.
  - Added an optional third argument to the `Hist::fill()` method, to allow for weighted uncertainties that are not purely stochastic. Thanks to Claire Bergman.
  - Added new method `Hist::getXPercentile()` to extract percentiles from histograms.
  - Added the method `Hist::yodaTable` to enable printing a `Hist` to the `ESTIMATE1D_V3` format from YODA.
  See Histograms for more details.
- New particle data method(s) `mSelInRange` selects the mass of a particle according to a Breit-Wigner shape, but within a range that is determined event-by-event.
- A small internal analysis of differential jet rates has been added to main164. Also, legacy HepMC2 support has been added to main164.
- The `SigmaTotal::calc(...)` code has been rearranged so as to provide a clean abort when the energy is too low, rather than a segmentation fault. Thanks to Einar Elen.
- Moved `-pthread` option to the `Makefile`. Thanks to Andrii Verbytskyi for the suggestion.
- Updated many of the references to now include hyperlinks to a publicly accessible version of the reference.
- Fixed an issue where the post-hoc and in-situ flavor variations for hadronization, see Hadronization Variations, did not match if particle decays were turned on, as the in-situ weights did not account for flavor variations in the hadron decays.
- Fixed a bug where tuning parameters are incorrectly loaded when specified inside a subrun in a `.cmnd` file. Thanks to Jade Abidi.
- Fix trial hadron generation in `StringFragmentation::kinematicsHadronTmp` used in the closepacking and thermal string breaking frameworks. Previous version only generated trial hadrons from string endpoints, which has now been fixed to generate trial hadrons given the present state of the fragmenting string. Consideration of string endpoint masses in trial hadron generation has also been included.
- The introduction of `StringZ:deriveLundPars` inadvertently broke the behaviour for when only `bLund` is derived, `StringZ:deriveLundPars = 1`. This has now been fixed.
- Fixed the spelling of the `addAtribute` method of the `PythiaToHepMC` class to `addAttribute`. Also, added a specialization for this method for integer attributes, as is already done for double attributes. Thanks to Kyle Cormier for the suggestion.
- Fixed an issue with the `toString` helper method which formatted numbers greater than `1e+6` with an exponent ending in zero incorrectly, e.g. `1e+10` would be returned as `"1e+1"`. Thanks to Einar Elen for reporting the issue.
- Fixed issue with `Settings::readFile` where for some systems an empty line could cause a `std::out_of_range` crash. Thanks to Marco Giacalone for the bug report and suggested fix.
- A bug was fixed that led to a pointer to the wrong `ParticleData` object when a Pythia object was created from the `Settings` and `ParticleData` of another Pythia instance. Thanks Einar Elen for reporting the bug.
- Tiny cosmetic fix so that a total cross section is not attempted to be initialized if not both incoming particles are hadrons (or photons). Thanks to Alexander Belyaev.

### 8.315: 27 May 2025

- The key topic addressed in this release is a fix for a serious bug in the Lund symmetric fragmentation function (LSFF). It concerns the case where diquarks or strange quarks are assumed to be produced at a later average time than the up and down quarks. The LSFF then has to be generalized to a form where both the a value of the old and of the new flavour in a fragmentation step occur. Unfortunately, in the transition from PYTHIA 6 to PYTHIA 8, a mistake was made, whereby the role of the old and the new a values were flipped in the (1-z)^a factor. By default diquarks are assumed to be produced later, so the bug fix has an impact on correlations between baryons and antibaryons, to some degree also on baryon spectra, whereas overall event shapes are only mildly affected. Strangeness is not modified in the current tunes. To maintain backwards compatibility, a new switch `StringZ:useOldAExtra` has been introduced, see the String Fragmentation page. All current internal tunes have been set to use the old handling, but new ones will use the bug-fixed LSFF expression. For more details on the bug and its consequences, have a look at the separate note linked here. In the near future we intend to present new tunes where this bug fix is taken into account. Thanks to Tony Menzo for finding this bug.
- Some changes in the Hidden Valley machinery. Several automatic rescalings of (safety) parameters and constants to allow a broader range of HV mass scales, including ones below the QCD one. Thanks to Miho Wakai. The manual clarifies the vector vs. pseudoscalar composition. Minor fix in `main509.cc`, so that the Lambda value is used to define the coupling expression. Furthermore the change of `recoilStrategyRF` default value in 8.314 affects `main509.cc` results, so a switch is introduced to recover the old behaviour, if so desired.
- The prefix for custom weights can now be specified with the setting `Weights:prefix` which is by default empty. The previous behaviour was for this to be `AUX_`. The flag `Weights:suppressAUX` still suppresses these weights, regardless of the prefix provided by the user. To recover the old behaviour, set `Weights:suppressAUX = AUX_`.
- The logic behind the construction of parton-shower histories in CKKW-L merging has been improved. This has previously resulted in out-of-range errors for processes with resonance-decay chains, such as ttbar production. Thanks to Andy Buckley for reporting the bug.
- Fixed two bugs in `PartonLevel.cc`.
  - When checking if beams are point-like (to determine if ISR and beam remnants), a lepton check was not performed for the second beam (B).
  - An incorrect check was made when calculating maximum weights for FSR decays with W/Z.
  Thanks to Dmitry Konstantinov for reporting the bug.
- Fixed a rare bug in `StringFragmentation::setHadronVertices` that caused a segmentation fault when the string endpoints are c or b quarks, and a quark mass offset correction is introduced. Thanks to Hao Yang for finding this bug.
- Fixed typos in the documentation for Hadronization Variations that do not effect that results of Pythia. Thanks to Giancarlo Panizzo for pointing this out.
- Internally, reverted beam particles back to raw pointers for technical reasons. This change should have no effect on public facing interfaces such as `UserHooks`.
- An incorrect type declaration in 8.314 invalidated the new option to derive the a and b parameters from the average and RMS width of the Lund FF, causing this option to fail for any choice of input parameters, corrected now.
- Fixed a typo in the MPI initialization when using saved grid which caused an out-of-access memory read.

### 8.314: 11 April 2025

- Both authors of the DIRE parton shower code have now left the Pythia team, and the field of particle physics. Since there is currently not sufficient person power to properly maintain the code, we are considering removing DIRE in a future release. Users of DIRE who are interested in maintaining the code in the future should contact authors@pythia.org.
- A batch generation interface in Python is now available using Awkward arrays. Thanks to Aartem Havryliuk and Jim Pivarski for providing this interface, as well as IRIS-HEP for funding this work.
- Introduced new options to treat the `aLund` and `bLund` parameters in the Lund symmetric fragmentation function as derived quantities. Instead, the user can specify a desired mean and RMS width of the Lund FF. Options to allow `aExtraDiquark` and `aExtraSQuark` to be derived from corresponding multiplicative factors are also made available.
- New option in `SimpleTimeShower` to interpolate smoothly between applying and not applying the RF eikonal reweighting factor for `recoilStrategyRF = 0`, in decays of coloured resonances such as t→bW, via the new parameter `weightRF`. New default behaviour is to apply the RF reweighting factor at full strength (`weightRF = 1.`). Does not affect the first emission in top decay (which is anyway ME corrected) but will affect second and subsequent emissions. Thanks to D. Hirschbuehl and E. Schmidt for suggesting and validating this update.
- The example `main144.cc` has been updated so that it can be optionally run with ROOT or Rivet. The ROOT streamer dictionary for `main144` has also been updated so that it has no Pythia dependencies and is generated with CLING rather than CINT. Finally, a ROOT macro `main144.C` has been added as an example on how to read the generated ROOT file.
- Reintroduced the `zHad` member to the `StringEnd` class for access via `UserHooks`.
- The parsed user supplied configuration command is now written to `Makefile.inc`. Thanks to Andy Buckley for the suggestion.
- Minor documentation updates for the string Close Packing model.
- The Glauber statistics in Angantyr are now reset any time the beams are changed.
- Internally, beam particles are now stored and passed as shared pointers. This change should have no effect on public facing interfaces such as `UserHooks`.
- Fixed bug in VINCIA that caused `Print:verbosity` to be increased by one. Also added more detailed warning message when encountering `Paccept > 1` in the VINCIA ISR shower. Thanks to B. Tuncay.
- Fixed incorrect verbosity setting in VINCIA's massive final-final branching kinematics introduced in 8.313 that resulted in incorrect warnings about failed kinematics.
- Fixed typo in `main487.cc`, mildly affecting results.
- Fixed bug in Hidden Valley fragmentation, whereby the lowest vector meson mass could be incorrectly identified. Thanks to Matt Strassler, Rabia Husain and Junyi Cheng.
- Explicitly declared inline methods in `Pythia.h` for C++17 compatibility. Thanks to Jonas Rembser.
- Fixed bug where, if an initialisation file is read in, the beam A id in `MultipartonInteractions` was set to the first beam in the `MultipartonInteractions::beamAList`, rather than keeping the one requested in `Beams:idA`.
- Updated links to download the EPPS16 PDF sets. Thanks to Wilke van der Schee.
- Fixed issue with a high failure rate in fixed target Angantyr events at very high energies due to momentum non-conservation. Thanks to E. Elén.
- Fixed issue when using `Tune:preferLHAPDF > 0` which resulted in an incorrect PDF set, thanks to Markus Seidel.
- Added the constructor `LHEF3FromPythia8(Pythia*)` to allow for writing of LHEF files via the Python interface. Thanks to Andre Sznajder for bringing this to our attention.
- Debug feature for catching floating point exceptions extended. Enabled with compilation flag `-DGCCFPDEBUG`. This is only available with `gcc` on `x86/x86_64` platforms.
- Fixed floating point exceptions in `MultipartonInteractions.cc`, `HISubCollisionModel.h` and `HISubCollisionModel.cc`. Generally, these exceptions should not have effected the output of Pythia.
- Fixed issue with RIVET linking in the examples.
- Corrected a bug in the Vincia QED spin-dependent RF antennae where scalars were previously treated the same as fermions. Thanks to G. Morgante.
- More verbose error message added when the XML directory is not found. Thanks to Bjarne Stugy.
- Corrected file name for the ATLAS A14 NNPDF2.3 LO tune. No physics results should change as it was only the file name itself that was incorrect. Thanks to A. Buckley.

### 8.313: 10 January 2025

- Leif Gellersen leaves as an active author.
- Marius Utheim leaves as an active author.
- Rob Verheyen leaves as an active author.
- A new merging setup for DIS processes has been implemented, see [Hel24]. The flag `Merging:doDynamicMerging` can now be used to set the merging scale dynamically according to a function that interpolates between the regions of large virtuality and large transverse momentum. The new merging scheme is available only for VINCIA and showcased in the `main164dis.cmnd` command file for the `main164.cc` example.
- A new parameter `Diffraction:sigmaRefPomPom` is introduced to describe the effective pomeron-pomeron total cross section, used to normalize the multiparton interactions machinery in central diffraction. Previously `Diffraction:sigmaRefPomP` was used also for this purpose, but now it is only used for single and double diffraction.
- Central diffraction initialization of multiparton interactions is now not performed when the central diffractive cross section is vanishing, specifically for the default values `SigmaDiffractive:mode = 1` in combination with `SigmaTotal:zeroAXB = on`.
- Several minor changes made to Angantyr.
  - A modified beam remnant treatment has been introduced.
  - Accessors for Glauber statistics has been fixed for bugs giving faulty output for pA configurations, thanks to Antonio Ortiz Velasquez.
  - Accessors for Glauber level cross sections were renamed and expanded and an accessor for the elastic amplitude was added.
  - HepMC2 and 3 output were updated accordingly.
  - Also the output of `Pythia::stat()` has been modified with a clearer description of the cross sections listed.
  - Unit conversions in Angantyr changed from Angantyr specific ones, to use the same as the rest of Pythia.
  - A new option `HeavyIon:forceUnitWeight` was introduced to change the Angantyr impact parameter sampler to give unit weights added.
  - Finally, for stability reasons when going to very small energies, the default `Angantyr:CollisionModel` has been changed from `1` to `2`.
- Cleanup of several main programs related to heavy ions and cosmic rays, notably to take into account new features in Angantyr.
  - The `main426` was added to illustrate how to use Glauber statistics and gather cross sections.
  - The new `main427` shows how to change the Angantyr impact parameter sampler to unit weights.
  - The new `main487` compares a hadronic cascade simulated either with `PythiaCascade` or with Angantyr, in a mixed atmosphere of nitrogen, oxygen and argon.
- Updated handling of fragmentation parameters in the Hidden Valley. Three levels of user control are introduced by the new `HiddenValley:setabsigma` switch, accessing default values updated to be based on the Monash tune, with explicit prescriptions for scaling rules from the corresponding QCD parameters to the Hidden Valley ones. Some parameter names and behaviours are changed, fixing previous inconsistencies. New `main511.cc` example illustrates scaling from QCD to HV. Also note, in case you missed it, that the Hidden Valley parton shower parameters were partly changed in version 8.309, see notably `HiddenValley:alphaOrder` and `HiddenValley:setLambda`. Thanks to Matt Strassler and Suchita Kulkarni for valuable input.
- The logic for modifying string fragmentation with `UserHooks` has changed. `canChangeFragPar()` will now only enable `doChangeFragPar()`, while the new function `canChangeVetoFragmentation()` enables the `doChangeVetoFragmentation()` functions and the new `doChangeVetoFnalTwo()` function. See User Hooks for details.
- An experimental feature has been introduced where the fragmentation sequence of Pythia can be modified by the user through the `set/add/insertFragmentationPtr` methods. Details are given in in the implement new fragmentation section on how to create a custom fragmentation model via the `FragmentationModel` base class. Some further modifications have also been made to enable more control of including plugins.
  - Vectors of external pointers in Pythia where the method `add` is allowed can also now be set with an `insert(i)` method, where `i` is the vector insertion index.
  - The `insert(i)` statement can also be used when loading plugins with the `Init:plugins` setting.
- The weighting of the fragmentation can now be determined for arbitrary flavor parameter variations after an event has been generated by setting `VariationFrag:flav = on`, see Hadronization Variations, and then using the `FlavorVariations` class provided in `include/Pythia8PluginsFlavorVariations.h`. See `main264.cc` for an example. This is an experimental feature.
- The tune settings have been migrated to command files under `share/Pythia8/settings/tune`. Under the hood, the tunes are now loaded using these settings, but there should be no difference to users. In addition to the previous `Tune:ee` and `Tune:pp` settings, it is now possible (and preferred) to set tunes with the command `include = tune/settings.cmnd` where `settings.cmnd` is the tune settings file. The following additional changes have also been made to enable this new tune setup.
  - The reading of command files has been migrated from the `Pythia` class to the `Settings` class for technical reasons. This should not directly impact users.
  - The syntax `Setting = DEFAULT` is now available to reset a setting to its default value.
  - The default for `Tune:preferLHAPDF` has been updated to `0` so that the internally available PDF is used by default. An additional option, `3`, has been added to also allow for the use of LHAPDF 6 files via PYTHIA's internal LHAGrid interpolation, which does not require the LHAPDF 6 library.
  - The default for `Vincia:tune` has been changed from `0` to `-1`. Users must now explicitly switch on the VINCIA tune, either with `Vincia:tune = 0` or `include = tune/VinciaDefault.cmnd`.
- The format and procedure for reusing initialization data has been changed. The options `1`, `2`, and `3` for `MultipartonInteractions:reuseInit` and corresponding modes in Angantyr works as before, but now internally use settings in the form `Init:reuseXXX` to store the initialisation data, and the file format changed so that the files can be read in as normal settings. In the future the `XXX:reuseInit` settings will be removed and the initialisation will always use data in `Init:reuseXXX` if present and consistent, and will always store the initialisation there for the user to write to a file and use in another run if needed.
- The number of pT bins used in the (differential) MPI cross section initialization has been reduced from 100 to 50, and is now hardcoded in `NSUDPTS`. The `MultipartonInteractions:nSample` now represents the total number of phase space samplings, rather than that per bin.
- Removal of the pearl fragmentation procedure due to both infrequency of usage and in order to simplify the fragmentation code. Should this pearl fragmentation need revisiting, the version of the code remains in 8.312.
- Closepacking parameters have been reparameterised and renamed.
- The `SimpleTimeShower::list()` has been expanded to show a few more properties of the current dipole ends.
- When `Print:verbosity` is set to 3 (report mode), errors and warnings are printed every time they occur instead of just the first time.
- Documentation updated to reflect previous changes in settings scheme, where a parameter set outside limits without using the keyword `force`, will make PYTHIA fail to initialize. Thanks to Giancarlo Panizzo, who pointed out that the documentation was lacking.
- Updated the HTML manual description of histograms to match the default options for `Hist::table`.
- A few minor upgrades of four-vector handling, the main update being an improved calculation of a very small opening angle between two vectors.
- Method added for peeking at next random number in `PythiaRndm`. Intended for debugging.
- A convenience class for parsing command line input `Pythia8Plugins/InputParser.h` in examples was added.
- A lightweight interface to the YODA histogramming library has been introduced in `include/Pythia8Plugins/Pythia8Yoda.h`. Example user code available in the new example `main114`.
- Several improvements to the HepMC2/3 interfaces from Andrii Vertbytskyi have been included.
- Example programs optionally using RIVET are now working correctly, as a missing flag in the `makefile` in the `examples` folder has been added.
- New possibility to smear the mass of a hadron provided in Les Houches input, see `LesHouches:smearHadronMass` on the Les Houches Event Files page. The reason could be that a rho meson, say, has been generated with a fixed input mass, which then distinguishes such a rho meson from ones generated inside PYTHIA. Thanks to Andy Buckley for the suggestion.
- The full Python interface, generated with `./generate --full` in the `plugins/python` directory, now includes classes from `include/Pythia8Plugins` with no dependencies. Now, `main295.py` should work when the full Python interface is used. Thanks to Matt LeBlanc for pointing this out.
- The full Python interface is now packaged with the Pythia release by default, to switch back to the simplified interface, it can be generated with `./generate --part` in the `plugins/python` directory.
- An issue with `sigmaGen` output was fixed when using the CKKW-L scheme. Thanks to Giancarlo Panizzo for reporting this.
- A number of bugs have been fixed in VINCIA's merging framework that previously prevented the use of VINCIA's evolution variable as the merging-scale definition. Also, the way cross-section estimates are calculated in VINCIA's merging has been changed, so that "dry runs" without shower agree better with actual merging runs.
- The `StringEnd::kinematicsHadron` method has been factorized to remove z selection. This also fixed a small bug where a zero momentum was returned for hard baryon fragmentation in beam remnants.
- Minor correction in the joining of the fragmentation from the two string ends towards the middle: if a popcorn diquark is produced in the final steps, it should not contribute with two separate diquark masses in the calculation of necessary remaining energy for the final two hadrons.
- Fixed tiny typo in `StringFragmentation::extraJoin`, found by Pi Duan. Only affects of the order of 1% of events, and then only mildly, but enough to break the random-number sequence.
- A bug causing the popcorn destructive interference mechanism to not work has been fixed.
- Fixed flavour sampling of enhanced gamma → f fbar splittings in the QED final-state shower. Thanks to Alexander Puck Neuwirth.
- A few bugs related to the `TimeShower:recoilStrategyRF` have been fixed. In addition, the correct recoiler in strategy `2` and `3` is now assigned also in the case when the decay of the coloured resonance produces more than two particles.
- Bug fix in the QCD Colour-Reconnection model (`ColourReconnection:mode = 1`) to prevent infinite recursions when handling junction-junction connections. Thanks to Laurent Dufour for alerting us to this bug.

### 8.312: 23 May 2024

- The Sample Main Programs in the `examples` subdirectory have been completely reorganized. Over the years, an expansion of examples has been driven by the addition of new capabilities as well as by a strong user demand. As the old two-digit `mainNN.cc` structure filled up, empty slots were used more-or-less at random, before eventually also three-digit codes were introduced. Now all examples have been regrouped by topic as three-digit codes `mainNNN.cc`, with empty space within each group for future expansion. No program keeps its old code. Some new examples have been introduced and some existing ones have been modified. The matching and merging examples have seen a significant restructuring, where `main162.cc` and `main164.cc` provide omnibus versions for several approaches.
- Some related updates and cleanup in `examples/Makefile`.
- The PYTHIA 8.3 Worksheet has been updated and expanded.
- The new more QCD based color reconnection model, `ColourReconnection:mode = 1` has been sped up by over a factor of two, thanks to Michal Kreps.
- Variable energy beams have been added to Angantyr. See `main424.cc` for details.
- Weighting of the fragmentation with parameter variations is now available. See Hadronization Variations for more details and `main263.cc` for an example. This is an experimental feature.
- New parameters `BeamRemnants:heavyQuarkEnhance` allows heavier quarks (s, c, b) to take more beam-remnant momentum than the lighter u and d ones. The same parameters also makes it more likely for a heavier quark not to be kicked backwards in low-mass systems. Thanks to Manuel Masip and Ivan Rosario Bonastre for pointing out the issue.
- Example of using Pythia as a custom shared library through Python has been added in `main296.cc` and `main296.py`.
- The option `--version` is now available for `pythia8-config` which will return the Pythia version, thanks to Christopher Dilks for the suggestion.
- A bug which caused popcorn destructive interference mechanism to not work has now been fixed.
- Added a new flag for neutrino PDFs to have them as unresolved particles by default as no other options currently exists. Minor related documentation update.
- Some bug fixes in less commonly used methods of the `Settings` and `ParticleData` classes.
- Tiny correction in `configure` that fixes issue with `pythia8-config` on some platforms, thanks to Gabriele Inghirami for reporting.
- Protect against potential division by zero in the Thrust method.
- Fixed an issue where cross-sections could be reported incorrectly when running a second hard process when the first hard process comes from an LHE file.
- Protection was added to Vincia FSR for the case where the charm quark mass is set to zero.

### 8.311: 08 March 2024

- Javira Altmann joins the author team.
- Stefan Prestel leaves as an active author.
- Reweighting for a subset of hadronization parameters, both kinematic and flavor related, is now available. See `main301` for an example and Hadronization Variations for details.
- A number of changes have been made to the junction fragmentation procedure:

- Updated iterative procedure to find average junction rest frame that is more stable as it does not rely on convergence.
- Include special treatment of soft-leg cases (i.e. when the 120 degree junction rest frame does not exist), called pearl-on-a-string.
- Allow for fragmentation of pearl-on-a-string cases using a gluon-approximation, controlled by `StringFragmentation:pearlFragmentation` and `StringFragmentation:pearlProbFactor`.
- Improvements in the hadronization of low-mass junction string systems, contributed by Harsh Shah. Low-mass junction systems now are handled by the ministring fragmentation code. This results in fewer discarded events when using the QCD-based colour reconnection model in scenarios where many junction systems are formed.

- A number of changes to the QCD-based colour reconnection model:

- Include a new string-length measure that better takes into consideration heavy quarks.
- Include additional separate parameter `ColourReconnection:mPseudo`, which formally had a combined definition with parameter `ColourReconnection:m0`.
- New option to limit the impact-parameter distance between dipoles that are allowed to reconnect in the QCD-based colour reconnection model, contributed by Harsh Shah. See `ColourReconnection:dipoleMaxDist` in Colour Reconnection for details.
- The inverse formation times for a three-dipole junction system were not correctly being initialized, while their colours were. This bug has now been fixed, although its impact should be minimal. Thanks to Michal Kreps for the fix.

- A number of updates and extensions to the string "closepacking" model:

- Include close-packing mechanism for Gaussian string breaks controlled by `ClosePacking:doClosePacking`, `ClosePacking:tension`, `ClosePacking:tensionRatio` and other `ClosePacking` parameters. See further on Close-packing.
- Include strangeness enhancement for string breaks next to a junction, controlled by `StringFragmentation:strangeJunctions` and `StringFragmentation:strangeJuncFactor`.
- Include popcorn destructive interference via simple diquark suppression controlled by `ClosePacking:qqFacQ` and `ClosePacking:qqFacP`.

- A new sub collision model (`Angantyr:CollisionModel=4,5`) has been added, wherein the projectile and target can fluctuate with different parameters, as one would expect in generic hadron-ion collisions.
- Usage of `HeavyIon:SigFitDefPar` is changed. For the case `Angantyr:CollisionModel=1,2`, the order of the parameters has changed as well. This means that saved parameters from previous releases cannot be used, and a refitting of parameters is recommended.
- The example `main200.cc` has had minor changes and cleanup.
- A fifteen percent uncertainty has been included for the `b` slope parameter of the `HeavyIon:SigFitErr` parameter vector used in fitting the cross sections for heavy ion collisions. This helps stabilize the fit at low collision energies.
- When parameters or modes are configured by the user via `readString` or `readFile` with out-of-range values, Pythia will now abort upon initialization, similar to when invalid user settings or particle data are provided, rather than the previous behaviour where the value would be set to the limit. Out-of-range parameters can still be used by directly calling the `force` methods in the `Settings` class.
- Parton shower enhancements in the simple shower are now available for the individual splittings g → c + cbar and g → b + bbar.
- Added capability to over sample emissions in combination with enhancing emissions so as to reduce large weight fluctuations.
- The documentation for POWHEG Matching has been updated with new recommendations and defaults.
- An option for suppressed power showers is now implemented also for the Vincia shower model, via the `Vincia:pTdampMatch` parameter. The `main202` example updated to illustrate this for ttbar.
- Entries in the event record may now be skipped when requesting matrix element corrections in the parton shower for a given event.
- Added new capability to disable matrix element corrections in the Timelike Shower for the first emission (only) of the hard process and/or resonance decays. The choice(s) of resonance(s) is customizable.
- Added example UserHook to modify the decay products in LHE files containing resonance decays.
- Updated RIVET examples to handle support for RIVET 4, while maintaining backwards compatibility.
- A new option for parallelism, `Parallel:doNext`, makes it possible for the user to run custom code before each event is generated, such as changing the energy on an event-by-event basis. For more information, see Parallelism or `main164`.
- New Vincia example programs for EW showers, `main205.cc` - `main207.cc`. `main205` illustrates electroweak showers in Z decays to neutrinos (at very high Z mass). `main206` illustrates EW showers for dijets at LHC and was previously named `main203`. `main207.cc` illustrates read-in of LHEF files for EW showering with Vincia.
- New `main208` example program illustrates Vincia QED showering in photon-initiated processes, specifically photon-photon → mu+ mu- production at LHC.
- Minor bug fix in Vincia's setup for helicity showers, to ignore beam particles when deciding whether helicity assignments need to be generated for the hard system. Thanks to M. di Mauro for help to identify this bug.
- Ensured that displaced-vertex information is propagated in the VINCIA QED and QCD FSR showers. This should correct a problem with displaced taus showing up with zero vertex information in HepMC events produced with VINCIA. Thanks to D. Hirscbuehl and S. Tuncay.
- Fixed issue where onia were showered with `pT2nextQCD` when `OniaShower:octetSplit` was set to `0` (do not allow the octet states to radiate). Thanks to Jake Pfaller for reporting this issue.
- Fixed issue where string systems were not updated when eliminating small string regions.
- Added protection when calling the `nTried`, `nSelected`, `nAccepted`, `sigmaGen`, `sigmaErr`, and `nameProc` methods in the `Info` class to prevent exceptions when requesting an invalid process ID.
- Fixed issue where if `Event::clear` is called before the particle database was initialized caused a segmentation fault.
- When using `TauDecays:mode = 2` or `3` the parameter `TauDecays:tauPolarization` was being read in as an integer rather than a real number. This has now been fixed. Thanks to Florian Harz for reporting this.
- When reading in external events without `SPINUP` information and with `TauDecays:externalMode = 1`, the production matrix element for a tau produced from W or W' boson was being incorrectly set to that of of a `Z` boson. This has now been fixed. Thanks to Florian Harz for reporting this.
- The heavy ion information, provided by the `HIInfo` class and available through the `hiInfo` member of the `Info` class, is now available by default in the simplified Python interface.
- Introduced direct access to the particles of an event by the new `Event.particles()` method. Thanks to H. Dembinski for the suggestion.
- Fixed issue where the Python interface does not compile under 32-bit. Thanks to Mattias Ellert for reporting the issue.
- Introduced an experimental random number sequence debugging tool for advanced debugging usage.
- Some memory management issues were corrected in Vincia.
- Further minor updates in Vincia to streamline Pythia coding style and improve naming of antenna functions.
- When using subruns, each with a different spectrum from an SLHA file for each initialization, the mass for particles can be incorrectly generated. A fix for this has now been introduced.
- Fixed bug in the `SubCollisionModel` class, where the functions `sigSDE()`, `sigSDEP()`, and `sigSDET()`, gave the wrong values. This will only affect the behaviour of Angantyr, in case the `NaiveSubCollisionModel` class is used in the Glauber calculation (`Angantyr:CollisionModel=0`).
- A bug in the merging framework has been fixed that was introduced by the changes for aMC@NLO-Delta in 8.309. Thanks to Marjorie Shapiro for the report.
- The introduction of the new `BeamSetup` class broke parts of the photoproduction initialization, which has now been fixed.
- Fixed memory leak in `main10`.
- Fixed possible access of unitialized variables in `PhaseSpace::setupSampling123`.

### 8.310: 25 July 2023

- Naomi Cooke joins the author team.
- Production of quarkonia is now available via the simple timelike shower, see Onia Showers for details.
- Added a new feature that allows producing user-defined resonances in hadronic rescattering. Newly added particles can be produced as resonances if they set `varWidth = on`. Examples of this are shown in `main157` and `main158`.
- A number of changes have been made to the heavy ion machinery.

- Variable energies can now be used in Angantyr. This is done by setting `Beams:allowVariableEnergy = on` and using the `Pythia::setKinematics` methods. In addition Angantyr can now handle all `Beams:frameType` options.
- MPI initialization reuse has now been enabled for heavy ions. The `MultipartonInteractions:reuseInit` and `MultipartonInteractions:initFile` parameters control whether the MBIAS Pythia object will reuse MPIs. In addition, the `HeavyIon:SasdMpiReuseInit` and `HeavyIon:SasdMpiInitFile` parameters do the same thing for the SASD Pythia object.
- The parameters calculated from the evolutionary algorithm can also be saved to file. This is controlled with the `HeavyIon:SigFitReuseInit` and `HeavyIon:SigFitInitFile` settings.
- The `HIUserHooks` source has been split into `HIInfo`, `HINucleusModel`, and `HISubCollisionModel`.
- Some code is offloaded to new classes `Nucleus` and `SubCollisionSet`, simplifying `HeavyIons.cc`.
- Simplified the output for the Angantyr procedure for fitting nucleon cross sections.

- Included possibility to sample intermediate photon virtuality also for externally provided events using built-in photon flux for protons.
- Included possibility to generate DIS events with a (anti-)neutrino beam.
- The `TopRecoilHook`, formerly available separately, has now been integrated into the `SimpleTimeShower`. See further the TimeShower:recoilStrategyRF switch, which replaces and extends the old `TimeShower:recoilToColoured` flag. In top decays the radiation pattern in the new option is reweighted to have top as recoiler in case the relevant colour line connects to it.

- Introduced a new use plugin system, see Plugins for details. This system is currently experimental and feedback is welcome. As part of this new system, a few changes have been made to how user provided classes are passed to a `Pythia>` object for consistency.

- The arguments to the `setSigmaPtr` method are now shared pointers. Additionally, `addSigmaPtr` has been introduced with the previous behaviour of `setSigmaPtr`, and the new `setSigmaPtr` overrides all previously added pointers.
- A similar change has been made for the `setResonancePtr` method with the addition of the `addResonancePtr` method.

- The new `Logger` class now handles printing such as initialization information and diagnostic messages. For more information about this class, see the Logging page.
- The new `BeamSetup` class has been introduced to handle the beam configuration, including initializing and changing beam identities, kinematics and parton distributions. This is a structural change that simplifies the code in the `Pythia` class, but does not introduce any functional changes.
- Modified interface to `LHAPDF6` to allow for multi-threading. Thanks to Christopher Jones for the report.
- Updated the Python interface to use `pybind11` version 2.10.4 which is compatible with Python 3.11. Thanks to Mattias Ellert and David Runge for reporting the incompatibility and maintaining the Fedora and Arch Linux packages. Note, this version is not compatible with Python versions 3.5 and below, and so version 2.9.2 of `pybind11` is used automatically for these versions.
- Fix for the Python interface working with `gcc13`, thanks to Dmitri Konstantinov.
- Fixed a bug in the Python interface which prevented `main162.py` from running correctly when passing a custom function for initialization.
- Updated the Lambda_b0 lifetime to c*tau = 0.44 mm. The value was rounded to two significant digits since PDG and HFLAV do not quite agree to three digits. Thanks to A. Rossi for pointing out the previous default value (0.369 mm) was outdated.
- Included several small fixes in response to running an LLVM static code analysis, thanks to Michal Kreps.
- Fixed out-of-range access when calling `Hist::getYMin` and `Hist::getYMax` for a histogram that has not been booked.
- Fixed `BeamRemnants:unresolvedHadron` option that was broken and had no effect since 8.307
- Removed use of `simple-template-id`s in `SusyLesHouches.h` to make compliant with `C++20`. Thanks to Jonas Hahnfeld.
- Fixed dipole sorting behaviour in `ColourReconnection` which resulted in an ordering that depended on the current memory state of the program.
- Changed the default for `Parallelism:balanceLoad` to `on` and updated the documentation. This ensures each thread will always generate the same number of events.
- Added the `+=` notation for settings vectors, as well as the `include = fileName` directive, which allows for additional settings files to be directly read in.
- Fixed a bug in the bookkeeping the number of hadrons in the string fragmentation.

### 8.309: 16 February 2023

- New functionality for aMC@NLO-Delta matching with a reduced number of negative-weight events is introduced. This includes the possibility to directly call shower Sudakov factors from a runtime interface to Madgraph5_aMC@NLO. See documentation of new flag `Merging:runtimeAMCATNLOInterface` on Merging page for further info and references.
- The `PowhegHooks` now work with all three shower models and automatically switch between the simple shower, Vincia, and Dire based on the `PartonShowers:model` mode. In addition, the option to set `POWHEG:nFinal = -1` has been ported from 8.244 to allow the use of event files with a variable number of real emissions.
- The Angantyr model for ion collisions has been updated with several possible nuclear geometries, suitable for light nuclei. It is now possible to select a harmonic oscillator shell model for nuclei with A <= 16, and a Hulthen potential for deuterons. It is also possible to read a nuclear configuration from an external file, format given in the manual.
- The documentation for ion collisions at Heavy Ions in the HTML manual has been extended.
- Allow scattered lepton to appear in different positions of the event record for remnant handling in externally generated DIS processes.
- Enable generation of externally generated hard processes for direct photoproduction.
- The Hidden Valley scenarios have now been updated with options that allow a second- or third-order running coupling in the shower, see further Hidden Valley Processes. A new `AlphaSUN` class implements the running for an arbitrary SU(N) gauge group, neglecting flavour thresholds. Thanks to Joshua Lockyer and Suchita Kulkarni for code contributions.
- Equation (9.5) in the 2006 RPP [Yao06] has erroneously been taken as a second-order alpha_strong expression, while actually it is a third-order one. This has been corrected, with separate second- and third-order options now available for matrix elements and showers. In practice the difference between second- and third-order running is minor, and furthermore first-order is default throughout.
- Updated `fjcore` to version v3.4.0 with minor modifications to remove compiler warnings. This version is compiled with limited thread safety, which is sufficient if "each thread is independently processing an event" and should have "essentially no speed overhead". For more details see the fjcore documentation. Thanks to Matteo Cacciari, Gavin Salam and Gregory Soyez.
- The `PythiaParallel` framework can now be used in the Python interface, see `main162`. This required some small changes to `PythiaParallel`, where callback functions now pass a `Pythia` instance by pointer rather than reference.
- The Worksheet has been updated and somewhat expanded.
- Minor fix in the new color reconnection to protect against out-of-bounds memory access.
- Fixed a bug where changing beam energies with `Beams:frameType = 2` gives wrong energies.
- A fix for overestimate of photon flux from nuclei when applying PDF:beam2gammaApprox = 2 to make sure that the two applied approximations separated at PDF:gammaFluxApprox2xCut match.
- Fixed a bug related to boosts for initial-final dipoles when performing parton showers.
- Fixed an issue with tau decays interacting with the weak shower. Thanks to Mattia Di Mauro for reporting the issue.
- A templated method to shuffle contents of a vector, called `shuffle`, has been added to the Random numbers machinery.
- Small bug fix to avoid segmentation fault when parsing ALPGEN input.
- Tiny fix in `HepMC3` header to avoid compiler warnings with GCC 12.2.

### 8.308: 16 November 2022

- The `HIInfo` class now has information about the impact parameter angle between colliding nuclei in the `phi()` function. In addition the impact parameter positions of the incoming nuclei are now set properly in `Particle::vProd()`.
- A new `PythiaCascade` wrapper class (in `include/Pythia8Plugins`) implements the functionality to perform fixed-target hadron-nucleus collisions and decays, as useful for the tracking of cascades is the atmosphere or in solid materials. The code in this class now is set up to handle any target nucleus. The new `main184.cc` example shows how to use `PythiaCascade` to track an atmospheric cascade, equivalent to the standalone `main183.cc`. An even simpler new example is found in `main185.cc`.
- The option to completely forbid popcorn baryon production from the beam remnant has been replaced by the possibility of a continuous suppression, see `BeamRemnants:dampPopcorn`.
- A new option for Pomeron flux has been added to provide more flexibility to modify the shape of the flux.
- Modified handling for resolved-lepton remnants so that also lepton-lepton collisions with unequal masses are correctly dealt with.
- Explicit bookkeeping of Hidden Valley (HV) colours in SU(N) scenarios has been introduced. These colours can be accessed in the event record, but are not shown by default. This allows for a more robust tracking of HV colours in showers. Notably a Higgs decay to a pair of HV gluons can now be handled, which used to be impossible. The functionality of the `TimeShower:recoilToColoured` switch is extended also to apply to the HV colours.
- Update to decay method of `ParticleDecays` class allows for proper showering of leptons produced in Hidden Valley particle decays.
- A simple example of Hidden Valley production mechanisms introduced with `main171.cc`.
- Fixed a bug that could block the radiation of HV photons in a broken U(1) scenario, i.e. where the HV photons acquire mass. Affected was radiation in the decay of Fv states, i.e. states with a charge both in the normal and in the HV sector.
- Two new ROOT-based example programs, `main94.cc` and `main95.cc`, illustrating how to visualize events and jets, respectively, in (y, phi)-space. Thanks to D. Gillberg for contributing these examples.
- Added handling of statistical uncertainties to the `Hist` class, with error propagation in the various histogram operations and friend methods, for both unweighted and weighted events. Updated `Hist` compatibility for current Matplotlib.
- Updated JetMatching to support improved treatment of non-enhanced jets in FxFx merging, see Jet Merging for more details. The updated treatment also fixes a bug that led to an asymmetric treatment of heavy quarks and the corresponding anti-quarks. Thanks to Rikkert Frederix.
- Vincia's tune initialisation has been changed to not override initialization, event-generation, statistics, and main-program settings.
- Included particle ID code in error message when a workable decay channel cannot be found in `ParticleDecays::decay()`. Thanks to K. Pedro for suggesting this.
- Added additional protection for Pythia initialization.
- Fixed an issue in the tau decays which caused segmentation faults when a tau nu final state is present in the event record without a mother W. Thanks to S. Jeon for reporting the problem.
- Corrected several typos in `antiName` and `chargeType` properties for particle ID codes for diffractive states (e.g., 9904230) in `ParticleData.xml`; thanks to A. Verbytskyi, G. Panizzo, and D. Konstantinov.
- Updated default top quark mass to 173 GeV (up from 171 GeV) in line with current PDG average (rounded to nearest GeV). Added particle data for a few more nuclei.
- Corrected a bug that affected the read-in of RPV couplings via SLHA files. In the erroneous version, a coupling for the third generation in the first index (i.e. 3,i,j) could not be set.
- Fixed bug preventing the generation of Python bindings in MacOS. Also fixed external library issue with Makefiles for MacOS.
- Updated `WeightsBase::getWeightNames` to provide RIVET compatible names.
- Updating HTML manual and program banner with new manual reference.
- Updating affiliation for Christian Bierlich.

### 8.307: 25 February 2022

- New option with interpolation between the low-energy hadronic cross sections, used for rescattering, and the more traditional SaS/DL cross sections, used at high energies. The latter framework has also been extended to include many more colliding hadron pairs. The `Pythia::getSigmaTotal` and `Pythia::getSigmaPartial` methods give the user direct access to these cross sections. These extend and replace the `Pythia::getLowEnergySigma` methods. See further on Total Cross Sections.
- New "SU21" PDFs for some 20 mesons and baryons, to be used e.g. in the MPI scenarios in hadron-hadron collisions, e.g. in a cascade in the atmosphere. The pi+ default PDF has been upgraded from GRV92 LO to GRS99 LO. The GJR07 LO set has been included as an option for the proton. The default value of `BeamRemnants:maxValQuark` has been updated to allow also charm and bottom hadrons as incoming beam particles.
- The framework for changing the beam kinematics between subsequent `Pythia::next` calls when using variable collision energies has been expanded. The `Pythia::setKinematics` methods mirror the frame type options for the beams. See further on Program Flow and Beam Parameters.
- As a further extension of the above, a new option exists wherein the first beam particle is initialized so it can be switched event-by-event between essentially any incoming hadron, while the second beam is restricted to be a proton or neutron. Again only `SoftQCD` and `LowEnergyQCD` processes are possible. To handle this feature, the code has been extended so that some 20 different PDFs are initialized, each with a corresponding MPI initialization and storage of required coefficients. See further Beam Parameters.
- Extended and improved handling of the Hidden Valley (HV) scenario.
  - Improved tracing of hidden-valley colours through a hidden-valley shower evolution history, thereby avoiding problems for some topologies.
  - Introduced the possibility to bookkeep individual HV hadron types, in particular HV-mesons, and thereby manage masses and decay properties. The default remains the simpler scheme, where only a smaller set of HV-hadron properties need to be defined. The detailed scenario also involves a mass-dependent handling of the joining of hadronization chains, or the collapse into a single hadron.
  - The list of Zv decays has been expanded to include further HV-quarks. Some default masses have been modified.
  - It is possible to set different production rates for HV-quarks during hadronization, and for HV-diquarks leading to HV-baryon production.
  - Introduced an option to suppress production of one flavour-diagonal pseudoscalar state, representing the eta_1 flavour singlet.
  - The `HiddenValley:spinFv` default value has been changed from 1 to 0, to make it transparent that HV-quarks have spin 1/2 by default.
  - Expanded the list of invisible particles accordingly.
  - A few minor bug fixes.
  - A significantly expanded description in Hidden Valley Processes.
  Thanks to Matt Strassler and Suchita Kulkarni for useful input.
- Added a new class `PythiaParallel` for easily making runs in parallel. See main161, main162 and main163 for usage examples. NOTE: this is an experimental feature. Feedback and bug reports should be sent to authors@pythia.org.
- New option introduced, where MPI initialization data can be stored on file and reused in a later run, to save time. See further on `MultipartonInteractions:reuseInit` and `MultipartonInteractions:initFile`. Also option to symmetrize the MPI rate between e.g. pi^+ p and pi^- p, see `MultipartonInteractions:setAntiSame`.
- New options allow a harder fragmentation function for a beam-remnant diquark, by a separate choice of the a and b parameters, and also forbid the popcorn mechanism for it. See further Beam Remnants.
- New diffractive states introduced, to cover all five-flavour mesonic states, and all baryonic ones with at most one c or b quarks. Furthermore, nitrogen and oxygen have been added to the set of nuclei
- New processes `SoftQCD:singleDiffractiveXB` and `SoftQCD:singleDiffractiveAX` allow to set single diffraction to occur only by A B → X B or only by A B → A X.
- Reorganised and consolidated the interface to external matrix element generators. Renamed `ShowerMEs` to `ExternalMEs` and `ShowerMEsMadgraph` to `ExternalMEsMadgraph`. Introduced new `HelicitySampler` class to sample helicities using external matrix elements.
- New options to get and set the state of the random number generator, `Rndm::getState` and `Rndm::setState`, as a direct-transfer option to the file-based `dumpState/readState` methods.
- New methods `Hist::fillTable` to read back in a table of histogram data, specifically as written by the `Hist::table` methods.
- Some minor rearrangements in `HadronLevel` to better structure the interleaving of hadronic rescattering and particle decays. New method `Pythia::moreDecays(int i)` to perform the decay of a single specified particle.
- Switched tunes to by default prefer LHAPDF 6 PDFs over LHAPDF 5 ones, via the setting `Tune:preferLHAPDF`.
- New `LHAPDF:xSymmetric` parameters allow the user to choose to use symmetric PDFs for s, c, and b quarks when using LHAPDF for a performance boost. By default, c and b are taken as symmetric (this matches the previous behaviour).
- `Info::pTnow()` can now also be used for showers during resonance decays, and when using the `shower()` method. The latter so far only for the Simple and Vincia shower models.
- Corrected a bug that mainly affects beam-remnant fragmentation in the QCD CR model. Previously, diquark-antidiquark systems with invariant masses below the threshold for baryon-antibaryon production would be combined into tetraquark-like states that do not exist in PYTHIA, resulting in errors with unknown particle codes and charge non-conservation. Now, `MiniStringFragmentation::ministring2two()` instead reconnects such topologies into two mesons, noting that this is consistent with the colour structure. Further motivation comes from studies of low-mass junction-antijunction systems in [Sjo03].
- Introduced fix to prevent the central description of Les Houches events showered with global recoil from shifting when shower variations are enabled.
- Fixed a few issues in Vincia's sector merging. Specifically, while the merging itself still only handles QCD corrections, Vincia's QED showers can now be left on during merging. Also corrected a bug leading to incomplete histories replacing complete ones with smaller probability, and fixed an inconsistent treatment of trial showers in systems with coloured resonances.
- When running Angantyr at very low energies, initialization would abort due to an incorrect initialization of the high-mass diffraction MPI machinery. Logic has been introduced to prevent this initializatoin.
- Fixed memory leaks in the `ColourReconnection` class.
- Fixed some recent compiler warnings and errors; thanks to Mattias Ellert.
- Removed the deprecated `SubCollisionModel` called `MultiRadial` from the heavy ion machinery.
- Added an abort in Pythia initialization to prevent using a low energy process with a hard process. Thanks to Jenna Bacon.
- Broke a circular shared pointer reference in `ResonanceWidths` and `ParticleDataEntry` which caused a small memory leak. Thanks to Gabriele Inghirami.
- Minor fix to avoid unnecessary (attempted) MPI initialization.
- Fixed issue with Dire getting stuck when showering soft QCD events. Note, Dire has not been validated for these types of events. Thanks to Giancarlo Panizzo and Marvin Flores for reporting the issue.

### 8.306: 28 June 2021

- Introduced ability to write intermediate output with RIVET, as demonstrated in the updated `main93.cc`.
- Fixed the incorrect scale being set when applying the POWHEG veto, i.e. `main31.cc`. Note that the number of emissions is correct in 8.303, but is incorrect in 8.304 and 8.305. Thanks to Mikhail Kirsanov.
- Fixed repeated initialization causing an ever expanding physics pointer list in the main `Pythia` class.
- Fixed issue for HepMC output from Vincia, which would previously issue warnings about inconsistent mother/daughter relationships, caused by Vincia's antenna-style bookkeeping by which emitted partons have two mothers instead of one. For status codes 43, 51, and 53, the HepMC interface now ignores the second parent, always using just the first one to define the vertex structure. Minor modifications to Vincia's QCD shower to ensure that the first mother is the one that changed colour and hence would be identified with the "radiator" in a collinear context. Analogous modifications in the QED module so the most collinear parent is the first mother.
- Removed `assert` statements from Angantyr.
- Shortened Pythia constructor header.

### 8.305: 03 May 2021

- Fixed issue that otherwise caused the weights of the Dire parton shower to be erroneously discarded. The fix will impact the results produced with the Dire parton shower model. The results of the previous version should be considered incorrect.
- Fixed potential for segfault in `Weights.cc` if `weightsShowerPtr == nullptr`.
- A number of fixes related to Vincia have been included.
  - Bug fixes in Vincia's merging, addressing the issue that occasionally incomplete histories were accepted while a complete one was available.
  - Fixed some small bugs in Vincia's QED shower that could cause issues when running at very high energies.
  - Minor namespace fixes. Moved `using namespace VinciaConstants` from headers to source files and moved `enum antFunType` inside the Pythia8 namespace.
  - Added default initialisers for data members in several Vincia classes, to avoid potentially undefined behaviour. Thanks to V. Zecca.
- Fixed unintentional initial-state radiation from unresolved hadron beams when set with option `BeamRemnants:unresolvedHadron` which would break up the beam. Minor fix also for cases where two unresolved hadrons.
- Added threshold check on low energy cross sections. This fixes a small bug reported by Vittorio Zecca.
- Corrected bug in normalization of histograms in `main07.cc`. Thanks to M. Baker and A. Thamm.

### 8.304: 09 April 2021

- Christian Preuss and Rob Verheyen join the author team.
- Christine O. Rasmussen leaves as an active author.
- New "sector" antenna showers implemented and made default for the Vincia antenna shower model.
- Minor changes to a few of the default Vincia hadronization parameters, reflecting the move to sector showers as default.
- New dedicated LO merging scheme for the Vincia sector antenna showers. The scheme is similar to CKKWL in spirit but exploits the bijective nature of the sector shower to vastly reduce the number of histories that need to be taken into account.
- New full-fledged electroweak shower option implemented for the Vincia shower model. The splitting kernels are based on collinear limits of corresponding helicity matrix elements so this EW shower model requires Born partons with assigned helicities. Currently these must either be input via LHEF or (for experts) runtime via Vincia's interface to MG5 matrix elements.
- Introduced tools to automatically generate MadGraph plugin libraries.
- New options for interleaved resonance decays implemented for both Pythia's default (simple) shower model, and for Vincia's antenna-shower model. Made default for the Vincia shower model, while Pythia's shower keeps its previous (non-interleaved) default setting.
- Revised internal handling of shower variations and splitting enhancements, both for regular and trial emissions. Enhancements of rare shower splittings are now steered by settings instead of UserHooks, and the necessary weights are automatically included in the shower and merging weights.
- A number of updates have been made to sophisticated tau decays.
  - External SPINUP is now always interpreted as a helicity state in the lab frame to ensure consistent treatment between tau decays and helicity showers.
  - The default external mode for tau decays has been changed to handle helicity showers.
  - gamma gamma → tau^+ tau^- processes are now handled.
  - Helicity states for initial beams can be specified and used in tau decays.
- Added HDF5 support.
- Added support for lepton-photon initiated hard processes generated internally or externally. Thanks to Liu Yao-Bei.
- Minor code changes to allow hadronic rescattering in nuclear collisions (remove limit on number of rescatterings, increase maximum transverse vertex location).
- Double quarkonia production, if enabled, is now also included in both MPI and second hard processes.
- Added some new functionality to the `Hist` class.
- Moved the event information in Info class to an appropriate diffractive system for hard diffraction. This way also the hard-process scale is properly propagated for primordial kT sampling.
- The `stopMassNow` in `StringFragmentation.cc` is made to increase faster for charm and bottom end quarks, to allow an increased few-body fraction further above threshold. Thanks to Andy Buckley.
- Added `ResonanceDecayFilterHook` and example `main103.cc` to demonstrate how to select specific final states from resonance decays.
- Fixed vertex smearing in heavy ion events.
- Fixed remnant handling for e+e- collisions for photon-initiated processes, thanks to Murat Köksal.
- Several (mostly minor) optimisations in Vincia, thanks to D. Konstantinov.
- Minor fixes in xml/html QCD process links and text.
- Several small bug fixes based on error reports by Vittorio Zecca.
  - Fixed a bug where some elastic cross sections for pi K at low energies were set equal to the total ones.
  - Protect against too high constituent masses inside a hadron in `LowEnergyProcess.cc`, already at an earlier stage of the process.
  - Protect against exp(-infinity) in `HadronLevel.cc`.
  - Two fixes for first step in the trial emissions in `StringFragmentation.cc`, used primarily in the thermal model option.
  - Properly set the photon-in-lepton PDF to vanish at very large x, rather than give unphysical values there.
  - Better protection against weird results for the `rap` and `eta` methods in `Basics.h`, and `y` in `Event.cc`.
  - Fixed pointer logic in Dire `getXPDF`.
  - Migrated from `log(1 + x)` to `log1p(x)` for numerical stability.
- Several small fixes in response to a static code analysis, provided by Dmitri Konstantinov.
  - Fix inconsistency in the usage of the third argument of the `dsigmaEl` method in the classes derived from `SigmaTotAux`.
  - Flawed and unused `LowEnergySigma::sigmaPartial` method removed.
  - Fix inconsistent type for `varWidthIn` in `ParticleDataEntry` class.
  - Introduce minor changes, e.g. to protect against out-of-bounds addressing or insert missing initializer, even though there is no evidence that it is needed.
  - Small speedup of the `Vec4` `[]` operator using `switch()` instead of `if` to find element to be returned.
- Bug fixed in the new possibility to let particles with narrow widths (such as onia states) obtain a simple Breit-Wigner distribution, specifically for MPIs, introduced in 8.240. This bug led to excessive rejection of low-invariant-mass interactions. Thanks to Albert De Roeck.
- Default event record checks switched off for `main21.cc`, to avoid issues with junction mother-daughter relations not being fully set. Also change so that showers are not called twice. Now all available cases are looped over, but easy to change back to study only one.

### 8.303: 01 September 2020

- Marius Utheim and Leif Gellersen join the author team.
- A new framework for Hadronic Rescattering has been developed. To enable rescattering, use `HadronLevel:Rescatter = on`, or see example programs `main151.cc` through `main156.cc` for use examples. Note that while the framework is ready to use, it is still being actively developed, and changes are likely in the near future. The older and much simpler rescattering models have been removed, including the related pp tunes 33 and 34, and there has been some file reorganization in code and documentation.
- A new class HadronWidths has been added to handle hadrons with mass-dependent widths. This has been done primarily because of its importance in resonance formation in rescattering, but the class is also used for decays of hadrons produced in other processes.
- A new class `LowEnergySigma` has been added to calculate cross sections of hadron-hadron interactions at low energies. These are used in rescattering and when performing primary collisions at low energies. Cross sections can be accessed using `Pythia::getLowEnergySigma`.
- Several changes in the `LowEnergyProcess` and `MiniStringFragmentation` frameworks, in particular with several new approaches to produce nondiffractive inelastic events as close as possible to the kinematical threshold. New method `StringFlav::combineToLightest` attempts to form the lightest hadron for a given flavour content. Also new possibility to disable popcorn baryon production, for use in small systems.
- The "decay"/mixing time of K^0/K^0bar → K^0_S/K^0_L has been changed from 1e-15 to 1e-6 mm, such that it only happens after hadronic rescattering, but still well before K^0_S/K^0_L decays.
- The Parton Vertex impact-parameter-plane assignment machinery has been completely rewritten and expanded with new options and capabilities. The default proton radius has been change from 0.7 to 0.85 fm.
- Limit the amount by which transverse smearing of the space-time quark-antiquark string breakup vertices can give large shifts, see further the new `HadronVertex:maxSmear` parameter. The new `HadronVertex:maxTau` gives the possibility to reject hadrons of suspected misreconstructed systems and try again. The introduction of MPI impact parameters is compensated by a reduced transverse hadronization smearing. Also some other related changes.
- The internal generation of photon-induced processes in hadronic collisions has been extended. This can be enabled with the new options `PDF:beamA2gamma` and `PDF:beamB2gamma`, which supersede the previous `PDF:leptonA2gamma` option. Some minor updates also for other related options, see PDF Selection for details.
- New photon fluxes from hadrons implemented, see PDF Selection for details.
- New example main program `main78.cc` to generate elastic, single- and double-dissociative photon-induced processes in proton-proton collisions, using options `PDF:beamA2gamma` and `PDF:beamB2gamma`. Also the sample programs `main69.cc` and `main70.cc` have been updated to use the new options.
- For asymmetric beams (e.g. electron-proton collisions) in Les Houches event files, a boost to the event CM frame is now defined and applied for outgoing particles, as required for successful event processing.
- The problem of "dangling" gluons causing changing color flows in `SimpleTimeShower` for top decays is now fixed. The fix is not fully validated for RPV.
- For LHE processes, the width of the primordial kT distribution is now set solely by the `BeamRemnants:primordialKThard` parameter, ignorning `BeamRemnants:primordialKTsoft`. This change is so that LHE events with low-pT extra jets (e.g., in the context of POWHEG-style merging) are given the same primordial kT as their Born-level counterparts.
- Improved HepMC3 multiweight output.
- Added automated renormalization scale variations in CKKW-L type merging schemes.
- Added UNLOPS merging scheme variations.
- Added warning messages in UNLOPS merging.
- Added flexible runtime plugin loading for Dire and Vincia matrix element corrections from Madgraph. These corrections can be enabled with the `--enable-mg5mes` flag during configuration and with the `Dire:MEplugin` and `Vincia:MEplugin` settings.
- Introduced common runtime plugin loading and unloading structure.
- Removed PDF set tracking for LHAPDF6 which breaks thread safety. In some cases this might cause a small penalty in memory.
- Removed `SLHA:keepSM` as it duplicates the functionality provided by `SLHA:minMassSM`.
- Some new methods in the `Hist` and `HistPlot` classes. `Hist::plotFunc` creates a histogram from the function provided as first argument, by evaluating its value in the middle of each histogram bin. `Hist::normalize` can rescale a histogram to an intended sum of bin contents. Methods to get x limits and lowest and highest y value. `Hist::smallestAbsValue` renamed `Hist::getYAbsMin` for consistency. `HistPlot::addFile` can add a file of data points, with or without errors, on to an existing histogram, for comparison purposes. A new variant of `HistPlot::plot` can set the frame borders.
- New `LinearInterpolator` class in `MathTools`.
- New `RotBstMatrix` methods `toSameVframe` and `fromSameVframe` sets up transformation to/from a frame where two particles move towards each other with equal-size velocities along the +-z direction.
- Some new functionality accessible via `PythiaStdlib.h`.
- It is now possible to use range-based for loops to iterate over particles in an event, e.g. `for (Particle& p : pythia.event)`. Similarly, the particle data table can be iterated over, with each entry being a `pair<int, ParticleDataEntry&>`.
- New possibility to redirect particle data listing output.
- A configure option `--obj-common='FLAGS'` to add additional compiler flags to object (`.o`) compilation (i.e. no effect on linking).
- Compilation flag `-DGCCFPDEBUG` enables floating point exceptions on a gcc compiler.
- New `index()` method in the `Py8Particle` class of the Fastjet3 interface ensures that the location of the particle in the PYTHIA event record is returned correctly. Thanks to Gavin Salam and Priyotosh Bandyopadhyay.
- A minor fix for kinematics of zero-virtuality photons to retain physical kinematics.
- Protect against diffractive masses exceeding phase space bounds for hard diffraction.
- A bug for propagation of space-like partons in string shoving. Thanks to Dong Jo Kim.
- Several indexing bugs for the "guess" option used in CKKW-L merging have been fixed. However, this does not yet mean that "guess" is guaranteed to be stable for any BSM process.
- Several fixes for problems discovered in a static code analysis, including one bug fix in LowEnergyProcess.cc. Thanks to Dmitri Konstantinov.
- Mixup of `ASecondHardProcess` and `SecondHardProcess` labels resolved. Thanks to Anton Karneyeu.
- Number of weights in `info` reset to 1 for each new `init` call.
- Fixed issue where the dark matter mass was reset even after explicitly being set by the user, e.g. `57:m0 = X`. This affects particle IDs 57 (DM+), 58 (DM2), and 59 (DM++).
- An indexing bug for the scattering lepton in DIS events with photon radiation allowed has been fixed.
- The redefinition of `dlsym` for plugin loading has now been removed as this is no longer required by modern compilers. Thanks to Chris Burr.
- Several small bug fixes based on error reports by Vittorio Zecca.
  - In `ProcessContainer.cc` the error calculation for Les Houches strategy +-3 should not be renewed for each file when the event sample is split across several files.
  - In `ProcessContainer::trialProcess()` a call to `phaseSpacePtr->rescaleMomenta( sHatNew);` should not be done since the momenta have not been set yet.
  - In the CT14qed PDF grid (and others?) the first two x grid values coincide, so one must not divide by their difference.
  - Default initialization of `hasOwnEventAttributes` in `Info.h` is necessary.
  - Protected against explicit evaluation of alphaS(LambdaQCD) in `VinciaISR`. Also added explicit member-variable initialisations for the `QEDemitElemental` class in `VinciaQED`.
  - Protected against floating point exceptions caused by dividing by zero in `PhaseSpace` for zero-width resonances.
  - Corrected a floating point exception in `Ropewalk.cc`.
  - Protected against out of range renormalization scale access for diffractive systems.
- Some further replacements of `fabs` by `abs`.
- Fix missing-pointer bug when colour reconnection is switched off for diffraction. Thanks to Valentina Zaccolo.

### 8.302: 24 April 2020

- A HepMC 3 interface is now included in `Pythia8Plugins/HepMC3.h`. All HepMC examples have been migrated from using the HepMC 2 interface to HepMC 3, excluding `main44.cc` and `main93.cc` which are kept for legacy purposes.
- Bug fix to correct units for automated shower uncertainty weights for `lhaStrategy = ±4`. In addition, the combination of weight variations, within the context of uncertainty bands, was not previously well documented and was therefore prone to misunderstandings. Now, all methods related to cross sections and weights are documented together on a single page, Cross Sections and Weights, the documentation on shower Variations has been improved, and the behaviour of `Info::getGroupWeight()` has been made more transparent. The `main121.cc` example has been modified accordingly. Note that the bug fix for `lhaStrategy = ±4` parallels an analogous one made in Pythia 8.244 which had not been previously carried over to Pythia 8.3.
- Fix for subscripting issue for photon beams, courtesy of Vittorio Zecca.
- New particle property directive `tauCalc` allows for a particle's proper lifetime to be set independently of its width. This is useful for studying the effect of lifetime for a particle when the particle width is otherwise negligible.
- Significant speedup of parton distribution handling, and thereby of the whole PYTHIA execution, since PDF is such a major part of the total execution time. This has been achieved by careful work by Dmitri Konstantinov and Grigory Latyshev. In detail, the main changes are:
  - In the LHAPDF6 interface the evaluation of the x and Q^2 limits is extremely slow, such that a caching of these numbers increases execution speed by about a factor of 2 when LHAPDF is used.
  - A caching of info on the amount of x already used up helps speed up MPI, ISR and FSR execution times, giving gains of order 20%. Main changes are in the `BeamParticle` class.
  - Optimization of array handling in `LHAGrid1` give a speedup by about 5%. This is the internal PYTHIA implementation of interpolation in LHAPDF6 grids which, still after the LHAPDF6 improvements reported above, runs more than 50% faster than using the same PDF evaluated by LHAPDF6. This streamlining is made at the cost of not offering facilities like PDF error bands.
  - Also the special internal routines for the NNPDF 2.3 series could be speeded up, but would still be slower than an equivalent `LHAGrid1` implementation. The NNPDF 2.3 sets therefore have been moved to the latter framework.
- New base class `ShowerModel` introduced, as a top-level handler of parton-shower models, interfaced via a shared pointer in `Pythia.cc`. Changes to Pythia's default showers and to the Vincia and Dire shower models to inherit from `ShowerModel`. New public method `Pythia::getShowerModelPtr()` intended to provide a way to access public ShowerModel methods for diagnostics purposes.
- Extra protection against unexpected input in e+e- Les Houches events, specifically where x >= 1 by roundoff errors. Thanks to Alexander Belyaev, Alexander Pukhov and Marco Zaro.
- Bug fix in `SusyLesHouches::checkSpectrum()`, to ensure uniform error handling when one or more spectrum self-consistency checks fails.
- Replaced use of `fabs()` by `abs()` in several places. Although default C++ `abs()` only takes integer arguments, `PythiaStdLib.h` contains the declaration `using std::abs` (via the `cmath` header), which is suitably overloaded and obviates the need for separate methods.
- Improvements to Vincia's handling of error messages; now issued via `Info::errorMsg()`.
- Removed `share/Pythia8/tunes` directory, with Vincia reverting to the same (in-code) way of setting tune presets as Dire and Pythia.

### 8.301: 30 October 2019

- Compilation is done with a new `-std=c++11` flag.
- The Vincia and Dire parton-shower programs, which previously have been available as free-standing add-ons to Pythia, are now fully integrated into Pythia, and will henceforth be distributed as part of this package. This has significant implications for code and documentation. The new master switch `PartonShowers:model` allows a simple choice of which to use, with 1 being the simple old internal one, 2 being Vincia and 3 being Dire. Note that Dire always comes with weighted events, while the other two by default have unit weight events, so analysis strategies must be adjusted accordingly.
- MadGraph-generated plugins for matrix element corrections to the Vincia and Dire parton-shower programs are now available. A new plugins directory has been created, where MadGraph5 matrix elements can be stored. Note that this implementation still is preliminary, with further improvements to come. To build the available plugins, `--enable-mg5mes` should be specified.
- Four new main programs have been introduced in the context of illustrating the Vincia and Dire shower models. Two of them also serve as examples of multithreading if Pythia is configured to link to OpenMP. `main200.cc` provides a simple test of final-state shower components, in a LEP-like setup. `main201.cc` compares two different shower models on dijet events. The two runs are executed in parallel if Pythia has been configured to link to OpenMP. `main202.cc` measures the running time for ttbar events and outputs a few test distributions. `main300.cc` can be linked against both HepMC2 and OpenMP, if Pythia has been configured correspondingly. It is capable of command-line instructions.
- A new plugin header, `Visualisation` is available and used in the example program `main300.cc`. Events can now be visualized via output that can be passed through GraphViz to produce a postscript file.
- Introduced a compromise for the treatment of lifetime and width, so that these can be set separately in some situations. If an `SLHA` file is used to set particle properties, then `SLHA:allowUserOverride = true` allows the lifetime to be set using a command file/string. Otherwise, lifetime is calculated from particle width. The ability to have the width and lifetime as independent properties is convenient for studies of new physics.
- The HTML and XML versions of the manual have been significantly reordered, with contents grouped in an increased set of main headings, each with an expandable index of subheadings. There are several new sections, notably for the Vincia and Dire showers. Among other changes, the example main programs have been classified by keywords, and are listed and searchable by these, see here.
- The PHP version of the manual has been discontinued, since it would be difficult to maintain in conjunction with the ongoing expansion of the html manual. The `include/Pythia8/phpdoc` directory has been removed.
- The Python interface has been completely redesigned to handle `C++11` by migrating from a `SWIG` generated interface to a `PyBind11` one. It is now possible for users to generate their own interface. Full details are given on the Python Interface page.
- The field `Pythia::info` of type `Info` has been made a constant reference, so that it cannot be externally manipulated outside of the internal classes. This constant reference points back to `Pythia::infoPrivate` instance, which is for internal use only. This instance now also contains pointers to several other commonly used classes.
- A new base class `PhysicsBase` has been created, from which several of the "physics" classes derive. This class standardizes the setup of pointers to commonly used classes, via the `Info` class. It has new methods that are called at the beginning and end of the generation of each event, and at the printout of final statistics. A new enum `Status` is provided in the method at the end of each event, to provide information on the reason for error exits. The access of the most commonly used `Settings` methods is streamlined.
- Most of the pointers in the `Pythia` class are now shared pointers, such that there is no need for `Pythia` to keep track of `new` and `delete` obligations. New header `SharedPointers.h`.
- The `CoupSM` and `CoupSUSY` couplings classes are now separated, rather than the latter being derived from the former. This avoids the problem of the old `Couplings` pointer potentially changing address, and some pointer casting.
- Mathematical functions and methods have been extracted from the `PythiaStdlib.h/.cc` files and put in new `MathTools.h/.cc` files. Thereby `PythiaStdlib` is more clearly reserved for declarations related to the Stdlib library, to some simple inline expressions (now `constexpr` where feasible) and to an expanded list of conversion constants.
- A new method `Rndm::phaseSpace2` has been added, and can be used to sample two-body phase space.
- The heavy ion machinery has been fixed so that particle vertex information in the event record is stored in units of mm rather than fm, while internal calculations still are in fm. Thanks to Christopher Plumberg.
- The data files related to parton distributions have been moved to a new `share/pythia8/pdfdata` directory, and code has been changed accordingly.
- Iterators are made available to simplify the study of the particles in the event record.
- A bug in the XML-to-HTML conversion has led to the indiscriminate removal of "more" from the HTML manual, notably in `Pythia::moreDecays()`.
- New class `LowEnergyProcess` for the hadronization of low-energy collisions between two hadrons. By default there is a smooth transition between this simple nonperturbative model and the full MPI-based framework at higher energies. To be used e.g. within the modelling of hadronic rescattering in the final state of high-energy collisions. This framework is still under development.
- New `StringInteractions` base class to provide common administrative framework for string shoving, rope hadronization, swing, (some) colour reconnection models, and more.
- The headers in `include/Pythia8Plugins` have been updated to no longer contain `using namespace Pythia8`. Thanks to Axel Naumann for pointing out inconsistent usage of scope.
- The build system has been updated to handle external package configuration scripts.
- The `ProMC` example and configuration option has been dropped.
- Optional package configurations for `RIVET` and `YODA` have been added.
- Support for `BOOST` has been dropped and only `LHAPDF6` with versions greater than `6.2` are supported.
- The flag `--openmp` has been added. Currently, OpenMP is used in some of the examples mentioned above, and in `DireWeightContainer.cc`.
- Bug fix so the option `UncertaintyBands:ISRpTmin2Fac` is correctly used in `SimpleSpaceShower.cc`.
- Bug fix stopping growth of number weights when multiple `init` calls are made in `Info`.
- Bug fix for `SusyWidthFunctions.cc` incorrectly calling `integrateGauss`, resulting in a width of zero.
- Bug fix to prevent overwriting of dark matter masses from unused model selections.
- Bug fix where instead of counting all PDG ids less than 100 as the Standard Model, masses of BSM Higgses and dark matter are allowed to be set without changing minMassSM.
- All 2 to 2 SUSY processes now inherit from Sigma2SUSY.
- Bug fix for Les Houches Event File input without specified beams, such that multiparton decays of a resonance can be combined with showers, although with proper care needed so as not to doublecount emissions.
- Clarify that Q2 scale has to be set by hand for DIS processes, if so desired.