<chapter name="Update History"> 
 
<h2>Update History</h2> 
 
These update notes describe major updates relative to the 
PYTHIA 8.243 version, which was the last 8.2 release (so far). 
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. 
 
<h3>8.303: 01 September 2020</h3> 
 
<ul> 
<li>Marius Utheim and Leif Gellersen join the author team.</li> 
 
<li>A new framework for 
<aloc href="HadronicRescattering">Hadronic Rescattering</aloc> 
has been developed. To enable rescattering, use 
<code>HadronLevel:Rescatter = on</code>, or see 
<aloc href="SampleMainPrograms">example programs</aloc> 
<code>main151.cc</code> through <code>main156.cc</code> 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 <ei>pp</ei> tunes 33 and 34, and there 
has been some file reorganization in code and documentation.</li> 
 
<li>A new class <aloc href="HadronWidths">HadronWidths</aloc> 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.</li> 
 
<li>A new class <code>LowEnergySigma</code> 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 
<code>Pythia::getLowEnergySigma</code>. 
</li> 
 
<li>Several changes in the <code>LowEnergyProcess</code> and 
<code>MiniStringFragmentation</code> frameworks, in particular with 
several new approaches to produce nondiffractive inelastic events as 
close as possible to the kinematical threshold. New method 
<code>StringFlav::combineToLightest</code> attempts to form the 
lightest hadron for a given flavour content. Also new possibility to 
disable popcorn baryon production, for use in small systems. 
</li> 
 
<li>The "decay"/mixing time of <ei>K^0/K^0bar &rarr; K^0_S/K^0_L</ei> 
has been changed from 1e-15 to 1e-6 mm, such that it only happens 
after hadronic rescattering, but still well before 
<ei>K^0_S/K^0_L</ei> decays.</li> 
 
<li>The <aloc href="PartonVertexInformation">Parton Vertex</aloc> 
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. 
</li> 
 
<li>Limit the amount by which transverse smearing of the space-time 
quark-antiquark string breakup vertices can give large shifts, see 
further the new <code>HadronVertex:maxSmear</code> parameter. The new 
<code>HadronVertex:maxTau</code> 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.</li> 
 
<li>The internal generation of photon-induced processes in hadronic 
collisions has been extended. This can be enabled with the new options 
<code>PDF:beamA2gamma</code> and <code>PDF:beamB2gamma</code>, which 
supersede the previous <code>PDF:leptonA2gamma</code> option. Some 
minor updates also for other related options, see 
<aloc href="PDFSelection">PDF Selection</aloc> for details. 
</li> 
 
<li>New photon fluxes from hadrons implemented, see 
<aloc href="PDFSelection">PDF Selection</aloc> for details. 
</li> 
 
<li>New example main program <code>main78.cc</code> to generate 
elastic, single- and double-dissociative photon-induced processes in 
proton-proton collisions, using options <code>PDF:beamA2gamma</code> 
and <code>PDF:beamB2gamma</code>. Also the sample programs 
<code>main69.cc</code> and <code>main70.cc</code> have been updated to 
use the new options. 
</li> 
 
<li>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 succesful event 
processing. 
</li> 
 
<li>The problem of "dangling" gluons causing changing color flows in 
<code>SimpleTimeShower</code> for top decays is now fixed. The fix is 
not fully validated for RPV.</li> 
 
<li>For LHE processes, the width of the primordial kT distribution is 
now set solely by the <code>BeamRemnants:primordialKThard</code> 
parameter, ignorning <code>BeamRemnants:primordialKTsoft</code>.  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.</li> 
 
<li>Improved HepMC3 multiweight output.</li> 
 
<li>Added automated renormalization scale variations in CKKW-L type 
merging schemes.</li> 
 
<li>Added UNLOPS merging scheme variations.</li> 
 
<li>Added warning messages in UNLOPS merging.</li> 
 
<li>Added flexible runtime plugin loading for Dire and Vincia matrix 
element corrections from Madgraph. These corrections can be enabled 
with the <code>--enable-mg5mes</code> flag during configuration and 
with the <code>Dire:MEplugin</code> and <code>Vincia:MEplugin</code> 
settings.</li> 
 
<li>Introduced common runtime plugin loading and unloading 
structure.</li> 
 
<li>Removed PDF set tracking for LHAPDF6 which breaks thread 
safety. In some cases this might cause a small penalty in memory.</li> 
 
<li>Removed <code>SLHA:keepSM</code> as it duplicates the 
functionality provided by <code>SLHA:minMassSM</code>.</li> 
 
<li>Some new methods in the <code>Hist</code> and 
<code>HistPlot</code> classes. <code>Hist::plotFunc</code> creates a 
histogram from the function provided as first argument, by evaluating 
its value in the middle of each histogram 
bin. <code>Hist::normalize</code> can rescale a histogram to an 
intended sum of bin contents. Methods to get <ei>x</ei> limits and 
lowest and highest <ei>y</ei> value. 
<code>Hist::smallestAbsValue</code> renamed 
<code>Hist::getYAbsMin</code> for consistency. 
<code>HistPlot::addFile</code> can add a file of data points, with or 
without errors, on to an existing histogram, for comparison purposes. 
A new variant of <code>HistPlot::plot</code> can set the frame 
borders. 
</li> 
 
<li>New <code>LinearInterpolator</code> class in 
<code>MathTools</code>.</li> 
 
<li>New <code>RotBstMatrix</code> methods <code>toSameVframe</code> 
and <code>fromSameVframe</code> sets up transformation to/from a frame 
where two particles move towards each other with equal-size velocities 
along the <ei>+-z</ei> direction.</li> 
 
<li>Some new functionality accessible via 
<code>PythiaStdlib.h</code>.</li> 
 
<li>It is now possible to use range-based for loops to iterate over 
particles in an event, e.g.  <code>for (Particle&amp p : 
pythia.event)</code>. Similarly, the particle data table can be 
iterated over, with each entry being a <code>pair&lt;int, 
ParticleDataEntry&amp&gt;</code>.</li> 
 
<li>New possibility to redirect particle data listing output.</li> 
 
<li>A configure option <code>--obj-common='FLAGS'</code> to add 
additional compiler flags to object (<code>.o</code>) compilation 
(i.e. no effect on linking).</li> 
 
<li>Compilation flag <code>-DGCCFPDEBUG</code> enables 
floating point exceptions on a gcc compiler.</li> 
 
<li>New <code>index()</code> method in the <code>Py8Particle</code> 
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.</li> 
 
<li>A minor fix for kinematics of zero-virtuality photons to retain 
physical kinematics.</li> 
 
<li>Protect against diffractive masses exceeding phase space bounds for hard diffraction.</li> 
 
<li>A bug for propagation of space-like partons in string shoving. 
Thanks to Dong Jo Kim.</li> 
 
<li>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.</li> 
 
<li>Several fixes for problems discovered in a static code analysis, 
including one bug fix in LowEnergyProcess.cc. Thanks to Dmitri 
Konstantinov.</li> 
 
<li>Mixup of <code>ASecondHardProcess</code> and 
<code>SecondHardProcess</code> labels resolved. Thanks to Anton 
Karneyeu.</li> 
 
<li>Number of weights in <code>info</code> reset to 1 for each new 
<code>init</code> call.</li> 
 
<li>Fixed issue where the dark matter mass was reset even after 
explicitly being set by the user, <ei>e.g.</ei> <code>57:m0 = 
X</code>. This affects particle IDs 57 (<ei>DM+</ei>), 58 
(<ei>DM2</ei>), and 59 (<ei>DM++</ei>).</li> 
 
<li>An indexing bug for the scattering lepton in DIS events with 
photon radiation allowed has been fixed.</li> 
 
<li>The redefinition of <code>dlsym</code> for plugin loading has now 
been removed as this is no longer required by modern compilers. Thanks 
to Chris Burr.</li> 
 
<li>Several small bug fixes based on error reports by Vittorio Zecca. 
<ul> 
<li>In <code>ProcessContainer.cc</code> the error calculation for Les 
Houches strategy +-3 should not be renewed for each file when the 
event sample is split across several files.</li> 
<li>In <code>ProcessContainer::trialProcess()</code> a call to 
<code>phaseSpacePtr->rescaleMomenta( sHatNew);</code> should not be 
done since the momenta have not been set yet.</li> 
<li>In the CT14qed PDF grid (and others?) the first two <ei>x</ei> 
grid values coincide, so one must not divide by their difference.</li> 
<li>Default initialization of <code>hasOwnEventAttributes</code> in 
<code>Info.h</code> is necessary.</li> 
<li>Protected against explicit evaluation of alphaS(LambdaQCD) in 
<code>VinciaISR</code>. Also added explicit member-variable 
initialisations for the <code>QEDemitElemental</code> class in 
<code>VinciaQED</code>.</li> 
<li>Protected against floating point exceptions caused by dividing by 
zero in <code>PhaseSpace</code> for zero-width resonances.</li> 
<li>Corrected a floating point exception in <code>Ropewalk.cc</code>.</li> 
<li>Protected against out of range renormalization scale access for 
diffractive systems.</li> 
</ul> 
</li> 
 
<li>Some further replacements of <code>fabs</code> by 
<code>abs</code>.</li> 
 
<li>Fix missing-pointer bug when colour reconnection is switched off 
for diffraction. Thanks to Valentina Zaccolo.</li> 
</ul> 
 
<h3>8.302: 24 April 2020</h3> 
 
<ul> 
<li>A HepMC 3 interface is now included in 
<code>Pythia8Plugins/HepMC3.h</code>. All HepMC examples have been 
migrated from using the HepMC 2 interface to HepMC 3, excluding 
<code>main44.cc</code> and <code>main93.cc</code> which are kept for 
legacy purposes.</li> 
 
<li>Bug fix to correct units for automated shower uncertainty weights 
for <code>lhaStrategy = &plusmn;4</code>. 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, 
<aloc href="CrossSectionsAndWeights">Cross Sections and Weights</aloc>, the 
documentation on shower <aloc href="Variations">Variations</aloc> has 
been improved, and the behaviour of 
<code>Info::getGroupWeight()</code> has been made more transparent. 
The <code>main121.cc</code> example has been modified 
accordingly. Note that the bug fix for <code>lhaStrategy = 
&plusmn;4</code> parallels an analogous one made in Pythia 8.244 which 
had not been previously carried over to Pythia 8.3.</li> 
 
<li>Fix for subscripting issue for photon beams, courtesy of Vittorio 
Zecca.</li> 
 
<li>New particle property directive <code>tauCalc</code> 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.</li> 
 
<li>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: 
<ul> 
<li>In the LHAPDF6 interface the evaluation of the <ei>x</ei> and 
<ei>Q^2</ei> limits is extremely slow, such that a caching of these 
numbers increases execution speed by about a factor of 2 when LHAPDF 
is used.</li> 
<li>A caching of info on the amount of <ei>x</ei> already used up 
helps speed up MPI, ISR and FSR execution times, giving gains of 
order 20%. Main changes are in the <code>BeamParticle</code> class. 
</li> 
<li>Optimization of array handling in <code>LHAGrid1</code> 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.</li> 
<li>Also the special internal routines for the NNPDF 2.3 series 
could be speeded up, but would still be slower than an equivalent 
<code>LHAGrid1</code> implementation. The NNPDF 2.3 sets therefore 
have been moved to the latter framework.</li> 
</ul> 
</li> 
 
<li>New base class <code>ShowerModel</code> introduced, as a 
top-level handler of parton-shower models, interfaced via a shared 
pointer in <code>Pythia.cc</code>. 
Changes to Pythia's default showers 
and to the Vincia and Dire shower models to inherit from 
<code>ShowerModel</code>. New public method 
<code>Pythia::getShowerModelPtr()</code> intended to provide a way 
to access public ShowerModel methods for diagnostics purposes. 
</li> 
 
<li>Extra protection against unexpected input in <ei>e+e-</ei> Les 
Houches events, specifically where <ei>x >= 1</ei> by roundoff errors. 
Thanks to Alexander Belyaev, Alexander Pukhov and Marco Zaro.</li> 
 
<li>Bug fix in 
<code>SusyLesHouches::checkSpectrum()</code>, to ensure uniform 
error handling when one or more spectrum self-consistency checks fails. 
</li> 
 
<li>Replaced use of <code>fabs()</code> by <code>abs()</code> 
in several places. Although default C++ <code>abs()</code> only takes 
integer arguments, <code>PythiaStdLib.h</code> contains the 
declaration <code>using std::abs</code> (via the <code>cmath</code> 
header), which is suitably overloaded and obviates the need for 
separate methods. 
</li> 
 
<li>Improvements to Vincia's handling of error messages; 
now issued via <code>Info::errorMsg()</code>.</li> 
 
<li>Removed <code>share/Pythia8/tunes</code> directory, 
with Vincia reverting to the same (in-code) way of setting tune 
presets as Dire and Pythia.</li> 
</ul> 
 
<h3>8.301: 30 October 2019</h3> 
<ul> 
<li>Compilation is done with a new <code>-std=c++11</code> flag.</li> 
 
<li>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 
<code><aloc href="PartonShowers">PartonShowers:model</aloc></code> 
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. 
</li> 
 
<li>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, 
<code>--enable-mg5mes</code> should be specified.</li> 
 
<li>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. <code>main200.cc</code> provides a simple test of final-state 
shower components, in a LEP-like setup. <code>main201.cc</code> 
compares two different shower models on dijet events. The two runs 
are executed in parallel if Pythia has been configured to link to 
OpenMP. <code>main202.cc</code> measures the running time for ttbar 
events and outputs a few test distributions. <code>main300.cc</code> 
can be linked against both HepMC2 and OpenMP, if Pythia has been 
configured correspondingly. It is capable of command-line 
instructions.</li> 
 
<li>A new plugin header, <code>Visualisation</code> is available and 
used in the example program <code>main300.cc</code>. Events can now be 
visualized via output that can be passed through GraphViz to produce a 
postscript file.</li> 
 
<li>Introduced a compromise for the treatment of lifetime and width, 
so that these can be set separately in some situations. If an 
<code>SLHA</code> file is used to set particle properties, then 
<code>SLHA:allowUserOverride = true</code> 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.</li> 
 
<li>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 
<aloc href="ExampleKeywords">here</aloc>.</li> 
 
<li>The PHP version of the manual has been discontinued, since it 
would be difficult to maintain in conjuction with the ongoing expansion 
of the html manual. The <code>include/Pythia8/phpdoc</code> 
directory has been removed.</li> 
 
<li>The Python interface has been completely redesigned to handle 
<code>C++11</code> by migrating from a <code>SWIG</code> generated 
interface to a <code>PyBind11</code> one. It is now possible for 
users to generate their own interface. Full details are given on the 
<aloc href="PythonInterface">Python Interface</aloc> page.</li> 
 
<li>The field <code>Pythia::info</code> of type <code>Info</code> has 
been made a constant reference, so that it cannot be externally 
manipulated outside of the internal classes. This constant reference 
points back to <code>Pythia::infoPrivate</code> instance, which is 
for internal use only.  This instance now also contains pointers to 
several other commonly used classes.</li> 
 
<li>A new base class <code>PhysicsBase</code> has been created, from 
which several of the "physics" classes derive. This class standardizes 
the setup of pointers to commonly used classes, via the 
<code>Info</code> 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 <code>Status</code> 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 
<code>Settings</code> methods is streamlined.</li> 
 
<li>Most of the pointers in the <code>Pythia</code> class are now 
shared pointers, such that there is no need for <code>Pythia</code> to 
keep track of <code>new</code> and <code>delete</code> 
obligations. New header <code>SharedPointers.h</code>.</li> 
 
<li>The <code>CoupSM</code> and <code>CoupSUSY</code> couplings 
classes are now separated, rather than the latter being derived from 
the former.  This avoids the problem of the old <code>Couplings</code> 
pointer potentially changing address, and some pointer casting.</li> 
 
<li>Mathematical functions and methods have been extracted from the 
<code>PythiaStdlib.h/.cc</code> files and put in new 
<code>MathTools.h/.cc</code> files. Thereby <code>PythiaStdlib</code> 
is more clearly reserved for declarations related to the Stdlib 
library, to some simple inline expressions (now <code>constexpr</code> 
where feasible) and to an expanded list of conversion constants.</li> 
 
<li>A new method <code>Rndm::phaseSpace2</code> has been added, and can be 
used to sample two-body phase space.</li> 
 
<li>The heavy ion machinery has been fixed so that particle vertex 
information in the event record is stored in units of <em>mm</em> 
rather than <em>fm</em>, while internal calculations still are in 
<em>fm</em>. Thanks to Christopher Plumberg.</li> 
 
<li>The data files related to parton distributions have been moved to 
a new <code>share/pythia8/pdfdata</code> directory, and code has been 
changed accordingly.</li> 
 
<li>Iterators are made available to simplify the study of the particles 
in the event record.</li> 
 
<li>A bug in the XML-to-HTML conversion has led to the indiscriminate 
removal of "more" from the HTML manual, notably in 
<code>Pythia::moreDecays()</code>.</li> 
 
<li>New class <code>LowEnergyProcess</code> for the hadronization of 
low-energy collisions between two hadrons. By default there is a smooh 
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.</li> 
 
<li>New <code>StringInteractions</code> base class to provide common 
administrative framework for string shoving, rope hadronization, 
swing, (some) colour reconnection models, and more.</li> 
 
<li>The headers in <code>include/Pythia8Plugins</code> have been 
updated to no longer contain <code>using namespace Pythia8</code>. 
Thanks to Axel Naumann for pointing out inconsistent usage of scope. 
</li> 
 
<li>The build system has been updated to handle external package 
configuration scripts.</li> 
 
<li>The <code>ProMC</code> example and configuration option has been 
dropped.</li> 
 
<li>Optional package configurations for <code>RIVET</code> and 
<code>YODA</code> have been added.</li> 
 
<li>Support for <code>BOOST</code> has been dropped and only 
<code>LHAPDF6</code> with versions greater than <code>6.2</code> are 
supported.</li> 
 
<li>The flag <code>--openmp</code> has been added. Currently, OpenMP 
is used in some of the examples mentioned above, and in 
<code>DireWeightContainer.cc</code>.</li> 
 
<li>Bug fix so the option <code>UncertaintyBands:ISRpTmin2Fac</code> 
is correctly used in <code>SimpleSpaceShower.cc</code>.</li> 
 
<li>Bug fix stopping growth of number weights when multiple 
<code>init</code> calls are made in <code>Info</code>.</li> 
 
<li>Bug fix for <code>SusyWidthFunctions.cc</code> incorrectly calling 
<code>integrateGauss</code>, resulting in a width of zero.</li> 
 
<li>Bug fix to prevent overwriting of dark matter masses from unused 
model selections.</li> 
 
<li> Bug fix where instead of counting all PDG ids less than 100 as 
the Standard Model, masses of BSM Higges and dark matter are allowed 
to be set without changing minMassSM.</li> 
 
<li> All 2 to 2 SUSY processes now inherit from Sigma2SUSY.</li> 
 
<li>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.</li> 
 
<li>Clarify that Q2 scale has to be set by hand for DIS processes, if 
so desired.</li> 
</ul> 
 
</chapter> 
 
<!-- Copyright (C) 2020 Torbjorn Sjostrand --> 
