Index: external/CMakeLists.txt
===================================================================
--- external/CMakeLists.txt	(revision 302624fca6ca1247dbb8697c4f2e8ecc730d20b1)
+++ external/CMakeLists.txt	(revision 90345e5e51b5e04ee05366a231dbb82c371dea54)
@@ -2,5 +2,4 @@
 add_subdirectory(ExRootAnalysis)
 add_subdirectory(Hector)
-add_subdirectory(HepMC3)
 add_subdirectory(tcl)
 add_subdirectory(PUPPI)
Index: external/HepMC3/AUTHORS
===================================================================
--- external/HepMC3/AUTHORS	(revision 302624fca6ca1247dbb8697c4f2e8ecc730d20b1)
+++ 	(revision )
@@ -1,21 +1,0 @@
-HEPMC3 AUTHORS
---------------
-Andy Buckley
-David Grellscheid
-Dmitri Konstantinov
-Leif Lonnblad
-James Monk
-Tomasz Przedzinski
-Witold Pokorski
-Andrii Verbytskyi
-
-HEPMC2 AUTHORS
---------------
-Lynn Garren
-Andy Buckley
-
-
-HEPMC1 AUTHORS
---------------
-Matt Dobbs
-Jorgen Beck Hansen
Index: external/HepMC3/Attribute.h
===================================================================
--- external/HepMC3/Attribute.h	(revision 302624fca6ca1247dbb8697c4f2e8ecc730d20b1)
+++ 	(revision )
@@ -1,1182 +1,0 @@
-// -*- C++ -*-
-//
-// This file is part of HepMC
-// Copyright (C) 2014-2020 The HepMC collaboration (see AUTHORS for details)
-//
-#ifndef HEPMC3_ATTRIBUTE_H
-#define HEPMC3_ATTRIBUTE_H
-/**
- *  @file Attribute.h
- *  @brief Definition of \b class Attribute, \b class IntAttribute and \b class StringAttribute
- *
- *  @class HepMC3::Attribute
- *  @brief Base class for all attributes
- *
- *  Contains virtual functions to_string and from_string that
- *  each attribute must implement, as well as init function that
- *  attributes should overload to initialize parsed attribute
- *
- *  @ingroup attributes
- *
- */
-#include <cstdio> // sprintf
-#include <string>
-#include <limits>
-#include <sstream>
-#include <iomanip>
-#include <map>
-
-#include "HepMC3/GenParticle_fwd.h"
-#include "HepMC3/GenVertex_fwd.h"
-
-/** Deprecated */
-using std::string;
-
-namespace HepMC3 {
-
-/** @brief Forward declaration of GenEvent. */
-class GenEvent;
-
-/** @brief Forward declaration of GenRunInfo. */
-class GenRunInfo;
-
-/** @brief Forward declaration of GenParticle. */
-// class GenParticle;
-class Attribute {
-//
-// Constructors
-//
-public:
-    /** @brief Default constructor */
-    //Note: m_event should be set to nullptr in case event is deleted!
-    Attribute():m_is_parsed(true) {    m_event=nullptr; }
-
-    /** @brief Virtual destructor */
-    virtual ~Attribute() {}
-
-protected:
-    /** @brief Protected constructor that allows to set string
-     *
-     *  Used when parsing attributes from file. An StringAttribute class
-     *  object is made, which uses this constructor to signify that
-     *  it just holds string without parsing it.
-     *
-     *  @note There should be no need for user class to ever use this constructor
-     */
-    //Note: m_event should be set to nullptr n case event is deleted!
-    explicit Attribute(const std::string &st):m_is_parsed(false),m_string(st) { m_event=nullptr; }
-
-    /** @brief GenEvent is a friend */
-    friend class GenEvent;
-
-//
-// Virtual Functions
-//
-public:
-    /** @brief Fill class content from string.
-     */
-    virtual bool from_string(const std::string & att) = 0;
-
-    /** @brief Optionally initialize the attribute after from_string.
-     */
-    virtual bool init() {
-        return true;
-    }
-
-    /** @brief Optionally initialize the attribute after from_string
-     *
-     * Is passed a reference to the GenRunInfo object to which the
-     * Attribute belongs.
-     */
-    virtual bool init(const GenRunInfo & ) {
-        return true;
-    }
-
-    /** @brief Fill string from class content */
-    virtual bool to_string(std::string &att) const = 0;
-
-//
-// Accessors
-//
-public:
-    /** @brief Check if this attribute is parsed */
-    bool is_parsed() const { return m_is_parsed; }
-
-    /** @brief Get unparsed string */
-    const std::string& unparsed_string() const { return m_string; }
-
-    /** return the GenEvent to which this Attribute belongs, if at all. */
-    const GenEvent * event() const {
-        return m_event;
-    }
-
-    /** return the GenParticle to which this Attribute belongs, if at all. */
-    GenParticlePtr particle() {
-        return m_particle;
-    }
-
-    /** return the GenParticle to which this Attribute belongs, if at all. */
-    ConstGenParticlePtr particle() const {
-        return std::const_pointer_cast<GenParticle>(m_particle);
-    }
-
-    /** return the GenVertex to which this Attribute belongs, if at all. */
-    GenVertexPtr vertex() {
-        return m_vertex;
-    }
-
-    /** return the GenVertex to which this Attribute belongs, if at all. */
-    ConstGenVertexPtr vertex() const {
-        return std::const_pointer_cast<GenVertex>(m_vertex);
-    }
-
-protected:
-    /** @brief Set is_parsed flag */
-    void set_is_parsed(bool flag) { m_is_parsed = flag; }
-
-    /** @brief Set unparsed string */
-    void set_unparsed_string(const std::string &st) { m_string = st; }
-
-//
-// Fields
-//
-private:
-    bool   m_is_parsed;             //!< Is this attribute parsed?
-    std::string m_string;                //!< Raw (unparsed) string
-    const GenEvent * m_event;       //!< Possibility to be aware of the
-    //!  controlling GenEvent object.
-    GenParticlePtr m_particle; //!< Particle to which assigned.
-    GenVertexPtr m_vertex;      //!< Vertex to which assigned.
-};
-
-/**
- *  @class HepMC3::IntAttribute
- *  @brief Attribute that holds an Integer implemented as an int
- *
- *  @ingroup attributes
- */
-class IntAttribute : public Attribute {
-public:
-
-    /** @brief Default constructor */
-    IntAttribute():Attribute(),m_val(0) {}
-
-    /** @brief Constructor initializing attribute value */
-    IntAttribute(int val):Attribute(),m_val(val) {}
-
-    /** @brief Implementation of Attribute::from_string */
-    bool from_string(const std::string &att) override {
-        m_val = atoi( att.c_str() );
-        return true;
-    }
-
-    /** @brief Implementation of Attribute::to_string */
-    bool to_string(std::string &att) const  override{
-        att = std::to_string(m_val);
-        return true;
-    }
-
-    /** @brief get the value associated to this Attribute. */
-    int value() const {
-        return m_val;
-    }
-
-    /** @brief set the value associated to this Attribute. */
-    void set_value(const int& i) {
-        m_val = i;
-    }
-
-private:
-    int m_val; ///< Attribute value
-};
-
-/**
- *  @class HepMC3::LongAttribute
- *  @brief Attribute that holds an Integer implemented as an int
- *
- *  @ingroup attributes
- */
-class LongAttribute : public Attribute {
-public:
-
-    /** @brief Default constructor */
-    LongAttribute(): Attribute(), m_val(0) {}
-
-    /** @brief Constructor initializing attribute value */
-    LongAttribute(long val): Attribute(), m_val(val) {}
-
-    /** @brief Implementation of Attribute::from_string */
-    bool from_string(const std::string &att)  override{
-        m_val = atol( att.c_str() );
-        return true;
-    }
-
-    /** @brief Implementation of Attribute::to_string */
-    bool to_string(std::string &att) const  override{
-        att = std::to_string(m_val);
-        return true;
-    }
-
-    /** @brief get the value associated to this Attribute. */
-    long value() const {
-        return m_val;
-    }
-
-    /** @brief set the value associated to this Attribute. */
-    void set_value(const long& l) {
-        m_val = l;
-    }
-
-private:
-
-    long m_val; ///< Attribute value
-
-};
-
-/**
- *  @class HepMC3::DoubleAttribute
- *  @brief Attribute that holds a real number as a double.
- *
- *  @ingroup attributes
- */
-class DoubleAttribute : public Attribute {
-public:
-
-    /** @brief Default constructor */
-    DoubleAttribute(): Attribute(), m_val(0.0) {}
-
-    /** @brief Constructor initializing attribute value */
-    DoubleAttribute(double val): Attribute(), m_val(val) {}
-
-    /** @brief Implementation of Attribute::from_string */
-    bool from_string(const std::string &att)  override{
-        m_val = atof( att.c_str() );
-        return true;
-    }
-
-    /** @brief Implementation of Attribute::to_string */
-    bool to_string(std::string &att) const  override{
-        std::ostringstream oss;
-        oss << std::setprecision(std::numeric_limits<double>::digits10)
-            << m_val;
-        att = oss.str();
-        return true;
-    }
-
-    /** @brief get the value associated to this Attribute. */
-    double value() const {
-        return m_val;
-    }
-
-    /** @brief set the value associated to this Attribute. */
-    void set_value(const double& d) {
-        m_val = d;
-    }
-
-private:
-
-    double m_val; ///< Attribute value
-};
-
-/**
- *  @class HepMC3::FloatAttribute
- *  @brief Attribute that holds a real number as a float.
- *
- *  @ingroup attributes
- */
-class FloatAttribute : public Attribute {
-public:
-
-    /** @brief Default constructor */
-    FloatAttribute(): Attribute(), m_val(0.0) {}
-
-    /** @brief Constructor initializing attribute value */
-    FloatAttribute(float val): Attribute(), m_val(val) {}
-
-    /** @brief Implementation of Attribute::from_string */
-    bool from_string(const std::string &att)  override{
-        m_val = float(atof( att.c_str() ));
-        return true;
-    }
-
-    /** @brief Implementation of Attribute::to_string */
-    bool to_string(std::string &att) const  override{
-        std::ostringstream oss;
-        oss << std::setprecision(std::numeric_limits<float>::digits10)
-            << m_val;
-        att = oss.str();
-        return true;
-    }
-
-    /** @brief get the value associated to this Attribute. */
-    float value() const {
-        return m_val;
-    }
-
-    /** @brief set the value associated to this Attribute. */
-    void set_value(const float& f) {
-        m_val = f;
-    }
-
-private:
-
-    float m_val; ///< Attribute value
-};
-
-/**
- *  @class HepMC3::StringAttribute
- *  @brief Attribute that holds a string
- *
- *  Default attribute constructed when reading input files.
- *  It can be then parsed by other attributes or left as a string.
- *
- *  @ingroup attributes
- *
- */
-class StringAttribute : public Attribute {
-public:
-
-    /** @brief Default constructor - empty string */
-    StringAttribute():Attribute() {}
-
-    /** @brief String-based constructor
-     *
-     *  The Attribute constructor used here marks that this is an unparsed
-     *  string that can be (but does not have to be) parsed
-     *
-     */
-    StringAttribute(const std::string &st):Attribute(st) {}
-
-    /** @brief Implementation of Attribute::from_string */
-    bool from_string(const std::string &att)  override{
-        set_unparsed_string(att);
-        return true;
-    }
-
-    /** @brief Implementation of Attribute::to_string */
-    bool to_string(std::string &att) const  override{
-        att = unparsed_string();
-        return true;
-    }
-
-    /** @brief get the value associated to this Attribute. */
-    std::string value() const {
-        return unparsed_string();
-    }
-
-    /** @brief set the value associated to this Attribute. */
-    void set_value(const std::string& s) {
-        set_unparsed_string(s);
-    }
-
-};
-
-/**
- *  @class HepMC3::CharAttribute
- *  @brief Attribute that holds an Chareger implemented as an int
- *
- *  @ingroup attributes
- */
-class CharAttribute : public Attribute {
-public:
-
-    /** @brief Default constructor */
-    CharAttribute():Attribute(),m_val(0) {}
-
-    /** @brief Constructor initializing attribute value */
-    CharAttribute(char val):Attribute(),m_val(val) {}
-
-    /** @brief Implementation of Attribute::from_string */
-    bool from_string(const std::string &att) override {
-        if (att.size())
-        {
-            m_val = att.at(0);
-            return true;
-        }
-        return false;
-    }
-
-    /** @brief Implementation of Attribute::to_string */
-    bool to_string(std::string &att) const override {
-        att = std::to_string(m_val);
-        return true;
-    }
-
-    /** @brief get the value associated to this Attribute. */
-    char value() const {
-        return m_val;
-    }
-
-    /** @brief set the value associated to this Attribute. */
-    void set_value(const char& i) {
-        m_val = i;
-    }
-
-private:
-    char m_val; ///< Attribute value
-};
-
-/**
- *  @class HepMC3::LongLongAttribute
- *  @brief Attribute that holds an Integer implemented as an int
- *
- *  @ingroup attributes
- */
-class LongLongAttribute : public Attribute {
-public:
-
-    /** @brief Default constructor */
-    LongLongAttribute(): Attribute(), m_val(0) {}
-
-    /** @brief Constructor initializing attribute value */
-    LongLongAttribute(long long val): Attribute(), m_val(val) {}
-
-    /** @brief Implementation of Attribute::from_string */
-    bool from_string(const std::string &att)  override{
-        m_val = atoll( att.c_str() );
-        return true;
-    }
-
-    /** @brief Implementation of Attribute::to_string */
-    bool to_string(std::string &att) const  override{
-        att = std::to_string(m_val);
-        return true;
-    }
-
-    /** @brief get the value associated to this Attribute. */
-    long long value() const {
-        return m_val;
-    }
-
-    /** @brief set the value associated to this Attribute. */
-    void set_value(const long long& l) {
-        m_val = l;
-    }
-
-private:
-
-    long  long m_val; ///< Attribute value
-
-};
-
-/**
- *  @class HepMC3::LongDoubleAttribute
- *  @brief Attribute that holds a real number as a double.
- *
- *  @ingroup attributes
- */
-class LongDoubleAttribute : public Attribute {
-public:
-
-    /** @brief Default constructor */
-    LongDoubleAttribute(): Attribute(), m_val(0.0) {}
-
-    /** @brief Constructor initializing attribute value */
-    LongDoubleAttribute(long double val): Attribute(), m_val(val) {}
-
-    /** @brief Implementation of Attribute::from_string */
-    bool from_string(const std::string &att) override {
-        m_val = strtold( att.c_str(),NULL);
-        return true;
-    }
-
-    /** @brief Implementation of Attribute::to_string */
-    bool to_string(std::string &att) const  override{
-        std::ostringstream oss;
-        oss << std::setprecision(std::numeric_limits<long double>::digits10)
-            << m_val;
-        att = oss.str();
-        return true;
-    }
-
-    /** @brief get the value associated to this Attribute. */
-    long double value() const {
-        return m_val;
-    }
-
-    /** @brief set the value associated to this Attribute. */
-    void set_value(const long double& d) {
-        m_val = d;
-    }
-
-private:
-
-    long double m_val; ///< Attribute value
-};
-
-
-
-/**
- *  @class HepMC3::UIntAttribute
- *  @brief Attribute that holds an unsigned int
- *
- *  @ingroup attributes
- */
-class UIntAttribute : public Attribute {
-public:
-
-    /** @brief Default constructor */
-    UIntAttribute():Attribute(),m_val(0) {}
-
-    /** @brief Constructor initializing attribute value */
-    UIntAttribute(unsigned int val):Attribute(),m_val(val) {}
-
-    /** @brief Implementation of Attribute::from_string */
-    bool from_string(const std::string &att)  override{
-        m_val = strtoul(att.c_str(), NULL, 0);
-        return true;
-    }
-
-    /** @brief Implementation of Attribute::to_string */
-    bool to_string(std::string &att) const  override{
-        att = std::to_string(m_val);
-        return true;
-    }
-
-    /** @brief get the value associated to this Attribute. */
-    unsigned int value() const {
-        return m_val;
-    }
-
-    /** @brief set the value associated to this Attribute. */
-    void set_value(const unsigned int& i) {
-        m_val = i;
-    }
-
-private:
-    unsigned int m_val; ///< Attribute value
-};
-
-
-
-/**
- *  @class HepMC3::ULongAttribute
- *  @brief Attribute that holds an unsigned long
- *
- *  @ingroup attributes
- */
-class ULongAttribute : public Attribute {
-public:
-
-    /** @brief Default constructor */
-    ULongAttribute():Attribute(),m_val(0) {}
-
-    /** @brief Constructor initializing attribute value */
-    ULongAttribute(unsigned long val):Attribute(),m_val(val) {}
-
-    /** @brief Implementation of Attribute::from_string */
-    bool from_string(const std::string &att)  override{
-        m_val = strtoul(att.c_str(), NULL, 0);
-        return true;
-    }
-
-    /** @brief Implementation of Attribute::to_string */
-    bool to_string(std::string &att) const  override{
-        att = std::to_string(m_val);
-        return true;
-    }
-
-    /** @brief get the value associated to this Attribute. */
-    unsigned long value() const {
-        return m_val;
-    }
-
-    /** @brief set the value associated to this Attribute. */
-    void set_value(const unsigned long& i) {
-        m_val = i;
-    }
-
-private:
-    unsigned long m_val; ///< Attribute value
-};
-
-
-/**
- *  @class HepMC3::ULongLongAttribute
- *  @brief Attribute that holds an unsigned long long
- *
- *  @ingroup attributes
- */
-class ULongLongAttribute : public Attribute {
-public:
-
-    /** @brief Default constructor */
-    ULongLongAttribute():Attribute(),m_val(0) {}
-
-    /** @brief Constructor initializing attribute value */
-    ULongLongAttribute(unsigned long long val):Attribute(),m_val(val) {}
-
-    /** @brief Implementation of Attribute::from_string */
-    bool from_string(const std::string &att)  override{
-        m_val = strtoull(att.c_str(), NULL, 0);
-        return true;
-    }
-
-    /** @brief Implementation of Attribute::to_string */
-    bool to_string(std::string &att) const  override{
-        att = std::to_string(m_val);
-        return true;
-    }
-
-    /** @brief get the value associated to this Attribute. */
-    unsigned long long value() const {
-        return m_val;
-    }
-
-    /** @brief set the value associated to this Attribute. */
-    void set_value(const unsigned long long& i) {
-        m_val = i;
-    }
-
-private:
-    unsigned long long m_val; ///< Attribute value
-};
-/**
- *  @class HepMC3::BoolAttribute
- *  @brief Attribute that holds an Booleger implemented as an int
- *
- *  @ingroup attributes
- */
-class BoolAttribute : public Attribute {
-public:
-
-    /** @brief Default constructor */
-    BoolAttribute():Attribute(),m_val(false) {}
-
-    /** @brief Constructor initializing attribute value */
-    BoolAttribute(bool val):Attribute(),m_val(val) {}
-
-    /** @brief Implementation of Attribute::from_string */
-    bool from_string(const std::string &att)  override{
-        if (att.size()!=1) return false;
-        if(att==std::string("1")) {m_val = true;  return true;}
-        if(att==std::string("0")) {m_val = false; return true;}
-        return false;
-    }
-
-    /** @brief Implementation of Attribute::to_string */
-    bool to_string(std::string &att) const override{
-        att = std::to_string(m_val);
-        return true;
-    }
-
-    /** @brief get the value associated to this Attribute. */
-    bool value() const {
-        return m_val;
-    }
-
-    /** @brief set the value associated to this Attribute. */
-    void set_value(const bool& i) {
-        m_val = i;
-    }
-
-private:
-    bool m_val; ///< Attribute value
-};
-
-/**
- *  @class HepMC3::VectorCharAttribute
- *  @brief Attribute that holds a vector of charegers of type  char
- *
- *  @ingroup attributes
- */
-class VectorCharAttribute : public Attribute {
-public:
-
-    /** @brief Default constructor */
-    VectorCharAttribute():Attribute(),m_val() {}
-
-    /** @brief Constructor initializing attribute value */
-    VectorCharAttribute(std::vector<char> val):Attribute(),m_val(val) {}
-
-    /** @brief Implementation of Attribute::from_string */
-    bool from_string(const std::string &att) override {
-        char  datafoo;
-        m_val.clear();
-        std::stringstream datastream(att);
-        while (datastream >> datafoo) m_val.push_back(datafoo);
-        return true;
-    }
-
-    /** @brief Implementation of Attribute::to_string */
-    bool to_string(std::string &att) const  override{
-        att.clear();
-        for (auto a:  m_val) {if (att.length()) att+=" ";  att+=std::to_string(a);}
-        return true;
-    }
-
-    /** @brief get the value associated to this Attribute. */
-    std::vector<char> value() const {
-        return m_val;
-    }
-
-    /** @brief set the value associated to this Attribute. */
-    void set_value(const std::vector<char>& i) {
-        m_val = i;
-    }
-
-private:
-    std::vector<char> m_val; ///< Attribute value
-};
-
-/**
- *  @class HepMC3::VectorFloatAttribute
- *  @brief Attribute that holds a vector of floategers of type  float
- *
- *  @ingroup attributes
- */
-class VectorFloatAttribute : public Attribute {
-public:
-
-    /** @brief Default constructor */
-    VectorFloatAttribute():Attribute(),m_val() {}
-
-    /** @brief Constructor initializing attribute value */
-    VectorFloatAttribute(std::vector<float> val):Attribute(),m_val(val) {}
-
-    /** @brief Implementation of Attribute::from_string */
-    bool from_string(const std::string &att) override {
-        float  datafoo;
-        m_val.clear();
-        std::stringstream datastream(att);
-        while (datastream >> datafoo) m_val.push_back(datafoo);
-        return true;
-    }
-
-    /** @brief Implementation of Attribute::to_string */
-    bool to_string(std::string &att) const  override{
-        att.clear();
-        for (auto a:  m_val) {if (att.length()) att+=" ";  att+=std::to_string(a);}
-        return true;
-    }
-
-    /** @brief get the value associated to this Attribute. */
-    std::vector<float> value() const {
-        return m_val;
-    }
-
-    /** @brief set the value associated to this Attribute. */
-    void set_value(const std::vector<float>& i) {
-        m_val = i;
-    }
-
-private:
-    std::vector<float> m_val; ///< Attribute value
-};
-
-
-/**
- *  @class HepMC3::VectorLongDoubleAttribute
- *  @brief Attribute that holds a vector of long doubleegers of type  long double
- *
- *  @ingroup attributes
- */
-class VectorLongDoubleAttribute : public Attribute {
-public:
-
-    /** @brief Default constructor */
-    VectorLongDoubleAttribute():Attribute(),m_val() {}
-
-    /** @brief Constructor initializing attribute value */
-    VectorLongDoubleAttribute(std::vector<long double> val):Attribute(),m_val(val) {}
-
-    /** @brief Implementation of Attribute::from_string */
-    bool from_string(const std::string &att) override {
-        long double  datafoo;
-        m_val.clear();
-        std::stringstream datastream(att);
-        while (datastream >> datafoo) m_val.push_back(datafoo);
-        return true;
-    }
-
-    /** @brief Implementation of Attribute::to_string */
-    bool to_string(std::string &att) const  override{
-        att.clear();
-        for (auto a:  m_val) {if (att.length()) att+=" ";  att+=std::to_string(a);}
-        return true;
-    }
-
-    /** @brief get the value associated to this Attribute. */
-    std::vector<long double> value() const {
-        return m_val;
-    }
-
-    /** @brief set the value associated to this Attribute. */
-    void set_value(const std::vector<long double>& i) {
-        m_val = i;
-    }
-
-private:
-    std::vector<long double> m_val; ///< Attribute value
-};
-
-
-
-/**
- *  @class HepMC3::VectorLongLongAttribute
- *  @brief Attribute that holds a vector of long longegers of type  long long
- *
- *  @ingroup attributes
- */
-class VectorLongLongAttribute : public Attribute {
-public:
-
-    /** @brief Default constructor */
-    VectorLongLongAttribute():Attribute(),m_val() {}
-
-    /** @brief Constructor initializing attribute value */
-    VectorLongLongAttribute(std::vector<long long> val):Attribute(),m_val(val) {}
-
-    /** @brief Implementation of Attribute::from_string */
-    bool from_string(const std::string &att) override {
-        long long  datafoo;
-        m_val.clear();
-        std::stringstream datastream(att);
-        while (datastream >> datafoo) m_val.push_back(datafoo);
-        return true;
-    }
-
-    /** @brief Implementation of Attribute::to_string */
-    bool to_string(std::string &att) const  override{
-        att.clear();
-        for (auto a:  m_val) {if (att.length()) att+=" ";  att+=std::to_string(a);}
-        return true;
-    }
-
-    /** @brief get the value associated to this Attribute. */
-    std::vector<long long> value() const {
-        return m_val;
-    }
-
-    /** @brief set the value associated to this Attribute. */
-    void set_value(const std::vector<long long>& i) {
-        m_val = i;
-    }
-
-private:
-    std::vector<long long> m_val; ///< Attribute value
-};
-
-/**
- *  @class HepMC3::VectorUIntAttribute
- *  @brief Attribute that holds a vector of unsigned integers of type  unsigned int
- *
- *  @ingroup attributes
- */
-class VectorUIntAttribute : public Attribute {
-public:
-
-    /** @brief Default constructor */
-    VectorUIntAttribute():Attribute(),m_val() {}
-
-    /** @brief Constructor initializing attribute value */
-    VectorUIntAttribute(std::vector<unsigned int> val):Attribute(),m_val(val) {}
-
-    /** @brief Implementation of Attribute::from_string */
-    bool from_string(const std::string &att) override {
-        unsigned int  datafoo;
-        m_val.clear();
-        std::stringstream datastream(att);
-        while (datastream >> datafoo) m_val.push_back(datafoo);
-        return true;
-    }
-
-    /** @brief Implementation of Attribute::to_string */
-    bool to_string(std::string &att) const  override{
-        att.clear();
-        for (auto a:  m_val) {if (att.length()) att+=" ";  att+=std::to_string(a);}
-        return true;
-    }
-
-    /** @brief get the value associated to this Attribute. */
-    std::vector<unsigned int> value() const {
-        return m_val;
-    }
-
-    /** @brief set the value associated to this Attribute. */
-    void set_value(const std::vector<unsigned int>& i) {
-        m_val = i;
-    }
-
-private:
-    std::vector<unsigned int> m_val; ///< Attribute value
-};
-
-/**
- *  @class HepMC3::VectorULongAttribute
- *  @brief Attribute that holds a vector of unsigned longegers of type  unsigned long
- *
- *  @ingroup attributes
- */
-class VectorULongAttribute : public Attribute {
-public:
-
-    /** @brief Default constructor */
-    VectorULongAttribute():Attribute(),m_val() {}
-
-    /** @brief Constructor initializing attribute value */
-    VectorULongAttribute(std::vector<unsigned long> val):Attribute(),m_val(val) {}
-
-    /** @brief Implementation of Attribute::from_string */
-    bool from_string(const std::string &att) override {
-        unsigned long  datafoo;
-        m_val.clear();
-        std::stringstream datastream(att);
-        while (datastream >> datafoo) m_val.push_back(datafoo);
-        return true;
-    }
-
-    /** @brief Implementation of Attribute::to_string */
-    bool to_string(std::string &att) const  override{
-        att.clear();
-        for (auto a:  m_val) {if (att.length()) att+=" ";  att+=std::to_string(a);}
-        return true;
-    }
-
-    /** @brief get the value associated to this Attribute. */
-    std::vector<unsigned long> value() const {
-        return m_val;
-    }
-
-    /** @brief set the value associated to this Attribute. */
-    void set_value(const std::vector<unsigned long>& i) {
-        m_val = i;
-    }
-
-private:
-    std::vector<unsigned long> m_val; ///< Attribute value
-};
-
-
-/**
- *  @class HepMC3::VectorULongLongAttribute
- *  @brief Attribute that holds a vector of unsigned long longegers of type  unsigned long long
- *
- *  @ingroup attributes
- */
-class VectorULongLongAttribute : public Attribute {
-public:
-
-    /** @brief Default constructor */
-    VectorULongLongAttribute():Attribute(),m_val() {}
-
-    /** @brief Constructor initializing attribute value */
-    VectorULongLongAttribute(std::vector<unsigned long long> val):Attribute(),m_val(val) {}
-
-    /** @brief Implementation of Attribute::from_string */
-    bool from_string(const std::string &att) override {
-        unsigned long long  datafoo;
-        m_val.clear();
-        std::stringstream datastream(att);
-        while (datastream >> datafoo) m_val.push_back(datafoo);
-        return true;
-    }
-
-    /** @brief Implementation of Attribute::to_string */
-    bool to_string(std::string &att) const  override{
-        att.clear();
-        for (auto a:  m_val) {if (att.length()) att+=" ";  att+=std::to_string(a);}
-        return true;
-    }
-
-    /** @brief get the value associated to this Attribute. */
-    std::vector<unsigned long long> value() const {
-        return m_val;
-    }
-
-    /** @brief set the value associated to this Attribute. */
-    void set_value(const std::vector<unsigned long long>& i) {
-        m_val = i;
-    }
-
-private:
-    std::vector<unsigned long long> m_val; ///< Attribute value
-};
-
-/**
- *  @class HepMC3::VectorIntAttribute
- *  @brief Attribute that holds a vector of integers of type  int
- *
- *  @ingroup attributes
- */
-class VectorIntAttribute : public Attribute {
-public:
-
-    /** @brief Default constructor */
-    VectorIntAttribute():Attribute(),m_val() {}
-
-    /** @brief Constructor initializing attribute value */
-    VectorIntAttribute(std::vector<int> val):Attribute(),m_val(val) {}
-
-    /** @brief Implementation of Attribute::from_string */
-    bool from_string(const std::string &att) override {
-        int  datafoo;
-        m_val.clear();
-        std::stringstream datastream(att);
-        while (datastream >> datafoo) m_val.push_back(datafoo);
-        return true;
-    }
-
-    /** @brief Implementation of Attribute::to_string */
-    bool to_string(std::string &att) const  override{
-        att.clear();
-        for (auto a:  m_val) {if (att.length()) att+=" ";  att+=std::to_string(a);}
-        return true;
-    }
-
-    /** @brief get the value associated to this Attribute. */
-    std::vector<int> value() const {
-        return m_val;
-    }
-
-    /** @brief set the value associated to this Attribute. */
-    void set_value(const std::vector<int>& i) {
-        m_val = i;
-    }
-
-private:
-    std::vector<int> m_val; ///< Attribute value
-};
-
-/**
- *  @class HepMC3::VectorIntAttribute
- *  @brief Attribute that holds a vector of integers of type  int
- *
- *  @ingroup attributes
- */
-class VectorLongIntAttribute : public Attribute {
-public:
-
-    /** @brief Default constructor */
-    VectorLongIntAttribute():Attribute(),m_val() {}
-
-    /** @brief Constructor initializing attribute value */
-    VectorLongIntAttribute(std::vector<long int> val):Attribute(),m_val(val) {}
-
-    /** @brief Implementation of Attribute::from_string */
-    bool from_string(const std::string &att) override {
-        long int  datafoo;
-        m_val.clear();
-        std::stringstream datastream(att);
-        while (datastream >> datafoo) m_val.push_back(datafoo);
-        return true;
-    }
-
-    /** @brief Implementation of Attribute::to_string */
-    bool to_string(std::string &att) const  override{
-        att.clear();
-        for (auto a:  m_val) {if (att.length()) att+=" ";  att+=std::to_string(a);}
-        return true;
-    }
-
-    /** @brief get the value associated to this Attribute. */
-    std::vector<long int> value() const {
-        return m_val;
-    }
-
-    /** @brief set the value associated to this Attribute. */
-    void set_value(const std::vector<long int>& i) {
-        m_val = i;
-    }
-
-private:
-    std::vector<long int> m_val; ///< Attribute value
-};
-
-/**
- *  @class HepMC3::VectorIntAttribute
- *  @brief Attribute that holds a vector of FPs of type  double
- *
- *  @ingroup attributes
- */
-class VectorDoubleAttribute : public Attribute {
-public:
-
-    /** @brief Default constructor */
-    VectorDoubleAttribute():Attribute(),m_val() {}
-
-    /** @brief Constructor initializing attribute value */
-    VectorDoubleAttribute(std::vector<double> val):Attribute(),m_val(val) {}
-
-    /** @brief Implementation of Attribute::from_string */
-    bool from_string(const std::string &att) override {
-        double  datafoo;
-        m_val.clear();
-        std::stringstream datastream(att);
-        while (datastream >> datafoo) m_val.push_back(datafoo);
-        return true;
-    }
-
-    /** @brief Implementation of Attribute::to_string */
-    bool to_string(std::string &att) const  override{
-        att.clear();
-        for (auto a:  m_val) {if (att.length()) att+=" ";  att+=std::to_string(a);}
-        return true;
-    }
-
-    /** @brief get the value associated to this Attribute. */
-    std::vector<double> value() const {
-        return m_val;
-    }
-
-    /** @brief set the value associated to this Attribute. */
-    void set_value(const std::vector<double>& i) {
-        m_val = i;
-    }
-
-private:
-    std::vector<double> m_val; ///< Attribute value
-};
-
-
-/**
- *  @class HepMC3::VectorIntAttribute
- *  @brief Attribute that holds a vector of FPs of type  string
- *
- *  @ingroup attributes
- */
-class VectorStringAttribute : public Attribute {
-public:
-
-    /** @brief Default constructor */
-    VectorStringAttribute():Attribute(),m_val() {}
-
-    /** @brief Constructor initializing attribute value */
-    VectorStringAttribute(std::vector<std::string> val):Attribute(),m_val(val) {}
-
-    /** @brief Implementation of Attribute::from_string */
-    bool from_string(const string &att) override {
-        size_t posb = att.find_first_not_of(' ');
-        do {
-           size_t pose = att.find_first_of(' ', posb);
-           m_val.push_back(att.substr(posb, pose - posb));
-           posb = att.find_first_not_of(' ', pose);
-        } while (posb != std::string::npos);
-        return true;
-    }
-
-    /** @brief Implementation of Attribute::to_string */
-    bool to_string(std::string &att) const  override{
-        att.clear();
-        for (auto a:  m_val) {if (att.length()) att+=" ";  att+=a;}
-        return true;
-    }
-
-    /** @brief get the value associated to this Attribute. */
-    std::vector<std::string> value() const {
-        return m_val;
-    }
-
-    /** @brief set the value associated to this Attribute. */
-    void set_value(const std::vector<std::string>& i) {
-        m_val = i;
-    }
-
-private:
-    std::vector<std::string> m_val; ///< Attribute value
-};
-
-
-} // namespace HepMC3
-
-#endif
Index: external/HepMC3/CMakeLists.txt
===================================================================
--- external/HepMC3/CMakeLists.txt	(revision 302624fca6ca1247dbb8697c4f2e8ecc730d20b1)
+++ 	(revision )
@@ -1,8 +1,0 @@
-include_directories(
-  ${CMAKE_SOURCE_DIR}/external
-  ${ROOT_INCLUDE_DIRS}
-)
-
-file(GLOB sources *.cc)
-
-add_library(HepMC3 OBJECT ${sources})
Index: external/HepMC3/COPYING
===================================================================
--- external/HepMC3/COPYING	(revision 302624fca6ca1247dbb8697c4f2e8ecc730d20b1)
+++ 	(revision )
@@ -1,674 +1,0 @@
-                    GNU GENERAL PUBLIC LICENSE
-                       Version 3, 29 June 2007
-
- Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-                            Preamble
-
-  The GNU General Public License is a free, copyleft license for
-software and other kinds of works.
-
-  The licenses for most software and other practical works are designed
-to take away your freedom to share and change the works.  By contrast,
-the GNU General Public License is intended to guarantee your freedom to
-share and change all versions of a program--to make sure it remains free
-software for all its users.  We, the Free Software Foundation, use the
-GNU General Public License for most of our software; it applies also to
-any other work released this way by its authors.  You can apply it to
-your programs, too.
-
-  When we speak of free software, we are referring to freedom, not
-price.  Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-them if you wish), that you receive source code or can get it if you
-want it, that you can change the software or use pieces of it in new
-free programs, and that you know you can do these things.
-
-  To protect your rights, we need to prevent others from denying you
-these rights or asking you to surrender the rights.  Therefore, you have
-certain responsibilities if you distribute copies of the software, or if
-you modify it: responsibilities to respect the freedom of others.
-
-  For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must pass on to the recipients the same
-freedoms that you received.  You must make sure that they, too, receive
-or can get the source code.  And you must show them these terms so they
-know their rights.
-
-  Developers that use the GNU GPL protect your rights with two steps:
-(1) assert copyright on the software, and (2) offer you this License
-giving you legal permission to copy, distribute and/or modify it.
-
-  For the developers' and authors' protection, the GPL clearly explains
-that there is no warranty for this free software.  For both users' and
-authors' sake, the GPL requires that modified versions be marked as
-changed, so that their problems will not be attributed erroneously to
-authors of previous versions.
-
-  Some devices are designed to deny users access to install or run
-modified versions of the software inside them, although the manufacturer
-can do so.  This is fundamentally incompatible with the aim of
-protecting users' freedom to change the software.  The systematic
-pattern of such abuse occurs in the area of products for individuals to
-use, which is precisely where it is most unacceptable.  Therefore, we
-have designed this version of the GPL to prohibit the practice for those
-products.  If such problems arise substantially in other domains, we
-stand ready to extend this provision to those domains in future versions
-of the GPL, as needed to protect the freedom of users.
-
-  Finally, every program is threatened constantly by software patents.
-States should not allow patents to restrict development and use of
-software on general-purpose computers, but in those that do, we wish to
-avoid the special danger that patents applied to a free program could
-make it effectively proprietary.  To prevent this, the GPL assures that
-patents cannot be used to render the program non-free.
-
-  The precise terms and conditions for copying, distribution and
-modification follow.
-
-                       TERMS AND CONDITIONS
-
-  0. Definitions.
-
-  "This License" refers to version 3 of the GNU General Public License.
-
-  "Copyright" also means copyright-like laws that apply to other kinds of
-works, such as semiconductor masks.
-
-  "The Program" refers to any copyrightable work licensed under this
-License.  Each licensee is addressed as "you".  "Licensees" and
-"recipients" may be individuals or organizations.
-
-  To "modify" a work means to copy from or adapt all or part of the work
-in a fashion requiring copyright permission, other than the making of an
-exact copy.  The resulting work is called a "modified version" of the
-earlier work or a work "based on" the earlier work.
-
-  A "covered work" means either the unmodified Program or a work based
-on the Program.
-
-  To "propagate" a work means to do anything with it that, without
-permission, would make you directly or secondarily liable for
-infringement under applicable copyright law, except executing it on a
-computer or modifying a private copy.  Propagation includes copying,
-distribution (with or without modification), making available to the
-public, and in some countries other activities as well.
-
-  To "convey" a work means any kind of propagation that enables other
-parties to make or receive copies.  Mere interaction with a user through
-a computer network, with no transfer of a copy, is not conveying.
-
-  An interactive user interface displays "Appropriate Legal Notices"
-to the extent that it includes a convenient and prominently visible
-feature that (1) displays an appropriate copyright notice, and (2)
-tells the user that there is no warranty for the work (except to the
-extent that warranties are provided), that licensees may convey the
-work under this License, and how to view a copy of this License.  If
-the interface presents a list of user commands or options, such as a
-menu, a prominent item in the list meets this criterion.
-
-  1. Source Code.
-
-  The "source code" for a work means the preferred form of the work
-for making modifications to it.  "Object code" means any non-source
-form of a work.
-
-  A "Standard Interface" means an interface that either is an official
-standard defined by a recognized standards body, or, in the case of
-interfaces specified for a particular programming language, one that
-is widely used among developers working in that language.
-
-  The "System Libraries" of an executable work include anything, other
-than the work as a whole, that (a) is included in the normal form of
-packaging a Major Component, but which is not part of that Major
-Component, and (b) serves only to enable use of the work with that
-Major Component, or to implement a Standard Interface for which an
-implementation is available to the public in source code form.  A
-"Major Component", in this context, means a major essential component
-(kernel, window system, and so on) of the specific operating system
-(if any) on which the executable work runs, or a compiler used to
-produce the work, or an object code interpreter used to run it.
-
-  The "Corresponding Source" for a work in object code form means all
-the source code needed to generate, install, and (for an executable
-work) run the object code and to modify the work, including scripts to
-control those activities.  However, it does not include the work's
-System Libraries, or general-purpose tools or generally available free
-programs which are used unmodified in performing those activities but
-which are not part of the work.  For example, Corresponding Source
-includes interface definition files associated with source files for
-the work, and the source code for shared libraries and dynamically
-linked subprograms that the work is specifically designed to require,
-such as by intimate data communication or control flow between those
-subprograms and other parts of the work.
-
-  The Corresponding Source need not include anything that users
-can regenerate automatically from other parts of the Corresponding
-Source.
-
-  The Corresponding Source for a work in source code form is that
-same work.
-
-  2. Basic Permissions.
-
-  All rights granted under this License are granted for the term of
-copyright on the Program, and are irrevocable provided the stated
-conditions are met.  This License explicitly affirms your unlimited
-permission to run the unmodified Program.  The output from running a
-covered work is covered by this License only if the output, given its
-content, constitutes a covered work.  This License acknowledges your
-rights of fair use or other equivalent, as provided by copyright law.
-
-  You may make, run and propagate covered works that you do not
-convey, without conditions so long as your license otherwise remains
-in force.  You may convey covered works to others for the sole purpose
-of having them make modifications exclusively for you, or provide you
-with facilities for running those works, provided that you comply with
-the terms of this License in conveying all material for which you do
-not control copyright.  Those thus making or running the covered works
-for you must do so exclusively on your behalf, under your direction
-and control, on terms that prohibit them from making any copies of
-your copyrighted material outside their relationship with you.
-
-  Conveying under any other circumstances is permitted solely under
-the conditions stated below.  Sublicensing is not allowed; section 10
-makes it unnecessary.
-
-  3. Protecting Users' Legal Rights From Anti-Circumvention Law.
-
-  No covered work shall be deemed part of an effective technological
-measure under any applicable law fulfilling obligations under article
-11 of the WIPO copyright treaty adopted on 20 December 1996, or
-similar laws prohibiting or restricting circumvention of such
-measures.
-
-  When you convey a covered work, you waive any legal power to forbid
-circumvention of technological measures to the extent such circumvention
-is effected by exercising rights under this License with respect to
-the covered work, and you disclaim any intention to limit operation or
-modification of the work as a means of enforcing, against the work's
-users, your or third parties' legal rights to forbid circumvention of
-technological measures.
-
-  4. Conveying Verbatim Copies.
-
-  You may convey verbatim copies of the Program's source code as you
-receive it, in any medium, provided that you conspicuously and
-appropriately publish on each copy an appropriate copyright notice;
-keep intact all notices stating that this License and any
-non-permissive terms added in accord with section 7 apply to the code;
-keep intact all notices of the absence of any warranty; and give all
-recipients a copy of this License along with the Program.
-
-  You may charge any price or no price for each copy that you convey,
-and you may offer support or warranty protection for a fee.
-
-  5. Conveying Modified Source Versions.
-
-  You may convey a work based on the Program, or the modifications to
-produce it from the Program, in the form of source code under the
-terms of section 4, provided that you also meet all of these conditions:
-
-    a) The work must carry prominent notices stating that you modified
-    it, and giving a relevant date.
-
-    b) The work must carry prominent notices stating that it is
-    released under this License and any conditions added under section
-    7.  This requirement modifies the requirement in section 4 to
-    "keep intact all notices".
-
-    c) You must license the entire work, as a whole, under this
-    License to anyone who comes into possession of a copy.  This
-    License will therefore apply, along with any applicable section 7
-    additional terms, to the whole of the work, and all its parts,
-    regardless of how they are packaged.  This License gives no
-    permission to license the work in any other way, but it does not
-    invalidate such permission if you have separately received it.
-
-    d) If the work has interactive user interfaces, each must display
-    Appropriate Legal Notices; however, if the Program has interactive
-    interfaces that do not display Appropriate Legal Notices, your
-    work need not make them do so.
-
-  A compilation of a covered work with other separate and independent
-works, which are not by their nature extensions of the covered work,
-and which are not combined with it such as to form a larger program,
-in or on a volume of a storage or distribution medium, is called an
-"aggregate" if the compilation and its resulting copyright are not
-used to limit the access or legal rights of the compilation's users
-beyond what the individual works permit.  Inclusion of a covered work
-in an aggregate does not cause this License to apply to the other
-parts of the aggregate.
-
-  6. Conveying Non-Source Forms.
-
-  You may convey a covered work in object code form under the terms
-of sections 4 and 5, provided that you also convey the
-machine-readable Corresponding Source under the terms of this License,
-in one of these ways:
-
-    a) Convey the object code in, or embodied in, a physical product
-    (including a physical distribution medium), accompanied by the
-    Corresponding Source fixed on a durable physical medium
-    customarily used for software interchange.
-
-    b) Convey the object code in, or embodied in, a physical product
-    (including a physical distribution medium), accompanied by a
-    written offer, valid for at least three years and valid for as
-    long as you offer spare parts or customer support for that product
-    model, to give anyone who possesses the object code either (1) a
-    copy of the Corresponding Source for all the software in the
-    product that is covered by this License, on a durable physical
-    medium customarily used for software interchange, for a price no
-    more than your reasonable cost of physically performing this
-    conveying of source, or (2) access to copy the
-    Corresponding Source from a network server at no charge.
-
-    c) Convey individual copies of the object code with a copy of the
-    written offer to provide the Corresponding Source.  This
-    alternative is allowed only occasionally and noncommercially, and
-    only if you received the object code with such an offer, in accord
-    with subsection 6b.
-
-    d) Convey the object code by offering access from a designated
-    place (gratis or for a charge), and offer equivalent access to the
-    Corresponding Source in the same way through the same place at no
-    further charge.  You need not require recipients to copy the
-    Corresponding Source along with the object code.  If the place to
-    copy the object code is a network server, the Corresponding Source
-    may be on a different server (operated by you or a third party)
-    that supports equivalent copying facilities, provided you maintain
-    clear directions next to the object code saying where to find the
-    Corresponding Source.  Regardless of what server hosts the
-    Corresponding Source, you remain obligated to ensure that it is
-    available for as long as needed to satisfy these requirements.
-
-    e) Convey the object code using peer-to-peer transmission, provided
-    you inform other peers where the object code and Corresponding
-    Source of the work are being offered to the general public at no
-    charge under subsection 6d.
-
-  A separable portion of the object code, whose source code is excluded
-from the Corresponding Source as a System Library, need not be
-included in conveying the object code work.
-
-  A "User Product" is either (1) a "consumer product", which means any
-tangible personal property which is normally used for personal, family,
-or household purposes, or (2) anything designed or sold for incorporation
-into a dwelling.  In determining whether a product is a consumer product,
-doubtful cases shall be resolved in favor of coverage.  For a particular
-product received by a particular user, "normally used" refers to a
-typical or common use of that class of product, regardless of the status
-of the particular user or of the way in which the particular user
-actually uses, or expects or is expected to use, the product.  A product
-is a consumer product regardless of whether the product has substantial
-commercial, industrial or non-consumer uses, unless such uses represent
-the only significant mode of use of the product.
-
-  "Installation Information" for a User Product means any methods,
-procedures, authorization keys, or other information required to install
-and execute modified versions of a covered work in that User Product from
-a modified version of its Corresponding Source.  The information must
-suffice to ensure that the continued functioning of the modified object
-code is in no case prevented or interfered with solely because
-modification has been made.
-
-  If you convey an object code work under this section in, or with, or
-specifically for use in, a User Product, and the conveying occurs as
-part of a transaction in which the right of possession and use of the
-User Product is transferred to the recipient in perpetuity or for a
-fixed term (regardless of how the transaction is characterized), the
-Corresponding Source conveyed under this section must be accompanied
-by the Installation Information.  But this requirement does not apply
-if neither you nor any third party retains the ability to install
-modified object code on the User Product (for example, the work has
-been installed in ROM).
-
-  The requirement to provide Installation Information does not include a
-requirement to continue to provide support service, warranty, or updates
-for a work that has been modified or installed by the recipient, or for
-the User Product in which it has been modified or installed.  Access to a
-network may be denied when the modification itself materially and
-adversely affects the operation of the network or violates the rules and
-protocols for communication across the network.
-
-  Corresponding Source conveyed, and Installation Information provided,
-in accord with this section must be in a format that is publicly
-documented (and with an implementation available to the public in
-source code form), and must require no special password or key for
-unpacking, reading or copying.
-
-  7. Additional Terms.
-
-  "Additional permissions" are terms that supplement the terms of this
-License by making exceptions from one or more of its conditions.
-Additional permissions that are applicable to the entire Program shall
-be treated as though they were included in this License, to the extent
-that they are valid under applicable law.  If additional permissions
-apply only to part of the Program, that part may be used separately
-under those permissions, but the entire Program remains governed by
-this License without regard to the additional permissions.
-
-  When you convey a copy of a covered work, you may at your option
-remove any additional permissions from that copy, or from any part of
-it.  (Additional permissions may be written to require their own
-removal in certain cases when you modify the work.)  You may place
-additional permissions on material, added by you to a covered work,
-for which you have or can give appropriate copyright permission.
-
-  Notwithstanding any other provision of this License, for material you
-add to a covered work, you may (if authorized by the copyright holders of
-that material) supplement the terms of this License with terms:
-
-    a) Disclaiming warranty or limiting liability differently from the
-    terms of sections 15 and 16 of this License; or
-
-    b) Requiring preservation of specified reasonable legal notices or
-    author attributions in that material or in the Appropriate Legal
-    Notices displayed by works containing it; or
-
-    c) Prohibiting misrepresentation of the origin of that material, or
-    requiring that modified versions of such material be marked in
-    reasonable ways as different from the original version; or
-
-    d) Limiting the use for publicity purposes of names of licensors or
-    authors of the material; or
-
-    e) Declining to grant rights under trademark law for use of some
-    trade names, trademarks, or service marks; or
-
-    f) Requiring indemnification of licensors and authors of that
-    material by anyone who conveys the material (or modified versions of
-    it) with contractual assumptions of liability to the recipient, for
-    any liability that these contractual assumptions directly impose on
-    those licensors and authors.
-
-  All other non-permissive additional terms are considered "further
-restrictions" within the meaning of section 10.  If the Program as you
-received it, or any part of it, contains a notice stating that it is
-governed by this License along with a term that is a further
-restriction, you may remove that term.  If a license document contains
-a further restriction but permits relicensing or conveying under this
-License, you may add to a covered work material governed by the terms
-of that license document, provided that the further restriction does
-not survive such relicensing or conveying.
-
-  If you add terms to a covered work in accord with this section, you
-must place, in the relevant source files, a statement of the
-additional terms that apply to those files, or a notice indicating
-where to find the applicable terms.
-
-  Additional terms, permissive or non-permissive, may be stated in the
-form of a separately written license, or stated as exceptions;
-the above requirements apply either way.
-
-  8. Termination.
-
-  You may not propagate or modify a covered work except as expressly
-provided under this License.  Any attempt otherwise to propagate or
-modify it is void, and will automatically terminate your rights under
-this License (including any patent licenses granted under the third
-paragraph of section 11).
-
-  However, if you cease all violation of this License, then your
-license from a particular copyright holder is reinstated (a)
-provisionally, unless and until the copyright holder explicitly and
-finally terminates your license, and (b) permanently, if the copyright
-holder fails to notify you of the violation by some reasonable means
-prior to 60 days after the cessation.
-
-  Moreover, your license from a particular copyright holder is
-reinstated permanently if the copyright holder notifies you of the
-violation by some reasonable means, this is the first time you have
-received notice of violation of this License (for any work) from that
-copyright holder, and you cure the violation prior to 30 days after
-your receipt of the notice.
-
-  Termination of your rights under this section does not terminate the
-licenses of parties who have received copies or rights from you under
-this License.  If your rights have been terminated and not permanently
-reinstated, you do not qualify to receive new licenses for the same
-material under section 10.
-
-  9. Acceptance Not Required for Having Copies.
-
-  You are not required to accept this License in order to receive or
-run a copy of the Program.  Ancillary propagation of a covered work
-occurring solely as a consequence of using peer-to-peer transmission
-to receive a copy likewise does not require acceptance.  However,
-nothing other than this License grants you permission to propagate or
-modify any covered work.  These actions infringe copyright if you do
-not accept this License.  Therefore, by modifying or propagating a
-covered work, you indicate your acceptance of this License to do so.
-
-  10. Automatic Licensing of Downstream Recipients.
-
-  Each time you convey a covered work, the recipient automatically
-receives a license from the original licensors, to run, modify and
-propagate that work, subject to this License.  You are not responsible
-for enforcing compliance by third parties with this License.
-
-  An "entity transaction" is a transaction transferring control of an
-organization, or substantially all assets of one, or subdividing an
-organization, or merging organizations.  If propagation of a covered
-work results from an entity transaction, each party to that
-transaction who receives a copy of the work also receives whatever
-licenses to the work the party's predecessor in interest had or could
-give under the previous paragraph, plus a right to possession of the
-Corresponding Source of the work from the predecessor in interest, if
-the predecessor has it or can get it with reasonable efforts.
-
-  You may not impose any further restrictions on the exercise of the
-rights granted or affirmed under this License.  For example, you may
-not impose a license fee, royalty, or other charge for exercise of
-rights granted under this License, and you may not initiate litigation
-(including a cross-claim or counterclaim in a lawsuit) alleging that
-any patent claim is infringed by making, using, selling, offering for
-sale, or importing the Program or any portion of it.
-
-  11. Patents.
-
-  A "contributor" is a copyright holder who authorizes use under this
-License of the Program or a work on which the Program is based.  The
-work thus licensed is called the contributor's "contributor version".
-
-  A contributor's "essential patent claims" are all patent claims
-owned or controlled by the contributor, whether already acquired or
-hereafter acquired, that would be infringed by some manner, permitted
-by this License, of making, using, or selling its contributor version,
-but do not include claims that would be infringed only as a
-consequence of further modification of the contributor version.  For
-purposes of this definition, "control" includes the right to grant
-patent sublicenses in a manner consistent with the requirements of
-this License.
-
-  Each contributor grants you a non-exclusive, worldwide, royalty-free
-patent license under the contributor's essential patent claims, to
-make, use, sell, offer for sale, import and otherwise run, modify and
-propagate the contents of its contributor version.
-
-  In the following three paragraphs, a "patent license" is any express
-agreement or commitment, however denominated, not to enforce a patent
-(such as an express permission to practice a patent or covenant not to
-sue for patent infringement).  To "grant" such a patent license to a
-party means to make such an agreement or commitment not to enforce a
-patent against the party.
-
-  If you convey a covered work, knowingly relying on a patent license,
-and the Corresponding Source of the work is not available for anyone
-to copy, free of charge and under the terms of this License, through a
-publicly available network server or other readily accessible means,
-then you must either (1) cause the Corresponding Source to be so
-available, or (2) arrange to deprive yourself of the benefit of the
-patent license for this particular work, or (3) arrange, in a manner
-consistent with the requirements of this License, to extend the patent
-license to downstream recipients.  "Knowingly relying" means you have
-actual knowledge that, but for the patent license, your conveying the
-covered work in a country, or your recipient's use of the covered work
-in a country, would infringe one or more identifiable patents in that
-country that you have reason to believe are valid.
-
-  If, pursuant to or in connection with a single transaction or
-arrangement, you convey, or propagate by procuring conveyance of, a
-covered work, and grant a patent license to some of the parties
-receiving the covered work authorizing them to use, propagate, modify
-or convey a specific copy of the covered work, then the patent license
-you grant is automatically extended to all recipients of the covered
-work and works based on it.
-
-  A patent license is "discriminatory" if it does not include within
-the scope of its coverage, prohibits the exercise of, or is
-conditioned on the non-exercise of one or more of the rights that are
-specifically granted under this License.  You may not convey a covered
-work if you are a party to an arrangement with a third party that is
-in the business of distributing software, under which you make payment
-to the third party based on the extent of your activity of conveying
-the work, and under which the third party grants, to any of the
-parties who would receive the covered work from you, a discriminatory
-patent license (a) in connection with copies of the covered work
-conveyed by you (or copies made from those copies), or (b) primarily
-for and in connection with specific products or compilations that
-contain the covered work, unless you entered into that arrangement,
-or that patent license was granted, prior to 28 March 2007.
-
-  Nothing in this License shall be construed as excluding or limiting
-any implied license or other defenses to infringement that may
-otherwise be available to you under applicable patent law.
-
-  12. No Surrender of Others' Freedom.
-
-  If conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License.  If you cannot convey a
-covered work so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you may
-not convey it at all.  For example, if you agree to terms that obligate you
-to collect a royalty for further conveying from those to whom you convey
-the Program, the only way you could satisfy both those terms and this
-License would be to refrain entirely from conveying the Program.
-
-  13. Use with the GNU Affero General Public License.
-
-  Notwithstanding any other provision of this License, you have
-permission to link or combine any covered work with a work licensed
-under version 3 of the GNU Affero General Public License into a single
-combined work, and to convey the resulting work.  The terms of this
-License will continue to apply to the part which is the covered work,
-but the special requirements of the GNU Affero General Public License,
-section 13, concerning interaction through a network will apply to the
-combination as such.
-
-  14. Revised Versions of this License.
-
-  The Free Software Foundation may publish revised and/or new versions of
-the GNU General Public License from time to time.  Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-  Each version is given a distinguishing version number.  If the
-Program specifies that a certain numbered version of the GNU General
-Public License "or any later version" applies to it, you have the
-option of following the terms and conditions either of that numbered
-version or of any later version published by the Free Software
-Foundation.  If the Program does not specify a version number of the
-GNU General Public License, you may choose any version ever published
-by the Free Software Foundation.
-
-  If the Program specifies that a proxy can decide which future
-versions of the GNU General Public License can be used, that proxy's
-public statement of acceptance of a version permanently authorizes you
-to choose that version for the Program.
-
-  Later license versions may give you additional or different
-permissions.  However, no additional obligations are imposed on any
-author or copyright holder as a result of your choosing to follow a
-later version.
-
-  15. Disclaimer of Warranty.
-
-  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
-APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
-HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
-OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
-IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
-ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
-  16. Limitation of Liability.
-
-  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
-THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
-GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
-USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
-DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
-PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
-EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGES.
-
-  17. Interpretation of Sections 15 and 16.
-
-  If the disclaimer of warranty and limitation of liability provided
-above cannot be given local legal effect according to their terms,
-reviewing courts shall apply local law that most closely approximates
-an absolute waiver of all civil liability in connection with the
-Program, unless a warranty or assumption of liability accompanies a
-copy of the Program in return for a fee.
-
-                     END OF TERMS AND CONDITIONS
-
-            How to Apply These Terms to Your New Programs
-
-  If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
-  To do so, attach the following notices to the program.  It is safest
-to attach them to the start of each source file to most effectively
-state the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
-    <one line to give the program's name and a brief idea of what it does.>
-    Copyright (C) <year>  <name of author>
-
-    This program is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-Also add information on how to contact you by electronic and paper mail.
-
-  If the program does terminal interaction, make it output a short
-notice like this when it starts in an interactive mode:
-
-    <program>  Copyright (C) <year>  <name of author>
-    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
-    This is free software, and you are welcome to redistribute it
-    under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License.  Of course, your program's commands
-might be different; for a GUI interface, you would use an "about box".
-
-  You should also get your employer (if you work as a programmer) or school,
-if any, to sign a "copyright disclaimer" for the program, if necessary.
-For more information on this, and how to apply and follow the GNU GPL, see
-<http://www.gnu.org/licenses/>.
-
-  The GNU General Public License does not permit incorporating your program
-into proprietary programs.  If your program is a subroutine library, you
-may consider it more useful to permit linking proprietary applications with
-the library.  If this is what you want to do, use the GNU Lesser General
-Public License instead of this License.  But first, please read
-<http://www.gnu.org/philosophy/why-not-lgpl.html>.
Index: external/HepMC3/Data/GenEventData.h
===================================================================
--- external/HepMC3/Data/GenEventData.h	(revision 302624fca6ca1247dbb8697c4f2e8ecc730d20b1)
+++ 	(revision )
@@ -1,61 +1,0 @@
-// -*- C++ -*-
-//
-// This file is part of HepMC
-// Copyright (C) 2014-2019 The HepMC collaboration (see AUTHORS for details)
-//
-#ifndef HEPMC3_DATA_GENEVENTDATA_H
-#define HEPMC3_DATA_GENEVENTDATA_H
-/**
- *  @file GenEventData.h
- *  @brief Definition of \b struct GenEventData
- *
- *  @struct HepMC3::GenEventData
- *  @brief Stores serializable event information
- *
- *  @ingroup data
- *
- */
-#include <vector>
-#include <string>
-#include "HepMC3/Data/GenParticleData.h"
-#include "HepMC3/Data/GenVertexData.h"
-#include "HepMC3/Units.h"
-
-namespace HepMC3 {
-
-struct GenEventData {
-    int                 event_number;  ///< Event number
-    Units::MomentumUnit momentum_unit; ///< Momentum unit
-    Units::LengthUnit   length_unit;   ///< Length unit
-
-    std::vector<GenParticleData> particles; ///< Particles
-    std::vector<GenVertexData>   vertices;  ///< Vertices
-    std::vector<double>          weights;   ///< Weights
-
-    FourVector event_pos;                   ///< Event position
-
-    /** @brief First id of the vertex links
-     *
-     *  If this id is positive - it is the incoming particle id
-     *  of a vertex which id is written in GenEventData::links2
-     *
-     *  If this id is negative - it's the id of a vertex which
-     *  outgoing particle id is written in GenEventData::links2
-     *
-     *  The links1[i] points to links2[i].
-     *  In case links1[i] is particle, links2[i] is end vertex.
-     *  In case links2[i] is vertex, links2[i] is outgoing particle.
-     *  An example of usage is given in documentation.
-     *
-     */
-    std::vector<int> links1;
-    std::vector<int> links2; ///< Second id of the vertex links
-
-    std::vector<int>         attribute_id;     ///< Attribute owner id
-    std::vector<std::string> attribute_name;   ///< Attribute name
-    std::vector<std::string> attribute_string; ///< Attribute serialized as string
-};
-
-} // namespace HepMC
-
-#endif
Index: external/HepMC3/Data/GenParticleData.h
===================================================================
--- external/HepMC3/Data/GenParticleData.h	(revision 302624fca6ca1247dbb8697c4f2e8ecc730d20b1)
+++ 	(revision )
@@ -1,34 +1,0 @@
-// -*- C++ -*-
-//
-// This file is part of HepMC
-// Copyright (C) 2014-2019 The HepMC collaboration (see AUTHORS for details)
-//
-#ifndef HEPMC3_DATA_GENPARTICLEDATA_H
-#define HEPMC3_DATA_GENPARTICLEDATA_H
-/**
- *  @file GenParticleData.h
- *  @brief Definition of \b class GenParticleData
- *
- *  @struct HepMC3::GenParticleData
- *  @brief Stores serializable particle information
- *
- *  @ingroup data
- *
- */
-#include "HepMC3/FourVector.h"
-
-namespace HepMC3 {
-
-// NOTE: Keep in mind the data alignment
-//       Currently it's 8b alignment = 56b total
-struct GenParticleData {
-    int        pid;               ///< PDG ID
-    int        status;            ///< Status
-    bool       is_mass_set;       ///< Check if generated mass is set
-    double     mass;              ///< Generated mass (if set)
-    FourVector momentum;          ///< Momentum
-};
-
-} // namespace HepMC
-
-#endif
Index: external/HepMC3/Data/GenRunInfoData.h
===================================================================
--- external/HepMC3/Data/GenRunInfoData.h	(revision 302624fca6ca1247dbb8697c4f2e8ecc730d20b1)
+++ 	(revision )
@@ -1,36 +1,0 @@
-// -*- C++ -*-
-//
-// This file is part of HepMC
-// Copyright (C) 2014-2019 The HepMC collaboration (see AUTHORS for details)
-//
-#ifndef HEPMC3_DATA_GENRUNINFODATA_H
-#define HEPMC3_DATA_GENRUNINFODATA_H
-/**
- *  @file GenRunInfoData.h
- *  @brief Definition of \b struct GenRunInfoData
- *
- *  @struct HepMC3::GenRunInfoData
- *  @brief Stores serializable run information
- *
- *  @ingroup data
- *
- */
-#include <vector>
-#include <string>
-
-namespace HepMC3 {
-
-struct GenRunInfoData {
-    std::vector<std::string> weight_names;     ///< Weight names
-
-    std::vector<std::string> tool_name;        ///< Tool names
-    std::vector<std::string> tool_version;     ///< Tool versions
-    std::vector<std::string> tool_description; ///< Tool descriptions
-
-    std::vector<std::string> attribute_name;   ///< Attribute name
-    std::vector<std::string> attribute_string; ///< Attribute serialized as string
-};
-
-} // namespace HepMC
-
-#endif
Index: external/HepMC3/Data/GenVertexData.h
===================================================================
--- external/HepMC3/Data/GenVertexData.h	(revision 302624fca6ca1247dbb8697c4f2e8ecc730d20b1)
+++ 	(revision )
@@ -1,36 +1,0 @@
-// -*- C++ -*-
-//
-// This file is part of HepMC
-// Copyright (C) 2014-2019 The HepMC collaboration (see AUTHORS for details)
-//
-#ifndef HEPMC3_DATA_GENVERTEXDATA_H
-#define HEPMC3_DATA_GENVERTEXDATA_H
-/**
- *  @file GenVertexData.h
- *  @brief Definition of \b class GenVertexData
- *
- *  @struct HepMC3::GenVertexData
- *  @brief Stores serializable vertex information
- *
- *  @ingroup data
- *
- */
-#include "HepMC3/FourVector.h"
-
-namespace HepMC3 {
-
-struct GenVertexData {
-    int        status;   ///< Vertex status
-    FourVector position; ///< Position in time-space
-    
-    /// @brief Check if this struct fields are zero
-    bool is_zero() const {
-        if( status ) return false;
-        
-        return position.is_zero();
-    }
-};
-
-} // namespace HepMC
-
-#endif
Index: external/HepMC3/Errors.h
===================================================================
--- external/HepMC3/Errors.h	(revision 302624fca6ca1247dbb8697c4f2e8ecc730d20b1)
+++ 	(revision )
@@ -1,50 +1,0 @@
-// -*- C++ -*-
-//
-// This file is part of HepMC
-// Copyright (C) 2014-2020 The HepMC collaboration (see AUTHORS for details)
-/**
- *  @file Errors.h
- *  @brief Implementation of  error and HEPMC3_HEPMC3_WARNING macros
- *
- */
-#ifndef HEPMC3_ERRORS_H
-#define HEPMC3_ERRORS_H
-
-#include <iostream>
-#include <stdexcept>
-
-namespace HepMC3 {
-
-
-/// @name Printing macros
-//@{
-
-/** @brief Macro for printing error messages */
-#define HEPMC3_ERROR(MESSAGE)   if ( Setup::print_errors() )   { std::cerr << "ERROR::" << MESSAGE << std::endl; }
-
-/** @brief Macro for printing HEPMC3_HEPMC3_WARNING messages */
-#define HEPMC3_WARNING(MESSAGE) if ( Setup::print_warnings() ) { std::cout << "WARNING::" << MESSAGE << std::endl; }
-
-// Debug messages and code that will not go to the release version
-#ifndef HEPMC3_RELEASE_VERSION
-
-/** @brief Macro for printing debug messages with appropriate debug level */
-#define HEPMC3_DEBUG(LEVEL,MESSAGE) if( Setup::debug_level()>=(LEVEL) ) { std::cout << "DEBUG(" << LEVEL <<")::" << MESSAGE << std::endl; }
-/** @brief Macro for storing code useful for debugging */
-#define HEPMC3_DEBUG_CODE_BLOCK( x ) x
-
-#else
-
-#define HEPMC3_DEBUG( x,y )
-#define HEPMC3_DEBUG_CODE_BLOCK( x )
-
-#endif
-
-//@}
-
-
-
-
-} // namespace HepMC3
-
-#endif
Index: external/HepMC3/FourVector.h
===================================================================
--- external/HepMC3/FourVector.h	(revision 302624fca6ca1247dbb8697c4f2e8ecc730d20b1)
+++ 	(revision )
@@ -1,338 +1,0 @@
-// -*- C++ -*-
-//
-// This file is part of HepMC
-// Copyright (C) 2014-2020 The HepMC collaboration (see AUTHORS for details)
-//
-#ifndef HEPMC3_FOURVECTOR_H
-#define HEPMC3_FOURVECTOR_H
-/**
- *  @file FourVector.h
- *  @brief Definition of \b class FourVector
- */
-#include <cmath>
-#ifndef M_PI
-/** @brief Definition of PI. Needed on some platforms */
-#define M_PI 3.14159265358979323846264338327950288
-#endif
-namespace HepMC3 {
-
-
-/**
- *  @brief Generic 4-vector
- *
- *  Interpretation of its content depends on accessors used: it's much simpler to do this
- *  than to distinguish between space and momentum vectors via the type system (especially
- *  given the need for backward compatibility with HepMC2). Be sensible and don't call
- *  energy functions on spatial vectors! To avoid duplication, most definitions are only
- *  implemented on the spatial function names, with the energy-momentum functions as aliases.
- *
- *  This is @a not intended to be a fully featured 4-vector, but does contain the majority
- *  of common non-boosting functionality, as well as a few support operations on
- *  4-vectors.
- *
- *  The implementations in this class are fully inlined.
- */
-class FourVector {
-public:
-
-    /** @brief Default constructor */
-    FourVector()
-        : m_v1(0.0),   m_v2(0.0), m_v3(0.0),    m_v4(0.0)  {}
-    /** @brief Sets all FourVector fields */
-    FourVector(double xx, double yy, double zz, double ee)
-        : m_v1(xx),     m_v2(yy),   m_v3(zz),      m_v4(ee)    {}
-    /** @brief Copy constructor */
-    FourVector(const FourVector & v)
-        : m_v1(v.m_v1), m_v2(v.m_v2), m_v3(v.m_v3), m_v4(v.m_v4) {}
-
-
-    /// @name Component accessors
-    //@{
-
-    /** @brief Set all FourVector fields, in order x,y,z,t */
-    void set(double x1, double x2, double x3, double x4) {
-        m_v1 = x1;
-        m_v2 = x2;
-        m_v3 = x3;
-        m_v4 = x4;
-    }
-
-    /// set component of position/displacement
-    void set_component(const int i, const double x)   
-    {
-    if (i==0) {m_v1=x; return; }
-    if (i==1) {m_v2=x; return; }
-    if (i==2) {m_v3=x; return; }
-    if (i==3) {m_v4=x; return; }
-    }
-    /// get component of position/displacement
-    double get_component(const int i)   const
-    {
-    if (i==0) return m_v1;
-    if (i==1) return m_v2;
-    if (i==2) return m_v3;
-    if (i==3) return m_v4;
-    return 0.0;
-    }
-
-
-    /// x-component of position/displacement
-    double x()        const { return m_v1; }
-    /// Set x-component of position/displacement
-    void set_x(double xx)   { m_v1 = xx;    }
-    /// @deprecated Prefer the HepMC-style set_x() function
-    void setX(double xx)   { set_x(xx);    }
-
-    /// y-component of position/displacement
-    double y()        const { return m_v2; }
-    /// Set y-component of position/displacement
-    void   set_y(double yy)   { m_v2 = yy;    }
-    /// @deprecated Prefer the HepMC-style set_y() function
-    void setY(double yy)   { set_y(yy);    }
-
-    /// z-component of position/displacement
-    double z()        const { return m_v3; }
-    /// Set z-component of position/displacement
-    void set_z(double zz)   { m_v3 = zz;    }
-    /// @deprecated Prefer the HepMC-style set_z() function
-    void setZ(double zz)   { set_z(zz);    }
-
-    /// Time component of position/displacement
-    double t()        const { return m_v4; }
-    /// Set time component of position/displacement
-    void set_t(double tt)   { m_v4 = tt;    }
-    /// @deprecated Prefer the HepMC-style set_t() function
-    void setT(double tt)   { set_t(tt);    }
-
-
-    /// x-component of momentum
-    double px() const { return x(); }
-    /// Set x-component of momentum
-    void set_px(double pxx) { set_x(pxx);   }
-    /// @deprecated Prefer the HepMC-style set_px() function
-    void setPx(double pxx) { set_px(pxx);    }
-
-    /// y-component of momentum
-    double py() const { return y(); }
-    /// Set y-component of momentum
-    void set_py(double pyy) { set_y(pyy);   }
-    /// @deprecated Prefer the HepMC-style set_py() function
-    void setPy(double pyy) { set_py(pyy);    }
-
-    /// z-component of momentum
-    double pz() const { return z(); }
-    /// Set z-component of momentum
-    void set_pz(double pzz) { set_z(pzz);   }
-    /// @deprecated Prefer the HepMC-style set_pz() function
-    void setPz(double pzz) { set_pz(pzz);    }
-
-    /// Energy component of momentum
-    double e() const { return t(); }
-    /// Set energy component of momentum
-    void set_e(double ee ) { this->set_t(ee);    }
-    /// @deprecated Prefer the HepMC-style set_y() function
-    void setE(double ee) { set_e(ee);    }
-
-    //@}
-
-
-    /// @name Computed properties
-    //@{
-
-    /// Squared magnitude of (x, y, z) 3-vector
-    double length2()  const { return x()*x() + y()*y() + z()*z(); }
-    /// Magnitude of spatial (x, y, z) 3-vector
-    double length()  const { return sqrt(length2()); }
-    /// Squared magnitude of (x, y) vector
-    double perp2()      const { return  x()*x() + y()*y(); }
-    /// Magnitude of (x, y) vector
-    double perp()      const { return sqrt(perp2()); }
-    /// Spacetime invariant interval s^2 = t^2 - x^2 - y^2 - z^2
-    double interval() const { return t()*t() - length2(); }
-
-    /// Squared magnitude of p3 = (px, py, pz) vector
-    double p3mod2()       const { return length2(); }
-    /// Magnitude of p3 = (px, py, pz) vector
-    double p3mod()       const { return length(); }
-    /// Squared transverse momentum px^2 + py^2
-    double pt2()      const { return perp2(); }
-    /// Transverse momentum
-    double pt()      const { return perp(); }
-    /// Squared invariant mass m^2 = E^2 - px^2 - py^2 - pz^2
-    double m2()       const { return interval(); }
-    /// Invariant mass. Returns -sqrt(-m) if e^2 - P^2 is negative
-    double m() const { return (m2() > 0.0) ? std::sqrt(m2()) : -std::sqrt(-m2()); }
-
-    /// Azimuthal angle
-    double phi() const { return atan2( y(), x() ); }
-    /// Polar angle w.r.t. z direction
-    double theta() const {  return atan2( perp(), z() ); }
-    // /// Cosine of polar angle w.r.t. z direction
-    // double costheta() const {  return z() / p3mod(); }
-    /// Pseudorapidity
-    double eta() const  { return 0.5*std::log( (p3mod() + pz()) / (p3mod() - pz()) ); }
-    /// Rapidity
-    double rap() const {   return 0.5*std::log( (e() + pz()) / (e() - pz()) ); }
-    /// Absolute pseudorapidity
-    double abs_eta() const { return std::abs( eta() ); }
-    /// Absolute rapidity
-    double abs_rap() const { return std::abs( rap() ); }
-
-    /// Same as eta()
-    /// @deprecated Prefer 'only one way to do it', and we don't have equivalent long names for e.g. pid, phi or eta
-    double pseudoRapidity() const { return eta(); }
-
-    //@}
-
-
-    /// @name Comparisons to another FourVector
-    //@{
-
-    /// Check if the length of this vertex is zero
-    bool is_zero() const { return x() == 0 && y() == 0 && z() == 0 && t() == 0; }
-
-    /// Signed azimuthal angle separation in [-pi, pi]
-    double delta_phi(const FourVector &v) const {
-        double dphi = phi() - v.phi();
-        if (dphi != dphi) return dphi;
-        while (dphi >=  M_PI) dphi -= 2.*M_PI;
-        while (dphi <  -M_PI) dphi += 2.*M_PI;
-        return dphi;
-    }
-
-    /// Pseudorapidity separation
-    double delta_eta(const FourVector &v) const { return eta() - v.eta(); }
-
-    /// Rapidity separation
-    double delta_rap(const FourVector &v) const { return rap() - v.rap(); }
-
-    /// R_eta^2-distance separation dR^2 = dphi^2 + deta^2
-    double delta_r2_eta(const FourVector &v) const {
-        return delta_phi(v)*delta_phi(v) + delta_eta(v)*delta_eta(v);
-    }
-
-    /// R_eta-distance separation dR = sqrt(dphi^2 + deta^2)
-    double delta_r_eta(const FourVector &v) const {
-        return sqrt( delta_r2_eta(v) );
-    }
-
-    /// R_rap^2-distance separation dR^2 = dphi^2 + drap^2
-    double delta_r2_rap(const FourVector &v) const {
-        return delta_phi(v)*delta_phi(v) + delta_rap(v)*delta_rap(v);
-    }
-
-    /// R-rap-distance separation dR = sqrt(dphi^2 + drap^2)
-    double delta_r_rap(const FourVector &v) const {
-        return sqrt( delta_r2_rap(v) );
-    }
-
-    //@}
-
-
-    /// @name Operators
-    //@{
-
-    /// Equality
-    bool operator==(const FourVector& rhs) const {
-        return x() == rhs.x() && y() == rhs.y() && z() == rhs.z() && t() == rhs.t();
-    }
-    /// Inequality
-    bool operator!=(const FourVector& rhs) const { return !(*this == rhs); }
-
-    /// Arithmetic operator +
-    FourVector  operator+ (const FourVector& rhs) const {
-        return FourVector( x() + rhs.x(), y() + rhs.y(), z() + rhs.z(), t() + rhs.t() );
-    }
-    /// Arithmetic operator -
-    FourVector  operator- (const FourVector& rhs) const {
-        return FourVector( x() - rhs.x(), y() - rhs.y(), z() - rhs.z(), t() - rhs.t() );
-    }
-    /// Arithmetic operator * by scalar
-    FourVector  operator* (const double rhs) const {
-        return FourVector( x()*rhs, y()*rhs, z()*rhs, t()*rhs );
-    }
-    /// Arithmetic operator / by scalar
-    FourVector  operator/ (const double rhs) const {
-        return FourVector( x()/rhs, y()/rhs, z()/rhs, t()/rhs );
-    }
-
-    /// Arithmetic operator +=
-    void operator += (const FourVector& rhs) {
-        setX(x() + rhs.x());
-        setY(y() + rhs.y());
-        setZ(z() + rhs.z());
-        setT(t() + rhs.t());
-    }
-    /// Arithmetic operator -=
-    void operator -= (const FourVector& rhs) {
-        setX(x() - rhs.x());
-        setY(y() - rhs.y());
-        setZ(z() - rhs.z());
-        setT(t() - rhs.t());
-    }
-    /// Arithmetic operator *= by scalar
-    void operator *= (const double rhs) {
-        setX(x()*rhs);
-        setY(y()*rhs);
-        setZ(z()*rhs);
-        setT(t()*rhs);
-    }
-    /// Arithmetic operator /= by scalar
-    void operator /= (const double rhs) {
-        setX(x()/rhs);
-        setY(y()/rhs);
-        setZ(z()/rhs);
-        setT(t()/rhs);
-    }
-
-    //@}
-
-
-    /// Static null FourVector = (0,0,0,0)
-    static const FourVector& ZERO_VECTOR() {
-        static const FourVector v;
-        return v;
-    }
-
-
-private:
-
-    double m_v1; ///< px or x. Interpretation depends on accessors used
-    double m_v2; ///< py or y. Interpretation depends on accessors used
-    double m_v3; ///< pz or z. Interpretation depends on accessors used
-    double m_v4; ///< e  or t. Interpretation depends on accessors used
-
-};
-
-
-/// @name Unbound vector comparison functions
-//@{
-
-/// Signed azimuthal angle separation in [-pi, pi] between vecs @c a and @c b
-inline double delta_phi(const FourVector &a, const FourVector &b) { return b.delta_phi(a); }
-
-/// Pseudorapidity separation between vecs @c a and @c b
-inline double delta_eta(const FourVector &a, const FourVector &b) { return b.delta_eta(a); }
-
-/// Rapidity separation between vecs @c a and @c b
-inline double delta_rap(const FourVector &a, const FourVector &b) { return b.delta_rap(a); }
-
-/// R_eta^2-distance separation dR^2 = dphi^2 + deta^2 between vecs @c a and @c b
-inline double delta_r2_eta(const FourVector &a, const FourVector &b) { return b.delta_r2_eta(a); }
-
-/// R_eta-distance separation dR = sqrt(dphi^2 + deta^2) between vecs @c a and @c b
-inline double delta_r_eta(const FourVector &a, const FourVector &b) { return b.delta_r_eta(a); }
-
-/// R_rap^2-distance separation dR^2 = dphi^2 + drap^2 between vecs @c a and @c b
-inline double delta_r2_rap(const FourVector &a, const FourVector &b) { return b.delta_r2_rap(a); }
-
-/// R_rap-distance separation dR = sqrt(dphi^2 + drap^2) between vecs @c a and @c b
-inline double delta_r_rap(const FourVector &a, const FourVector &b) { return b.delta_r_rap(a); }
-
-//@}
-
-
-} // namespace HepMC3
-
-
-#endif
Index: external/HepMC3/GenCrossSection.cc
===================================================================
--- external/HepMC3/GenCrossSection.cc	(revision 302624fca6ca1247dbb8697c4f2e8ecc730d20b1)
+++ 	(revision )
@@ -1,113 +1,0 @@
-// -*- C++ -*-
-//
-// This file is part of HepMC
-// Copyright (C) 2014-2019 The HepMC collaboration (see AUTHORS for details)
-//
-/**
- *  @file GenCrossSection.cc
- *  @brief Implementation of \b class GenCrossSection
- *
- */
-#include "HepMC3/GenCrossSection.h"
-#include "HepMC3/GenEvent.h"
-#include <cstring> // memcmp
-#include <cstdlib> // atoi
-#include <sstream>
-#include <iomanip>
-
-namespace HepMC3 {
-
-
-int GenCrossSection::windx(std::string wName) const {
-    if ( !event() || !event()->run_info() ) return 0;
-    return event()->run_info()->weight_index(wName);
-}
-
-void GenCrossSection::set_cross_section(const double& xs, const double& xs_err,const long& n_acc, const long& n_att ) {
-    double cross_section       = xs;
-    double cross_section_error = xs_err;
-    accepted_events     = n_acc;
-    attempted_events    = n_att;
-    size_t N=1;
-    if ( event() ) N=std::max(event()->weights().size(),N);
-    cross_sections = std::vector<double>(N, cross_section);
-    cross_section_errors = std::vector<double>(N, cross_section_error);
-}
-
-
-bool GenCrossSection::from_string(const std::string &att) {
-    const char *cursor = att.data();
-    cross_sections.clear();
-    cross_section_errors.clear();
-
-
-    double cross_section = atof(cursor);
-    cross_sections.push_back(cross_section);
-
-    if( !(cursor = strchr(cursor+1,' ')) ) return false;
-    double cross_section_error = atof(cursor);
-    cross_section_errors.push_back(cross_section_error);
-
-    if( !(cursor = strchr(cursor+1,' ')) ) {accepted_events = -1; attempted_events = -1;}
-    else
-    {
-        accepted_events = atoi(cursor);
-        if( !(cursor = strchr(cursor+1,' ')) ) attempted_events = -1;
-        else attempted_events = atoi(cursor);
-    }
-    size_t N=1;
-    if ( event() ) N=std::max(event()->weights().size(),N);
-    const size_t max_n_cross_sections=1000;
-    while (cross_sections.size()<max_n_cross_sections) {
-        if( !(cursor = strchr(cursor+1,' ')) ) break;
-        cross_sections.push_back(atof(cursor));
-        if( !(cursor = strchr(cursor+1,' ')) ) break;
-        cross_section_errors.push_back(atof(cursor));
-    }
-    if (cross_sections.size()>=max_n_cross_sections)
-        HEPMC3_WARNING( "GenCrossSection::from_string: too many optional cross-sections  N="<<cross_sections.size()<<" or ill-formed input:"<<att )
-//        if (cross_sections.size()!=N)
-//  So far it is not clear if there should be a warning or not
-//  Frank suggests no.             HEPMC3_WARNING( "GenCrossSection::from_string: optional cross-sections are available not for all weights")
-        size_t oldsize=cross_sections.size();
-    for (size_t i=oldsize; i<N; i++) {cross_sections.push_back(cross_section); cross_section_errors.push_back(cross_section_error);}
-
-    return true;
-}
-
-bool GenCrossSection::to_string(std::string &att) const {
-    std::ostringstream os;
-
-    os << std::setprecision(8) << std::scientific
-       << cross_sections.at(0) << " "
-       << cross_section_errors.at(0) << " "
-       << accepted_events << " "
-       << attempted_events;
-
-    for (size_t i = 1; i < cross_sections.size(); ++i )
-        os << " " << cross_sections.at(i)
-           << " " << cross_section_errors.at(i);
-
-    att = os.str();
-
-    return true;
-}
-
-bool GenCrossSection::operator==( const GenCrossSection& a ) const {
-    return ( memcmp( (void*)this, (void*) &a, sizeof(class GenCrossSection) ) == 0 );
-}
-
-bool GenCrossSection::operator!=( const GenCrossSection& a ) const {
-    return !( a == *this );
-}
-
-bool GenCrossSection::is_valid() const {
-    if( cross_sections.size()       == 0 ) return false;
-    if( cross_section_errors.size() == 0 ) return false;
-    if( cross_section_errors.size()!=cross_sections.size() ) return false;
-    if( cross_sections.at(0)       != 0 ) return true;
-    if( cross_section_errors.at(0) != 0 ) return true;
-    return false;
-}
-
-} // namespace HepMC3
Index: external/HepMC3/GenCrossSection.h
===================================================================
--- external/HepMC3/GenCrossSection.h	(revision 302624fca6ca1247dbb8697c4f2e8ecc730d20b1)
+++ 	(revision )
@@ -1,161 +1,0 @@
-// -*- C++ -*-
-//
-// This file is part of HepMC
-// Copyright (C) 2014-2020 The HepMC collaboration (see AUTHORS for details)
-//
-#ifndef HEPMC3_CROSS_SECTION_H
-#define HEPMC3_CROSS_SECTION_H
-/**
- *  @file GenCrossSection.h
- *  @brief Definition of attribute \b class GenCrossSection
- *
- *  @class HepMC3::GenCrossSection
- *  @brief Stores additional information about cross-section
- *
- *  This is an example of event attribute used to store cross-section information
- *
- *  This class is meant to be used to pass, on an event by event basis,
- *  the current best guess of the total cross section.
- *  It is expected that the final cross section will be stored elsewhere.
- *
- *    - double cross_section;       // cross section in pb.
- *    - double cross_section_error; // error associated with this cross section.
- *    - long accepted_events;       ///< The number of events generated so far.
- *    - long attempted_events;      ///< The number of events attempted so far.
- *
- *  In addition, several cross sections and related info can be
- *  included in case of runs with mulltiple weights.
- *
- *  The units of cross_section and cross_section_error are expected to be pb.
- *
- *  @ingroup attributes
- *
- */
-#include <iostream>
-#include <algorithm>
-#include "HepMC3/Attribute.h"
-
-namespace HepMC3 {
-/** Deprecated */
-using namespace std;
-
-class GenCrossSection : public Attribute {
-
-//
-// Fields
-//
-private:
-
-    long accepted_events;       ///< The number of events generated so far.
-    long attempted_events;      ///< The number of events attempted so far.
-
-    std::vector<double> cross_sections;       ///< Per-weight cross-section.
-    std::vector<double> cross_section_errors; ///< Per-weight errors.
-//
-// Functions
-//
-public:
-    /** @brief Implementation of Attribute::from_string */
-    bool from_string(const std::string &att)  override;
-
-    /** @brief Implementation of Attribute::to_string */
-    bool to_string(std::string &att) const override;
-
-    /** @brief Set all fields */
-    void set_cross_section(const double& xs, const double& xs_err,const long& n_acc = -1, const long& n_att = -1);
-
-    /** @brief Set the number of accepted events
-     */
-    void set_accepted_events(const long& n_acc ) {
-        accepted_events=n_acc;
-    }
-
-    /** @brief Set the number of attempted events
-     */
-    void set_attempted_events(const long& n_att ) {
-        attempted_events=n_att;
-    }
-
-    /** @brief Get the number of accepted events
-     */
-    long get_accepted_events() const {
-        return accepted_events;
-    }
-
-    /** @brief Get the number of attempted events
-     */
-    long get_attempted_events() const {
-        return  attempted_events;
-    }
-
-    /** @brief Set the cross section  corresponding to the weight
-        named \a wName.
-     */
-    void set_xsec(const std::string& wName,const double& xs) {
-        set_xsec(windx(wName), xs);
-    }
-
-    /** @brief Set the cross section corresponding to the weight with
-        index \a indx.
-     */
-    void set_xsec(const int& indx, const double& xs) {
-        cross_sections[indx] = xs;
-    }
-
-    /** @brief Set the cross section error corresponding to the weight
-        named \a wName.
-     */
-    void set_xsec_err(const std::string& wName, const double& xs_err) {
-        set_xsec_err(windx(wName), xs_err);
-    }
-
-    /** @brief Set the cross section error corresponding to the weight
-        with index \a indx.
-     */
-    void set_xsec_err(const int& indx, const double& xs_err) {
-        cross_section_errors[indx] = xs_err;
-    }
-
-    /** @brief Get the cross section corresponding to the weight named
-        \a wName.
-     */
-    double xsec(const std::string& wName) const {
-        return xsec(windx(wName));
-    }
-
-    /** @brief Get the cross section corresponding to the weight with index
-        \a indx.
-     */
-    double xsec(const int& indx = 0) const {
-        return cross_sections[indx];
-    }
-
-    /** @brief Get the cross section error corresponding to the weight
-        named \a wName.
-     */
-    double xsec_err(const std::string& wName) const {
-        return xsec_err(windx(wName));
-    }
-
-    /** @brief Get the cross section error corresponding to the weight
-        with index \a indx.
-     */
-    double xsec_err(const int& indx = 0) const {
-        return cross_section_errors[indx];
-    }
-
-    bool operator==( const GenCrossSection& ) const; ///< Operator ==
-    bool operator!=( const GenCrossSection& ) const; ///< Operator !=
-    bool is_valid()                           const; ///< Verify that the instance contains non-zero information
-
-private:
-
-    /** @brief get the weight index given a weight name. */
-    int windx(std::string wName) const;
-
-};
-
-
-} // namespace HepMC3
-
-#endif
Index: external/HepMC3/GenCrossSection_fwd.h
===================================================================
--- external/HepMC3/GenCrossSection_fwd.h	(revision 302624fca6ca1247dbb8697c4f2e8ecc730d20b1)
+++ 	(revision )
@@ -1,25 +1,0 @@
-// -*- C++ -*-
-//
-// This file is part of HepMC
-// Copyright (C) 2014-2020 The HepMC collaboration (see AUTHORS for details)
-//
-///
-/// @file GenCrossSection_fwd.h
-/// @brief Minimal forward declarations for GenCrossSection
-///
-
-#ifndef HEPMC3_GENCROSSSECTION_FWD_H
-#define HEPMC3_GENCROSSSECTION_FWD_H
-
-#include <memory>
-
-namespace HepMC3 {
-
-class GenCrossSection;
-
-using GenCrossSectionPtr = std::shared_ptr<GenCrossSection>;
-using ConstGenCrossSectionPtr = std::shared_ptr<const GenCrossSection>;
-
-}
-
-#endif
Index: external/HepMC3/GenEvent.cc
===================================================================
--- external/HepMC3/GenEvent.cc	(revision 302624fca6ca1247dbb8697c4f2e8ecc730d20b1)
+++ 	(revision )
@@ -1,820 +1,0 @@
-// -*- C++ -*-
-//
-// This file is part of HepMC
-// Copyright (C) 2014-2019 The HepMC collaboration (see AUTHORS for details)
-//
-/**
- *  @file GenEvent.cc
- *  @brief Implementation of \b class GenEvent
- *
- */
-#include "HepMC3/GenEvent.h"
-#include "HepMC3/GenParticle.h"
-#include "HepMC3/GenVertex.h"
-#include "HepMC3/Data/GenEventData.h"
-
-#include <deque>
-#include <algorithm> // sort
-
-namespace HepMC3 {
-
-GenEvent::GenEvent(Units::MomentumUnit mu,
-                   Units::LengthUnit lu)
-    : m_event_number(0), m_weights(std::vector<double>()), //m_weights(std::vector<double>(1, 1.0)),//Prevent from  different number of weights and names
-      m_momentum_unit(mu), m_length_unit(lu),
-      m_rootvertex(std::make_shared<GenVertex>()) {}
-
-
-GenEvent::GenEvent(std::shared_ptr<GenRunInfo> run,
-                   Units::MomentumUnit mu,
-                   Units::LengthUnit lu)
-    : m_event_number(0), m_weights(std::vector<double>()), //m_weights(std::vector<double>(1, 1.0)),//Prevent from  different number of weights and names
-      m_momentum_unit(mu), m_length_unit(lu),
-      m_rootvertex(std::make_shared<GenVertex>()),
-      m_run_info(run) {
-    if ( run && !run->weight_names().empty() )
-        m_weights = std::vector<double>(run->weight_names().size(), 1.0);
-}
-
-const std::vector<ConstGenParticlePtr>& GenEvent::particles() const {
-    return *(reinterpret_cast<const std::vector<ConstGenParticlePtr>*>(&m_particles));
-}
-
-const std::vector<ConstGenVertexPtr>& GenEvent::vertices() const {
-    return *(reinterpret_cast<const std::vector<ConstGenVertexPtr>*>(&m_vertices));
-}
-
-
-// void GenEvent::add_particle( const GenParticlePtr &p ) {
-void GenEvent::add_particle( GenParticlePtr p ) {
-    if( !p|| p->in_event() ) return;
-
-    m_particles.push_back(p);
-
-    p->m_event = this;
-    p->m_id = particles().size();
-
-    // Particles without production vertex are added to the root vertex
-    if( !p->production_vertex() )
-        m_rootvertex->add_particle_out(p);
-}
-
-
-GenEvent::GenEvent(const GenEvent&e) {
-    if (this != &e)
-    {
-        std::lock(m_lock_attributes, e.m_lock_attributes);
-        std::lock_guard<std::recursive_mutex> lhs_lk(m_lock_attributes, std::adopt_lock);
-        std::lock_guard<std::recursive_mutex> rhs_lk(e.m_lock_attributes, std::adopt_lock);
-        GenEventData tdata;
-        e.write_data(tdata);
-        read_data(tdata);
-    }
-}
-
-GenEvent::~GenEvent() {
-    for ( std::map< std::string, std::map<int, std::shared_ptr<Attribute> > >::iterator attm=m_attributes.begin(); attm!=m_attributes.end(); ++attm)
-        for ( std::map<int, std::shared_ptr<Attribute> >::iterator att=attm->second.begin(); att!=attm->second.end(); ++att) if (att->second) att->second->m_event = nullptr;
-
-    for  ( std::vector<GenVertexPtr>::iterator v=m_vertices.begin(); v!=m_vertices.end(); ++v ) if (*v)  if ((*v)->m_event==this) (*v)->m_event=nullptr;
-    for  ( std::vector<GenParticlePtr>::iterator p=m_particles.begin(); p!=m_particles.end(); ++p ) if (*p)  if ((*p)->m_event==this)  (*p)->m_event=nullptr;
-}
-
-GenEvent& GenEvent::operator=(const GenEvent& e) {
-    if (this != &e)
-    {
-        std::lock(m_lock_attributes, e.m_lock_attributes);
-        std::lock_guard<std::recursive_mutex> lhs_lk(m_lock_attributes, std::adopt_lock);
-        std::lock_guard<std::recursive_mutex> rhs_lk(e.m_lock_attributes, std::adopt_lock);
-        GenEventData tdata;
-        e.write_data(tdata);
-        read_data(tdata);
-    }
-    return *this;
-}
-
-
-void GenEvent::add_vertex( GenVertexPtr v ) {
-    if( !v|| v->in_event() ) return;
-    m_vertices.push_back(v);
-
-    v->m_event = this;
-    v->m_id = -(int)vertices().size();
-
-    // Add all incoming and outgoing particles and restore their production/end vertices
-    for(auto p: v->particles_in() ) {
-        if(!p->in_event()) add_particle(p);
-        p->m_end_vertex = v->shared_from_this();
-    }
-
-    for(auto p: v->particles_out() ) {
-        if(!p->in_event()) add_particle(p);
-        p->m_production_vertex = v;
-    }
-}
-
-
-void GenEvent::remove_particle( GenParticlePtr p ) {
-    if( !p || p->parent_event() != this ) return;
-
-    HEPMC3_DEBUG( 30, "GenEvent::remove_particle - called with particle: "<<p->id() );
-    GenVertexPtr end_vtx = p->end_vertex();
-    if( end_vtx ) {
-        end_vtx->remove_particle_in(p);
-
-        // If that was the only incoming particle, remove vertex from the event
-        if( end_vtx->particles_in().size() == 0 )  remove_vertex(end_vtx);
-    }
-
-    GenVertexPtr prod_vtx = p->production_vertex();
-    if( prod_vtx ) {
-        prod_vtx->remove_particle_out(p);
-
-        // If that was the only outgoing particle, remove vertex from the event
-        if( prod_vtx->particles_out().size() == 0 ) remove_vertex(prod_vtx);
-    }
-
-    HEPMC3_DEBUG( 30, "GenEvent::remove_particle - erasing particle: " << p->id() )
-
-    int idx = p->id();
-    std::vector<GenParticlePtr>::iterator it = m_particles.erase(m_particles.begin() + idx-1 );
-
-    // Remove attributes of this particle
-    std::lock_guard<std::recursive_mutex> lock(m_lock_attributes);
-    std::vector<std::string> atts = p->attribute_names();
-    for(const std::string &s: atts) {
-        p->remove_attribute(s);
-    }
-
-    //
-    // Reassign id of attributes with id above this one
-    //
-    std::vector< std::pair< int, std::shared_ptr<Attribute> > > changed_attributes;
-
-    for(att_key_t& vt1: m_attributes ) {
-        changed_attributes.clear();
-
-        for ( std::map<int, std::shared_ptr<Attribute> >::iterator vt2=vt1.second.begin(); vt2!=vt1.second.end(); ++vt2) {
-            if( (*vt2).first > p->id() ) {
-                changed_attributes.push_back(*vt2);
-            }
-        }
-
-        for( att_val_t val: changed_attributes ) {
-            vt1.second.erase(val.first);
-            vt1.second[val.first-1] = val.second;
-        }
-    }
-    // Reassign id of particles with id above this one
-    for(; it != m_particles.end(); ++it) {
-        --((*it)->m_id);
-    }
-
-    // Finally - set parent event and id of this particle to 0
-    p->m_event = nullptr;
-    p->m_id    = 0;
-}
-/** @brief Comparison of two particle by id */
-struct sort_by_id_asc {
-    /** @brief Comparison of two particle by id */
-    inline bool operator()(const GenParticlePtr& p1, const GenParticlePtr& p2) {
-        return (p1->id() > p2->id());
-    }
-};
-
-void GenEvent::remove_particles( std::vector<GenParticlePtr> v ) {
-
-    std::sort( v.begin(), v.end(), sort_by_id_asc() );
-
-    for (std::vector<GenParticlePtr>::iterator p=v.begin(); p!=v.end(); ++p) {
-        remove_particle(*p);
-    }
-}
-
-void GenEvent::remove_vertex( GenVertexPtr v ) {
-    if( !v || v->parent_event() != this ) return;
-
-    HEPMC3_DEBUG( 30, "GenEvent::remove_vertex   - called with vertex:  "<<v->id() );
-    std::shared_ptr<GenVertex> null_vtx;
-
-    for(auto p: v->particles_in() ) {
-        p->m_end_vertex = std::weak_ptr<GenVertex>();
-    }
-
-    for(auto p: v->particles_out() ) {
-        p->m_production_vertex = std::weak_ptr<GenVertex>();
-
-        // recursive delete rest of the tree
-        remove_particle(p);
-    }
-
-    // Erase this vertex from vertices list
-    HEPMC3_DEBUG( 30, "GenEvent::remove_vertex   - erasing vertex: " << v->id() )
-
-    int idx = -v->id();
-    std::vector<GenVertexPtr>::iterator it = m_vertices.erase(m_vertices.begin() + idx-1 );
-    // Remove attributes of this vertex
-    std::lock_guard<std::recursive_mutex> lock(m_lock_attributes);
-    std::vector<std::string> atts = v->attribute_names();
-    for(std::string s: atts) {
-        v->remove_attribute(s);
-    }
-
-    //
-    // Reassign id of attributes with id below this one
-    //
-
-    std::vector< std::pair< int, std::shared_ptr<Attribute> > > changed_attributes;
-
-    for( att_key_t& vt1: m_attributes ) {
-        changed_attributes.clear();
-
-        for ( std::map<int, std::shared_ptr<Attribute> >::iterator vt2=vt1.second.begin(); vt2!=vt1.second.end(); ++vt2) {
-            if( (*vt2).first < v->id() ) {
-                changed_attributes.push_back(*vt2);
-            }
-        }
-
-        for( att_val_t val: changed_attributes ) {
-            vt1.second.erase(val.first);
-            vt1.second[val.first+1] = val.second;
-        }
-    }
-
-    // Reassign id of particles with id above this one
-    for(; it != m_vertices.end(); ++it) {
-        ++((*it)->m_id);
-    }
-
-    // Finally - set parent event and id of this vertex to 0
-    v->m_event = nullptr;
-    v->m_id    = 0;
-}
-/// @todo This looks dangerously similar to the recusive event traversel that we forbade in the
-///       Core library due to wories about generator dependence
-static bool visit_children(std::map<ConstGenVertexPtr,int>  &a, ConstGenVertexPtr v)
-{
-    for ( ConstGenParticlePtr p: v->particles_out())
-        if (p->end_vertex())
-        {
-            if (a[p->end_vertex()]!=0) return true;
-            else a[p->end_vertex()]++;
-            if (visit_children(a, p->end_vertex())) return true;
-        }
-    return false;
-}
-
-void GenEvent::add_tree( const std::vector<GenParticlePtr> &parts ) {
-
-    std::shared_ptr<IntAttribute> existing_hc=attribute<IntAttribute>("cycles");
-    bool has_cycles=false;
-    std::map<GenVertexPtr,int>  sortingv;
-    std::vector<GenVertexPtr> noinv;
-    if (existing_hc)     if (existing_hc->value()!=0) has_cycles=true;
-    if(!existing_hc)
-    {
-        for(GenParticlePtr p: parts ) {
-            GenVertexPtr v = p->production_vertex();
-            if(v) sortingv[v]=0;
-            if( !v || v->particles_in().size()==0 ) {
-                GenVertexPtr v2 = p->end_vertex();
-                if(v2) {noinv.push_back(v2); sortingv[v2]=0;}
-            }
-        }
-        for (GenVertexPtr v: noinv) {
-            std::map<ConstGenVertexPtr,int>  sorting_temp(sortingv.begin(), sortingv.end());
-            has_cycles=(has_cycles||visit_children(sorting_temp, v));
-        }
-    }
-    if (has_cycles) {
-        add_attribute("cycles", std::make_shared<IntAttribute>(1));
-        /* Commented out  as improvemnts allow us to do sorting in other way.
-         for( std::map<GenVertexPtr,int>::iterator vi=sortingv.begin();vi!=sortingv.end();++vi) if( !vi->first->in_event() ) add_vertex(vi->first);
-         return;
-         */
-    }
-
-    std::deque<GenVertexPtr> sorting;
-
-    // Find all starting vertices (end vertex of particles that have no production vertex)
-    for(auto p: parts ) {
-        const GenVertexPtr &v = p->production_vertex();
-        if( !v || v->particles_in().size()==0 ) {
-            const GenVertexPtr &v2 = p->end_vertex();
-            if(v2) sorting.push_back(v2);
-        }
-    }
-
-    HEPMC3_DEBUG_CODE_BLOCK(
-        unsigned int sorting_loop_count = 0;
-        unsigned int max_deque_size     = 0;
-    )
-
-    // Add vertices to the event in topological order
-    while( !sorting.empty() ) {
-        HEPMC3_DEBUG_CODE_BLOCK(
-            if( sorting.size() > max_deque_size ) max_deque_size = sorting.size();
-            ++sorting_loop_count;
-        )
-
-            GenVertexPtr &v = sorting.front();
-
-        bool added = false;
-
-        // Add all mothers to the front of the list
-        for( auto p: v->particles_in() ) {
-            GenVertexPtr v2 = p->production_vertex();
-            if( v2 && !v2->in_event() && find(sorting.begin(),sorting.end(),v2)==sorting.end()) {
-                sorting.push_front(v2);
-                added = true;
-            }
-        }
-
-        // If we have added at least one production vertex,
-        // our vertex is not the first one on the list
-        if( added ) continue;
-
-        // If vertex not yet added
-        if( !v->in_event() ) {
-
-            add_vertex(v);
-
-            // Add all end vertices to the end of the list
-            for(auto p: v->particles_out() ) {
-                GenVertexPtr v2 = p->end_vertex();
-                if( v2 && !v2->in_event()&& find(sorting.begin(),sorting.end(),v2)==sorting.end() ) {
-                    sorting.push_back(v2);
-                }
-            }
-        }
-
-        sorting.pop_front();
-    }
-
-    // LL: Make sure root vertex has index zero and is not written out
-    if ( m_rootvertex->id() != 0 ) {
-        const int vx = -1 - m_rootvertex->id();
-        const int rootid = m_rootvertex->id();
-        if ( vx >= 0 && vx < m_vertices.size() && m_vertices[vx] == m_rootvertex ) {
-            auto next = m_vertices.erase(m_vertices.begin() + vx);
-            std::lock_guard<std::recursive_mutex> lock(m_lock_attributes);
-            for(auto & vt1: m_attributes ) {
-                std::vector< std::pair< int, std::shared_ptr<Attribute> > > changed_attributes;
-                for ( auto vt2 : vt1.second )
-                    if( vt2.first <= rootid )
-                        changed_attributes.push_back(vt2);
-                for( auto val : changed_attributes ) {
-                    vt1.second.erase(val.first);
-                    vt1.second[val.first == rootid? 0: val.first + 1] = val.second;
-                }
-            }
-            m_rootvertex->set_id(0);
-            while ( next != m_vertices.end() ) {
-                ++((*next++)->m_id);
-            }
-        } else {
-            HEPMC3_WARNING( "ReaderAsciiHepMC2: Suspicious looking rootvertex found. Will try to cope." )
-        }
-    }
-
-    HEPMC3_DEBUG_CODE_BLOCK(
-        HEPMC3_DEBUG( 6, "GenEvent - particles sorted: "
-                      <<this->particles().size()<<", max deque size: "
-                      <<max_deque_size<<", iterations: "<<sorting_loop_count )
-    )
-    return;
-}
-
-
-void GenEvent::reserve(const size_t& parts, const size_t& verts) {
-    m_particles.reserve(parts);
-    m_vertices.reserve(verts);
-}
-
-
-void GenEvent::set_units( Units::MomentumUnit new_momentum_unit, Units::LengthUnit new_length_unit) {
-    if( new_momentum_unit != m_momentum_unit ) {
-        for( GenParticlePtr p: m_particles ) {
-            Units::convert( p->m_data.momentum, m_momentum_unit, new_momentum_unit );
-            Units::convert( p->m_data.mass, m_momentum_unit, new_momentum_unit );
-        }
-
-        m_momentum_unit = new_momentum_unit;
-    }
-
-    if( new_length_unit != m_length_unit ) {
-        for(GenVertexPtr &v: m_vertices ) {
-            FourVector &fv = v->m_data.position;
-            if( !fv.is_zero() ) Units::convert( fv, m_length_unit, new_length_unit );
-        }
-
-        m_length_unit = new_length_unit;
-    }
-}
-
-
-const FourVector& GenEvent::event_pos() const {
-    return m_rootvertex->data().position;
-}
-
-std::vector<ConstGenParticlePtr> GenEvent::beams() const {
-    return std::const_pointer_cast<const GenVertex>(m_rootvertex)->particles_out();
-}
-
-const std::vector<GenParticlePtr> & GenEvent::beams() {
-    return m_rootvertex->particles_out();
-}
-
-void GenEvent::shift_position_by( const FourVector & delta ) {
-    m_rootvertex->set_position( event_pos() + delta );
-
-    // Offset all vertices
-    for ( GenVertexPtr v: m_vertices ) {
-        if ( v->has_set_position() )
-            v->set_position( v->position() + delta );
-    }
-}
-
-bool GenEvent::rotate( const FourVector&  delta )
-{
-
-    for ( auto p: m_particles)
-    {
-        FourVector mom=p->momentum();
-        long double tempX=mom.x();
-        long double tempY=mom.y();
-        long double tempZ=mom.z();
-
-        long double tempX_;
-        long double tempY_;
-        long double tempZ_;
-
-
-        long double cosa=cos(delta.x());
-        long double sina=sin(delta.x());
-
-        tempY_= cosa*tempY+sina*tempZ;
-        tempZ_=-sina*tempY+cosa*tempZ;
-        tempY=tempY_;
-        tempZ=tempZ_;
-
-
-        long double cosb=cos(delta.y());
-        long double sinb=sin(delta.y());
-
-        tempX_= cosb*tempX-sinb*tempZ;
-        tempZ_= sinb*tempX+cosb*tempZ;
-        tempX=tempX_;
-        tempZ=tempZ_;
-
-        long double cosg=cos(delta.z());
-        long double sing=sin(delta.z());
-
-        tempX_= cosg*tempX+sing*tempY;
-        tempY_=-sing*tempX+cosg*tempY;
-        tempX=tempX_;
-        tempY=tempY_;
-
-        FourVector temp(tempX,tempY,tempZ,mom.e());
-        p->set_momentum(temp);
-    }
-    for ( auto v: m_vertices)
-    {
-        FourVector pos=v->position();
-        long double tempX=pos.x();
-        long double tempY=pos.y();
-        long double tempZ=pos.z();
-
-        long double tempX_;
-        long double tempY_;
-        long double tempZ_;
-
-
-        long double cosa=cos(delta.x());
-        long double sina=sin(delta.x());
-
-        tempY_= cosa*tempY+sina*tempZ;
-        tempZ_=-sina*tempY+cosa*tempZ;
-        tempY=tempY_;
-        tempZ=tempZ_;
-
-
-        long double cosb=cos(delta.y());
-        long double sinb=sin(delta.y());
-
-        tempX_= cosb*tempX-sinb*tempZ;
-        tempZ_= sinb*tempX+cosb*tempZ;
-        tempX=tempX_;
-        tempZ=tempZ_;
-
-        long double cosg=cos(delta.z());
-        long double sing=sin(delta.z());
-
-        tempX_= cosg*tempX+sing*tempY;
-        tempY_=-sing*tempX+cosg*tempY;
-        tempX=tempX_;
-        tempY=tempY_;
-
-        FourVector temp(tempX,tempY,tempZ,pos.t());
-        v->set_position(temp);
-    }
-
-
-    return true;
-}
-
-bool GenEvent::reflect(const int axis)
-{
-    if (axis>3||axis<0)
-    {
-        HEPMC3_WARNING( "GenEvent::reflect: wrong axis" )
-        return false;
-    }
-    switch (axis)
-    {
-    case 0:
-        for ( auto p: m_particles) { FourVector temp=p->momentum(); temp.setX(-p->momentum().x()); p->set_momentum(temp);}
-        for ( auto v: m_vertices)  { FourVector temp=v->position(); temp.setX(-v->position().x()); v->set_position(temp);}
-        break;
-    case 1:
-        for ( auto p: m_particles) { FourVector temp=p->momentum(); temp.setY(-p->momentum().y()); p->set_momentum(temp);}
-        for ( auto v: m_vertices)  { FourVector temp=v->position(); temp.setY(-v->position().y()); v->set_position(temp);}
-        break;
-    case 2:
-        for ( auto p: m_particles) { FourVector temp=p->momentum(); temp.setZ(-p->momentum().z()); p->set_momentum(temp);}
-        for ( auto v: m_vertices)  { FourVector temp=v->position(); temp.setZ(-v->position().z()); v->set_position(temp);}
-        break;
-    case 3:
-        for ( auto p: m_particles) { FourVector temp=p->momentum(); temp.setT(-p->momentum().e()); p->set_momentum(temp);}
-        for ( auto v: m_vertices)  { FourVector temp=v->position(); temp.setT(-v->position().t()); v->set_position(temp);}
-        break;
-    default:
-        return false;
-    }
-
-    return true;
-}
-
-bool GenEvent::boost( const FourVector&  delta )
-{
-
-    double deltalength2d=delta.length2();
-    if (deltalength2d>1.0)
-    {
-        HEPMC3_WARNING( "GenEvent::boost: wrong large boost vector. Will leave event as is." )
-        return false;
-    }
-    if (std::abs(deltalength2d-1.0)<std::numeric_limits<double>::epsilon())
-    {
-        HEPMC3_WARNING( "GenEvent::boost: too large gamma. Will leave event as is." )
-        return false;
-    }
-    if (std::abs(deltalength2d)<std::numeric_limits<double>::epsilon())
-    {
-        HEPMC3_WARNING( "GenEvent::boost: wrong small boost vector. Will leave event as is." )
-        return true;
-    }
-    long double deltaX=delta.x();
-    long double deltaY=delta.y();
-    long double deltaZ=delta.z();
-    long double deltalength2=deltaX*deltaX+deltaY*deltaY+deltaZ*deltaZ;
-    long double deltalength=std::sqrt(deltalength2 );
-    long double gamma=1.0/std::sqrt(1.0-deltalength2);
-
-    for ( auto p: m_particles)
-    {
-        FourVector mom=p->momentum();
-
-        long double tempX=mom.x();
-        long double tempY=mom.y();
-        long double tempZ=mom.z();
-        long double tempE=mom.e();
-        long double nr=(deltaX*tempX+deltaY*tempY+deltaZ*tempZ)/deltalength;
-
-        tempX+=(deltaX*((gamma-1)*nr/deltalength)-deltaX*(tempE*gamma));
-        tempY+=(deltaY*((gamma-1)*nr/deltalength)-deltaY*(tempE*gamma));
-        tempZ+=(deltaZ*((gamma-1)*nr/deltalength)-deltaZ*(tempE*gamma));
-        tempE=gamma*(tempE-deltalength*nr);
-        FourVector temp(tempX,tempY,tempZ,tempE);
-        p->set_momentum(temp);
-    }
-
-    return true;
-}
-
-
-
-
-void GenEvent::clear() {
-    std::lock_guard<std::recursive_mutex> lock(m_lock_attributes);
-    m_event_number = 0;
-    m_rootvertex = std::make_shared<GenVertex>();
-    m_weights.clear();
-    m_attributes.clear();
-    m_particles.clear();
-    m_vertices.clear();
-}
-
-
-
-
-void GenEvent::remove_attribute(const std::string &name,  const int& id) {
-    std::lock_guard<std::recursive_mutex> lock(m_lock_attributes);
-    std:: map< std::string, std::map<int, std::shared_ptr<Attribute> > >::iterator i1 =
-        m_attributes.find(name);
-    if( i1 == m_attributes.end() ) return;
-
-    std::map<int, std::shared_ptr<Attribute> >::iterator i2 = i1->second.find(id);
-    if( i2 == i1->second.end() ) return;
-
-    i1->second.erase(i2);
-}
-
-std::vector<std::string> GenEvent::attribute_names( const int& id) const {
-    std::vector<std::string> results;
-
-    for(const att_key_t& vt1: m_attributes ) {
-        if( vt1.second.count( id ) == 1 ) {
-            results.push_back( vt1.first );
-        }
-    }
-
-    return results;
-}
-
-void GenEvent::write_data(GenEventData& data) const {
-    // Reserve memory for containers
-    data.particles.reserve( this->particles().size() );
-    data.vertices.reserve( this->vertices().size() );
-    data.links1.reserve( this->particles().size()*2 );
-    data.links2.reserve( this->particles().size()*2 );
-    data.attribute_id.reserve( m_attributes.size() );
-    data.attribute_name.reserve( m_attributes.size() );
-    data.attribute_string.reserve( m_attributes.size() );
-
-    // Fill event data
-    data.event_number  = this->event_number();
-    data.momentum_unit = this->momentum_unit();
-    data.length_unit   = this->length_unit();
-    data.event_pos     = this->event_pos();
-
-    // Fill containers
-    data.weights = this->weights();
-
-    for( ConstGenParticlePtr p: this->particles() ) {
-        data.particles.push_back( p->data() );
-    }
-
-    for(ConstGenVertexPtr v: this->vertices() ) {
-        data.vertices.push_back( v->data() );
-        int v_id = v->id();
-
-        for(ConstGenParticlePtr p: v->particles_in() ) {
-            data.links1.push_back( p->id() );
-            data.links2.push_back( v_id    );
-        }
-
-        for(ConstGenParticlePtr p: v->particles_out() ) {
-            data.links1.push_back( v_id    );
-            data.links2.push_back( p->id() );
-        }
-    }
-
-    for( const att_key_t& vt1: this->attributes() ) {
-        for( const att_val_t& vt2: vt1.second ) {
-
-            std::string st;
-
-            bool status = vt2.second->to_string(st);
-
-            if( !status ) {
-                HEPMC3_WARNING( "GenEvent::write_data: problem serializing attribute: "<<vt1.first )
-            }
-            else {
-                data.attribute_id.push_back(vt2.first);
-                data.attribute_name.push_back(vt1.first);
-                data.attribute_string.push_back(st);
-            }
-        }
-    }
-}
-
-
-void GenEvent::read_data(const GenEventData &data) {
-    this->clear();
-    this->set_event_number( data.event_number );
-//Note: set_units checks the current unit of event, i.e. applicable only for fully constructed event.
-    m_momentum_unit=data.momentum_unit;
-    m_length_unit=data.length_unit;
-    this->shift_position_to( data.event_pos );
-
-    // Fill weights
-    this->weights() = data.weights;
-
-    // Fill particle information
-    for( const GenParticleData &pd: data.particles ) {
-        GenParticlePtr p = std::make_shared<GenParticle>(pd);
-
-        m_particles.push_back(p);
-
-        p->m_event = this;
-        p->m_id    = m_particles.size();
-    }
-
-    // Fill vertex information
-    for( const GenVertexData &vd: data.vertices ) {
-        GenVertexPtr v = std::make_shared<GenVertex>(vd);
-
-        m_vertices.push_back(v);
-
-        v->m_event = this;
-        v->m_id    = -(int)m_vertices.size();
-    }
-
-    // Restore links
-    for( unsigned int i=0; i<data.links1.size(); ++i) {
-        int id1 = data.links1[i];
-        int id2 = data.links2[i];
-        /* @note:
-        The  meaningfull combinations for (id1,id2) are:
-        (+-)  --  particle has end vertex
-        (-+)  --  particle  has production vertex
-        */
-        if ( (id1<0&&id2<0)|| (id1>0&&id2>0) )   { HEPMC3_WARNING( "GenEvent::read_data: wrong link: "<<id1<<" "<<id2 ); continue;}
-
-        if ( id1 > 0 ) { m_vertices[ (-id2)-1 ]->add_particle_in ( m_particles[ id1-1 ] ); continue; }
-        if ( id1 < 0 ) { m_vertices[ (-id1)-1 ]->add_particle_out( m_particles[ id2-1 ] );   continue; }
-    }
-    for (auto p:  m_particles) if (!p->production_vertex()) m_rootvertex->add_particle_out(p);
-
-    // Read attributes
-    for( unsigned int i=0; i<data.attribute_id.size(); ++i) {
-        add_attribute( data.attribute_name[i],
-                       std::make_shared<StringAttribute>(data.attribute_string[i]),
-                       data.attribute_id[i] );
-    }
-}
-
-
-
-//
-// Deprecated functions
-//
-
-void GenEvent::add_particle( GenParticle *p ) {
-    add_particle( GenParticlePtr(p) );
-}
-
-
-void GenEvent::add_vertex( GenVertex *v ) {
-    add_vertex( GenVertexPtr(v) );
-}
-
-
-void GenEvent::set_beam_particles(GenParticlePtr p1, GenParticlePtr p2) {
-    m_rootvertex->add_particle_out(p1);
-    m_rootvertex->add_particle_out(p2);
-}
-
-void GenEvent::add_beam_particle(GenParticlePtr p1) {
-    if (!p1)
-    {
-        HEPMC3_WARNING("Attempting to add an empty particle as beam particle. Ignored.")
-        return;
-    }
-    if( p1->in_event()) if (p1->parent_event()!=this)
-        {
-            HEPMC3_WARNING("Attempting to add particle from another event. Ignored.")
-            return;
-        }
-    if (p1->production_vertex())  p1->production_vertex()->remove_particle_out(p1);
-//Particle w/o production vertex is added to root vertex.
-    add_particle(p1);
-    p1->set_status(4);
-    return;
-}
-
-
-std::string GenEvent::attribute_as_string(const std::string &name, const int& id) const {
-    std::lock_guard<std::recursive_mutex> lock(m_lock_attributes);
-    std::map< std::string, std::map<int, std::shared_ptr<Attribute> > >::iterator i1 =
-        m_attributes.find(name);
-    if( i1 == m_attributes.end() ) {
-        if ( id == 0 && run_info() ) {
-            return run_info()->attribute_as_string(name);
-        }
-        return std::string();
-    }
-
-    std::map<int, std::shared_ptr<Attribute> >::iterator i2 = i1->second.find(id);
-    if (i2 == i1->second.end() ) return std::string();
-
-    if( !i2->second ) return std::string();
-
-    std::string ret;
-    i2->second->to_string(ret);
-
-    return ret;
-}
-
-} // namespace HepMC3
Index: external/HepMC3/GenEvent.h
===================================================================
--- external/HepMC3/GenEvent.h	(revision 302624fca6ca1247dbb8697c4f2e8ecc730d20b1)
+++ 	(revision )
@@ -1,426 +1,0 @@
-// -*- C++ -*-
-//
-// This file is part of HepMC
-// Copyright (C) 2014-2020 The HepMC collaboration (see AUTHORS for details)
-//
-///
-/// @file GenEvent.h
-/// @brief Definition of \b class GenEvent
-///
-#ifndef HEPMC3_GENEVENT_H
-#define HEPMC3_GENEVENT_H
-
-#include "HepMC3/Units.h"
-#include "HepMC3/GenParticle_fwd.h"
-#include "HepMC3/GenVertex_fwd.h"
-#include "HepMC3/GenPdfInfo_fwd.h"
-#include "HepMC3/GenHeavyIon_fwd.h"
-#include "HepMC3/GenCrossSection_fwd.h"
-
-#if !defined(__CINT__)
-#include "HepMC3/GenHeavyIon.h"
-#include "HepMC3/GenPdfInfo.h"
-#include "HepMC3/GenCrossSection.h"
-#include "HepMC3/GenRunInfo.h"
-#include <mutex>
-#endif // __CINT__
-
-#ifdef HEPMC3_ROOTIO
-class TBuffer;
-#endif
-
-
-namespace HepMC3 {
-
-struct GenEventData;
-
-/// @brief Stores event-related information
-///
-/// Manages event-related information.
-/// Contains lists of GenParticle and GenVertex objects
-class GenEvent {
-
-public:
-
-    /// @brief Event constructor without a run
-    GenEvent(Units::MomentumUnit momentum_unit = Units::GEV,
-             Units::LengthUnit length_unit = Units::MM);
-
-#if !defined(__CINT__)
-
-    /// @brief Constructor with associated run
-    GenEvent(std::shared_ptr<GenRunInfo> run,
-             Units::MomentumUnit momentum_unit = Units::GEV,
-             Units::LengthUnit length_unit = Units::MM);
-
-    /// @brief Copy constructor
-    GenEvent(const GenEvent&);
-
-    /// @brief Destructor
-    ~GenEvent();
-
-    /// @brief Assignment operator
-    GenEvent& operator=(const GenEvent&);
-
-    /// @name Particle and vertex access
-    //@{
-
-    /// @brief Get list of particles (const)
-    const std::vector<ConstGenParticlePtr>& particles() const;
-    /// @brief Get list of vertices (const)
-    const std::vector<ConstGenVertexPtr>& vertices() const;
-
-
-    /// @brief Get/set list of particles (non-const)
-    const std::vector<GenParticlePtr>& particles() { return m_particles; }
-    /// @brief Get/set list of vertices (non-const)
-    const std::vector<GenVertexPtr>& vertices() { return m_vertices; }
-
-    //@}
-
-
-    /// @name Event weights
-    //@{
-
-    /// Get event weight values as a vector
-    const std::vector<double>& weights() const { return m_weights; }
-    /// Get event weights as a vector (non-const)
-    std::vector<double>& weights() { return m_weights; }
-    /// Get event weight accessed by index (or the canonical/first one if there is no argument)
-    /// @note It's the user's responsibility to ensure that the given index exists!
-    double weight(const unsigned long& index=0) const { return weights().at(index); }
-    /// Get event weight accessed by weight name
-    /// @note Requires there to be an attached GenRunInfo, otherwise will throw an exception
-    /// @note It's the user's responsibility to ensure that the given name exists!
-    double weight(const std::string& name) const {
-        if (!run_info()) throw std::runtime_error("GenEvent::weight(str): named access to event weights requires the event to have a GenRunInfo");
-        return weight(run_info()->weight_index(name));
-    }
-    /// Get event weight accessed by weight name
-    /// @note Requires there to be an attached GenRunInfo, otherwise will throw an exception
-    /// @note It's the user's responsibility to ensure that the given name exists!
-    double& weight(const std::string& name) {
-        if (!run_info()) throw std::runtime_error("GenEvent::weight(str): named access to event weights requires the event to have a GenRunInfo");
-        int pos=run_info()->weight_index(name);
-        if (pos<0) throw std::runtime_error("GenEvent::weight(str): no weight with given name in this run");
-        return m_weights[pos];
-    }
-    /// Get event weight names, if there are some
-    /// @note Requires there to be an attached GenRunInfo with registered weight names, otherwise will throw an exception
-    const std::vector<std::string>& weight_names() const {
-        if (!run_info()) throw std::runtime_error("GenEvent::weight_names(): access to event weight names requires the event to have a GenRunInfo");
-        const std::vector<std::string>& weightnames = run_info()->weight_names();
-        if (weightnames.empty()) throw std::runtime_error("GenEvent::weight_names(): no event weight names are registered for this run");
-        return weightnames;
-    }
-
-    //@}
-
-
-    /// @name Auxiliary info and event metadata
-    //@{
-
-    /// @brief Get a pointer to the the GenRunInfo object.
-    std::shared_ptr<GenRunInfo> run_info() const {
-        return m_run_info;
-    }
-    /// @brief Set the GenRunInfo object by smart pointer.
-    void set_run_info(std::shared_ptr<GenRunInfo> run) {
-        m_run_info = run;
-        if ( run && !run->weight_names().empty() )
-            m_weights.resize(run->weight_names().size(), 1.0);
-    }
-
-    /// @brief Get event number
-    int  event_number() const { return m_event_number; }
-    /// @brief Set event number
-    void set_event_number(const int& num) { m_event_number = num; }
-
-    /// @brief Get momentum unit
-    const Units::MomentumUnit& momentum_unit() const { return m_momentum_unit; }
-    /// @brief Get length unit
-    const Units::LengthUnit& length_unit() const { return m_length_unit; }
-    /// @brief Change event units
-    /// Converts event from current units to new ones
-    void set_units( Units::MomentumUnit new_momentum_unit, Units::LengthUnit new_length_unit);
-
-    /// @brief Get heavy ion generator additional information
-    GenHeavyIonPtr heavy_ion() { return attribute<GenHeavyIon>("GenHeavyIon"); }
-    /// @brief Get heavy ion generator additional information (const version)
-    ConstGenHeavyIonPtr heavy_ion() const { return attribute<GenHeavyIon>("GenHeavyIon"); }
-    /// @brief Set heavy ion generator additional information
-    void set_heavy_ion(GenHeavyIonPtr hi) { add_attribute("GenHeavyIon",hi); }
-
-    /// @brief Get PDF information
-    GenPdfInfoPtr pdf_info() { return attribute<GenPdfInfo>("GenPdfInfo"); }
-    /// @brief Get PDF information (const version)
-    ConstGenPdfInfoPtr pdf_info() const { return attribute<GenPdfInfo>("GenPdfInfo"); }
-    /// @brief Set PDF information
-    void set_pdf_info(GenPdfInfoPtr pi) { add_attribute("GenPdfInfo",pi); }
-
-    /// @brief Get cross-section information
-    GenCrossSectionPtr cross_section() { return attribute<GenCrossSection>("GenCrossSection"); }
-    /// @brief Get cross-section information (const version)
-    ConstGenCrossSectionPtr cross_section() const { return attribute<GenCrossSection>("GenCrossSection"); }
-    /// @brief Set cross-section information
-    void set_cross_section(GenCrossSectionPtr cs) { add_attribute("GenCrossSection",cs); }
-
-    //@}
-
-
-    /// @name Event position
-    //@{
-
-    /// Vertex representing the overall event position
-    const FourVector& event_pos() const;
-
-    /// @brief Vector of beam particles
-    std::vector<ConstGenParticlePtr> beams() const;
-
-    /// @brief Vector of beam particles
-    const std::vector<GenParticlePtr> & beams();
-
-    /// @brief Shift position of all vertices in the event by @a delta
-    void shift_position_by( const FourVector & delta );
-
-    /// @brief Shift position of all vertices in the event to @a op
-    void shift_position_to( const FourVector & newpos ) {
-        const FourVector delta = newpos - event_pos();
-        shift_position_by(delta);
-    }
-
-    /// @brief Boost event using x,y,z components of @a v as velocities
-    bool boost( const FourVector&  v );
-    /// @brief Rotate event using x,y,z components of @a v as rotation angles
-    bool rotate( const FourVector&  v );
-    /// @brief Change sign of @a axis
-    bool reflect(const int axis);
-
-    //@}
-
-
-    /// @name Additional attributes
-    //@{
-    /// @brief Add event attribute to event
-    ///
-    /// This will overwrite existing attribute if an attribute
-    /// with the same name is present
-    void add_attribute(const std::string &name, const std::shared_ptr<Attribute> &att,  const int& id = 0) {
-        ///Disallow empty strings
-        if (name.length()==0) return;     
-        if (!att)  return;
-        std::lock_guard<std::recursive_mutex> lock(m_lock_attributes);
-        if (m_attributes.count(name)==0) m_attributes[name]=std::map<int, std::shared_ptr<Attribute> >();
-        m_attributes[name][id] = att;
-        att->m_event = this;
-        if ( id > 0 && id <= int(particles().size()) )
-            att->m_particle = particles()[id - 1];
-        if ( id < 0 && -id <= int(vertices().size()) )
-            att->m_vertex = vertices()[-id - 1];
-    }
-
-    /// @brief Remove attribute
-    void remove_attribute(const std::string &name,  const int& id = 0);
-
-    /// @brief Get attribute of type T
-    template<class T>
-    std::shared_ptr<T> attribute(const std::string &name,  const int& id = 0) const;
-
-    /// @brief Get attribute of any type as string
-    std::string attribute_as_string(const std::string &name,  const int& id = 0) const;
-
-    /// @brief Get list of attribute names
-    std::vector<std::string> attribute_names( const int& id = 0) const;
-
-    /// @brief Get a copy of the list of attributes
-    /// @note To avoid thread issues, this is returns a copy. Better solution may be needed.
-    std::map< std::string, std::map<int, std::shared_ptr<Attribute> > > attributes() const {
-        std::lock_guard<std::recursive_mutex> lock(m_lock_attributes);
-        return m_attributes;
-    }
-
-    //@}
-
-
-    /// @name Particle and vertex modification
-    //@{
-
-    /// @brief Add particle
-    void add_particle( GenParticlePtr p );
-
-    /// @brief Add vertex
-    void add_vertex( GenVertexPtr v );
-
-    /// @brief Remove particle from the event
-    ///
-    /// This function  will remove whole sub-tree starting from this particle
-    /// if it is the only incoming particle of this vertex.
-    /// It will also production vertex of this particle if this vertex
-    /// has no more outgoing particles
-    void remove_particle( GenParticlePtr v );
-
-    /// @brief Remove a set of particles
-    ///
-    /// This function follows rules of GenEvent::remove_particle to remove
-    /// a list of particles from the event.
-    void remove_particles( std::vector<GenParticlePtr> v );
-
-    /// @brief Remove vertex from the event
-    ///
-    /// This will remove all sub-trees of all outgoing particles of this vertex
-    void remove_vertex( GenVertexPtr v );
-
-    /// @brief Add whole tree in topological order
-    ///
-    /// This function will find the beam particles (particles
-    /// that have no production vertices or their production vertices
-    /// have no particles) and will add the whole decay tree starting from
-    /// these particles.
-    ///
-    /// @note Any particles on this list that do not belong to the tree
-    ///       will be ignored.
-    void add_tree( const std::vector<GenParticlePtr> &particles );
-
-    /// @brief Reserve memory for particles and vertices
-    ///
-    /// Helps optimize event creation when size of the event is known beforehand
-    void reserve(const size_t& particles, const size_t& vertices = 0);
-
-    /// @brief Remove contents of this event
-    void clear();
-
-    //@}
-
-    /// @name Deprecated functionality
-    //@{
-
-    /// @brief Add particle by raw pointer
-    /// @deprecated Use GenEvent::add_particle( const GenParticlePtr& ) instead
-    void add_particle( GenParticle *p );
-
-    /// @brief Add vertex by raw pointer
-    /// @deprecated Use GenEvent::add_vertex( const GenVertexPtr& ) instead
-    void add_vertex  ( GenVertex *v );
-
-
-    /// @brief Set incoming beam particles
-    /// @deprecated Backward compatibility
-    void set_beam_particles(GenParticlePtr p1, GenParticlePtr p2);
-
-
-    /// @brief Add  particle to root vertex
-
-    void add_beam_particle(GenParticlePtr p1);
-
-
-    //@}
-
-#endif // __CINT__
-
-
-    /// @name Methods to fill GenEventData and to read it back
-    //@{
-
-    /// @brief Fill GenEventData object
-    void write_data(GenEventData &data) const;
-
-    /// @brief Fill GenEvent based on GenEventData
-    void read_data(const GenEventData &data);
-
-#ifdef HEPMC3_ROOTIO
-    /// @brief ROOT I/O streamer
-    void Streamer(TBuffer &b);
-    //@}
-#endif
-
-private:
-
-    /// @name Fields
-    //@{
-
-#if !defined(__CINT__)
-
-    /// List of particles
-    std::vector<GenParticlePtr> m_particles;
-    /// List of vertices
-    std::vector<GenVertexPtr> m_vertices;
-
-    /// Event number
-    int m_event_number;
-
-    /// Event weights
-    std::vector<double> m_weights;
-
-    /// Momentum unit
-    Units::MomentumUnit m_momentum_unit;
-    /// Length unit
-    Units::LengthUnit m_length_unit;
-
-    /// The root vertex is stored outside the normal vertices list to block user access to it
-    GenVertexPtr m_rootvertex;
-
-    /// Global run information.
-    std::shared_ptr<GenRunInfo> m_run_info;
-
-    /// @brief Map of event, particle and vertex attributes
-    ///
-    /// Keys are name and ID (0 = event, <0 = vertex, >0 = particle)
-    mutable std::map< std::string, std::map<int, std::shared_ptr<Attribute> > > m_attributes;
-
-    /// @brief Attribute map key type
-    typedef std::map< std::string, std::map<int, std::shared_ptr<Attribute> > >::value_type att_key_t;
-
-    /// @brief Attribute map value type
-    typedef std::map<int, std::shared_ptr<Attribute> >::value_type att_val_t;
-
-    /// @brief Mutex lock for the m_attibutes map.
-    mutable std::recursive_mutex m_lock_attributes;
-#endif // __CINT__
-
-    //@}
-
-};
-
-#if !defined(__CINT__)
-//
-// Template methods
-//
-template<class T>
-std::shared_ptr<T> GenEvent::attribute(const std::string &name,  const int& id) const {
-    std::lock_guard<std::recursive_mutex> lock(m_lock_attributes);
-    std::map< std::string, std::map<int, std::shared_ptr<Attribute> > >::iterator i1 =
-        m_attributes.find(name);
-    if( i1 == m_attributes.end() ) {
-        if ( id == 0 && run_info() ) {
-            return run_info()->attribute<T>(name);
-        }
-        return std::shared_ptr<T>();
-    }
-
-    std::map<int, std::shared_ptr<Attribute> >::iterator i2 = i1->second.find(id);
-    if (i2 == i1->second.end() ) return std::shared_ptr<T>();
-
-    if (!i2->second->is_parsed() ) {
-
-        std::shared_ptr<T> att = std::make_shared<T>();
-        att->m_event = this;
-
-        if ( id > 0 && id <= int(particles().size()) )
-            att->m_particle = m_particles[id - 1];
-        if ( id < 0 && -id <= int(vertices().size()) )
-            att->m_vertex = m_vertices[-id - 1];
-        if ( att->from_string(i2->second->unparsed_string()) &&
-                att->init() ) {
-            // update map with new pointer
-            i2->second = att;
-            return att;
-        } else {
-            return std::shared_ptr<T>();
-        }
-    }
-    else return std::dynamic_pointer_cast<T>(i2->second);
-}
-#endif // __CINT__
-
-} // namespace HepMC3
-#endif
Index: external/HepMC3/GenHeavyIon.cc
===================================================================
--- external/HepMC3/GenHeavyIon.cc	(revision 302624fca6ca1247dbb8697c4f2e8ecc730d20b1)
+++ 	(revision )
@@ -1,157 +1,0 @@
-// -*- C++ -*-
-//
-// This file is part of HepMC
-// Copyright (C) 2014-2019 The HepMC collaboration (see AUTHORS for details)
-//
-/**
- *  @file GenHeavyIon.cc
- *  @brief Implementation of \b class GenHeavyIon
- *
- */
-#include "HepMC3/GenHeavyIon.h"
-#include <cstring> // memcmp
-#include <cstdlib> // atoi
-#include <cstdio> // sprintf
-#include <sstream> // sprintf
-
-namespace HepMC3 {
-
-bool GenHeavyIon::from_string(const std::string &att) {
-
-#ifdef HEPMC3_NO_DEPRECATED
-    double spectator_neutrons, spectator_protons, eccentricity;
-#endif
-
-    std::istringstream is(att);
-    std::string version;
-
-    if ( att[0]  != 'v' ) {
-        is >> Ncoll_hard >> Npart_proj >> Npart_targ >> Ncoll
-           >> spectator_neutrons >> spectator_protons
-           >> N_Nwounded_collisions >> Nwounded_N_collisions
-           >> Nwounded_Nwounded_collisions >> impact_parameter
-           >> event_plane_angle >> eccentricity >> sigma_inel_NN
-           >> centrality;
-        return !is.fail();
-    } else
-        is >> version;
-
-
-
-    is >> Ncoll_hard >> Npart_proj >> Npart_targ >> Ncoll;
-    if ( version == "v0" ) is >> spectator_neutrons >> spectator_protons;
-    is >> N_Nwounded_collisions >> Nwounded_N_collisions
-       >> Nwounded_Nwounded_collisions >> impact_parameter
-       >> event_plane_angle;
-    if ( version == "v0" ) is >> eccentricity;
-    is >> sigma_inel_NN >> centrality;
-    if ( version != "v0" ) is >> user_cent_estimate;
-    is >> Nspec_proj_n >> Nspec_targ_n >> Nspec_proj_p >> Nspec_targ_p;
-
-    int N, ord;
-    is >> N;
-    for ( int i = 0; i < N; ++i ) {
-        is >> ord;
-        is >> participant_plane_angles[ord];
-    }
-    is >> N;
-    for ( int i = 0; i < N; ++i ) {
-        is >> ord;
-        is >> eccentricities[ord];
-    }
-
-    return !is.fail();
-}
-
-bool GenHeavyIon::to_string(std::string &att) const {
-    std::ostringstream os;
-
-#ifndef HEPMC3_NO_DEPRECATED
-    if ( !forceoldformat ) os << "v0 ";
-#else
-    os << "v1 ";
-#endif
-
-    os << std::setprecision(8)
-       << Ncoll_hard << " " << Npart_proj << " "
-       << Npart_targ << " " << Ncoll << " "
-#ifndef HEPMC3_NO_DEPRECATED
-       << spectator_neutrons << " " << spectator_protons << " "
-#endif
-       << N_Nwounded_collisions << " " << Nwounded_N_collisions << " "
-       << Nwounded_Nwounded_collisions << " " << impact_parameter << " "
-       << event_plane_angle << " "
-#ifndef HEPMC3_NO_DEPRECATED
-       << eccentricity << " "
-#endif
-       << sigma_inel_NN << " " << centrality << " " << user_cent_estimate << " "
-       << Nspec_proj_n << " " << Nspec_targ_n << " "
-       << Nspec_proj_p << " " << Nspec_targ_p << " ";
-
-    os << participant_plane_angles.size();
-    for ( std::map<int,double>::const_iterator it = participant_plane_angles.begin();
-            it != participant_plane_angles.end(); ++it )
-        os << " " << it->first << " " << it->second;
-
-    os << " " << eccentricities.size();
-    for ( std::map<int,double>::const_iterator it = eccentricities.begin();
-            it != eccentricities.end(); ++it )
-        os << " " << it->first << " " << it->second;
-
-    att = os.str();
-
-    return true;
-}
-
-
-#ifndef HEPMC3_NO_DEPRECATED
-
-bool GenHeavyIon::operator==( const GenHeavyIon& a ) const {
-    return ( memcmp( (void*) this, (void*) &a, sizeof(class GenHeavyIon) ) == 0 );
-}
-
-bool GenHeavyIon::operator!=( const GenHeavyIon& a ) const {
-    return !( a == *this );
-}
-
-void GenHeavyIon::set( const int&nh, const int&np, const int&nt, const int&nc, const int&ns, const int&nsp,
-                       const int&nnw, const int&nwn, const int&nwnw,
-                       const double& im, const double& pl, const double& ec, const double& s, const double& cent, const double& usrcent ) {
-    Ncoll_hard                   = nh;
-    Npart_proj                   = np;
-    Npart_targ                   = nt;
-    Ncoll                        = nc;
-    spectator_neutrons           = ns;
-    spectator_protons            = nsp;
-    N_Nwounded_collisions        = nnw;
-    Nwounded_N_collisions        = nwn;
-    Nwounded_Nwounded_collisions = nwnw;
-    impact_parameter             = im;
-    event_plane_angle            = pl;
-    eccentricity                 = ec;
-    sigma_inel_NN                = s;
-    centrality                   = cent;
-    user_cent_estimate           = usrcent;
-}
-
-bool GenHeavyIon::is_valid() const {
-    if( Ncoll_hard                   != 0 ) return true;
-    if( Npart_proj                   != 0 ) return true;
-    if( Npart_targ                   != 0 ) return true;
-    if( Ncoll                        != 0 ) return true;
-    if( spectator_neutrons           != 0 ) return true;
-    if( spectator_protons            != 0 ) return true;
-    if( N_Nwounded_collisions        != 0 ) return true;
-    if( Nwounded_N_collisions        != 0 ) return true;
-    if( Nwounded_Nwounded_collisions != 0 ) return true;
-    if( impact_parameter             != 0 ) return true;
-    if( event_plane_angle            != 0 ) return true;
-    if( eccentricity                 != 0 ) return true;
-    if( sigma_inel_NN                != 0 ) return true;
-    if( centrality                   != 0 ) return true;
-    return false;
-}
-
-#endif
-
-} // namespace HepMC3
Index: external/HepMC3/GenHeavyIon.h
===================================================================
--- external/HepMC3/GenHeavyIon.h	(revision 302624fca6ca1247dbb8697c4f2e8ecc730d20b1)
+++ 	(revision )
@@ -1,254 +1,0 @@
-// -*- C++ -*-
-//
-// This file is part of HepMC
-// Copyright (C) 2014-2020 The HepMC collaboration (see AUTHORS for details)
-//
-#ifndef HEPMC3_HEAVYION_H
-#define HEPMC3_HEAVYION_H
-/**
- *  @file GenHeavyIon.h
- *  @brief Definition of attribute \b class GenHeavyIon
- *
- *  @class HepMC3::GenHeavyIon
- *  @brief Stores additional information about Heavy Ion generator
- *
- *  This is an example of event attribute used to store Heavy Ion information
- *
- *  @ingroup attributes
- *
- */
-#include <iostream>
-#include <map>
-#include "HepMC3/Attribute.h"
-
-namespace HepMC3 {
-/** Deprecated */
-using namespace std;
-
-class GenHeavyIon : public Attribute {
-
-public:
-
-    /// Empty default constructor.
-    GenHeavyIon()
-        : Ncoll_hard(-1), Npart_proj(-1), Npart_targ(-1), Ncoll(-1),
-#ifndef HEPMC3_NO_DEPRECATED
-          spectator_neutrons(-1), spectator_protons(-1),
-#endif
-          N_Nwounded_collisions(-1), Nwounded_N_collisions(-1),
-          Nwounded_Nwounded_collisions(-1), impact_parameter(-1.0),
-          event_plane_angle(-1.0),
-#ifndef HEPMC3_NO_DEPRECATED
-          eccentricity(-1.0),
-#endif
-          sigma_inel_NN(-1.0), centrality(-1.0), user_cent_estimate(-1.0),
-          Nspec_proj_n(-1), Nspec_targ_n(-1),
-          Nspec_proj_p(-1), Nspec_targ_p(-1), forceoldformat(false) {}
-
-//
-// Fields
-//
-public:
-
-    ///
-    /// @brief the number of hard nucleon-nucleon collisions.
-    ///
-    /// Model-dependent. Usually the number of nucleon-nucleon
-    /// collisions containing a special signal process. A negative
-    /// value means that the information is not available.
-    int    Ncoll_hard;
-
-    /// @brief the number of participating nucleons in the projectile.
-    ///
-    /// The number of nucleons in the projectile participating in an
-    /// inelastic collision (see Ncoll). A negative value means that
-    /// the information is not available.
-    int    Npart_proj;
-
-    /// @brief the number of participating nucleons in the target.
-    ///
-    /// The number of nucleons in the target participating in an
-    /// inelastic collision (see Ncoll). A negative value means that
-    /// the information is not available.
-    int    Npart_targ;
-
-    /// @brief the number of inelastic nucleon-nucleon collisions.
-    ///
-    /// Note that a one participating nucleon can be involved in many
-    /// inelastic collisions, and that inelastic also includes
-    /// diffractive excitation. A negative value means that the
-    /// information is not available.
-    ///
-    int    Ncoll;
-
-#ifndef HEPMC3_NO_DEPRECATED
-    /// @brief Total number of spectator neutrons.
-    ///
-    /// HEPMC3_DEPRECATED("Use Nspec_proj_n and Nspec_targ_n instead.")
-    int    spectator_neutrons;
-
-    /// @brief Total number of spectator protons.
-    ///
-    /// HEPMC3_DEPRECATED("Use Nspec_proj_p and Nspec_targ_p instead.")
-    int    spectator_protons;
-#endif
-
-    /// @brief Collisions with a diffractively excited target nucleon.
-    ///
-    /// The number of single diffractive nucleon-nucleon collisions
-    /// where the target nucleon is excited. A negative value means
-    /// that the information is not available.
-    int    N_Nwounded_collisions;
-
-    /// @brief Collisions with a diffractively excited projectile nucleon.
-    ///
-    /// The number of single diffractive nucleon-nucleon collisions
-    /// where the projectile nucleon is excited. A negative value
-    /// means that the information is not available.
-    int    Nwounded_N_collisions;
-
-    /// @brief Non-diffractive or doubly diffractive collisions.
-    ///
-    /// The number of nucleon-nucleon collisions where both projectile
-    /// and target nucleons are wounded. A negative value means that
-    /// the information is not available.
-    int    Nwounded_Nwounded_collisions;
-
-    /// @brief The impact parameter.
-    ///
-    /// The impact parameter given in units of femtometer. A negative
-    /// value means that the information is not available.
-    double impact_parameter;
-
-    /// @brief The event plane angle.
-    ///
-    /// The angle wrt. the x-axix of the impact parameter vector
-    /// (pointing frm the target to the projectile). A positive number
-    /// between 0 and two pi. A negative value means that the
-    /// information is not available.
-    double event_plane_angle;
-
-#ifndef HEPMC3_NO_DEPRECATED
-    /// @brief The eccentricity.
-    ///
-    /// HEPMC3_DEPRECATED("Use eccentricities insted.")
-    double eccentricity;
-#endif
-
-    /// @brief The assumed inelastic nucleon-nucleon cross section
-    ///
-    /// in units of millibarn. As used in a Glauber calculation to
-    /// simulate the distribution in Ncoll. A negative value means
-    /// that the information is not available.
-    double sigma_inel_NN;
-
-    /// @brief The centrality.
-    ///
-    /// The generated centrality in percentiles, where 0 is the
-    /// maximally central and 100 is the minimally central. A negative
-    /// value means that the information is not available.
-    double centrality;
-
-    /// @brief A user defined centrality estimator.
-    ///
-    /// This variable may contain anything a generator feels is
-    /// reasonable for estimating centrality. The value should be
-    /// non-negative, and a low value corresponds to a low
-    /// centrality. A negative value indicatess that the information
-    /// is not available.
-    double user_cent_estimate;
-
-
-    /// @brief The number of spectator neutrons in the projectile
-    ///
-    /// ie. those that thave not participated in any inelastic
-    /// nucleon-nucleon collision. A negative value indicatess that
-    /// the information is not available.
-    int Nspec_proj_n;
-
-    /// @brief The number of spectator neutrons in the target
-    ///
-    /// ie. those that thave not participated in any inelastic
-    /// nucleon-nucleon collision. A negative value indicatess that
-    /// the information is not available.
-    int Nspec_targ_n;
-
-    /// @brief The number of spectator protons in the projectile
-    ///
-    /// ie. those that thave not participated in any inelastic
-    /// nucleon-nucleon collision. A negative value indicatess that
-    /// the information is not available.
-    int Nspec_proj_p;
-
-    /// @brief The number of spectator protons in the target
-    ///
-    /// ie. those that thave not participated in any inelastic
-    /// nucleon-nucleon collision. A negative value indicatess that
-    /// the information is not available.
-    int Nspec_targ_p;
-
-    /// @brief Participant plane angles
-    ///
-    /// calculated to different orders. The key of the map specifies
-    /// the order, and the value gives to the angle wrt. the
-    /// event plane.
-    std::map<int,double> participant_plane_angles;
-
-    /// @brief Eccentricities
-    ///
-    /// Calculated to different orders. The key of the map specifies
-    /// the order, and the value gives the corresponding eccentricity.
-    std::map<int,double> eccentricities;
-
-//
-// Functions
-//
-public:
-
-    /// @brief Implementation of Attribute::from_string.
-    bool from_string(const std::string &att) override;
-
-    /// @brief Implementation of Attribute::to_string.
-    bool to_string(std::string &att) const  override;
-
-#ifndef HEPMC3_NO_DEPRECATED
-
-    /// @brief Operator ==
-    ///
-    bool operator==( const GenHeavyIon& ) const;
-    /// @brief Operator !=
-    ///
-    bool operator!=( const GenHeavyIon& ) const;
-
-    /// @brief Set all fields.
-    ///
-    /// HEPMC3_DEPRECATED("Set individual fields directly instead.")
-    /** @brief Set all fields */
-    void set( const int&nh, const int&np, const int&nt, const int&nc, const int&ns, const int&nsp,
-              const int&nnw=0, const int&nwn=0, const int&nwnw=0,
-              const double& im=0., const double& pl=0., const double& ec=0., const double& s=0., const double& cent=0., const double& ucent=0. );
-
-    /// @brief Verify that the instance contains non-zero information.
-    ///
-    /// HEPMC3_DEPRECATED("Each filed now have default values meaning
-    /// that they have not been set")
-    bool is_valid() const;
-
-    /// @brief force writing in old format for compatibility purposes.
-    ///
-    /// HEPMC3_DEPRECATED("This should really not be needed");
-    bool forceoldformat;
-
-#endif
-
-};
-
-
-#ifndef HEPMC3_NO_DEPRECATED
-typedef GenHeavyIon HeavyIon; ///< Backward compatibility typedef
-#endif
-
-
-} // namespace HepMC3
-
-#endif
Index: external/HepMC3/GenHeavyIon_fwd.h
===================================================================
--- external/HepMC3/GenHeavyIon_fwd.h	(revision 302624fca6ca1247dbb8697c4f2e8ecc730d20b1)
+++ 	(revision )
@@ -1,25 +1,0 @@
-// -*- C++ -*-
-//
-// This file is part of HepMC
-// Copyright (C) 2014-2020 The HepMC collaboration (see AUTHORS for details)
-//
-///
-/// @file GenHeavyIon_fwd.h
-/// @brief Minimal forward declarations for GenHeavyIon
-///
-
-#ifndef HEPMC3_GENHEAVYION_FWD_H
-#define HEPMC3_GENHEAVYION_FWD_H
-
-#include <memory>
-
-namespace HepMC3 {
-
-class GenHeavyIon;
-
-using GenHeavyIonPtr = std::shared_ptr<GenHeavyIon>;
-using ConstGenHeavyIonPtr = std::shared_ptr<const GenHeavyIon>;
-
-}
-
-#endif
Index: external/HepMC3/GenParticle.cc
===================================================================
--- external/HepMC3/GenParticle.cc	(revision 302624fca6ca1247dbb8697c4f2e8ecc730d20b1)
+++ 	(revision )
@@ -1,114 +1,0 @@
-// -*- C++ -*-
-//
-// This file is part of HepMC
-// Copyright (C) 2014-2019 The HepMC collaboration (see AUTHORS for details)
-//
-/**
- *  @file GenParticle.cc
- *  @brief Implementation of \b class GenParticle
- *
- */
-#include "HepMC3/GenParticle.h"
-#include "HepMC3/GenVertex.h"
-#include "HepMC3/GenEvent.h"
-#include "HepMC3/Setup.h"
-#include "HepMC3/Attribute.h"
-
-namespace HepMC3 {
-
-GenParticle::GenParticle( const FourVector &mom, int pidin, int stat):
-    m_event(nullptr),
-    m_id(0) {
-    m_data.pid               = pidin;
-    m_data.momentum          = mom;
-    m_data.status            = stat;
-    m_data.is_mass_set       = false;
-    m_data.mass              = 0.0;
-}
-
-GenParticle::GenParticle( const GenParticleData &dat ):
-    m_event(nullptr),
-    m_id(0),
-    m_data(dat) {
-}
-
-double GenParticle::generated_mass() const {
-    if(m_data.is_mass_set) return m_data.mass;
-    else                   return m_data.momentum.m();
-}
-
-void GenParticle::set_pid(int pidin) {
-    m_data.pid = pidin;
-}
-
-void GenParticle::set_status(int stat) {
-    m_data.status = stat;
-}
-
-void GenParticle::set_momentum(const FourVector& mom) {
-    m_data.momentum = mom;
-}
-
-void GenParticle::set_generated_mass(double m) {
-    m_data.mass        = m;
-    m_data.is_mass_set = true;
-}
-
-void GenParticle::unset_generated_mass() {
-    m_data.mass        = 0.;
-    m_data.is_mass_set = false;
-}
-
-GenVertexPtr GenParticle::production_vertex() {
-    return m_production_vertex.lock();
-}
-
-ConstGenVertexPtr GenParticle::production_vertex() const {
-    return std::const_pointer_cast<const GenVertex>(m_production_vertex.lock());
-}
-
-GenVertexPtr GenParticle::end_vertex() {
-    return m_end_vertex.lock();
-}
-
-ConstGenVertexPtr GenParticle::end_vertex() const {
-    return std::const_pointer_cast<const GenVertex>(m_end_vertex.lock());
-}
-
-std::vector<GenParticlePtr> GenParticle::parents() {
-    return (m_production_vertex.expired())? std::vector<GenParticlePtr>() : production_vertex()->particles_in();
-}
-
-std::vector<ConstGenParticlePtr> GenParticle::parents() const {
-    return (m_production_vertex.expired()) ? std::vector<ConstGenParticlePtr>() : production_vertex()->particles_in();
-}
-
-std::vector<GenParticlePtr> GenParticle::children() {
-    return (m_end_vertex.expired())? std::vector<GenParticlePtr>() : end_vertex()->particles_out();
-}
-
-std::vector<ConstGenParticlePtr> GenParticle::children() const {
-    return (m_end_vertex.expired()) ? std::vector<ConstGenParticlePtr>() : end_vertex()->particles_out();
-}
-
-bool GenParticle::add_attribute(const std::string& name, std::shared_ptr<Attribute> att) {
-    if ( !parent_event() ) return false;
-    parent_event()->add_attribute(name, att, id());
-    return true;
-}
-
-std::vector<std::string> GenParticle::attribute_names() const {
-    if ( parent_event() ) return parent_event()->attribute_names(id());
-
-    return std::vector<std::string>();
-}
-
-void GenParticle::remove_attribute(const std::string& name) {
-    if ( parent_event() ) parent_event()->remove_attribute(name, id());
-}
-
-std::string GenParticle::attribute_as_string(const std::string& name) const {
-    return parent_event() ? parent_event()->attribute_as_string(name, id()) : std::string();
-}
-
-} // namespace HepMC3
Index: external/HepMC3/GenParticle.h
===================================================================
--- external/HepMC3/GenParticle.h	(revision 302624fca6ca1247dbb8697c4f2e8ecc730d20b1)
+++ 	(revision )
@@ -1,163 +1,0 @@
-// -*- C++ -*-
-//
-// This file is part of HepMC
-// Copyright (C) 2014-2020 The HepMC collaboration (see AUTHORS for details)
-//
-#ifndef HEPMC3_GENPARTICLE_H
-#define HEPMC3_GENPARTICLE_H
-/**
- *  @file GenParticle.h
- *  @brief Definition of \b class GenParticle
- *
- *  @class HepMC3::GenParticle
- *  @brief Stores particle-related information
- *
- */
-#include <string>
-#include "HepMC3/Data/GenParticleData.h"
-#include "HepMC3/FourVector.h"
-
-#include "HepMC3/GenParticle_fwd.h"
-#include "HepMC3/GenVertex_fwd.h"
-
-namespace HepMC3 {
-
-/** Deprecated */
-using namespace std;
-
-class GenEvent;
-class Attribute;
-
-class GenParticle : public std::enable_shared_from_this<GenParticle> {
-
-    friend class GenVertex;
-    friend class GenEvent;
-
-//
-// Constructors
-//
-public:
-    /** @brief Default constructor */
-    GenParticle( const FourVector &momentum = FourVector::ZERO_VECTOR(), int pid = 0, int status = 0 );
-
-    /** @brief Constructor based on particle data */
-    GenParticle( const GenParticleData &data );
-
-//
-// Functions
-//
-public:
-    /** @brief Check if this particle belongs to an event */
-    bool in_event() const { return (bool)(m_event); }
-
-//
-// Accessors
-//
-public:
-
-    GenEvent*              parent_event() { return m_event; } //!< Get parent event
-    const GenEvent*              parent_event() const { return m_event; } //!< Get parent event
-    int                    id()           const { return m_id;    } //!< Get particle id
-    const GenParticleData& data()         const { return m_data;  } //!< Get particle data
-
-
-    ConstGenVertexPtr production_vertex() const;        //!< Get production vertex (const version)
-    ConstGenVertexPtr end_vertex() const;               //!< Get end vertex (const version)
-
-    GenVertexPtr production_vertex();        //!< Get production vertex
-    GenVertexPtr end_vertex();               //!< Get end vertex
-
-    /// @brief Convenience access to immediate incoming particles via production vertex
-    /// @note Less efficient than via the vertex since return must be by value (in case there is no vertex)
-    std::vector<GenParticlePtr> parents();
-
-    /// @brief Convenience access to immediate incoming particles via production vertex (const version)
-    /// @note Less efficient than via the vertex since return must be by value (in case there is no vertex)
-    std::vector<ConstGenParticlePtr> parents() const;
-
-    /// @brief Convenience access to immediate outgoing particles via end vertex
-    /// @note Less efficient than via the vertex since return must be by value (in case there is no vertex)
-    std::vector<GenParticlePtr> children();
-
-    /// @brief Convenience access to immediate outgoing particles via end vertex
-    /// @note Less efficient than via the vertex since return must be by value (in case there is no vertex)
-    std::vector<ConstGenParticlePtr> children() const;
-
-    int   pid()                   const { return m_data.pid;            } //!< Get PDG ID
-    int   abs_pid()               const { return abs(pid());            } //!< Get absolute value of PDG ID
-    int   status()                const { return m_data.status;         } //!< Get status code
-    const FourVector& momentum()  const { return m_data.momentum;       } //!< Get momentum
-    bool  is_generated_mass_set() const { return m_data.is_mass_set;    } //!< Check if generated mass is set
-
-    /// @brief Get generated mass
-    ///
-    /// This function will return mass as set by a generator/tool.
-    /// If not set, it will return momentum().m()
-    double generated_mass() const;
-
-
-    void set_pid(int pid);                         //!< Set PDG ID
-    void set_status(int status);                   //!< Set status code
-    void set_momentum(const FourVector& momentum); //!< Set momentum
-    void set_generated_mass(double m);             //!< Set generated mass
-    void unset_generated_mass();                   //!< Declare that generated mass is not set
-
-    /** @brief Add an attribute to this particle
-     *
-     *  This will overwrite existing attribute if an attribute with
-     *  the same name is present. The attribute will be stored in the
-     *  parent_event(). @return false if there is no parent_event();
-     */
-    bool add_attribute(const std::string& name, std::shared_ptr<Attribute> att);
-
-    /// @brief Get list of names of attributes assigned to this particle
-    std::vector<std::string> attribute_names() const;
-
-    /// @brief Remove attribute
-    void remove_attribute(const std::string& name);
-
-    /// @brief Get attribute of type T
-    template<class T>
-    std::shared_ptr<T> attribute(const std::string& name) const;
-
-    /// @brief Get attribute of any type as string
-    std::string attribute_as_string(const std::string& name) const;
-
-
-    /// @name Deprecated functionality
-    //@{
-
-    /// @brief Get PDG ID
-    /// @deprecated Use pid() instead
-    int pdg_id() const { return pid(); }
-
-    /// @brief Set PDG ID
-    /// @deprecated Use set_pid() instead
-    void set_pdg_id(const int& pidin) { set_pid(pidin); }
-
-
-    //@}
-//
-// Fields
-//
-private:
-    GenEvent        *m_event; //!< Parent event
-    int              m_id;    //!< Index
-    GenParticleData  m_data;  //!< Particle data
-
-    std::weak_ptr<GenVertex>    m_production_vertex; //!< Production vertex
-    std::weak_ptr<GenVertex>    m_end_vertex;        //!< End vertex
-//    weak_ptr<GenParticle>  m_this;              //!< Pointer to shared pointer managing this particle
-};
-
-} // namespace HepMC3
-
-#include "HepMC3/GenEvent.h"
-namespace HepMC3 {
-/// @brief Get attribute of type T
-template<class T> std::shared_ptr<T> GenParticle::attribute(const std::string& name) const {
-    return parent_event()?
-           parent_event()->attribute<T>(name, id()): std::shared_ptr<T>();
-}
-}
-#endif
Index: external/HepMC3/GenParticle_fwd.h
===================================================================
--- external/HepMC3/GenParticle_fwd.h	(revision 302624fca6ca1247dbb8697c4f2e8ecc730d20b1)
+++ 	(revision )
@@ -1,35 +1,0 @@
-// -*- C++ -*-
-//
-// This file is part of HepMC
-// Copyright (C) 2014-2020 The HepMC collaboration (see AUTHORS for details)
-//
-///
-/// @file GenParticle_fwd.h
-/// @brief Minimal forward declarations for GenParticle
-///
-
-#ifndef HEPMC3_GENPARTICLE_FWD_H
-#define HEPMC3_GENPARTICLE_FWD_H
-
-#include <memory>
-#include <vector>
-
-namespace HepMC3 {
-
-class GenParticle;
-
-using GenParticlePtr = std::shared_ptr<GenParticle>;
-using ConstGenParticlePtr = std::shared_ptr<const GenParticle>;
-
-using GenParticles = std::vector<GenParticlePtr>;
-using ConstGenParticles = std::vector<ConstGenParticlePtr>;
-
-/// An alias to a vector of GenParticle pointers whose constness depends on the
-/// constness of the template shared_ptr param
-/// This is convenient for declaring the return types based on the input type
-template<typename T>
-using GenParticles_type = typename std::conditional<std::is_const<typename T::element_type>::value, ConstGenParticles, GenParticles>::type;
-
-}
-
-#endif
Index: external/HepMC3/GenPdfInfo.cc
===================================================================
--- external/HepMC3/GenPdfInfo.cc	(revision 302624fca6ca1247dbb8697c4f2e8ecc730d20b1)
+++ 	(revision )
@@ -1,106 +1,0 @@
-// -*- C++ -*-
-//
-// This file is part of HepMC
-// Copyright (C) 2014-2019 The HepMC collaboration (see AUTHORS for details)
-//
-/**
- *  @file GenPdfInfo.cc
- *  @brief Implementation of \b class GenPdfInfo
- *
- */
-#include "HepMC3/GenPdfInfo.h"
-#include <cstring> // memcmp
-#include <cstdlib> // atoi
-#include <cstdio> // sprintf
-
-namespace HepMC3 {
-
-bool GenPdfInfo::from_string(const std::string &att) {
-    const char *cursor = att.data();
-
-    parton_id[0] = atoi(cursor);
-
-    if( !(cursor = strchr(cursor+1,' ')) ) return false;
-    parton_id[1] = atoi(cursor);
-
-    if( !(cursor = strchr(cursor+1,' ')) ) return false;
-    x[0] = atof(cursor);
-
-    if( !(cursor = strchr(cursor+1,' ')) ) return false;
-    x[1] = atof(cursor);
-
-    if( !(cursor = strchr(cursor+1,' ')) ) return false;
-    scale = atof(cursor);
-
-    if( !(cursor = strchr(cursor+1,' ')) ) return false;
-    xf[0] = atof(cursor);
-
-    if( !(cursor = strchr(cursor+1,' ')) ) return false;
-    xf[1] = atof(cursor);
-
-    if( !(cursor = strchr(cursor+1,' ')) ) return false;
-    pdf_id[0] = atoi(cursor);
-
-    if( !(cursor = strchr(cursor+1,' ')) ) return false;
-    pdf_id[1] = atoi(cursor);
-
-    return true;
-}
-
-bool GenPdfInfo::to_string(std::string &att) const {
-    char buf[255];//Note: the format is fixed, so no reason for complicatied tratment
-
-    snprintf(buf,255,"%i %i %.8e %.8e %.8e %.8e %.8e %i %i",
-             parton_id[0],
-             parton_id[1],
-             x[0],
-             x[1],
-             scale,
-             xf[0],
-             xf[1],
-             pdf_id[0],
-             pdf_id[1]);
-
-    att = buf;
-
-    return true;
-}
-
-void GenPdfInfo::set(const int& parton_id1, const int& parton_id2, const double& x1, const double& x2,
-                     const double& scale_in, const double& xf1,const double& xf2,
-                     const int& pdf_id1, const int& pdf_id2) {
-    parton_id[0] = parton_id1;
-    parton_id[1] = parton_id2;
-    x[0]         = x1;
-    x[1]         = x2;
-    scale        = scale_in;
-    xf[0]        = xf1;
-    xf[1]        = xf2;
-    pdf_id[0]    = pdf_id1;
-    pdf_id[1]    = pdf_id2;
-}
-
-bool GenPdfInfo::operator==( const GenPdfInfo& a ) const {
-    return ( memcmp( (void*)this, (void*)&a, sizeof(class GenPdfInfo) ) == 0 );
-}
-
-bool GenPdfInfo::operator!=( const GenPdfInfo& a ) const {
-    return !( a == *this );
-}
-
-bool GenPdfInfo::is_valid() const
-{
-    if( parton_id[0] != 0 ) return true;
-    if( parton_id[1] != 0 ) return true;
-    if( x[0]         != 0 ) return true;
-    if( x[1]         != 0 ) return true;
-    if( scale        != 0 ) return true;
-    if( xf[0]        != 0 ) return true;
-    if( xf[1]        != 0 ) return true;
-    if( pdf_id[0]    != 0 ) return true;
-    if( pdf_id[1]    != 0 ) return true;
-
-    return false;
-}
-
-} // namespace HepMC3
Index: external/HepMC3/GenPdfInfo.h
===================================================================
--- external/HepMC3/GenPdfInfo.h	(revision 302624fca6ca1247dbb8697c4f2e8ecc730d20b1)
+++ 	(revision )
@@ -1,66 +1,0 @@
-// -*- C++ -*-
-//
-// This file is part of HepMC
-// Copyright (C) 2014-2020 The HepMC collaboration (see AUTHORS for details)
-//
-#ifndef HEPMC3_GENPDFINFO_H
-#define HEPMC3_GENPDFINFO_H
-/**
- *  @file GenPdfInfo.h
- *  @brief Definition of event attribute \b class GenPdfInfo
- *
- *  @class HepMC3::GenPdfInfo
- *  @brief Stores additional information about PDFs
- *
- *  This is an example of event attribute used to store PDF-related information
- *
- *  @note Input parton flavour codes id1 & id2 are expected to obey the
- *        PDG code conventions, especially g = 21.
- *
- *  @note The contents of pdf1 and pdf2 are expected to be x*f(x).
- *        The LHAPDF set ids are the entries in the first column of
- *        http:///projects.hepforge.org/lhapdf/PDFsets.index
- *
- *  @ingroup attributes
- *
- */
-#include <iostream>
-#include "HepMC3/Attribute.h"
-
-namespace HepMC3 {
-
-class GenPdfInfo : public Attribute {
-
-//
-// Fields
-//
-public:
-    int    parton_id[2]; ///< Parton PDG ID
-    int    pdf_id[2];    ///< LHAPDF ID code
-    double scale;        ///< Factorisation scale (in GEV)
-    double x[2];         ///< Parton momentum fraction
-    double xf[2];        ///< PDF value
-
-//
-// Functions
-//
-public:
-    /** @brief Implementation of Attribute::from_string */
-    bool from_string(const std::string &att)  override;
-
-    /** @brief Implementation of Attribute::to_string */
-    bool to_string(std::string &att) const  override;
-
-    /** @brief Set all fields */
-    void set( const int& parton_id1, const int& parton_id2, const double& x1, const double& x2,
-              const double& scale_in, const double& xf1, const double& xf2,
-              const int& pdf_id1 = 0, const int& pdf_id2 = 0 );
-
-    bool operator==( const GenPdfInfo& ) const; ///< Operator ==
-    bool operator!=( const GenPdfInfo& ) const; ///< Operator !=
-    bool is_valid()                      const; ///< Verify that the instance contains non-zero information
-};
-
-} // namespace HepMC3
-
-#endif
Index: external/HepMC3/GenPdfInfo_fwd.h
===================================================================
--- external/HepMC3/GenPdfInfo_fwd.h	(revision 302624fca6ca1247dbb8697c4f2e8ecc730d20b1)
+++ 	(revision )
@@ -1,25 +1,0 @@
-// -*- C++ -*-
-//
-// This file is part of HepMC
-// Copyright (C) 2014-2020 The HepMC collaboration (see AUTHORS for details)
-//
-///
-/// @file GenPdfInfo_fwd.h
-/// @brief Minimal forward declarations for GenPdfInfo
-///
-
-#ifndef HEPMC3_GENPDFINFO_FWD_H
-#define HEPMC3_GENPDFINFO_FWD_H
-
-#include <memory>
-
-namespace HepMC3 {
-
-class GenPdfInfo;
-
-using GenPdfInfoPtr = std::shared_ptr<GenPdfInfo>;
-using ConstGenPdfInfoPtr = std::shared_ptr<const GenPdfInfo>;
-
-}
-
-#endif
Index: external/HepMC3/GenRunInfo.cc
===================================================================
--- external/HepMC3/GenRunInfo.cc	(revision 302624fca6ca1247dbb8697c4f2e8ecc730d20b1)
+++ 	(revision )
@@ -1,133 +1,0 @@
-// -*- C++ -*-
-//
-// This file is part of HepMC
-// Copyright (C) 2014-2019 The HepMC collaboration (see AUTHORS for details)
-//
-/**
- *  @file GenRunInfo.cc
- *  @brief Implementation of \b class GenRunInfo
- *
- */
-#include "HepMC3/GenRunInfo.h"
-#include "HepMC3/Data/GenRunInfoData.h"
-#include <sstream>
-
-namespace HepMC3 {
-
-
-void GenRunInfo::set_weight_names(const std::vector<std::string> & names) {
-    m_weight_indices.clear();
-    m_weight_names = names;
-    for ( int i = 0, N = names.size(); i < N; ++i ) {
-        std::string name = names[i];
-        if ( name.empty() ) {
-            std::ostringstream oss;
-            oss << i;
-            name = oss.str();
-            m_weight_names[i] = name;
-        }
-        if ( has_weight(name) )
-            throw std::logic_error("GenRunInfo::set_weight_names: "
-                                   "Duplicate weight name '" + name +
-                                   "' found.");
-        m_weight_indices[name] = i;
-    }
-}
-
-std::string GenRunInfo::attribute_as_string(const std::string &name) const {
-    std::lock_guard<std::recursive_mutex> lock(m_lock_attributes);
-    std::map< std::string, std::shared_ptr<Attribute> >::iterator i = m_attributes.find(name);
-    if( i == m_attributes.end() ) return std::string();
-
-    if( !i->second ) return std::string();
-
-    std::string ret;
-    i->second->to_string(ret);
-
-    return ret;
-}
-
-void GenRunInfo::write_data(GenRunInfoData& data) const {
-
-    // Weight names
-    data.weight_names = this->weight_names();
-
-    // Attributes
-    typedef std::map<std::string, std::shared_ptr<Attribute> >::value_type att_val_t;
-
-    for(const att_val_t& vt: m_attributes ) {
-        std::string att;
-        vt.second->to_string(att);
-
-        data.attribute_name.  push_back(vt.first);
-        data.attribute_string.push_back(att);
-    }
-
-    // Tools
-    for( const ToolInfo &tool: this->tools() ) {
-        data.tool_name.       push_back(tool.name);
-        data.tool_version.    push_back(tool.version);
-        data.tool_description.push_back(tool.description);
-    }
-}
-
-
-std::vector<std::string> GenRunInfo::attribute_names( ) const {
-    std::vector<std::string> results;
-    for(auto vt1: m_attributes ) {
-        results.push_back( vt1.first );
-    }
-    return results;
-}
-
-void GenRunInfo::read_data(const GenRunInfoData& data) {
-
-    //this->clear();
-
-    // Weight names
-    set_weight_names(data.weight_names);
-
-    // Attributes
-    for(unsigned int i=0; i<data.attribute_name.size(); ++i) {
-        add_attribute( data.attribute_name[i],
-                       std::make_shared<StringAttribute>(data.attribute_string[i]) );
-    }
-
-    // Tools
-    for(unsigned int i=0; i<data.tool_name.size(); ++i) {
-        ToolInfo ti;
-        ti.name        = data.tool_name[i];
-        ti.version     = data.tool_version[i];
-        ti.description = data.tool_description[i];
-
-        this->tools().push_back(ti);
-    }
-}
-
-GenRunInfo::GenRunInfo(const GenRunInfo& r)
-{
-    if (this != &r)
-    {
-        std::lock(m_lock_attributes, r.m_lock_attributes);
-        std::lock_guard<std::recursive_mutex> lhs_lk(m_lock_attributes, std::adopt_lock);
-        std::lock_guard<std::recursive_mutex> rhs_lk(r.m_lock_attributes, std::adopt_lock);
-        GenRunInfoData tdata;
-        r.write_data(tdata);
-        read_data(tdata);
-    }
-}
-GenRunInfo& GenRunInfo::operator=(const GenRunInfo& r)
-{
-    if (this != &r)
-    {
-        std::lock(m_lock_attributes, r.m_lock_attributes);
-        std::lock_guard<std::recursive_mutex> lhs_lk(m_lock_attributes, std::adopt_lock);
-        std::lock_guard<std::recursive_mutex> rhs_lk(r.m_lock_attributes, std::adopt_lock);
-        GenRunInfoData tdata;
-        r.write_data(tdata);
-        read_data(tdata);
-    }
-    return *this;
-}
-
-} // namespace HepMC3
Index: external/HepMC3/GenRunInfo.h
===================================================================
--- external/HepMC3/GenRunInfo.h	(revision 302624fca6ca1247dbb8697c4f2e8ecc730d20b1)
+++ 	(revision )
@@ -1,202 +1,0 @@
-// -*- C++ -*-
-//
-// This file is part of HepMC
-// Copyright (C) 2014-2020 The HepMC collaboration (see AUTHORS for details)
-//
-///
-/// @file GenRunInfo.h
-/// @brief Definition of \b class GenRunInfo
-///
-#ifndef HEPMC3_GENRUNINFO_H
-#define HEPMC3_GENRUNINFO_H
-
-#if !defined(__CINT__)
-#include "HepMC3/Units.h"
-#include "HepMC3/Attribute.h"
-#include <mutex>
-#endif // __CINT__
-
-#ifdef HEPMC3_ROOTIO
-class TBuffer;
-#endif
-
-namespace HepMC3 {
-/** Deprecated */
-using namespace std;
-
-struct GenRunInfoData;
-
-/// @brief Stores run-related information
-///
-/// Manages run-related information.
-/// Contains run-wide attributes
-class GenRunInfo {
-
-public:
-
-    /// @brief Interrnal struct for keeping track of tools.
-    struct ToolInfo {
-
-        /// @brief The name of the tool.
-        std::string name;
-
-        /// @brief The version of the tool.
-        std::string version;
-
-        /// @brief Other information about how the tool was used in
-        /// the run.
-        std::string description;
-    };
-
-public:
-
-    /// @brief Default constructor
-    GenRunInfo() {}
-    /// @brief Copy constructor
-    GenRunInfo(const GenRunInfo& r);
-    /// @brief Assignmet
-    GenRunInfo& operator=(const GenRunInfo& r);
-
-#if !defined(__CINT__)
-
-    /// @brief The vector of tools used to produce this run.
-    const std::vector<ToolInfo> & tools() const {
-        return m_tools;
-    }
-    /// @brief The vector of tools used to produce this run.
-    std::vector<ToolInfo> & tools() {
-        return m_tools;
-    }
-
-    /// @brief Check if a weight name is present.
-    bool has_weight(const std::string& name) const {
-        return m_weight_indices.find(name) !=  m_weight_indices.end();
-    }
-
-    /// @brief Return the index corresponding to a weight name.
-    /// @return -1 if name was not found
-    int weight_index(const std::string& name) const {
-        std::map<std::string, int>::const_iterator it = m_weight_indices.find(name);
-        return it == m_weight_indices.end()? -1: it->second;
-    }
-
-    /// @brief Get the vector of weight names.
-    const std::vector<std::string> & weight_names() const {
-        return m_weight_names;
-    }
-
-    /// @brief Set the names of the weights in this run.
-    ///
-    /// For consistency, the length of the vector should be the same as
-    /// the number of weights in the events in the run.
-    void set_weight_names(const std::vector<std::string> & names);
-
-    /// @brief add an attribute
-    /// This will overwrite existing attribute if an attribute
-    /// with the same name is present
-    void add_attribute(const std::string &name,
-                       const std::shared_ptr<Attribute> &att) {
-        std::lock_guard<std::recursive_mutex> lock(m_lock_attributes);
-        if ( att ) m_attributes[name] = att;
-    }
-
-    /// @brief Remove attribute
-    void remove_attribute(const std::string &name) {
-        std::lock_guard<std::recursive_mutex> lock(m_lock_attributes);
-        m_attributes.erase(name);
-    }
-
-    /// @brief Get attribute of type T
-    template<class T>
-    std::shared_ptr<T> attribute(const std::string &name) const;
-
-    /// @brief Get attribute of any type as string
-    std::string attribute_as_string(const std::string &name) const;
-
-    /// @brief Get list of attribute names
-    std::vector<std::string> attribute_names() const;
-
-    /// @brief Get a copy of the list of attributes
-    /// @note To avoid thread issues, this is returns a copy. Better solution may be needed.
-    std::map< std::string, std::shared_ptr<Attribute> > attributes() const {
-        return m_attributes;
-    }
-
-
-#endif // __CINT__
-
-    /// @name Methods to fill GenRunInfoData and to read it back
-    //@{
-
-    /// @brief Fill GenRunInfoData object
-    void write_data(GenRunInfoData &data) const;
-
-    /// @brief Fill GenRunInfo based on GenRunInfoData
-    void read_data(const GenRunInfoData &data);
-
-#ifdef HEPMC3_ROOTIO
-    /// @brief ROOT I/O streamer
-    void Streamer(TBuffer &b);
-    //@}
-#endif
-
-private:
-
-    /// @name Fields
-    //@{
-
-#if !defined(__CINT__)
-
-    /// @brief The vector of tools used to produce this run.
-    std::vector<ToolInfo> m_tools;
-
-    /// @brief A map of weight names mapping to indices.
-    std::map<std::string, int> m_weight_indices;
-
-    /// @brief A vector of weight names.
-    std::vector<std::string> m_weight_names;
-
-    /// @brief Map of attributes
-    mutable std::map< std::string, std::shared_ptr<Attribute> > m_attributes;
-
-    /// @brief Mutex lock for the m_attibutes map.
-    mutable std::recursive_mutex m_lock_attributes;
-    //@}
-
-#endif // __CINT__
-};
-
-#if !defined(__CINT__)
-
-//
-// Template methods
-//
-
-template<class T>
-std::shared_ptr<T> GenRunInfo::attribute(const std::string &name) const {
-    std::lock_guard<std::recursive_mutex> lock(m_lock_attributes);
-    std::map< std::string, std::shared_ptr<Attribute> >::iterator i =
-        m_attributes.find(name);
-    if( i == m_attributes.end() ) return std::shared_ptr<T>();
-
-    if( !i->second->is_parsed() ) {
-
-        std::shared_ptr<T> att = std::make_shared<T>();
-        if ( att->from_string(i->second->unparsed_string()) &&
-                att->init(*this) ) {
-            // update map with new pointer
-            i->second = att;
-
-            return att;
-        }
-        else
-            return std::shared_ptr<T>();
-    }
-    else return std::dynamic_pointer_cast<T>(i->second);
-}
-
-#endif // __CINT__
-
-} // namespace HepMC3
-
-#endif
Index: external/HepMC3/GenVertex.cc
===================================================================
--- external/HepMC3/GenVertex.cc	(revision 302624fca6ca1247dbb8697c4f2e8ecc730d20b1)
+++ 	(revision )
@@ -1,141 +1,0 @@
-// -*- C++ -*-
-//
-// This file is part of HepMC
-// Copyright (C) 2014-2019 The HepMC collaboration (see AUTHORS for details)
-//
-/**
- *  @file GenVertex.cc
- *  @brief Implementation of \b class GenVertex
- *
- */
-#include "HepMC3/GenVertex.h"
-#include "HepMC3/GenParticle.h"
-#include "HepMC3/GenEvent.h"
-#include "HepMC3/Setup.h"
-#include "HepMC3/Attribute.h"
-#include <algorithm> // std::remove
-
-namespace HepMC3 {
-
-
-GenVertex::GenVertex( const FourVector& pos):
-    m_event(nullptr),
-    m_id(0) {
-    m_data.status   = 0;
-    m_data.position = pos;
-}
-
-GenVertex::GenVertex( const GenVertexData &dat):
-    m_event(nullptr),
-    m_id(0),
-    m_data(dat) {
-}
-
-
-void GenVertex::add_particle_in( GenParticlePtr p ) {
-    if(!p) return;
-
-    // Avoid duplicates
-    if (std::find(particles_in().begin(),particles_in().end(),p)!=particles_in().end()) return;
-
-    m_particles_in.push_back(p);
-
-    if( p->end_vertex() ) p->end_vertex()->remove_particle_in(p);
-
-    p->m_end_vertex = shared_from_this();
-
-    if(m_event) m_event->add_particle(p);
-}
-
-
-void GenVertex::add_particle_out(GenParticlePtr p ) {
-    if(!p) return;
-
-    // Avoid duplicates
-    if (std::find(particles_out().begin(),particles_out().end(),p)!=particles_out().end()) return;
-
-    m_particles_out.push_back(p);
-
-    if( p->production_vertex() ) p->production_vertex()->remove_particle_out(p);
-
-    p->m_production_vertex = shared_from_this();
-
-    if(m_event) m_event->add_particle(p);
-}
-
-void GenVertex::remove_particle_in( GenParticlePtr p ) {
-    if(!p) return;
-    if (std::find(m_particles_in.begin(),m_particles_in.end(),p)==m_particles_in.end()) return;
-    p->m_end_vertex.reset();
-    m_particles_in.erase( std::remove( m_particles_in.begin(), m_particles_in.end(), p), m_particles_in.end());
-}
-
-
-void GenVertex::remove_particle_out( GenParticlePtr p ) {
-    if(!p) return;
-    if (std::find(m_particles_out.begin(),m_particles_out.end(),p)==m_particles_out.end()) return;
-    p->m_production_vertex.reset();
-    m_particles_out.erase( std::remove( m_particles_out.begin(), m_particles_out.end(), p), m_particles_out.end());
-}
-
-void GenVertex::set_id(int id) {
-    m_id = id;
-    return;
-}
-
-
-const std::vector<ConstGenParticlePtr>& GenVertex::particles_in()const {
-    return *(reinterpret_cast<const std::vector<ConstGenParticlePtr>*>(&m_particles_in));
-}
-
-const std::vector<ConstGenParticlePtr>& GenVertex::particles_out()const {
-    return *(reinterpret_cast<const std::vector<ConstGenParticlePtr>*>(&m_particles_out));
-}
-
-const FourVector& GenVertex::position() const {
-
-    if( has_set_position() ) return m_data.position;
-
-    // No position information - look at event and/or search ancestors
-    if( parent_event() )
-    {
-        std::shared_ptr<IntAttribute> cycles=parent_event()->attribute<IntAttribute>("cycles");
-        //This could be a recussive call.  Try to prevent it.
-        if (!cycles||cycles->value()==0)
-        {
-
-            for(ConstGenParticlePtr p: m_particles_in ) {
-                ConstGenVertexPtr v = p->production_vertex();
-                if(v) return v->position();
-            }
-        }
-        return parent_event()->event_pos();
-    }
-    return FourVector::ZERO_VECTOR();
-}
-
-void GenVertex::set_position(const FourVector& new_pos) {
-    m_data.position = new_pos;
-}
-
-bool GenVertex::add_attribute(const std::string& name, std::shared_ptr<Attribute> att) {
-    if ( !parent_event() ) return false;
-    parent_event()->add_attribute(name, att, id());
-    return true;
-}
-
-void GenVertex::remove_attribute(const std::string& name) {
-    if ( parent_event() ) parent_event()->remove_attribute(name, id());
-}
-
-std::string GenVertex::attribute_as_string(const std::string& name) const {
-    return parent_event() ? parent_event()->attribute_as_string(name, id()) : std::string();
-}
-
-std::vector<std::string> GenVertex::attribute_names() const {
-    if ( parent_event() ) return parent_event()->attribute_names(id());
-
-    return std::vector<std::string>();
-}
-
-} // namespace HepMC3
Index: external/HepMC3/GenVertex.h
===================================================================
--- external/HepMC3/GenVertex.h	(revision 302624fca6ca1247dbb8697c4f2e8ecc730d20b1)
+++ 	(revision )
@@ -1,167 +1,0 @@
-// -*- C++ -*-
-//
-// This file is part of HepMC
-// Copyright (C) 2014-2020 The HepMC collaboration (see AUTHORS for details)
-//
-/// @file GenVertex.h
-/// @brief Definition of \b class GenVertex
-//
-#ifndef HEPMC3_GENVERTEX_H
-#define HEPMC3_GENVERTEX_H
-#include <string>
-#include "HepMC3/GenParticle_fwd.h"
-#include "HepMC3/GenVertex_fwd.h"
-#include "HepMC3/Data/GenVertexData.h"
-#include "HepMC3/FourVector.h"
-
-namespace HepMC3 {
-
-/** Deprecated */
-using namespace std;
-
-class Attribute;
-class GenEvent;
-
-/// Stores vertex-related information
-class GenVertex : public std::enable_shared_from_this<GenVertex> {
-
-    friend class GenEvent;
-
-public:
-
-    /// @name Constructors
-    //@{
-
-    /// Default constructor
-    GenVertex( const FourVector& position = FourVector::ZERO_VECTOR() );
-
-    /// Constructor based on vertex data
-    GenVertex( const GenVertexData& data );
-
-    //@}
-
-public:
-
-    /// @name Accessors
-    //@{
-
-    /// Get parent event
-    GenEvent* parent_event() { return m_event; }
-
-    /// Get parent event
-    const GenEvent* parent_event() const { return m_event; }
-
-    /// Check if this vertex belongs to an event
-    bool in_event() const { return parent_event() != nullptr; }
-
-    /// Get the vertex unique identifier
-    ///
-    /// @note This is not the same as id() in HepMC v2, which is now @c status()
-    int id() const { return m_id; }
-
-    /// @brief set the vertex identifier
-    void set_id(int id);
-
-    /// Get vertex status code
-    int status() const { return m_data.status; }
-    /// Set vertex status code
-    void set_status(int stat) { m_data.status = stat; }
-
-    /// Get vertex data
-    const GenVertexData& data() const { return m_data; }
-
-    /// Add incoming particle
-    void add_particle_in ( GenParticlePtr p);
-    /// Add outgoing particle
-    void add_particle_out( GenParticlePtr p);
-    /// Remove incoming particle
-    void remove_particle_in ( GenParticlePtr p);
-    /// Remove outgoing particle
-    void remove_particle_out( GenParticlePtr p);
-
-    /// Get list of incoming particles
-    const std::vector<GenParticlePtr>& particles_in() { return m_particles_in; }
-    /// Get list of incoming particles (for const access)
-    const std::vector<ConstGenParticlePtr>& particles_in() const;
-    /// Get list of outgoing particles
-    const std::vector<GenParticlePtr>& particles_out() { return m_particles_out; }
-    /// Get list of outgoing particles (for const access)
-    const std::vector<ConstGenParticlePtr>& particles_out() const;
-
-    /// @brief Get vertex position
-    ///
-    /// Returns the position of this vertex. If a position is not set on _this_ vertex,
-    /// the production vertices of ancestors are searched to find the inherited position.
-    /// FourVector(0,0,0,0) is returned if no position information is found.
-    ///
-    const FourVector& position() const;
-    /// @brief Check if position of this vertex is set
-    bool has_set_position() const { return !(m_data.position.is_zero()); }
-
-    /// Set vertex position
-    void set_position(const FourVector& new_pos); //!<
-
-    /// @brief Add event attribute to this vertex
-    ///
-    /// This will overwrite existing attribute if an attribute with
-    /// the same name is present. The attribute will be stored in the
-    /// parent_event(). @return false if there is no parent_event();
-    bool add_attribute(const std::string& name, std::shared_ptr<Attribute> att);
-
-    /// @brief Get list of names of attributes assigned to this particle
-    std::vector<std::string> attribute_names() const;
-
-    /// @brief Remove attribute
-    void remove_attribute(const std::string& name);
-
-    /// @brief Get attribute of type T
-    template<class T>
-    std::shared_ptr<T> attribute(const std::string& name) const;
-
-    /// @brief Get attribute of any type as string
-    std::string attribute_as_string(const std::string& name) const;
-
-    /// @name Deprecated functionality
-    //@{
-
-
-    /// Add incoming particle by raw pointer
-    /// @deprecated Use GenVertex::add_particle_in( const GenParticlePtr &p ) instead
-    void add_particle_in ( GenParticle *p ) { add_particle_in( GenParticlePtr(p) ); }
-
-    /// Add outgoing particle by raw pointer
-    /// @deprecated Use GenVertex::add_particle_out( const GenParticlePtr &p ) instead
-    void add_particle_out( GenParticle *p ) { add_particle_out( GenParticlePtr(p) ); }
-
-
-    //@}
-
-
-private:
-
-    /// @name Fields
-    //@{
-    GenEvent       *m_event;  //!< Parent event
-    int             m_id;     //!< Vertex id
-    GenVertexData   m_data;   //!< Vertex data
-
-    std::vector<GenParticlePtr>  m_particles_in;  //!< Incoming particle list
-
-    std::vector<GenParticlePtr>  m_particles_out; //!< Outgoing particle list
-    //@}
-
-};
-
-
-} // namespace HepMC3
-
-#include "HepMC3/GenEvent.h"
-namespace HepMC3 {
-/// @brief Get attribute of type T
-template<class T> std::shared_ptr<T> GenVertex::attribute(const std::string& name) const {
-    return parent_event()?
-           parent_event()->attribute<T>(name, id()): std::shared_ptr<T>();
-}
-}
-
-#endif
Index: external/HepMC3/GenVertex_fwd.h
===================================================================
--- external/HepMC3/GenVertex_fwd.h	(revision 302624fca6ca1247dbb8697c4f2e8ecc730d20b1)
+++ 	(revision )
@@ -1,28 +1,0 @@
-// -*- C++ -*-
-//
-// This file is part of HepMC
-// Copyright (C) 2014-2020 The HepMC collaboration (see AUTHORS for details)
-//
-///
-/// @file GenVertex_fwd.h
-/// @brief Minimal forward declarations for GenVertex
-///
-
-#ifndef HEPMC3_GENVERTEX_FWD_H
-#define HEPMC3_GENVERTEX_FWD_H
-
-#include <memory>
-
-namespace HepMC3 {
-
-class GenVertex;
-
-using GenVertexPtr = std::shared_ptr<GenVertex>;
-using ConstGenVertexPtr = std::shared_ptr<const GenVertex>;
-
-template<typename T>
-using GenVertex_type = typename std::conditional<std::is_const<typename T::element_type>::value, ConstGenVertexPtr, GenVertexPtr>::type;
-
-}
-
-#endif
Index: external/HepMC3/Reader.h
===================================================================
--- external/HepMC3/Reader.h	(revision 302624fca6ca1247dbb8697c4f2e8ecc730d20b1)
+++ 	(revision )
@@ -1,77 +1,0 @@
-// -*- C++ -*-
-//
-// This file is part of HepMC
-// Copyright (C) 2014-2020 The HepMC collaboration (see AUTHORS for details)
-//
-#ifndef HEPMC3_READER_H
-#define HEPMC3_READER_H
-///
-/// @file  Reader.h
-/// @brief Definition of interface \b Reader
-///
-/// @class HepMC3::Reader
-/// @brief Base class for all I/O readers
-///
-/// @ingroup IO
-///
-
-#include "HepMC3/GenRunInfo.h"
-
-namespace HepMC3 {
-
-// Forward declaration
-class GenEvent;
-
-class Reader {
-public:
-    ///Constructor
-    Reader() {}
-
-    /// Virtual destructor
-    virtual ~Reader() {}
-
-    /// skip or fast forward reading of some events
-    virtual bool skip(const int) { return !failed();}
-
-    /// Fill next event from input into @a evt
-    virtual bool read_event(GenEvent& evt) = 0;
-    /** @brief Get file and/or stream error state */
-    virtual bool failed()=0;
-    /** @brief Close file and/or stream */
-    virtual void close()=0;
-
-    /// Get the global GenRunInfo object.
-    std::shared_ptr<GenRunInfo> run_info() const {
-        return m_run_info;
-    }
-
-///deleted copy constructor
-    Reader(const Reader&) = delete; 
-///deleted copy assignment operator
-    Reader& operator = (const Reader &) = delete;            
-    /// Set options
-    void set_options(const std::map<std::string, std::string>& options)
-    {
-    m_options=options;
-    }
-    /// Set options
-    std::map<std::string, std::string> get_options() const
-    {
-    return m_options;
-    }
-protected:
-    /// Set the global GenRunInfo object.
-    void set_run_info(std::shared_ptr<GenRunInfo> run) {
-        m_run_info = run;
-    }
-        /// options
-    std::map<std::string, std::string> m_options;
-private:
-    /// The global GenRunInfo object.
-    std::shared_ptr<GenRunInfo> m_run_info;
-};
-
-
-} // namespace HepMC3
-
-#endif
Index: external/HepMC3/ReaderAscii.cc
===================================================================
--- external/HepMC3/ReaderAscii.cc	(revision 302624fca6ca1247dbb8697c4f2e8ecc730d20b1)
+++ 	(revision )
@@ -1,561 +1,0 @@
-// -*- C++ -*-
-//
-// This file is part of HepMC
-// Copyright (C) 2014-2019 The HepMC collaboration (see AUTHORS for details)
-//
-///
-/// @file ReaderAscii.cc
-/// @brief Implementation of \b class ReaderAscii
-///
-#include "HepMC3/ReaderAscii.h"
-
-#include "HepMC3/GenEvent.h"
-#include "HepMC3/GenParticle.h"
-#include "HepMC3/GenVertex.h"
-#include "HepMC3/Units.h"
-#include <cstring>
-#include <sstream>
-
-namespace HepMC3 {
-
-
-ReaderAscii::ReaderAscii(const std::string &filename)
-    : m_file(filename), m_stream(0), m_isstream(false)
-{
-    if( !m_file.is_open() ) {
-        HEPMC3_ERROR( "ReaderAscii: could not open input file: "<<filename )
-    }
-    set_run_info(std::make_shared<GenRunInfo>());
-}
-
-
-// Ctor for reading from stdin
-ReaderAscii::ReaderAscii(std::istream & stream)
-    : m_stream(&stream), m_isstream(true)
-{
-    if( !m_stream->good() ) {
-        HEPMC3_ERROR( "ReaderAscii: could not open input stream " )
-    }
-    set_run_info(std::make_shared<GenRunInfo>());
-}
-
-
-
-ReaderAscii::~ReaderAscii() { if (!m_isstream) close(); }
-
-bool ReaderAscii::skip(const int n)
-{
-    const size_t       max_buffer_size=512*512;
-    char               buf[max_buffer_size];
-    int nn=n;
-    while(!failed()) {
-        char  peek;
-        if ( (!m_file.is_open()) && (!m_isstream) ) return false;
-        m_isstream ? peek = m_stream->peek() : peek = m_file.peek();
-        if( peek=='E' ) nn--;
-        if (nn<0) return true;
-        m_isstream ? m_stream->getline(buf,max_buffer_size) : m_file.getline(buf,max_buffer_size);
-    }
-    return true;
-}
-
-
-bool ReaderAscii::read_event(GenEvent &evt) {
-    if ( (!m_file.is_open()) && (!m_isstream) ) return false;
-
-    char               peek;
-    const size_t       max_buffer_size=512*512;
-    char               buf[max_buffer_size];
-    bool               parsed_event_header    = false;
-    bool               is_parsing_successful  = true;
-    std::pair<int,int> vertices_and_particles(0,0);
-
-    evt.clear();
-    evt.set_run_info(run_info());
-    m_forward_daughters.clear();
-    m_forward_mothers.clear();
-    //
-    // Parse event, vertex and particle information
-    //
-    while(!failed()) {
-
-        m_isstream ? m_stream->getline(buf,max_buffer_size) : m_file.getline(buf,max_buffer_size);
-
-        if( strlen(buf) == 0 ) continue;
-
-        // Check for ReaderAscii header/footer
-        if( strncmp(buf,"HepMC",5) == 0 ) {
-            if( strncmp(buf,"HepMC::Version",14) != 0 && strncmp(buf,"HepMC::Asciiv3",14)!=0 )
-            {
-                HEPMC3_WARNING( "ReaderAscii: found unsupported expression in header. Will close the input." )
-                std::cout<<buf<<std::endl;
-                m_isstream ? m_stream->clear(std::ios::eofbit) : m_file.clear(std::ios::eofbit);
-            }
-            if(parsed_event_header) {
-                is_parsing_successful = true;
-                break;
-            }
-            continue;
-        }
-
-        switch(buf[0]) {
-        case 'E':
-            vertices_and_particles = parse_event_information(evt,buf);
-            if (vertices_and_particles.second < 0) {
-                is_parsing_successful = false;
-            } else {
-                is_parsing_successful = true;
-                parsed_event_header   = true;
-            }
-            break;
-        case 'V':
-            is_parsing_successful = parse_vertex_information(evt,buf);
-            break;
-        case 'P':
-            is_parsing_successful = parse_particle_information(evt,buf);
-            break;
-        case 'W':
-            if ( parsed_event_header )
-                is_parsing_successful = parse_weight_values(evt,buf);
-            else
-                is_parsing_successful = parse_weight_names(buf);
-            break;
-        case 'U':
-            is_parsing_successful = parse_units(evt,buf);
-            break;
-        case 'T':
-            is_parsing_successful = parse_tool(buf);
-            break;
-        case 'A':
-            if ( parsed_event_header )
-                is_parsing_successful = parse_attribute(evt,buf);
-            else
-                is_parsing_successful = parse_run_attribute(buf);
-            break;
-        default:
-            HEPMC3_WARNING( "ReaderAscii: skipping unrecognised prefix: " << buf[0] )
-            is_parsing_successful = true;
-            break;
-        }
-
-        if( !is_parsing_successful ) break;
-
-        // Check for next event
-        m_isstream ? peek = m_stream->peek() : peek = m_file.peek();
-        if( parsed_event_header && peek=='E' ) break;
-    }
-
-
-    // Check if all particles and vertices were parsed
-    if ((int)evt.particles().size() > vertices_and_particles.second ) {
-        HEPMC3_ERROR( "ReaderAscii: too many particles were parsed" )
-        printf("%zu  vs  %i expected\n",evt.particles().size(),vertices_and_particles.second );
-        is_parsing_successful = false;
-    }
-    if ((int)evt.particles().size() < vertices_and_particles.second ) {
-        HEPMC3_ERROR( "ReaderAscii: too few  particles were parsed" )
-        printf("%zu  vs  %i expected\n",evt.particles().size(),vertices_and_particles.second );
-        is_parsing_successful = false;
-    }
-
-    if ((int)evt.vertices().size()  > vertices_and_particles.first) {
-        HEPMC3_ERROR( "ReaderAscii: too many vertices were parsed" )
-        printf("%zu  vs  %i expected\n",evt.vertices().size(),vertices_and_particles.first );
-        is_parsing_successful =  false;
-    }
-
-    if ((int)evt.vertices().size()  < vertices_and_particles.first) {
-        HEPMC3_ERROR( "ReaderAscii: too few vertices were parsed" )
-        printf("%zu  vs  %i expected\n",evt.vertices().size(),vertices_and_particles.first );
-        is_parsing_successful =  false;
-    }
-    // Check if there were HEPMC3_ERRORs during parsing
-    if( !is_parsing_successful ) {
-        HEPMC3_ERROR( "ReaderAscii: event parsing failed. Returning empty event" )
-        HEPMC3_DEBUG( 1, "Parsing failed at line:" << std::endl << buf )
-
-        evt.clear();
-        m_isstream ? m_stream->clear(std::ios::badbit) : m_file.clear(std::ios::badbit);
-
-        return false;
-    }
-    for ( auto p : m_forward_daughters )
-        for (auto v: evt.vertices())
-            if (p.second==v->id())
-                v->add_particle_out(p.first);
-    for ( auto v : m_forward_mothers )  for ( auto idpm : v.second )  v.first->add_particle_in(evt.particles()[idpm-1]);
-
-    /* restore ids of vertices using a bank of available ids*/
-    std::vector<int> all_ids;
-    std::vector<int> filled_ids;
-    std::vector<int> diff;
-    for (auto v: evt.vertices()) if (v->id()!=0) filled_ids.push_back(v->id());
-    for (int i=-((long)evt.vertices().size()); i<0; i++) all_ids.push_back(i);
-    std::sort(all_ids.begin(),all_ids.end());
-    std::sort(filled_ids.begin(),filled_ids.end());
-    //The bank of available ids is created as a difference between all range of ids and the set of used ids
-    std::set_difference(all_ids.begin(), all_ids.end(), filled_ids.begin(), filled_ids.end(), std::inserter(diff, diff.begin()));
-    auto it= diff.rbegin();
-    //Set available ids to vertices sequentially.
-    for (auto v: evt.vertices()) if (v->id()==0) { v->set_id(*it); it++;}
-
-    return true;
-}
-
-
-std::pair<int,int> ReaderAscii::parse_event_information(GenEvent &evt, const char *buf) {
-    static const std::pair<int,int>  err(-1,-1);
-    std::pair<int,int>               ret(-1,-1);
-    const char                 *cursor   = buf;
-    int                         event_no = 0;
-    FourVector                  position;
-
-    // event number
-    if( !(cursor = strchr(cursor+1,' ')) ) return err;
-    event_no = atoi(cursor);
-    evt.set_event_number(event_no);
-
-    // num_vertices
-    if( !(cursor = strchr(cursor+1,' ')) ) return err;
-    ret.first = atoi(cursor);
-
-    // num_particles
-    if( !(cursor = strchr(cursor+1,' ')) ) return err;
-    ret.second = atoi(cursor);
-
-    // check if there is position information
-    if( (cursor = strchr(cursor+1,'@')) ) {
-
-        // x
-        if( !(cursor = strchr(cursor+1,' ')) ) return err;
-        position.setX(atof(cursor));
-
-        // y
-        if( !(cursor = strchr(cursor+1,' ')) ) return err;
-        position.setY(atof(cursor));
-
-        // z
-        if( !(cursor = strchr(cursor+1,' ')) ) return err;
-        position.setZ(atof(cursor));
-
-        // t
-        if( !(cursor = strchr(cursor+1,' ')) ) return err;
-        position.setT(atof(cursor));
-        evt.shift_position_to( position );
-    }
-
-    HEPMC3_DEBUG( 10, "ReaderAscii: E: "<<event_no<<" ("<<ret.first<<"V, "<<ret.second<<"P)" )
-
-    return ret;
-}
-
-
-bool ReaderAscii::parse_weight_values(GenEvent &evt, const char *buf) {
-
-    std::istringstream iss(buf + 1);
-    std::vector<double> wts;
-    double w;
-    while ( iss >> w ) wts.push_back(w);
-    if ( run_info() && run_info()->weight_names().size()
-            && run_info()->weight_names().size() != wts.size() )
-        throw std::logic_error("ReaderAscii::parse_weight_values: "
-                               "The number of weights ("+std::to_string((long long int)(wts.size()))+") does not match "
-                               "the  number weight names("+std::to_string((long long int)(run_info()->weight_names().size()))+") in the GenRunInfo object");
-    evt.weights() = wts;
-
-    return true;
-}
-
-
-bool ReaderAscii::parse_units(GenEvent &evt, const char *buf) {
-    const char *cursor = buf;
-
-    // momentum
-    if( !(cursor = strchr(cursor+1,' ')) ) return false;
-    ++cursor;
-    Units::MomentumUnit momentum_unit = Units::momentum_unit(cursor);
-
-    // length
-    if( !(cursor = strchr(cursor+1,' ')) ) return false;
-    ++cursor;
-    Units::LengthUnit length_unit = Units::length_unit(cursor);
-
-    evt.set_units(momentum_unit,length_unit);
-
-    HEPMC3_DEBUG( 10, "ReaderAscii: U: " << Units::name(evt.momentum_unit()) << " " << Units::name(evt.length_unit()) )
-
-    return true;
-}
-
-
-bool ReaderAscii::parse_vertex_information(GenEvent &evt, const char *buf) {
-    GenVertexPtr  data = std::make_shared<GenVertex>();
-    FourVector    position;
-    const char   *cursor          = buf;
-    const char   *cursor2         = nullptr;
-    int           id              = 0;
-    int           highest_id      = evt.particles().size();
-
-    // id
-    if( !(cursor = strchr(cursor+1,' ')) ) return false;
-    id = atoi(cursor);
-
-    // status
-    if( !(cursor = strchr(cursor+1,' ')) ) return false;
-    data->set_status( atoi(cursor) );
-
-    // skip to the list of particles
-    if( !(cursor = strchr(cursor+1,'[')) ) return false;
-
-    while(true) {
-        ++cursor;             // skip the '[' or ',' character
-        cursor2     = cursor; // save cursor position
-        int  particle_in = atoi(cursor);
-
-        // add incoming particle to the vertex
-        if( particle_in > 0) {
-//Particles are always ordered, so id==position in event.
-            if (particle_in <= highest_id)
-                data->add_particle_in( evt.particles()[particle_in-1] );
-//If the particle has not been red yet, we store its id to add the particle later.
-            else m_forward_mothers[data].insert(particle_in);
-        }
-
-        // check for next particle or end of particle list
-        if( !(cursor = strchr(cursor+1,',')) ) {
-            if( !(cursor = strchr(cursor2+1,']')) ) return false;
-            break;
-        }
-    }
-
-    // check if there is position information
-    if( (cursor = strchr(cursor+1,'@')) ) {
-
-        // x
-        if( !(cursor = strchr(cursor+1,' ')) ) return false;
-        position.setX(atof(cursor));
-
-        // y
-        if( !(cursor = strchr(cursor+1,' ')) ) return false;
-        position.setY(atof(cursor));
-
-        // z
-        if( !(cursor = strchr(cursor+1,' ')) ) return false;
-        position.setZ(atof(cursor));
-
-        // t
-        if( !(cursor = strchr(cursor+1,' ')) ) return false;
-        position.setT(atof(cursor));
-        data->set_position( position );
-
-    }
-
-    HEPMC3_DEBUG( 10, "ReaderAscii: V: "<<id<<" with "<<data->particles_in().size()<<" particles)" )
-
-    evt.add_vertex(data);
-//Restore vertex id, as it is used to build connections inside event.
-    data->set_id(id);
-
-    return true;
-}
-
-
-bool ReaderAscii::parse_particle_information(GenEvent &evt, const char *buf) {
-    GenParticlePtr  data = std::make_shared<GenParticle>();
-    FourVector      momentum;
-    const char     *cursor  = buf;
-    int             mother_id = 0;
-
-    // verify id
-    if( !(cursor = strchr(cursor+1,' ')) ) return false;
-
-    if( atoi(cursor) != (int)evt.particles().size() + 1 ) {
-        /// @todo Should be an exception
-        HEPMC3_ERROR( "ReaderAscii: particle ID mismatch" )
-        return false;
-    }
-
-    // mother id
-    if( !(cursor = strchr(cursor+1,' ')) ) return false;
-    mother_id = atoi(cursor);
-
-    // Parent object is a particle. Particleas are always ordered id==position in event.
-    if( mother_id > 0 && mother_id <= (int)evt.particles().size() ) {
-
-        GenParticlePtr mother = evt.particles()[ mother_id-1 ];
-        GenVertexPtr   vertex = mother->end_vertex();
-
-        // create new vertex if needed
-        if( !vertex ) {
-            vertex = std::make_shared<GenVertex>();
-            vertex->add_particle_in(mother);
-        }
-
-        vertex->add_particle_out(data);
-        evt.add_vertex(vertex);
-//ID of this vertex is not explicitely set in the input. We set it to zero to prevent overlap with other ids. It will be restored later.
-        vertex->set_id(0);
-    }
-    // Parent object is vertex
-    else if( mother_id < 0 )
-    {
-        //Vertices are not always ordered, e.g. when one reads HepMC2 event, so we check their ids.
-        bool found=false;
-        for (auto v: evt.vertices()) if (v->id()==mother_id) {v->add_particle_out(data); found=true; break; }
-        if (!found)
-        {
-//This should happen  in case of unordered event.
-//      WARNING("ReaderAscii: Unordered event, id of mother vertex  is out of range of known ids:   " <<mother_id<<" evt.vertices().size()="<<evt.vertices().size() )
-//Save the mother id to reconnect later.
-            m_forward_daughters[data]=mother_id;
-        }
-    }
-
-    // pdg id
-    if( !(cursor = strchr(cursor+1,' ')) ) return false;
-    data->set_pid( atoi(cursor) );
-
-    // px
-    if( !(cursor = strchr(cursor+1,' ')) ) return false;
-    momentum.setPx(atof(cursor));
-
-    // py
-    if( !(cursor = strchr(cursor+1,' ')) ) return false;
-    momentum.setPy(atof(cursor));
-
-    // pz
-    if( !(cursor = strchr(cursor+1,' ')) ) return false;
-    momentum.setPz(atof(cursor));
-
-    // pe
-    if( !(cursor = strchr(cursor+1,' ')) ) return false;
-    momentum.setE(atof(cursor));
-    data->set_momentum(momentum);
-
-    // m
-    if( !(cursor = strchr(cursor+1,' ')) ) return false;
-    data->set_generated_mass( atof(cursor) );
-
-    // status
-    if( !(cursor = strchr(cursor+1,' ')) ) return false;
-    data->set_status( atoi(cursor) );
-
-    evt.add_particle(data);
-
-    HEPMC3_DEBUG( 10, "ReaderAscii: P: "<<data->id()<<" ( mother: "<<mother_id<<", pid: "<<data->pid()<<")" )
-
-    return true;
-}
-
-
-bool ReaderAscii::parse_attribute(GenEvent &evt, const char *buf) {
-    const char     *cursor  = buf;
-    const char     *cursor2 = buf;
-    char            name[512];
-    int             id = 0;
-
-    if( !(cursor = strchr(cursor+1,' ')) ) return false;
-    id = atoi(cursor);
-
-    if( !(cursor  = strchr(cursor+1,' ')) ) return false;
-    ++cursor;
-
-    if( !(cursor2 = strchr(cursor,' ')) ) return false;
-    snprintf(name, 512,"%.*s",(int)(cursor2-cursor), cursor);
-
-    cursor = cursor2+1;
-
-    std::shared_ptr<Attribute> att =
-        std::make_shared<StringAttribute>( StringAttribute(unescape(cursor)) );
-
-    evt.add_attribute(std::string(name), att, id);
-
-    return true;
-}
-
-bool ReaderAscii::parse_run_attribute(const char *buf) {
-    const char     *cursor  = buf;
-    const char     *cursor2 = buf;
-    char            name[512];
-
-    if( !(cursor = strchr(cursor+1,' ')) ) return false;
-    ++cursor;
-
-    if( !(cursor2 = strchr(cursor,' ')) ) return false;
-    snprintf(name, 512,"%.*s", (int)(cursor2-cursor), cursor);
-
-    cursor = cursor2+1;
-
-    std::shared_ptr<StringAttribute> att =
-        std::make_shared<StringAttribute>( StringAttribute(unescape(cursor)) );
-
-    run_info()->add_attribute(std::string(name), att);
-
-    return true;
-
-}
-
-
-bool ReaderAscii::parse_weight_names(const char *buf) {
-    const char     *cursor  = buf;
-
-    if( !(cursor = strchr(cursor+1,' ')) ) return false;
-    ++cursor;
-
-    std::istringstream iss(unescape(cursor));
-    std::vector<std::string> names;
-    std::string name;
-    while ( iss >> name ) names.push_back(name);
-
-    run_info()->set_weight_names(names);
-
-    return true;
-
-}
-
-bool ReaderAscii::parse_tool(const char *buf) {
-    const char     *cursor  = buf;
-
-    if( !(cursor = strchr(cursor+1,' ')) ) return false;
-    ++cursor;
-    std::string line = unescape(cursor);
-    GenRunInfo::ToolInfo tool;
-    std::string::size_type pos = line.find("\n");
-    tool.name = line.substr(0, pos);
-    line = line.substr(pos + 1);
-    pos = line.find("\n");
-    tool.version = line.substr(0, pos);
-    tool.description = line.substr(pos + 1);
-    run_info()->tools().push_back(tool);
-
-    return true;
-
-}
-
-
-std::string ReaderAscii::unescape(const std::string& s) {
-    std::string ret;
-    ret.reserve(s.length());
-    for ( std::string::const_iterator it = s.begin(); it != s.end(); ++it ) {
-        if ( *it == '\\' ) {
-            ++it;
-            if ( *it == '|' )
-                ret += '\n';
-            else
-                ret += *it;
-        } else
-            ret += *it;
-    }
-
-    return ret;
-}
-
-bool ReaderAscii::failed() { return m_isstream ? (bool)m_stream->rdstate() :(bool)m_file.rdstate(); }
-
-void ReaderAscii::close() {
-    if( !m_file.is_open()) return;
-    m_file.close();
-}
-
-
-} // namespace HepMC3
Index: external/HepMC3/ReaderAscii.h
===================================================================
--- external/HepMC3/ReaderAscii.h	(revision 302624fca6ca1247dbb8697c4f2e8ecc730d20b1)
+++ 	(revision )
@@ -1,174 +1,0 @@
-// -*- C++ -*-
-//
-// This file is part of HepMC
-// Copyright (C) 2014-2020 The HepMC collaboration (see AUTHORS for details)
-//
-#ifndef HEPMC3_READERASCII_H
-#define HEPMC3_READERASCII_H
-///
-/// @file  ReaderAscii.h
-/// @brief Definition of class \b ReaderAscii
-///
-/// @class HepMC3::ReaderAscii
-/// @brief GenEvent I/O parsing for structured text files
-///
-/// @ingroup IO
-///
-#include <set>
-#include <string>
-#include <fstream>
-#include <istream>
-#include <iterator>
-#include "HepMC3/Reader.h"
-#include "HepMC3/GenEvent.h"
-
-
-namespace HepMC3 {
-
-
-class ReaderAscii : public Reader {
-public:
-
-    /// @brief Constructor
-    ReaderAscii(const std::string& filename);
-    /// The ctor to read from stdin
-    ReaderAscii(std::istream &);
-    /// @brief Destructor
-    ~ReaderAscii();
-
-    /// @brief skip events
-    bool skip(const int)  override;
-    
-    /// @brief Load event from file
-    ///
-    /// @param[out] evt Event to be filled
-    bool read_event(GenEvent& evt)  override;
-
-    /// @todo No-arg version returning GenEvent?
-
-    /// @brief Return status of the stream
-    bool failed()  override;
-
-    /// @todo Implicit cast to bool = !failed()?
-
-    /// @brief Close file stream
-    void close()  override;
-
-private:
-
-    /// @brief Unsecape '\' and '\n' characters in string
-    std::string unescape(const std::string& s);
-
-    /// @name Read helpers
-    //@{
-
-    /// @brief Parse event
-    ///
-    /// Helper routine for parsing event information
-    /// @param[out] evt Event that will be filled with new data
-    /// @param[in]  buf Line of text that needs to be parsed
-    /// @return vertices count and particles count for verification
-    std::pair<int,int> parse_event_information(GenEvent &evt, const char *buf);
-
-    /// @brief Parse weight value lines
-    ///
-    /// Helper routine for parsing weight value information
-    /// @param[out] evt Event whose GenWeights will be filled with weight values
-    /// @param[in]  buf Line of text that needs to be parsed
-    ///
-    bool parse_weight_values(GenEvent &evt, const char *buf);
-
-    /// @brief Parse units
-    ///
-    /// Helper routine for parsing units information
-    /// @param[out] evt Event that will be filled with unit information
-    /// @param[in]  buf Line of text that needs to be parsed
-    ///
-    bool parse_units(GenEvent &evt, const char *buf);
-
-    /// @brief Parse struct GenPdfInfo information
-    ///
-    /// Helper routine for parsing PDF information
-    /// @param[out] evt Event that will be filled with unit information
-    /// @param[in]  buf Line of text that needs to be parsed
-    bool parse_pdf_info(GenEvent &evt, const char *buf);
-
-    /// @brief Parse struct GenHeavyIon information
-    ///
-    /// Helper routine for parsing heavy ion information
-    /// @param[out] evt Event that will be filled with unit information
-    /// @param[in]  buf Line of text that needs to be parsed
-    bool parse_heavy_ion(GenEvent &evt, const char *buf);
-
-    /// @brief Parse struct GenCrossSection information
-    ///
-    /// Helper routine for parsing cross-section information
-    /// @param[out] evt Event that will be filled with unit information
-    /// @param[in]  buf Line of text that needs to be parsed
-    bool parse_cross_section(GenEvent &evt, const char *buf);
-
-    /// @brief Parse vertex
-    ///
-    /// Helper routine for parsing single event information
-    /// @param[out] evt Event that will contain parsed vertex
-    /// @param[in] buf Line of text that needs to be parsed
-    ///
-    bool parse_vertex_information(GenEvent &evt, const char *buf);
-
-    /// @brief Parse particle
-    ///
-    /// Helper routine for parsing single particle information
-    /// @param[out] evt Event that will contain parsed particle
-    /// @param[in] buf Line of text that needs to be parsed
-    bool parse_particle_information(GenEvent &evt, const char *buf);
-
-    /// @brief Parse attribute
-    ///
-    /// Helper routine for parsing single attribute information
-    /// @param[out] evt Event that will contain parsed attribute
-    /// @param[in] buf Line of text that needs to be parsed
-    bool parse_attribute(GenEvent &evt, const char *buf);
-
-    /// @brief Parse run-level attribute.
-    ///
-    /// Helper routine for parsing single attribute information
-    /// @param[in] buf Line of text that needs to be parsed
-    bool parse_run_attribute(const char *buf);
-
-    /// @brief Parse run-level weight names.
-    ///
-    /// Helper routine for parsing a line with information about
-    /// weight names.
-    /// @param[in] buf Line of text that needs to be parsed
-    bool parse_weight_names(const char *buf);
-
-    /// @brief Parse run-level tool information.
-    ///
-    /// Helper routine for parsing a line with information about
-    /// tools being used.
-    /// @param[in] buf Line of text that needs to be parsed
-    bool parse_tool(const char *buf);
-    //@}
-
-
-private:
-
-    std::ifstream m_file; //!< Input file
-    std::istream* m_stream; ///< For ctor when reading from stdin
-    bool m_isstream; ///< toggles usage of m_file or m_stream
-
-
-    /** @brief Store attributes global to the run being written/read. */
-    std::map< std::string, std::shared_ptr<Attribute> > m_global_attributes;
-
-    /** @brief Temp storage for  outgoing particle ids */
-    std::map<GenVertexPtr, std::set<int> >  m_forward_mothers;
-    /** @brief Temp storage for  prod vertex ids */
-    std::map<GenParticlePtr, int >  m_forward_daughters;
-
-};
-
-
-} // namespace HepMC3
-
-#endif
Index: external/HepMC3/ReaderAsciiHepMC2.cc
===================================================================
--- external/HepMC3/ReaderAsciiHepMC2.cc	(revision 302624fca6ca1247dbb8697c4f2e8ecc730d20b1)
+++ 	(revision )
@@ -1,724 +1,0 @@
-// -*- C++ -*-
-//
-// This file is part of HepMC
-// Copyright (C) 2014-2019 The HepMC collaboration (see AUTHORS for details)
-//
-/**
- *  @file ReaderAsciiHepMC2.cc
- *  @brief Implementation of \b class ReaderAsciiHepMC2
- *
- */
-#include "HepMC3/ReaderAsciiHepMC2.h"
-
-#include "HepMC3/GenEvent.h"
-#include "HepMC3/GenVertex.h"
-#include "HepMC3/GenParticle.h"
-#include "HepMC3/GenHeavyIon.h"
-#include "HepMC3/GenPdfInfo.h"
-#include "HepMC3/Setup.h"
-#include <cstring>
-#include <cstdlib>
-namespace HepMC3 {
-
-ReaderAsciiHepMC2::ReaderAsciiHepMC2(const std::string& filename):
-    m_file(filename), m_stream(0), m_isstream(false) {
-    if( !m_file.is_open() ) {
-        HEPMC3_ERROR( "ReaderAsciiHepMC2: could not open input file: "<<filename )
-    }
-    set_run_info(std::make_shared<GenRunInfo>());
-    m_event_ghost= new GenEvent();
-}
-// Ctor for reading from stdin
-ReaderAsciiHepMC2::ReaderAsciiHepMC2(std::istream & stream)
-    : m_stream(&stream), m_isstream(true)
-{
-    if( !m_stream->good() ) {
-        HEPMC3_ERROR( "ReaderAsciiHepMC2: could not open input stream " )
-    }
-    set_run_info(std::make_shared<GenRunInfo>());
-    m_event_ghost= new GenEvent();
-}
-
-ReaderAsciiHepMC2::~ReaderAsciiHepMC2() { if (m_event_ghost) { m_event_ghost->clear(); delete m_event_ghost; m_event_ghost=nullptr; } if (!m_isstream) close(); }
-
-bool ReaderAsciiHepMC2::skip(const int n)
-{
-    const size_t       max_buffer_size=512*512;
-    char               buf[max_buffer_size];
-    int nn=n;
-    while(!failed()) {
-        char peek;
-        if ( (!m_file.is_open()) && (!m_isstream) ) return false;
-        m_isstream ? peek = m_stream->peek() : peek = m_file.peek();
-        if( peek=='E' ) nn--;
-        if (nn<0) return true;
-        m_isstream ? m_stream->getline(buf,max_buffer_size) : m_file.getline(buf,max_buffer_size);
-    }
-    return true;
-}
-
-bool ReaderAsciiHepMC2::read_event(GenEvent &evt) {
-    if ( (!m_file.is_open()) && (!m_isstream) ) return false;
-
-    char               peek;
-    const size_t  max_buffer_size=512*512;
-    const size_t  max_weights_size=256;
-    char          buf[max_buffer_size];
-    bool          parsed_event_header            = false;
-    bool          is_parsing_successful          = true;
-    int           parsing_result                 = 0;
-    unsigned int  vertices_count                 = 0;
-    unsigned int  current_vertex_particles_count = 0;
-    unsigned int  current_vertex_particles_parsed= 0;
-
-    evt.clear();
-    evt.set_run_info(run_info());
-
-    // Empty cache
-    m_vertex_cache.clear();
-    m_vertex_barcodes.clear();
-
-    m_particle_cache.clear();
-    m_end_vertex_barcodes.clear();
-    m_particle_cache_ghost.clear();
-    //
-    // Parse event, vertex and particle information
-    //
-    while(!failed()) {
-        m_isstream ? m_stream->getline(buf,max_buffer_size) : m_file.getline(buf,max_buffer_size);
-        if( strlen(buf) == 0 ) continue;
-        // Check for IO_GenEvent header/footer
-        if( strncmp(buf,"HepMC",5) == 0 ) {
-            if( strncmp(buf,"HepMC::Version",14) != 0 && strncmp(buf,"HepMC::IO_GenEvent",18)!=0 )
-            {
-                HEPMC3_WARNING( "ReaderAsciiHepMC2: found unsupported expression in header. Will close the input." )
-                std::cout<<buf<<std::endl;
-                m_isstream ? m_stream->clear(std::ios::eofbit) : m_file.clear(std::ios::eofbit);
-            }
-            if(parsed_event_header) {
-                is_parsing_successful = true;
-                break;
-            }
-            continue;
-        }
-        switch(buf[0]) {
-        case 'E':
-            parsing_result = parse_event_information(evt,buf);
-            if(parsing_result<0) {
-                is_parsing_successful = false;
-                HEPMC3_ERROR( "ReaderAsciiHepMC2: HEPMC3_ERROR parsing event information" )
-            }
-            else {
-                vertices_count = parsing_result;
-                m_vertex_cache.reserve(vertices_count);
-                m_particle_cache.reserve(vertices_count*3);
-                m_vertex_barcodes.reserve(vertices_count);
-                m_end_vertex_barcodes.reserve(vertices_count*3);
-                is_parsing_successful = true;
-            }
-            parsed_event_header = true;
-            break;
-        case 'V':
-            // If starting new vertex: verify if previous was fully parsed
-
-            /** @bug HepMC2 files produced with Pythia8 are known to have wrong
-                     information about number of particles in vertex. Hence '<' sign */
-            if(current_vertex_particles_parsed < current_vertex_particles_count) {
-                is_parsing_successful = false;
-                break;
-            }
-            current_vertex_particles_parsed = 0;
-
-            parsing_result = parse_vertex_information(buf);
-
-            if(parsing_result<0) {
-                is_parsing_successful = false;
-                HEPMC3_ERROR( "ReaderAsciiHepMC2: HEPMC3_ERROR parsing vertex information" )
-            }
-            else {
-                current_vertex_particles_count = parsing_result;
-                is_parsing_successful = true;
-            }
-            break;
-        case 'P':
-
-            parsing_result   = parse_particle_information(buf);
-
-            if(parsing_result<0) {
-                is_parsing_successful = false;
-                HEPMC3_ERROR( "ReaderAsciiHepMC2: HEPMC3_ERROR parsing particle information" )
-            }
-            else {
-                ++current_vertex_particles_parsed;
-                is_parsing_successful = true;
-            }
-            break;
-        case 'U':
-            is_parsing_successful = parse_units(evt,buf);
-            break;
-        case 'F':
-            is_parsing_successful = parse_pdf_info(evt,buf);
-            break;
-        case 'H':
-            is_parsing_successful = parse_heavy_ion(evt,buf);
-            break;
-        case 'N':
-            is_parsing_successful = parse_weight_names(buf);
-            break;
-        case 'C':
-            is_parsing_successful = parse_xs_info(evt,buf);
-            break;
-        default:
-            HEPMC3_WARNING( "ReaderAsciiHepMC2: skipping unrecognised prefix: " << buf[0] )
-            is_parsing_successful = true;
-            break;
-        }
-
-        if( !is_parsing_successful ) break;
-
-        // Check for next event
-        m_isstream ? peek = m_stream->peek() : peek = m_file.peek();
-        if( parsed_event_header && peek=='E' ) break;
-    }
-
-    // Check if all particles in last vertex were parsed
-    /** @bug HepMC2 files produced with Pythia8 are known to have wrong
-             information about number of particles in vertex. Hence '<' sign */
-    if( is_parsing_successful && current_vertex_particles_parsed < current_vertex_particles_count ) {
-        HEPMC3_ERROR( "ReaderAsciiHepMC2: not all particles parsed" )
-        is_parsing_successful = false;
-    }
-    // Check if all vertices were parsed
-    else if( is_parsing_successful && m_vertex_cache.size() != vertices_count ) {
-        HEPMC3_ERROR( "ReaderAsciiHepMC2: not all vertices parsed" )
-        is_parsing_successful = false;
-    }
-
-    if( !is_parsing_successful ) {
-        HEPMC3_ERROR( "ReaderAsciiHepMC2: event parsing failed. Returning empty event" )
-        HEPMC3_DEBUG( 1, "Parsing failed at line:" << std::endl << buf )
-        evt.clear();
-        m_isstream ? m_stream->clear(std::ios::badbit) : m_file.clear(std::ios::badbit);
-        return 0;
-    }
-
-    // Restore production vertex pointers
-    for(unsigned int i=0; i<m_particle_cache.size(); ++i) {
-        if( !m_end_vertex_barcodes[i] ) continue;
-
-        for(unsigned int j=0; j<m_vertex_cache.size(); ++j) {
-            if( m_vertex_barcodes[j] == m_end_vertex_barcodes[i] ) {
-                m_vertex_cache[j]->add_particle_in(m_particle_cache[i]);
-                break;
-            }
-        }
-    }
-
-    // Remove vertices with no incoming particles or no outgoing particles
-    for(unsigned int i=0; i<m_vertex_cache.size(); ++i) {
-        if( m_vertex_cache[i]->particles_in().size() == 0 ) {
-            HEPMC3_DEBUG( 30, "ReaderAsciiHepMC2::read_event - found a vertex without incoming particles: "<<m_vertex_cache[i]->id() );
-//Sometimes the root vertex has no incoming particles.  Here we try to save the event.
-            std::vector<GenParticlePtr> beams;
-            for (auto p: m_vertex_cache[i]->particles_out()) if (p->status()==4 && !(p->end_vertex())) beams.push_back(p);
-            for (auto p: beams)
-            {
-                m_vertex_cache[i]->add_particle_in(p);
-                m_vertex_cache[i]->remove_particle_out(p);
-                HEPMC3_DEBUG( 30, "ReaderAsciiHepMC2::read_event - moved particle with status=4 from the outgoing to the incoming particles of vertex: "<<m_vertex_cache[i]->id() );
-            }
-            if (beams.size()==0) m_vertex_cache[i] = nullptr;
-        }
-        else if( m_vertex_cache[i]->particles_out().size() == 0 ) {
-            HEPMC3_DEBUG( 30, "ReaderAsciiHepMC2::read_event - found a vertex without outgouing particles: "<<m_vertex_cache[i]->id() );
-            m_vertex_cache[i] = nullptr;
-        }
-    }
-
-    // Reserve memory for the event
-    evt.reserve( m_particle_cache.size(), m_vertex_cache.size() );
-
-    // Add whole event tree in topological order
-    evt.add_tree( m_particle_cache );
-
-    for(unsigned int i=0; i<m_particle_cache.size(); ++i) {
-        if(m_particle_cache_ghost[i]->attribute_names().size())
-        {
-            std::shared_ptr<DoubleAttribute> phi = m_particle_cache_ghost[i]->attribute<DoubleAttribute>("phi");
-            if (phi) m_particle_cache[i]->add_attribute("phi",phi);
-            std::shared_ptr<DoubleAttribute> theta = m_particle_cache_ghost[i]->attribute<DoubleAttribute>("theta");
-            if (theta) m_particle_cache[i]->add_attribute("theta",theta);
-            if (m_options.find("particle_flows_are_separated")!=m_options.end())
-            {
-                std::shared_ptr<IntAttribute> flow1 = m_particle_cache_ghost[i]->attribute<IntAttribute>("flow1");
-                if (flow1) m_particle_cache[i]->add_attribute("flow1",flow1);
-                std::shared_ptr<IntAttribute> flow2 = m_particle_cache_ghost[i]->attribute<IntAttribute>("flow2");
-                if (flow2) m_particle_cache[i]->add_attribute("flow2",flow2);
-                std::shared_ptr<IntAttribute> flow3 = m_particle_cache_ghost[i]->attribute<IntAttribute>("flow3");
-                if (flow3) m_particle_cache[i]->add_attribute("flow3",flow3);
-            }
-            else
-            {
-                std::shared_ptr<VectorIntAttribute> flows = m_particle_cache_ghost[i]->attribute<VectorIntAttribute>("flows");
-                if (flows)  m_particle_cache[i]->add_attribute("flows",flows);
-            }
-        }
-    }
-
-    for(unsigned int i=0; i<m_vertex_cache.size(); ++i)
-        if(m_vertex_cache_ghost[i]->attribute_names().size())
-        {
-            for (size_t ii=0; ii<max_weights_size; ii++)
-            {
-                std::shared_ptr<DoubleAttribute> rs=m_vertex_cache_ghost[i]->attribute<DoubleAttribute>("weight"+std::to_string((long long unsigned int)ii));
-                if (!rs) break;
-                m_vertex_cache[i]->add_attribute("weight"+std::to_string((long long unsigned int)ii),rs);
-            }
-        }
-    std::shared_ptr<IntAttribute> signal_process_vertex_barcode=evt.attribute<IntAttribute>("signal_process_vertex");
-    if (signal_process_vertex_barcode) {
-        int signal_process_vertex_barcode_value=signal_process_vertex_barcode->value();
-        for(unsigned int i=0; i<m_vertex_cache.size(); ++i)
-        {
-            if (i>=m_vertex_barcodes.size()) continue;//this should not happen!
-            if (signal_process_vertex_barcode_value!=m_vertex_barcodes.at(i)) continue;
-            std::shared_ptr<IntAttribute> signal_process_vertex = std::make_shared<IntAttribute>(m_vertex_cache.at(i)->id());
-            evt.add_attribute("signal_process_vertex",signal_process_vertex);
-            break;
-        }
-    }
-    m_particle_cache_ghost.clear();
-    m_vertex_cache_ghost.clear();
-    m_event_ghost->clear();
-    return 1;
-}
-
-int ReaderAsciiHepMC2::parse_event_information(GenEvent &evt, const char *buf) {
-    const char          *cursor             = buf;
-    int                  event_no           = 0;
-    int                  vertices_count     = 0;
-    int                  random_states_size = 0;
-    int                  weights_size       = 0;
-    std::vector<long>    random_states(0);
-    std::vector<double>  weights(0);
-
-    // event number
-    if( !(cursor = strchr(cursor+1,' ')) ) return -1;
-    event_no = atoi(cursor);
-    evt.set_event_number(event_no);
-
-    //mpi
-    if( !(cursor = strchr(cursor+1,' ')) ) return -1;
-    std::shared_ptr<IntAttribute> mpi = std::make_shared<IntAttribute>(atoi(cursor));
-    evt.add_attribute("mpi",mpi);
-
-    //event scale
-    if( !(cursor = strchr(cursor+1,' ')) ) return -1;
-    std::shared_ptr<DoubleAttribute> event_scale = std::make_shared<DoubleAttribute>(atof(cursor));
-    evt.add_attribute("event_scale",event_scale);
-
-    //alpha_qcd
-    if( !(cursor = strchr(cursor+1,' ')) ) return -1;
-    std::shared_ptr<DoubleAttribute> alphaQCD = std::make_shared<DoubleAttribute>(atof(cursor));
-    evt.add_attribute("alphaQCD",alphaQCD);
-
-    //alpha_qed
-    if( !(cursor = strchr(cursor+1,' ')) ) return -1;
-    std::shared_ptr<DoubleAttribute> alphaQED = std::make_shared<DoubleAttribute>(atof(cursor));
-    evt.add_attribute("alphaQED",alphaQED);
-
-    //signal_process_id
-    if( !(cursor = strchr(cursor+1,' ')) ) return -1;
-    std::shared_ptr<IntAttribute> signal_process_id = std::make_shared<IntAttribute>(atoi(cursor));
-    evt.add_attribute("signal_process_id",signal_process_id);
-
-    //signal_process_vertex
-    if( !(cursor = strchr(cursor+1,' ')) ) return -1;
-    std::shared_ptr<IntAttribute> signal_process_vertex = std::make_shared<IntAttribute>(atoi(cursor));
-    evt.add_attribute("signal_process_vertex",signal_process_vertex);
-
-    // num_vertices
-    if( !(cursor = strchr(cursor+1,' ')) ) return -1;
-    vertices_count = atoi(cursor);
-
-    // SKIPPED: beam 1
-    if( !(cursor = strchr(cursor+1,' ')) ) return -1;
-
-    // SKIPPED: beam 2
-    if( !(cursor = strchr(cursor+1,' ')) ) return -1;
-
-    //random states
-    if( !(cursor = strchr(cursor+1,' ')) ) return -1;
-    random_states_size = atoi(cursor);
-    random_states.resize(random_states_size);
-
-    for ( int i = 0; i < random_states_size; ++i ) {
-        if( !(cursor = strchr(cursor+1,' ')) ) return -1;
-        random_states[i] = atoi(cursor);
-    }
-    if (m_options.find("event_random_states_are_separated")!=m_options.end())
-    {
-        evt.add_attribute("random_states",std::make_shared<VectorLongIntAttribute>(random_states));
-    }
-    else
-    {
-        for ( int i = 0; i < random_states_size; ++i )
-            evt.add_attribute("random_states"+std::to_string((long long unsigned int)i),std::make_shared<IntAttribute>(random_states[i]));
-    }
-    // weights
-    if( !(cursor = strchr(cursor+1,' ')) ) return -1;
-    weights_size = atoi(cursor);
-    weights.resize(weights_size);
-
-    for ( int i = 0; i < weights_size; ++i ) {
-        if( !(cursor = strchr(cursor+1,' ')) ) return -1;
-        weights[i] = atof(cursor);
-    }
-
-    evt.weights() = weights;
-
-    HEPMC3_DEBUG( 10, "ReaderAsciiHepMC2: E: "<<event_no<<" ("<<vertices_count<<"V, "<<weights_size<<"W, "<<random_states_size<<"RS)" )
-
-    return vertices_count;
-}
-
-bool ReaderAsciiHepMC2::parse_units(GenEvent &evt, const char *buf) {
-    const char *cursor  = buf;
-
-    // momentum
-    if( !(cursor = strchr(cursor+1,' ')) ) return false;
-    ++cursor;
-    Units::MomentumUnit momentum_unit = Units::momentum_unit(cursor);
-
-    // length
-    if( !(cursor = strchr(cursor+1,' ')) ) return false;
-    ++cursor;
-    Units::LengthUnit length_unit = Units::length_unit(cursor);
-
-    evt.set_units(momentum_unit,length_unit);
-
-    HEPMC3_DEBUG( 10, "ReaderAsciiHepMC2: U: " << Units::name(evt.momentum_unit()) << " " << Units::name(evt.length_unit()) )
-
-    return true;
-}
-
-int ReaderAsciiHepMC2::parse_vertex_information(const char *buf) {
-    GenVertexPtr  data = std::make_shared<GenVertex>();
-    GenVertexPtr  data_ghost = std::make_shared<GenVertex>();
-    FourVector    position;
-    const char   *cursor            = buf;
-    int           barcode           = 0;
-    int           num_particles_out = 0;
-    int                  weights_size       = 0;
-    std::vector<double>  weights(0);
-    // barcode
-    if( !(cursor = strchr(cursor+1,' ')) ) return -1;
-    barcode = atoi(cursor);
-
-    // status
-    if( !(cursor = strchr(cursor+1,' ')) ) return -1;
-    data->set_status( atoi(cursor) );
-
-    // x
-    if( !(cursor = strchr(cursor+1,' ')) ) return -1;
-    position.setX(atof(cursor));
-
-    // y
-    if( !(cursor = strchr(cursor+1,' ')) ) return -1;
-    position.setY(atof(cursor));
-
-    // z
-    if( !(cursor = strchr(cursor+1,' ')) ) return -1;
-    position.setZ(atof(cursor));
-
-    // t
-    if( !(cursor = strchr(cursor+1,' ')) ) return -1;
-    position.setT(atof(cursor));
-    data->set_position( position );
-
-    // SKIPPED: num_orphans_in
-    if( !(cursor = strchr(cursor+1,' ')) ) return -1;
-
-    // num_particles_out
-    if( !(cursor = strchr(cursor+1,' ')) ) return -1;
-    num_particles_out = atoi(cursor);
-
-    //  weights
-
-    if( !(cursor = strchr(cursor+1,' ')) ) return -1;
-    weights_size = atoi(cursor);
-    weights.resize(weights_size);
-
-    for ( int i = 0; i < weights_size; ++i ) {
-        if( !(cursor = strchr(cursor+1,' ')) ) return -1;
-        weights[i] = atof(cursor);
-    }
-
-
-
-    // Add original vertex barcode to the cache
-    m_vertex_cache.push_back( data );
-    m_vertex_barcodes.push_back( barcode );
-
-    m_event_ghost->add_vertex(data_ghost);
-    if (m_options.find("vertex_weights_are_separated")!=m_options.end())
-    {
-        for ( int i = 0; i < weights_size; ++i )
-            data_ghost->add_attribute("weight"+std::to_string((long long unsigned int)i),std::make_shared<DoubleAttribute>(weights[i]));
-    }
-    else
-    {
-        data_ghost->add_attribute("weights",std::make_shared<VectorDoubleAttribute>(weights));
-        data_ghost->add_attribute("weights",std::make_shared<VectorDoubleAttribute>(weights));
-    }
-    m_vertex_cache_ghost.push_back( data_ghost );
-
-    HEPMC3_DEBUG( 10, "ReaderAsciiHepMC2: V: "<<-(int)m_vertex_cache.size()<<" (old barcode"<<barcode<<") "<<num_particles_out<<" particles)" )
-
-    return num_particles_out;
-}
-
-int ReaderAsciiHepMC2::parse_particle_information(const char *buf) {
-    GenParticlePtr  data = std::make_shared<GenParticle>();
-    GenParticlePtr  data_ghost = std::make_shared<GenParticle>();
-    m_event_ghost->add_particle(data_ghost);
-    FourVector      momentum;
-    const char     *cursor  = buf;
-    int             end_vtx = 0;
-
-    /// @note barcode is ignored
-    if( !(cursor = strchr(cursor+1,' ')) ) return -1;
-
-    // id
-    if( !(cursor = strchr(cursor+1,' ')) ) return -1;
-    data->set_pid( atoi(cursor) );
-
-    // px
-    if( !(cursor = strchr(cursor+1,' ')) ) return -1;
-    momentum.setPx(atof(cursor));
-
-    // py
-    if( !(cursor = strchr(cursor+1,' ')) ) return -1;
-    momentum.setPy(atof(cursor));
-
-    // pz
-    if( !(cursor = strchr(cursor+1,' ')) ) return -1;
-    momentum.setPz(atof(cursor));
-
-    // pe
-    if( !(cursor = strchr(cursor+1,' ')) ) return -1;
-    momentum.setE(atof(cursor));
-    data->set_momentum(momentum);
-
-    // m
-    if( !(cursor = strchr(cursor+1,' ')) ) return -1;
-    data->set_generated_mass( atof(cursor) );
-
-    // status
-    if( !(cursor = strchr(cursor+1,' ')) ) return -1;
-    data->set_status( atoi(cursor) );
-
-    //theta
-    if( !(cursor = strchr(cursor+1,' ')) ) return -1;
-    std::shared_ptr<DoubleAttribute> theta = std::make_shared<DoubleAttribute>(atof(cursor));
-    if (theta->value()!=0.0) data_ghost->add_attribute("theta",theta);
-
-    //phi
-    if( !(cursor = strchr(cursor+1,' ')) ) return -1;
-    std::shared_ptr<DoubleAttribute> phi = std::make_shared<DoubleAttribute>(atof(cursor));
-    if (phi->value()!=0.0) data_ghost->add_attribute("phi",phi);
-
-    // end_vtx_code
-    if( !(cursor = strchr(cursor+1,' ')) ) return -1;
-    end_vtx = atoi(cursor);
-
-    //flow
-    if( !(cursor = strchr(cursor+1,' ')) ) return -1;
-    int flowsize=atoi(cursor);
-
-    std::map<int,int> flows;
-    for (int i=0; i<flowsize; i++)
-    {
-        if( !(cursor = strchr(cursor+1,' ')) ) return -1;
-        int  flowindex=atoi(cursor);
-        if( !(cursor = strchr(cursor+1,' ')) ) return -1;
-        int flowvalue=atoi(cursor);
-        flows[flowindex]=flowvalue;
-    }
-    if (m_options.find("particle_flows_are_separated")==m_options.end())
-    {
-        std::vector<int> vectorflows;
-        for (auto f: flows) vectorflows.push_back(f.second);
-        data_ghost->add_attribute("flows",std::make_shared<VectorIntAttribute>(vectorflows));
-    }
-    else
-    {
-        for (auto f: flows)   data_ghost->add_attribute("flow"+std::to_string((long long int)f.first),std::make_shared<IntAttribute>(f.second));
-    }
-// Set prod_vtx link
-    if( end_vtx == m_vertex_barcodes.back() ) {
-        m_vertex_cache.back()->add_particle_in(data);
-        end_vtx = 0;
-    }
-    else {
-        m_vertex_cache.back()->add_particle_out(data);
-    }
-
-    m_particle_cache.push_back( data );
-    m_particle_cache_ghost.push_back( data_ghost );
-    m_end_vertex_barcodes.push_back( end_vtx );
-
-    HEPMC3_DEBUG( 10, "ReaderAsciiHepMC2: P: "<<m_particle_cache.size()<<" ( pid: "<<data->pid()<<") end vertex: "<<end_vtx )
-
-    return 0;
-}
-
-bool ReaderAsciiHepMC2::parse_xs_info(GenEvent &evt, const char *buf) {
-    const char *cursor  = buf;
-    std::shared_ptr<GenCrossSection>  xs     = std::make_shared<GenCrossSection>();
-
-    if( !(cursor = strchr(cursor+1,' ')) ) return false;
-    double xs_val  = atof(cursor);
-
-    if( !(cursor = strchr(cursor+1,' ')) ) return false;
-    double xs_err = atof(cursor);
-
-    xs->set_cross_section( xs_val, xs_err);
-    evt.add_attribute("GenCrossSection",xs);
-
-    return true;
-}
-
-bool ReaderAsciiHepMC2::parse_weight_names(const char *buf) {
-    const char     *cursor  = buf;
-    const char     *cursor2 = buf;
-    int             w_count = 0;
-    std::vector<std::string>  w_names;
-
-    // Ignore weight names if no GenRunInfo object
-    if( !run_info() ) return true;
-
-    if( !(cursor = strchr(cursor+1,' ')) ) return false;
-    w_count = atoi(cursor);
-
-    if( w_count <= 0 ) return false;
-
-    w_names.resize(w_count);
-
-    for( int i=0; i < w_count; ++i ) {
-        // Find pair of '"' characters
-        if( !(cursor  = strchr(cursor+1,'"')) ) return false;
-        if( !(cursor2 = strchr(cursor+1,'"')) ) return false;
-
-        // Strip cursor of leading '"' character
-        ++cursor;
-
-        w_names[i].assign(cursor, cursor2-cursor);
-
-        cursor = cursor2;
-    }
-
-    run_info()->set_weight_names(w_names);
-
-    return true;
-}
-
-bool ReaderAsciiHepMC2::parse_heavy_ion(GenEvent &evt, const char *buf) {
-    std::shared_ptr<GenHeavyIon>  hi     = std::make_shared<GenHeavyIon>();
-    const char              *cursor = buf;
-
-    if( !(cursor = strchr(cursor+1,' ')) ) return false;
-    hi->Ncoll_hard = atoi(cursor);
-
-    if( !(cursor = strchr(cursor+1,' ')) ) return false;
-    hi->Npart_proj = atoi(cursor);
-
-    if( !(cursor = strchr(cursor+1,' ')) ) return false;
-    hi->Npart_targ = atoi(cursor);
-
-    if( !(cursor = strchr(cursor+1,' ')) ) return false;
-    hi->Ncoll = atoi(cursor);
-
-    if( !(cursor = strchr(cursor+1,' ')) ) return false;
-    hi->spectator_neutrons = atoi(cursor);
-
-    if( !(cursor = strchr(cursor+1,' ')) ) return false;
-    hi->spectator_protons = atoi(cursor);
-
-    if( !(cursor = strchr(cursor+1,' ')) ) return false;
-    hi->N_Nwounded_collisions = atoi(cursor);
-
-    if( !(cursor = strchr(cursor+1,' ')) ) return false;
-    hi->Nwounded_N_collisions = atoi(cursor);
-
-    if( !(cursor = strchr(cursor+1,' ')) ) return false;
-    hi->Nwounded_Nwounded_collisions = atoi(cursor);
-
-    if( !(cursor = strchr(cursor+1,' ')) ) return false;
-    hi->impact_parameter = atof(cursor);
-
-    if( !(cursor = strchr(cursor+1,' ')) ) return false;
-    hi->event_plane_angle = atof(cursor);
-
-    if( !(cursor = strchr(cursor+1,' ')) ) return false;
-    hi->eccentricity = atof(cursor);
-
-    if( !(cursor = strchr(cursor+1,' ')) ) return false;
-    hi->sigma_inel_NN = atof(cursor);
-
-    // Not in HepMC2:
-    hi->centrality = 0.0;
-
-    evt.add_attribute("GenHeavyIon",hi);
-
-    return true;
-}
-
-bool ReaderAsciiHepMC2::parse_pdf_info(GenEvent &evt, const char *buf) {
-    std::shared_ptr<GenPdfInfo>  pi     = std::make_shared<GenPdfInfo>();
-    const char             *cursor = buf;
-
-    if( !(cursor = strchr(cursor+1,' ')) ) return false;
-    pi->parton_id[0] = atoi(cursor);
-
-    if( !(cursor = strchr(cursor+1,' ')) ) return false;
-    pi->parton_id[1] = atoi(cursor);
-
-    if( !(cursor = strchr(cursor+1,' ')) ) return false;
-    pi->x[0] = atof(cursor);
-
-    if( !(cursor = strchr(cursor+1,' ')) ) return false;
-    pi->x[1] = atof(cursor);
-
-    if( !(cursor = strchr(cursor+1,' ')) ) return false;
-    pi->scale = atof(cursor);
-
-    if( !(cursor = strchr(cursor+1,' ')) ) return false;
-    pi->xf[0] = atof(cursor);
-
-    if( !(cursor = strchr(cursor+1,' ')) ) return false;
-    pi->xf[1] = atof(cursor);
-
-    //For compatibility with original HepMC2
-    bool pdfids=true;
-    if( !(cursor = strchr(cursor+1,' ')) ) pdfids=false;
-    if(pdfids) pi->pdf_id[0] = atoi(cursor);
-    else  pi->pdf_id[0] =0;
-
-    if(pdfids) if( !(cursor = strchr(cursor+1,' ')) )  pdfids=false;
-    if(pdfids) pi->pdf_id[1] = atoi(cursor);
-    else  pi->pdf_id[1] =0;
-
-    evt.add_attribute("GenPdfInfo",pi);
-
-    return true;
-}
-bool ReaderAsciiHepMC2::failed() { return m_isstream ? (bool)m_stream->rdstate() :(bool)m_file.rdstate(); }
-
-void ReaderAsciiHepMC2::close() {
-    if (m_event_ghost) { m_event_ghost->clear(); delete m_event_ghost; m_event_ghost=nullptr;}
-    if( !m_file.is_open() ) return;
-    m_file.close();
-}
-
-} // namespace HepMC3
Index: external/HepMC3/ReaderAsciiHepMC2.h
===================================================================
--- external/HepMC3/ReaderAsciiHepMC2.h	(revision 302624fca6ca1247dbb8697c4f2e8ecc730d20b1)
+++ 	(revision )
@@ -1,145 +1,0 @@
-// -*- C++ -*-
-//
-// This file is part of HepMC
-// Copyright (C) 2014-2020 The HepMC collaboration (see AUTHORS for details)
-//
-#ifndef HEPMC3_READER_ASCII_HEPMC2_H
-#define HEPMC3_READER_ASCII_HEPMC2_H
-/**
- *  @file  ReaderAsciiHepMC2.h
- *  @brief Definition of \b class ReaderAsciiHepMC2
- *
- *  @class HepMC3::ReaderAsciiHepMC2
- *  @brief Parser for HepMC2 I/O files
- *
- *  @ingroup IO
- *
- */
-#include "HepMC3/Reader.h"
-
-#include "HepMC3/GenEvent.h"
-
-#include <string>
-#include <fstream>
-#include <istream>
-
-namespace HepMC3 {
-
-
-
-class ReaderAsciiHepMC2 : public Reader {
-//
-// Constructors
-//
-public:
-    /** @brief Default constructor */
-    ReaderAsciiHepMC2(const std::string& filename);
-
-    /// The ctor to read from stdin
-    ReaderAsciiHepMC2(std::istream &);
-
-    /// @brief Destructor
-    ~ReaderAsciiHepMC2();
-//
-// Functions
-//
-public:
-    /// @brief skip events
-    bool skip(const int)  override;
-
-    /** @brief Implementation of Reader::read_event */
-    bool read_event(GenEvent &evt)  override;
-
-    /// @brief Return status of the stream
-    bool failed()  override;
-
-    /// @brief Close file stream
-    void close()  override;
-
-private:
-    /** @brief Parse event
-     *
-     *  Helper routine for parsing event information
-     *  @param[out] evt Event that will be filled with new data
-     *  @param[in]  buf Line of text that needs to be parsed
-     */
-    int parse_event_information(GenEvent &evt, const char *buf);
-
-    /** @brief Parse units
-     *
-     *  Helper routine for parsing unit information
-     *  @param[out] evt Event that will be filled with unit information
-     *  @param[in]  buf Line of text that needs to be parsed
-     */
-    bool parse_units(GenEvent &evt, const char *buf);
-
-    /** @brief Parse vertex
-     *
-     *  Helper routine for parsing single event information
-     *  @param[in] buf Line of text that needs to be parsed
-     */
-    int parse_vertex_information(const char *buf);
-
-    /** @brief Parse particle
-     *
-     *  Helper routine for parsing single particle information
-     *  @param[in] buf Line of text that needs to be parsed
-     */
-    int parse_particle_information(const char *buf);
-
-    /** @brief Parse weight names
-     *
-     *  Helper routine for parsing weight names
-     *  @param[in] buf Line of text that needs to be parsed
-     */
-    bool parse_weight_names(const char *buf);
-
-    /** @brief Parse heavy ion information
-     *
-     *  Helper routine for parsing heavy ion information
-     *  @param[out] evt Event that will be filled with new data
-     *  @param[in]  buf Line of text that needs to be parsed
-     */
-    bool parse_heavy_ion(GenEvent &evt, const char *buf);
-
-    /** @brief Parse pdf information
-     *
-     *  Helper routine for parsing pdf information
-     *  @param[out] evt Event that will be filled with new data
-     *  @param[in]  buf Line of text that needs to be parsed
-     */
-    bool parse_pdf_info(GenEvent &evt, const char *buf);
-
-
-    /** @brief Parse pdf information
-    *
-    *  Helper routine for parsing cross-section information
-    *  @param[out] evt Event that will be filled with new data
-    *  @param[in]  buf Line of text that needs to be parsed
-    */
-    bool parse_xs_info(GenEvent &evt, const char *buf);
-
-
-
-//
-// Fields
-//
-private:
-    std::ifstream m_file; //!< Input file
-    std::istream* m_stream; ///< For ctor when reading from stdin
-    bool m_isstream; ///< toggles usage of m_file or m_stream
-
-    std::vector<GenVertexPtr>   m_vertex_cache;        //!< Vertex cache
-    std::vector<int>            m_vertex_barcodes;     //!< Old vertex barcodes
-
-    std::vector<GenParticlePtr> m_particle_cache;      //!< Particle cache
-    std::vector<int>            m_end_vertex_barcodes; //!< Old end vertex barcodes
-
-    GenEvent*              m_event_ghost;                      //!< To save particle and verstex attributes.
-    std::vector<GenParticlePtr> m_particle_cache_ghost;//!< Particle cache for attributes
-    std::vector<GenVertexPtr>   m_vertex_cache_ghost;        //!< Vertex cache for attributes
-};
-
-} // namespace HepMC3
-
-#endif
Index: external/HepMC3/Setup.cc
===================================================================
--- external/HepMC3/Setup.cc	(revision 302624fca6ca1247dbb8697c4f2e8ecc730d20b1)
+++ 	(revision )
@@ -1,27 +1,0 @@
-// -*- C++ -*-
-//
-// This file is part of HepMC
-// Copyright (C) 2014-2019 The HepMC collaboration (see AUTHORS for details)
-//
-/**
- *  @file Setup.cc
- *  @brief Implementation of Setup class
- *
- */
-#include "HepMC3/Setup.h"
-
-namespace HepMC3 {
-
-const unsigned int Setup::DEFAULT_DOUBLE_ALMOST_EQUAL_MAXULPS = 10;
-const double       Setup::DOUBLE_EPSILON                      = 10e-20;
-bool Setup::print_errors()                      { return m_is_printing_errors;    }
-void Setup::set_print_errors(const bool flag)   { m_is_printing_errors   = flag;  }
-bool Setup::print_warnings()                    { return m_is_printing_warnings;  }
-void Setup::set_print_warnings(const bool flag) { m_is_printing_warnings = flag;  }
-int  Setup::debug_level()                       { return m_debug_level;           }
-void Setup::set_debug_level(const int level)    { m_debug_level          = level; }
-bool Setup::m_is_printing_errors    = true;
-bool Setup::m_is_printing_warnings  = true;
-int  Setup::m_debug_level           = 5;
-
-} // namespace HepMC3
Index: external/HepMC3/Setup.h
===================================================================
--- external/HepMC3/Setup.h	(revision 302624fca6ca1247dbb8697c4f2e8ecc730d20b1)
+++ 	(revision )
@@ -1,72 +1,0 @@
-// -*- C++ -*-
-//
-// This file is part of HepMC
-// Copyright (C) 2014-2020 The HepMC collaboration (see AUTHORS for details)
-//
-/// @file Setup.h
-/// @brief Definition of \b class Setup
-
-#ifndef HEPMC3_SETUP_H
-#define HEPMC3_SETUP_H
-
-
-
-namespace HepMC3 {
-
-/// @brief Configuration for HepMC
-///
-/// Contains macro definitions for printing debug output, feature deprecation, etc.
-/// Static class - configuration is shared among all HepMC events
-/// and program threads
-///
-class Setup {
-
-    /// Private constructor
-    Setup() {}
-    /// Private destructor
-    ~Setup() {}
-
-
-public:
-
-    /// @name Accessors
-    //@{
-
-    /// Get error messages printing flag
-    static bool print_errors();
-    /// set error messages printing flag
-    static void set_print_errors(const bool flag);
-
-    /// Get warning messages printing flag
-    static bool print_warnings();
-    /// Set warning messages printing flag
-    static void set_print_warnings(const bool flag);
-
-    /// Get debug level
-    static int  debug_level();
-    /// Set debug level
-    static void set_debug_level(const int level);
-    //@}
-
-    /// @name Static constants
-    //@{
-    /// Default maxUlps for AlmostEqual2sComplement function (double precision)
-    static const unsigned int DEFAULT_DOUBLE_ALMOST_EQUAL_MAXULPS;
-
-    /// Default threshold for comparing double variables
-    static const double DOUBLE_EPSILON;
-
-    //@}
-
-
-private:
-
-    static bool m_is_printing_errors;   //!< Flag for printing error messages
-    static bool m_is_printing_warnings; //!< Flag for printing warning messages
-    static int  m_debug_level;          //!< Level of debug messages printed out
-};
-
-
-} // namespace HepMC3
-
-#endif
Index: external/HepMC3/Units.h
===================================================================
--- external/HepMC3/Units.h	(revision 302624fca6ca1247dbb8697c4f2e8ecc730d20b1)
+++ 	(revision )
@@ -1,113 +1,0 @@
-// -*- C++ -*-
-//
-// This file is part of HepMC
-// Copyright (C) 2014-2020 The HepMC collaboration (see AUTHORS for details)
-//
-#ifndef HEPMC3_UNITS_H
-#define HEPMC3_UNITS_H
-/**
- *  @file Units.h
- *  @brief Definition of \b class Units
- *
- *  @class HepMC3::Units
- *  @brief Stores units-related enums and conversion functions
- *
- *  Manages units used by HepMC::GenEvent
- *
- */
-#include <string>
-#include "HepMC3/Errors.h"
-#include "HepMC3/Setup.h"
-#include "HepMC3/FourVector.h"
-
-namespace HepMC3 {
-
-
-class Units {
-public:
-    /** @brief Momentum units */
-    enum MomentumUnit { MEV, GEV };
-
-    /** @brief Position units */
-    enum LengthUnit   { MM,  CM  };
-
-public:
-    /** @brief Get momentum unit based on its name*/
-    static MomentumUnit momentum_unit( const std::string& name ) {
-        if( name.compare(0,3,"GEV") == 0 ) return GEV;
-        if( name.compare(0,3,"MEV") == 0 ) return MEV;
-
-        HEPMC3_ERROR("Units::momentum_unit: unrecognised unit name: '" << name <<"', setting to GEV" )
-
-        return GEV;
-    }
-
-    /** @brief Get length unit based on its name*/
-    static LengthUnit length_unit( const std::string& name ) {
-        if( name.compare(0,2,"CM") == 0 ) return CM;
-        if( name.compare(0,2,"MM") == 0 ) return MM;
-
-        HEPMC3_ERROR("Units::length_unit: unrecognised unit name: '" << name <<"', setting to CM" )
-
-        return CM;
-    }
-
-    /** @brief Get name of momentum unit */
-    static std::string name( MomentumUnit u ) {
-        switch(u) {
-        case MEV:
-            return "MEV";
-        case GEV:
-            return "GEV";
-        }
-
-        return "<UNDEFINED>";
-    }
-
-    /** @brief Get name of length unit */
-    static std::string name( LengthUnit u ) {
-        switch(u) {
-        case MM:
-            return "MM";
-        case CM:
-            return "CM";
-        }
-
-        return "<UNDEFINED>";
-    }
-
-    /** @brief Convert FourVector to different momentum unit */
-    template <typename T>
-    static void convert( T &m, MomentumUnit from, MomentumUnit to ) {
-        if( from == to ) return;
-
-        if( from == GEV ) {
-            // GEV -> MEV
-            m *= 1000.;
-        }
-        else if( from == MEV ) {
-            // MEV -> GEV
-            m *= 0.001;
-        }
-    }
-
-    /** @brief Convert FourVector to different length unit */
-    template <typename T>
-    static void convert( T &m, LengthUnit from, LengthUnit to ) {
-        if( from == to ) return;
-
-        if( from == CM ) {
-            // CM -> MM
-            m *= 10.0;
-        }
-        else if( from == MM ) {
-            // MM -> CM
-            m *= 0.1;
-        }
-    }
-
-};
-
-} // namespace HepMC3
-
-#endif
