We present the HepMC3 library designed to perform manipulations with
event records of High Energy Physics Monte Carlo Event Generators
(MCEGs). The library is a natural successor of HepMC and HepMC2
libraries used in the present and in the past. HepMC3 supports all
functionality of previous versions and significantly extends them.
In comparison to the previous versions, the default event record has
been simplified, while an option to add arbitrary information to the
event record has been implemented. Particles and vertices are stored
separately in an ordered graph structure, reflecting the evolution of
a physics event and enabling usage of sophisticated algorithms for
event record analysis.
The I/O functionality of the library has been extended to support common
input and output formats of HEP MCEGs, including formats used in Fortran
HEP MCEGs, formats used in HepMC2 library and ROOT. The functionality of
the library allows user to implement customized input or output format.
The library is already supported by popular modern MCEGs (e.g. Sherpa and
Pythia8) and can replace the older HepMC versions in many others.