Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt	(revision 224c92984d9377110561f2a4250faea3daad2b5e)
+++ CMakeLists.txt	(revision b30245b0657b11c14403abbcf01ed63b738a06b8)
@@ -29,5 +29,5 @@
 
 # Declare ROOT dependency
-find_package(ROOT COMPONENTS EG Eve Geom Gui GuiHtml GenVector Hist Physics Matrix Graf RIO Tree Gpad RGL MathCore)
+find_package(ROOT COMPONENTS Core EG Eve Geom Gui GuiHtml GenVector Hist Physics Matrix Graf RIO Tree Gpad RGL MathCore)
 include(${ROOT_USE_FILE})
 
@@ -95,3 +95,3 @@
 endif()
 
-install(TARGETS Delphes DelphesDisplay DESTINATION lib)
+install(TARGETS Delphes DelphesDisplay DESTINATION ${CMAKE_INSTALL_LIBDIR})
Index: Makefile
===================================================================
--- Makefile	(revision 224c92984d9377110561f2a4250faea3daad2b5e)
+++ Makefile	(revision b30245b0657b11c14403abbcf01ed63b738a06b8)
@@ -1,2726 +1,665 @@
-
-#
-# Makefile for ExRootAnalysis
-#
-# Author: P. Demin - UCL, Louvain-la-Neuve
-#
-# multi-platform configuration is taken from ROOT (root/test/Makefile.arch)
-#
-
-include doc/Makefile.arch
-
-ROOT_MAJOR := $(shell $(RC) --version | cut -d'.' -f1)
-
-SrcSuf = cc
-PcmSuf = _rdict.pcm
-
-CXXFLAGS += $(ROOTCFLAGS) -Wno-write-strings -D_FILE_OFFSET_BITS=64 -DDROP_CGAL -I. -Iexternal -Iexternal/tcl
-DELPHES_LIBS = $(shell $(RC) --libs) -lEG $(SYSLIBS)
-DISPLAY_LIBS = $(shell $(RC) --evelibs) -lGuiHtml $(SYSLIBS)
-
-ifneq ($(CMSSW_FWLITE_INCLUDE_PATH),)
-HAS_CMSSW = true
-CXXFLAGS += -std=c++0x -I$(subst :, -I,$(CMSSW_FWLITE_INCLUDE_PATH))
-OPT_LIBS += -L$(subst include,lib,$(subst :, -L,$(CMSSW_FWLITE_INCLUDE_PATH)))
-ifneq ($(CMSSW_RELEASE_BASE),)
-CXXFLAGS += -I$(CMSSW_RELEASE_BASE)/src
-endif
-ifneq ($(LD_LIBRARY_PATH),)
-OPT_LIBS += -L$(subst include,lib,$(subst :, -L,$(LD_LIBRARY_PATH)))
-endif
-OPT_LIBS += -lGenVector -lFWCoreFWLite -lDataFormatsFWLite -lDataFormatsCommon -lDataFormatsPatCandidates -lDataFormatsLuminosity -lSimDataFormatsGeneratorProducts -lCommonToolsUtils -lDataFormatsCommon
-endif
-
-# check consistency
-ifneq ($(PROMC),)
-ifneq ($(PROIO),)
-$(error Attention:  PROMC and PROIO env. variables are set simultaneously. You cannot compile ProMC and ProIO readers in one compilation process due to an inconsistency in protocol buffers libraries. The suggestion is to compile these two readers in two steps. First unset PROIO variable and then \"configure; make\". After this, unset PROMC, set PROIO,  and run \"configure; make\". During runs, make sure shared libraries are set correctly.)
-endif
-endif
-
-ifneq ($(PROMC),)
-HAS_PROMC = true
-$(info ProMC event reader is requested)
-CXXFLAGS += -I$(PROMC)/include -I$(PROMC)/src
-OPT_LIBS += -L$(PROMC)/lib -lpromc -lprotoc -lprotobuf -lprotobuf-lite -lcbook -lz
-endif
-
-ifneq ($(PROIO),)
-HAS_PROIO = true
-$(info ProIO reader is requested)
-ifeq ($(PROTOBUF),)
-$(error but PROTOBUF variable is not set.)
-endif
-PROTOBUF_FILE=$(PROTOBUF)/lib/libprotobuf.a
-ifeq ("$(wildcard $(PROTOBUF_FILE))","")
-$(error PROTOBUF variable is set, but it does not point to valid $(PROTOBUF_FILE))
-endif
-ifeq ($(LZ4),)
-$(error but LZ4 variable is not set.)
-endif
-LZ4_FILE=$(LZ4)/lib/liblz4.so
-ifeq ("$(wildcard $(LZ4_FILE))","")
-$(error LZ4 variable is set,  but it does not point to valid $(LZ4_FILE))
-endif
-CXXFLAGS += -I$(PROIO)/include -I$(PROTOBUF)/include -I$(LZ4)/include -I$(PROIO)/src
-OPT_LIBS += -L$(PROTOBUF)/lib -lprotobuf -L$(PROIO)/lib -lproio -lproio.pb -lz -L$(LZ4)/lib -llz4
-endif
-
-ifeq ($(HAS_PYTHIA8),true)
-ifneq ($(PYTHIA8),)
-CXXFLAGS += -I$(PYTHIA8)/include
-CXXFLAGS += -I$(PYTHIA8)/include/Pythia8
-OPT_LIBS += -L$(PYTHIA8)/lib -lpythia8 -ldl -lz
-endif
-endif
-
-DELPHES_LIBS += $(OPT_LIBS)
-DISPLAY_LIBS += $(OPT_LIBS)
-
-###
-
-NOFASTJET = libDelphesNoFastJet.$(DllSuf)
-NOFASTJETLIB = libDelphesNoFastJet.lib
-
-DELPHES = libDelphes.$(DllSuf)
-DELPHESLIB = libDelphes.lib
-
-DISPLAY = libDelphesDisplay.$(DllSuf)
-DISPLAYLIB = libDelphesDisplay.lib
-
-VERSION = x.y.z
-DISTDIR = Delphes-$(VERSION)
-DISTTAR = $(DISTDIR).tar.gz
-
-all:
-
-
-hepmc2pileup$(ExeSuf): \
-	tmp/converters/hepmc2pileup.$(ObjSuf)
-
-tmp/converters/hepmc2pileup.$(ObjSuf): \
-	converters/hepmc2pileup.cpp \
-	classes/DelphesClasses.h \
-	classes/DelphesFactory.h \
-	classes/DelphesHepMC2Reader.h \
-	classes/DelphesPileUpWriter.h \
-	external/ExRootAnalysis/ExRootProgressBar.h \
-	external/ExRootAnalysis/ExRootTreeBranch.h \
-	external/ExRootAnalysis/ExRootTreeWriter.h
-lhco2root$(ExeSuf): \
-	tmp/converters/lhco2root.$(ObjSuf)
-
-tmp/converters/lhco2root.$(ObjSuf): \
-	converters/lhco2root.cpp \
-	classes/DelphesClasses.h \
-	classes/DelphesFactory.h \
-	classes/DelphesStream.h \
-	modules/Delphes.h \
-	external/ExRootAnalysis/ExRootProgressBar.h \
-	external/ExRootAnalysis/ExRootTreeBranch.h \
-	external/ExRootAnalysis/ExRootTreeWriter.h
-pileup2root$(ExeSuf): \
-	tmp/converters/pileup2root.$(ObjSuf)
-
-tmp/converters/pileup2root.$(ObjSuf): \
-	converters/pileup2root.cpp \
-	classes/DelphesClasses.h \
-	classes/DelphesFactory.h \
-	classes/DelphesPileUpReader.h \
-	classes/DelphesStream.h \
-	external/ExRootAnalysis/ExRootProgressBar.h \
-	external/ExRootAnalysis/ExRootTreeBranch.h \
-	external/ExRootAnalysis/ExRootTreeWriter.h
-root2lhco$(ExeSuf): \
-	tmp/converters/root2lhco.$(ObjSuf)
-
-tmp/converters/root2lhco.$(ObjSuf): \
-	converters/root2lhco.cpp \
-	classes/DelphesClasses.h \
-	external/ExRootAnalysis/ExRootProgressBar.h \
-	external/ExRootAnalysis/ExRootTreeReader.h
-root2pileup$(ExeSuf): \
-	tmp/converters/root2pileup.$(ObjSuf)
-
-tmp/converters/root2pileup.$(ObjSuf): \
-	converters/root2pileup.cpp \
-	classes/DelphesClasses.h \
-	classes/DelphesPileUpWriter.h \
-	external/ExRootAnalysis/ExRootProgressBar.h \
-	external/ExRootAnalysis/ExRootTreeReader.h
-stdhep2pileup$(ExeSuf): \
-	tmp/converters/stdhep2pileup.$(ObjSuf)
-
-tmp/converters/stdhep2pileup.$(ObjSuf): \
-	converters/stdhep2pileup.cpp \
-	classes/DelphesClasses.h \
-	classes/DelphesFactory.h \
-	classes/DelphesPileUpWriter.h \
-	classes/DelphesSTDHEPReader.h \
-	external/ExRootAnalysis/ExRootProgressBar.h \
-	external/ExRootAnalysis/ExRootTreeBranch.h \
-	external/ExRootAnalysis/ExRootTreeWriter.h
-CaloGrid$(ExeSuf): \
-	tmp/examples/CaloGrid.$(ObjSuf)
-
-tmp/examples/CaloGrid.$(ObjSuf): \
-	examples/CaloGrid.cpp \
-	external/ExRootAnalysis/ExRootConfReader.h \
-	classes/DelphesClasses.h \
-	display/Delphes3DGeometry.h
-Example1$(ExeSuf): \
-	tmp/examples/Example1.$(ObjSuf)
-
-tmp/examples/Example1.$(ObjSuf): \
-	examples/Example1.cpp \
-	classes/DelphesClasses.h \
-	external/ExRootAnalysis/ExRootResult.h \
-	external/ExRootAnalysis/ExRootTreeBranch.h \
-	external/ExRootAnalysis/ExRootTreeReader.h \
-	external/ExRootAnalysis/ExRootTreeWriter.h \
-	external/ExRootAnalysis/ExRootUtilities.h
-DelphesValidation$(ExeSuf): \
-	tmp/validation/DelphesValidation.$(ObjSuf)
-
-tmp/validation/DelphesValidation.$(ObjSuf): \
-	validation/DelphesValidation.cpp \
-	classes/DelphesClasses.h \
-	external/ExRootAnalysis/ExRootResult.h \
-	external/ExRootAnalysis/ExRootTreeBranch.h \
-	external/ExRootAnalysis/ExRootTreeReader.h \
-	external/ExRootAnalysis/ExRootTreeWriter.h \
-	external/ExRootAnalysis/ExRootUtilities.h
-EXECUTABLE +=  \
-	hepmc2pileup$(ExeSuf) \
-	lhco2root$(ExeSuf) \
-	pileup2root$(ExeSuf) \
-	root2lhco$(ExeSuf) \
-	root2pileup$(ExeSuf) \
-	stdhep2pileup$(ExeSuf) \
-	CaloGrid$(ExeSuf) \
-	Example1$(ExeSuf) \
-	DelphesValidation$(ExeSuf)
-
-EXECUTABLE_OBJ +=  \
-	tmp/converters/hepmc2pileup.$(ObjSuf) \
-	tmp/converters/lhco2root.$(ObjSuf) \
-	tmp/converters/pileup2root.$(ObjSuf) \
-	tmp/converters/root2lhco.$(ObjSuf) \
-	tmp/converters/root2pileup.$(ObjSuf) \
-	tmp/converters/stdhep2pileup.$(ObjSuf) \
-	tmp/examples/CaloGrid.$(ObjSuf) \
-	tmp/examples/Example1.$(ObjSuf) \
-	tmp/validation/DelphesValidation.$(ObjSuf)
-
-DelphesHepMC2$(ExeSuf): \
-	tmp/readers/DelphesHepMC2.$(ObjSuf)
-
-tmp/readers/DelphesHepMC2.$(ObjSuf): \
-	readers/DelphesHepMC2.cpp \
-	classes/DelphesClasses.h \
-	classes/DelphesFactory.h \
-	classes/DelphesHepMC2Reader.h \
-	modules/Delphes.h \
-	external/ExRootAnalysis/ExRootProgressBar.h \
-	external/ExRootAnalysis/ExRootTreeBranch.h \
-	external/ExRootAnalysis/ExRootTreeWriter.h
-DelphesHepMC3$(ExeSuf): \
-	tmp/readers/DelphesHepMC3.$(ObjSuf)
-
-tmp/readers/DelphesHepMC3.$(ObjSuf): \
-	readers/DelphesHepMC3.cpp \
-	classes/DelphesClasses.h \
-	classes/DelphesFactory.h \
-	modules/Delphes.h \
-	external/ExRootAnalysis/ExRootProgressBar.h \
-	external/ExRootAnalysis/ExRootTreeBranch.h \
-	external/ExRootAnalysis/ExRootTreeWriter.h \
-	external/HepMC3/ReaderAscii.h \
-	external/HepMC3/GenEvent.h \
-	external/HepMC3/GenCrossSection.h \
-	external/HepMC3/GenPdfInfo.h \
-	external/HepMC3/GenParticle.h \
-	external/HepMC3/GenVertex.h \
-	external/HepMC3/Units.h
-DelphesLHEF$(ExeSuf): \
-	tmp/readers/DelphesLHEF.$(ObjSuf)
-
-tmp/readers/DelphesLHEF.$(ObjSuf): \
-	readers/DelphesLHEF.cpp \
-	classes/DelphesClasses.h \
-	classes/DelphesFactory.h \
-	classes/DelphesLHEFReader.h \
-	modules/Delphes.h \
-	external/ExRootAnalysis/ExRootProgressBar.h \
-	external/ExRootAnalysis/ExRootTreeBranch.h \
-	external/ExRootAnalysis/ExRootTreeWriter.h
-DelphesROOT$(ExeSuf): \
-	tmp/readers/DelphesROOT.$(ObjSuf)
-
-tmp/readers/DelphesROOT.$(ObjSuf): \
-	readers/DelphesROOT.cpp \
-	classes/DelphesClasses.h \
-	classes/DelphesFactory.h \
-	classes/DelphesStream.h \
-	modules/Delphes.h \
-	external/ExRootAnalysis/ExRootProgressBar.h \
-	external/ExRootAnalysis/ExRootTreeBranch.h \
-	external/ExRootAnalysis/ExRootTreeReader.h \
-	external/ExRootAnalysis/ExRootTreeWriter.h
-DelphesSTDHEP$(ExeSuf): \
-	tmp/readers/DelphesSTDHEP.$(ObjSuf)
-
-tmp/readers/DelphesSTDHEP.$(ObjSuf): \
-	readers/DelphesSTDHEP.cpp \
-	classes/DelphesClasses.h \
-	classes/DelphesFactory.h \
-	classes/DelphesSTDHEPReader.h \
-	modules/Delphes.h \
-	external/ExRootAnalysis/ExRootProgressBar.h \
-	external/ExRootAnalysis/ExRootTreeBranch.h \
-	external/ExRootAnalysis/ExRootTreeWriter.h
-EXECUTABLE +=  \
-	DelphesHepMC2$(ExeSuf) \
-	DelphesHepMC3$(ExeSuf) \
-	DelphesLHEF$(ExeSuf) \
-	DelphesROOT$(ExeSuf) \
-	DelphesSTDHEP$(ExeSuf)
-
-EXECUTABLE_OBJ +=  \
-	tmp/readers/DelphesHepMC2.$(ObjSuf) \
-	tmp/readers/DelphesHepMC3.$(ObjSuf) \
-	tmp/readers/DelphesLHEF.$(ObjSuf) \
-	tmp/readers/DelphesROOT.$(ObjSuf) \
-	tmp/readers/DelphesSTDHEP.$(ObjSuf)
-
-ifeq ($(HAS_CMSSW),true)
-DelphesCMSFWLite$(ExeSuf): \
-	tmp/readers/DelphesCMSFWLite.$(ObjSuf)
-
-tmp/readers/DelphesCMSFWLite.$(ObjSuf): \
-	readers/DelphesCMSFWLite.cpp \
-	classes/DelphesClasses.h \
-	classes/DelphesFactory.h \
-	classes/DelphesStream.h \
-	modules/Delphes.h \
-	external/ExRootAnalysis/ExRootProgressBar.h \
-	external/ExRootAnalysis/ExRootTreeBranch.h \
-	external/ExRootAnalysis/ExRootTreeWriter.h
-EXECUTABLE +=  \
-	DelphesCMSFWLite$(ExeSuf)
-
-EXECUTABLE_OBJ +=  \
-	tmp/readers/DelphesCMSFWLite.$(ObjSuf)
-
-endif
-
-ifeq ($(HAS_PROMC),true)
-DelphesProMC$(ExeSuf): \
-	tmp/readers/DelphesProMC.$(ObjSuf)
-
-tmp/readers/DelphesProMC.$(ObjSuf): \
-	readers/DelphesProMC.cpp \
-	classes/DelphesClasses.h \
-	classes/DelphesFactory.h \
-	classes/DelphesStream.h \
-	modules/Delphes.h \
-	external/ExRootAnalysis/ExRootProgressBar.h \
-	external/ExRootAnalysis/ExRootTreeBranch.h \
-	external/ExRootAnalysis/ExRootTreeWriter.h
-EXECUTABLE +=  \
-	DelphesProMC$(ExeSuf)
-
-EXECUTABLE_OBJ +=  \
-	tmp/readers/DelphesProMC.$(ObjSuf)
-
-endif
-
-ifeq ($(HAS_PROIO),true)
-DelphesProIO$(ExeSuf): \
-	tmp/readers/DelphesProIO.$(ObjSuf)
-
-tmp/readers/DelphesProIO.$(ObjSuf): \
-	readers/DelphesProIO.cpp \
-	classes/DelphesClasses.h \
-	classes/DelphesFactory.h \
-	classes/DelphesStream.h \
-	modules/Delphes.h \
-	external/ExRootAnalysis/ExRootProgressBar.h \
-	external/ExRootAnalysis/ExRootTreeBranch.h \
-	external/ExRootAnalysis/ExRootTreeWriter.h
-EXECUTABLE +=  \
-	DelphesProIO$(ExeSuf)
-
-EXECUTABLE_OBJ +=  \
-	tmp/readers/DelphesProIO.$(ObjSuf)
-
-endif
-
-ifeq ($(HAS_PYTHIA8),true)
-DelphesPythia8$(ExeSuf): \
-	tmp/readers/DelphesPythia8.$(ObjSuf)
-
-tmp/readers/DelphesPythia8.$(ObjSuf): \
-	readers/DelphesPythia8.cpp \
-	classes/DelphesClasses.h \
-	classes/DelphesFactory.h \
-	classes/DelphesLHEFReader.h \
-	modules/Delphes.h \
-	external/ExRootAnalysis/ExRootProgressBar.h \
-	external/ExRootAnalysis/ExRootTreeBranch.h \
-	external/ExRootAnalysis/ExRootTreeWriter.h
-EXECUTABLE +=  \
-	DelphesPythia8$(ExeSuf)
-
-EXECUTABLE_OBJ +=  \
-	tmp/readers/DelphesPythia8.$(ObjSuf)
-
-tmp/modules/Pythia8Dict.$(SrcSuf): \
-	modules/Pythia8LinkDef.h \
-	modules/PileUpMergerPythia8.h
-tmp/modules/Pythia8Dict$(PcmSuf): \
-	tmp/modules/Pythia8Dict.$(SrcSuf)
-Pythia8Dict$(PcmSuf): \
-	tmp/modules/Pythia8Dict$(PcmSuf)
-DELPHES_DICT_OBJ +=  \
-	tmp/modules/Pythia8Dict.$(ObjSuf)
-
-DELPHES_DICT_PCM +=  \
-	Pythia8Dict$(PcmSuf)
-
-endif
-
-tmp/classes/ClassesDict.$(SrcSuf): \
-	classes/ClassesLinkDef.h \
-	classes/DelphesModule.h \
-	classes/DelphesFactory.h \
-	classes/SortableObject.h \
-	classes/DelphesClasses.h
-tmp/classes/ClassesDict$(PcmSuf): \
-	tmp/classes/ClassesDict.$(SrcSuf)
-ClassesDict$(PcmSuf): \
-	tmp/classes/ClassesDict$(PcmSuf)
-tmp/external/ExRootAnalysis/ExRootAnalysisDict.$(SrcSuf): \
-	external/ExRootAnalysis/ExRootAnalysisLinkDef.h \
-	external/ExRootAnalysis/ExRootTreeReader.h \
-	external/ExRootAnalysis/ExRootTreeWriter.h \
-	external/ExRootAnalysis/ExRootTreeBranch.h \
-	external/ExRootAnalysis/ExRootResult.h \
-	external/ExRootAnalysis/ExRootUtilities.h \
-	external/ExRootAnalysis/ExRootClassifier.h \
-	external/ExRootAnalysis/ExRootFilter.h \
-	external/ExRootAnalysis/ExRootProgressBar.h \
-	external/ExRootAnalysis/ExRootConfReader.h \
-	external/ExRootAnalysis/ExRootTask.h
-tmp/external/ExRootAnalysis/ExRootAnalysisDict$(PcmSuf): \
-	tmp/external/ExRootAnalysis/ExRootAnalysisDict.$(SrcSuf)
-ExRootAnalysisDict$(PcmSuf): \
-	tmp/external/ExRootAnalysis/ExRootAnalysisDict$(PcmSuf)
-tmp/modules/ModulesDict.$(SrcSuf): \
-	modules/ModulesLinkDef.h \
-	modules/Delphes.h \
-	modules/AngularSmearing.h \
-	modules/PhotonConversions.h \
-	modules/ParticlePropagator.h \
-	modules/Efficiency.h \
-	modules/IdentificationMap.h \
-	modules/EnergySmearing.h \
-	modules/MomentumSmearing.h \
-	modules/TrackSmearing.h \
-	modules/TrackCovariance.h \
-	modules/ClusterCounting.h \
-	modules/ImpactParameterSmearing.h \
-	modules/TimeSmearing.h \
-	modules/TimeOfFlight.h \
-	modules/SimpleCalorimeter.h \
-	modules/DenseTrackFilter.h \
-	modules/Calorimeter.h \
-	modules/DualReadoutCalorimeter.h \
-	modules/OldCalorimeter.h \
-	modules/Isolation.h \
-	modules/EnergyScale.h \
-	modules/UniqueObjectFinder.h \
-	modules/TrackCountingBTagging.h \
-	modules/BTagging.h \
-	modules/TauTagging.h \
-	modules/TrackCountingTauTagging.h \
-	modules/TreeWriter.h \
-	modules/Merger.h \
-	modules/LeptonDressing.h \
-	modules/PileUpMerger.h \
-	modules/JetPileUpSubtractor.h \
-	modules/TrackPileUpSubtractor.h \
-	modules/TaggingParticlesSkimmer.h \
-	modules/PileUpJetID.h \
-	modules/PhotonID.h \
-	modules/ConstituentFilter.h \
-	modules/StatusPidFilter.h \
-	modules/PdgCodeFilter.h \
-	modules/BeamSpotFilter.h \
-	modules/RecoPuFilter.h \
-	modules/Cloner.h \
-	modules/Weighter.h \
-	modules/Hector.h \
-	modules/JetFlavorAssociation.h \
-	modules/JetFakeParticle.h \
-	modules/VertexSorter.h \
-	modules/VertexFinder.h \
-	modules/VertexFinderDA4D.h \
-	modules/DecayFilter.h \
-	modules/ParticleDensity.h \
-	modules/TruthVertexFinder.h \
-	modules/ExampleModule.h
-tmp/modules/ModulesDict$(PcmSuf): \
-	tmp/modules/ModulesDict.$(SrcSuf)
-ModulesDict$(PcmSuf): \
-	tmp/modules/ModulesDict$(PcmSuf)
-DELPHES_DICT_OBJ +=  \
-	tmp/classes/ClassesDict.$(ObjSuf) \
-	tmp/external/ExRootAnalysis/ExRootAnalysisDict.$(ObjSuf) \
-	tmp/modules/ModulesDict.$(ObjSuf)
-
-DELPHES_DICT_PCM +=  \
-	ClassesDict$(PcmSuf) \
-	ExRootAnalysisDict$(PcmSuf) \
-	ModulesDict$(PcmSuf)
-
-tmp/modules/FastJetDict.$(SrcSuf): \
-	modules/FastJetLinkDef.h \
-	modules/FastJetFinder.h \
-	modules/FastJetGridMedianEstimator.h \
-	modules/RunPUPPI.h
-tmp/modules/FastJetDict$(PcmSuf): \
-	tmp/modules/FastJetDict.$(SrcSuf)
-FastJetDict$(PcmSuf): \
-	tmp/modules/FastJetDict$(PcmSuf)
-FASTJET_DICT_OBJ +=  \
-	tmp/modules/FastJetDict.$(ObjSuf)
-
-FASTJET_DICT_PCM +=  \
-	FastJetDict$(PcmSuf)
-
-tmp/display/DisplayDict.$(SrcSuf): \
-	display/DisplayLinkDef.h \
-	display/DelphesDisplay.h \
-	display/DelphesCaloData.h \
-	display/DelphesBranchElement.h \
-	display/Delphes3DGeometry.h \
-	display/DelphesEventDisplay.h \
-	display/DelphesHtmlSummary.h \
-	display/DelphesPlotSummary.h
-tmp/display/DisplayDict$(PcmSuf): \
-	tmp/display/DisplayDict.$(SrcSuf)
-DisplayDict$(PcmSuf): \
-	tmp/display/DisplayDict$(PcmSuf)
-DISPLAY_DICT_OBJ +=  \
-	tmp/display/DisplayDict.$(ObjSuf)
-
-DISPLAY_DICT_PCM +=  \
-	DisplayDict$(PcmSuf)
-
-tmp/classes/DelphesClasses.$(ObjSuf): \
-	classes/DelphesClasses.$(SrcSuf) \
-	classes/DelphesClasses.h \
-	classes/DelphesFactory.h \
-	classes/SortableObject.h
-tmp/classes/DelphesCylindricalFormula.$(ObjSuf): \
-	classes/DelphesCylindricalFormula.$(SrcSuf) \
-	classes/DelphesCylindricalFormula.h
-tmp/classes/DelphesFactory.$(ObjSuf): \
-	classes/DelphesFactory.$(SrcSuf) \
-	classes/DelphesFactory.h \
-	classes/DelphesClasses.h \
-	external/ExRootAnalysis/ExRootTreeBranch.h
-tmp/classes/DelphesFormula.$(ObjSuf): \
-	classes/DelphesFormula.$(SrcSuf) \
-	classes/DelphesFormula.h \
-	classes/DelphesClasses.h
-tmp/classes/DelphesHepMC2Reader.$(ObjSuf): \
-	classes/DelphesHepMC2Reader.$(SrcSuf) \
-	classes/DelphesHepMC2Reader.h \
-	classes/DelphesClasses.h \
-	classes/DelphesFactory.h \
-	classes/DelphesStream.h \
-	external/ExRootAnalysis/ExRootTreeBranch.h
-tmp/classes/DelphesHepMC3Reader.$(ObjSuf): \
-	classes/DelphesHepMC3Reader.$(SrcSuf) \
-	classes/DelphesHepMC3Reader.h \
-	classes/DelphesClasses.h \
-	classes/DelphesFactory.h \
-	classes/DelphesStream.h \
-	external/ExRootAnalysis/ExRootTreeBranch.h
-tmp/classes/DelphesLHEFReader.$(ObjSuf): \
-	classes/DelphesLHEFReader.$(SrcSuf) \
-	classes/DelphesLHEFReader.h \
-	classes/DelphesClasses.h \
-	classes/DelphesFactory.h \
-	classes/DelphesStream.h \
-	external/ExRootAnalysis/ExRootTreeBranch.h
-tmp/classes/DelphesModule.$(ObjSuf): \
-	classes/DelphesModule.$(SrcSuf) \
-	classes/DelphesModule.h \
-	classes/DelphesFactory.h \
-	external/ExRootAnalysis/ExRootResult.h \
-	external/ExRootAnalysis/ExRootTreeBranch.h \
-	external/ExRootAnalysis/ExRootTreeReader.h \
-	external/ExRootAnalysis/ExRootTreeWriter.h
-tmp/classes/DelphesPileUpReader.$(ObjSuf): \
-	classes/DelphesPileUpReader.$(SrcSuf) \
-	classes/DelphesPileUpReader.h \
-	classes/DelphesXDRReader.h
-tmp/classes/DelphesPileUpWriter.$(ObjSuf): \
-	classes/DelphesPileUpWriter.$(SrcSuf) \
-	classes/DelphesPileUpWriter.h \
-	classes/DelphesXDRWriter.h
-tmp/classes/DelphesSTDHEPReader.$(ObjSuf): \
-	classes/DelphesSTDHEPReader.$(SrcSuf) \
-	classes/DelphesSTDHEPReader.h \
-	classes/DelphesClasses.h \
-	classes/DelphesFactory.h \
-	classes/DelphesXDRReader.h \
-	external/ExRootAnalysis/ExRootTreeBranch.h
-tmp/classes/DelphesStream.$(ObjSuf): \
-	classes/DelphesStream.$(SrcSuf) \
-	classes/DelphesStream.h
-tmp/classes/DelphesTF2.$(ObjSuf): \
-	classes/DelphesTF2.$(SrcSuf) \
-	classes/DelphesTF2.h
-tmp/classes/DelphesXDRReader.$(ObjSuf): \
-	classes/DelphesXDRReader.$(SrcSuf) \
-	classes/DelphesXDRReader.h
-tmp/classes/DelphesXDRWriter.$(ObjSuf): \
-	classes/DelphesXDRWriter.$(SrcSuf) \
-	classes/DelphesXDRWriter.h
-tmp/external/ExRootAnalysis/ExRootConfReader.$(ObjSuf): \
-	external/ExRootAnalysis/ExRootConfReader.$(SrcSuf) \
-	external/ExRootAnalysis/ExRootConfReader.h \
-	external/tcl/tcl.h
-tmp/external/ExRootAnalysis/ExRootFilter.$(ObjSuf): \
-	external/ExRootAnalysis/ExRootFilter.$(SrcSuf) \
-	external/ExRootAnalysis/ExRootFilter.h \
-	external/ExRootAnalysis/ExRootClassifier.h
-tmp/external/ExRootAnalysis/ExRootProgressBar.$(ObjSuf): \
-	external/ExRootAnalysis/ExRootProgressBar.$(SrcSuf) \
-	external/ExRootAnalysis/ExRootProgressBar.h
-tmp/external/ExRootAnalysis/ExRootResult.$(ObjSuf): \
-	external/ExRootAnalysis/ExRootResult.$(SrcSuf) \
-	external/ExRootAnalysis/ExRootResult.h \
-	external/ExRootAnalysis/ExRootUtilities.h
-tmp/external/ExRootAnalysis/ExRootTask.$(ObjSuf): \
-	external/ExRootAnalysis/ExRootTask.$(SrcSuf) \
-	external/ExRootAnalysis/ExRootTask.h \
-	external/ExRootAnalysis/ExRootConfReader.h
-tmp/external/ExRootAnalysis/ExRootTreeBranch.$(ObjSuf): \
-	external/ExRootAnalysis/ExRootTreeBranch.$(SrcSuf) \
-	external/ExRootAnalysis/ExRootTreeBranch.h
-tmp/external/ExRootAnalysis/ExRootTreeReader.$(ObjSuf): \
-	external/ExRootAnalysis/ExRootTreeReader.$(SrcSuf) \
-	external/ExRootAnalysis/ExRootTreeReader.h
-tmp/external/ExRootAnalysis/ExRootTreeWriter.$(ObjSuf): \
-	external/ExRootAnalysis/ExRootTreeWriter.$(SrcSuf) \
-	external/ExRootAnalysis/ExRootTreeWriter.h \
-	external/ExRootAnalysis/ExRootTreeBranch.h
-tmp/external/ExRootAnalysis/ExRootUtilities.$(ObjSuf): \
-	external/ExRootAnalysis/ExRootUtilities.$(SrcSuf) \
-	external/ExRootAnalysis/ExRootUtilities.h
-tmp/external/Hector/H_AbstractBeamLine.$(ObjSuf): \
-	external/Hector/H_AbstractBeamLine.$(SrcSuf)
-tmp/external/Hector/H_Aperture.$(ObjSuf): \
-	external/Hector/H_Aperture.$(SrcSuf)
-tmp/external/Hector/H_Beam.$(ObjSuf): \
-	external/Hector/H_Beam.$(SrcSuf)
-tmp/external/Hector/H_BeamLine.$(ObjSuf): \
-	external/Hector/H_BeamLine.$(SrcSuf)
-tmp/external/Hector/H_BeamLineParser.$(ObjSuf): \
-	external/Hector/H_BeamLineParser.$(SrcSuf)
-tmp/external/Hector/H_BeamParticle.$(ObjSuf): \
-	external/Hector/H_BeamParticle.$(SrcSuf)
-tmp/external/Hector/H_CircularAperture.$(ObjSuf): \
-	external/Hector/H_CircularAperture.$(SrcSuf)
-tmp/external/Hector/H_Dipole.$(ObjSuf): \
-	external/Hector/H_Dipole.$(SrcSuf)
-tmp/external/Hector/H_Drift.$(ObjSuf): \
-	external/Hector/H_Drift.$(SrcSuf)
-tmp/external/Hector/H_EllipticAperture.$(ObjSuf): \
-	external/Hector/H_EllipticAperture.$(SrcSuf)
-tmp/external/Hector/H_HorizontalKicker.$(ObjSuf): \
-	external/Hector/H_HorizontalKicker.$(SrcSuf)
-tmp/external/Hector/H_HorizontalQuadrupole.$(ObjSuf): \
-	external/Hector/H_HorizontalQuadrupole.$(SrcSuf)
-tmp/external/Hector/H_Kicker.$(ObjSuf): \
-	external/Hector/H_Kicker.$(SrcSuf)
-tmp/external/Hector/H_Marker.$(ObjSuf): \
-	external/Hector/H_Marker.$(SrcSuf)
-tmp/external/Hector/H_OpticalElement.$(ObjSuf): \
-	external/Hector/H_OpticalElement.$(SrcSuf)
-tmp/external/Hector/H_Parameters.$(ObjSuf): \
-	external/Hector/H_Parameters.$(SrcSuf)
-tmp/external/Hector/H_Quadrupole.$(ObjSuf): \
-	external/Hector/H_Quadrupole.$(SrcSuf)
-tmp/external/Hector/H_RecRPObject.$(ObjSuf): \
-	external/Hector/H_RecRPObject.$(SrcSuf)
-tmp/external/Hector/H_RectEllipticAperture.$(ObjSuf): \
-	external/Hector/H_RectEllipticAperture.$(SrcSuf)
-tmp/external/Hector/H_RectangularAperture.$(ObjSuf): \
-	external/Hector/H_RectangularAperture.$(SrcSuf)
-tmp/external/Hector/H_RectangularCollimator.$(ObjSuf): \
-	external/Hector/H_RectangularCollimator.$(SrcSuf)
-tmp/external/Hector/H_RectangularDipole.$(ObjSuf): \
-	external/Hector/H_RectangularDipole.$(SrcSuf)
-tmp/external/Hector/H_RomanPot.$(ObjSuf): \
-	external/Hector/H_RomanPot.$(SrcSuf)
-tmp/external/Hector/H_SectorDipole.$(ObjSuf): \
-	external/Hector/H_SectorDipole.$(SrcSuf)
-tmp/external/Hector/H_TransportMatrices.$(ObjSuf): \
-	external/Hector/H_TransportMatrices.$(SrcSuf)
-tmp/external/Hector/H_VerticalKicker.$(ObjSuf): \
-	external/Hector/H_VerticalKicker.$(SrcSuf)
-tmp/external/Hector/H_VerticalQuadrupole.$(ObjSuf): \
-	external/Hector/H_VerticalQuadrupole.$(SrcSuf)
-tmp/external/HepMC3/GenCrossSection.$(ObjSuf): \
-	external/HepMC3/GenCrossSection.$(SrcSuf) \
-	external/HepMC3/GenCrossSection.h \
-	external/HepMC3/GenEvent.h
-tmp/external/HepMC3/GenEvent.$(ObjSuf): \
-	external/HepMC3/GenEvent.$(SrcSuf) \
-	external/HepMC3/GenEvent.h \
-	external/HepMC3/GenParticle.h \
-	external/HepMC3/GenVertex.h \
-	external/HepMC3/Data/GenEventData.h
-tmp/external/HepMC3/GenHeavyIon.$(ObjSuf): \
-	external/HepMC3/GenHeavyIon.$(SrcSuf) \
-	external/HepMC3/GenHeavyIon.h
-tmp/external/HepMC3/GenParticle.$(ObjSuf): \
-	external/HepMC3/GenParticle.$(SrcSuf) \
-	external/HepMC3/GenParticle.h \
-	external/HepMC3/GenVertex.h \
-	external/HepMC3/GenEvent.h \
-	external/HepMC3/Setup.h \
-	external/HepMC3/Attribute.h
-tmp/external/HepMC3/GenPdfInfo.$(ObjSuf): \
-	external/HepMC3/GenPdfInfo.$(SrcSuf) \
-	external/HepMC3/GenPdfInfo.h
-tmp/external/HepMC3/GenRunInfo.$(ObjSuf): \
-	external/HepMC3/GenRunInfo.$(SrcSuf) \
-	external/HepMC3/GenRunInfo.h \
-	external/HepMC3/Data/GenRunInfoData.h
-tmp/external/HepMC3/GenVertex.$(ObjSuf): \
-	external/HepMC3/GenVertex.$(SrcSuf) \
-	external/HepMC3/GenVertex.h \
-	external/HepMC3/GenParticle.h \
-	external/HepMC3/GenEvent.h \
-	external/HepMC3/Setup.h \
-	external/HepMC3/Attribute.h
-tmp/external/HepMC3/ReaderAscii.$(ObjSuf): \
-	external/HepMC3/ReaderAscii.$(SrcSuf) \
-	external/HepMC3/ReaderAscii.h \
-	external/HepMC3/GenEvent.h \
-	external/HepMC3/GenParticle.h \
-	external/HepMC3/GenVertex.h \
-	external/HepMC3/Units.h
-tmp/external/HepMC3/ReaderAsciiHepMC2.$(ObjSuf): \
-	external/HepMC3/ReaderAsciiHepMC2.$(SrcSuf) \
-	external/HepMC3/ReaderAsciiHepMC2.h \
-	external/HepMC3/GenEvent.h \
-	external/HepMC3/GenVertex.h \
-	external/HepMC3/GenParticle.h \
-	external/HepMC3/GenHeavyIon.h \
-	external/HepMC3/GenPdfInfo.h \
-	external/HepMC3/Setup.h
-tmp/external/HepMC3/Setup.$(ObjSuf): \
-	external/HepMC3/Setup.$(SrcSuf) \
-	external/HepMC3/Setup.h
-tmp/external/TrackCovariance/AcceptanceClx.$(ObjSuf): \
-	external/TrackCovariance/AcceptanceClx.$(SrcSuf)
-tmp/external/TrackCovariance/ObsTrk.$(ObjSuf): \
-	external/TrackCovariance/ObsTrk.$(SrcSuf)
-tmp/external/TrackCovariance/SolGeom.$(ObjSuf): \
-	external/TrackCovariance/SolGeom.$(SrcSuf)
-tmp/external/TrackCovariance/SolGridCov.$(ObjSuf): \
-	external/TrackCovariance/SolGridCov.$(SrcSuf)
-tmp/external/TrackCovariance/SolTrack.$(ObjSuf): \
-	external/TrackCovariance/SolTrack.$(SrcSuf)
-tmp/external/TrackCovariance/TrkUtil.$(ObjSuf): \
-	external/TrackCovariance/TrkUtil.$(SrcSuf)
-tmp/external/TrackCovariance/VertexFit.$(ObjSuf): \
-	external/TrackCovariance/VertexFit.$(SrcSuf)
-tmp/modules/AngularSmearing.$(ObjSuf): \
-	modules/AngularSmearing.$(SrcSuf) \
-	modules/AngularSmearing.h \
-	classes/DelphesClasses.h \
-	classes/DelphesFactory.h \
-	classes/DelphesFormula.h \
-	external/ExRootAnalysis/ExRootClassifier.h \
-	external/ExRootAnalysis/ExRootFilter.h \
-	external/ExRootAnalysis/ExRootResult.h
-tmp/modules/BTagging.$(ObjSuf): \
-	modules/BTagging.$(SrcSuf) \
-	modules/BTagging.h \
-	classes/DelphesClasses.h \
-	classes/DelphesFactory.h \
-	classes/DelphesFormula.h
-tmp/modules/BeamSpotFilter.$(ObjSuf): \
-	modules/BeamSpotFilter.$(SrcSuf) \
-	modules/BeamSpotFilter.h \
-	classes/DelphesClasses.h \
-	classes/DelphesFactory.h \
-	classes/DelphesFormula.h \
-	external/ExRootAnalysis/ExRootClassifier.h \
-	external/ExRootAnalysis/ExRootFilter.h \
-	external/ExRootAnalysis/ExRootResult.h
-tmp/modules/Calorimeter.$(ObjSuf): \
-	modules/Calorimeter.$(SrcSuf) \
-	modules/Calorimeter.h \
-	classes/DelphesClasses.h \
-	classes/DelphesFactory.h \
-	classes/DelphesFormula.h \
-	external/ExRootAnalysis/ExRootClassifier.h \
-	external/ExRootAnalysis/ExRootFilter.h \
-	external/ExRootAnalysis/ExRootResult.h
-tmp/modules/Cloner.$(ObjSuf): \
-	modules/Cloner.$(SrcSuf) \
-	modules/Cloner.h \
-	classes/DelphesClasses.h \
-	classes/DelphesFactory.h \
-	classes/DelphesFormula.h \
-	external/ExRootAnalysis/ExRootClassifier.h \
-	external/ExRootAnalysis/ExRootFilter.h \
-	external/ExRootAnalysis/ExRootResult.h
-tmp/modules/ClusterCounting.$(ObjSuf): \
-	modules/ClusterCounting.$(SrcSuf) \
-	modules/ClusterCounting.h \
-	classes/DelphesClasses.h \
-	external/TrackCovariance/TrkUtil.h
-tmp/modules/ConstituentFilter.$(ObjSuf): \
-	modules/ConstituentFilter.$(SrcSuf) \
-	modules/ConstituentFilter.h \
-	classes/DelphesClasses.h \
-	classes/DelphesFactory.h \
-	classes/DelphesFormula.h \
-	external/ExRootAnalysis/ExRootClassifier.h \
-	external/ExRootAnalysis/ExRootFilter.h \
-	external/ExRootAnalysis/ExRootResult.h
-tmp/modules/DecayFilter.$(ObjSuf): \
-	modules/DecayFilter.$(SrcSuf) \
-	modules/DecayFilter.h \
-	classes/DelphesClasses.h \
-	classes/DelphesFactory.h \
-	classes/DelphesFormula.h \
-	external/ExRootAnalysis/ExRootClassifier.h \
-	external/ExRootAnalysis/ExRootFilter.h \
-	external/ExRootAnalysis/ExRootResult.h
-tmp/modules/Delphes.$(ObjSuf): \
-	modules/Delphes.$(SrcSuf) \
-	modules/Delphes.h \
-	classes/DelphesClasses.h \
-	classes/DelphesFactory.h \
-	classes/DelphesFormula.h \
-	external/ExRootAnalysis/ExRootClassifier.h \
-	external/ExRootAnalysis/ExRootConfReader.h \
-	external/ExRootAnalysis/ExRootFilter.h \
-	external/ExRootAnalysis/ExRootResult.h \
-	external/ExRootAnalysis/ExRootTreeWriter.h
-tmp/modules/DenseTrackFilter.$(ObjSuf): \
-	modules/DenseTrackFilter.$(SrcSuf) \
-	modules/DenseTrackFilter.h \
-	classes/DelphesClasses.h \
-	classes/DelphesFactory.h \
-	classes/DelphesFormula.h \
-	external/ExRootAnalysis/ExRootClassifier.h \
-	external/ExRootAnalysis/ExRootFilter.h \
-	external/ExRootAnalysis/ExRootResult.h
-tmp/modules/DualReadoutCalorimeter.$(ObjSuf): \
-	modules/DualReadoutCalorimeter.$(SrcSuf) \
-	modules/DualReadoutCalorimeter.h \
-	classes/DelphesClasses.h \
-	classes/DelphesFactory.h \
-	classes/DelphesFormula.h \
-	external/ExRootAnalysis/ExRootResult.h \
-	external/ExRootAnalysis/ExRootFilter.h \
-	external/ExRootAnalysis/ExRootClassifier.h
-tmp/modules/Efficiency.$(ObjSuf): \
-	modules/Efficiency.$(SrcSuf) \
-	modules/Efficiency.h \
-	classes/DelphesClasses.h \
-	classes/DelphesFactory.h \
-	classes/DelphesFormula.h \
-	external/ExRootAnalysis/ExRootClassifier.h \
-	external/ExRootAnalysis/ExRootFilter.h \
-	external/ExRootAnalysis/ExRootResult.h
-tmp/modules/EnergyScale.$(ObjSuf): \
-	modules/EnergyScale.$(SrcSuf) \
-	modules/EnergyScale.h \
-	classes/DelphesClasses.h \
-	classes/DelphesFactory.h \
-	classes/DelphesFormula.h \
-	external/ExRootAnalysis/ExRootClassifier.h \
-	external/ExRootAnalysis/ExRootFilter.h \
-	external/ExRootAnalysis/ExRootResult.h
-tmp/modules/EnergySmearing.$(ObjSuf): \
-	modules/EnergySmearing.$(SrcSuf) \
-	modules/EnergySmearing.h \
-	classes/DelphesClasses.h \
-	classes/DelphesFactory.h \
-	classes/DelphesFormula.h \
-	external/ExRootAnalysis/ExRootClassifier.h \
-	external/ExRootAnalysis/ExRootFilter.h \
-	external/ExRootAnalysis/ExRootResult.h
-tmp/modules/ExampleModule.$(ObjSuf): \
-	modules/ExampleModule.$(SrcSuf) \
-	modules/ExampleModule.h \
-	classes/DelphesClasses.h \
-	classes/DelphesFactory.h \
-	classes/DelphesFormula.h \
-	external/ExRootAnalysis/ExRootClassifier.h \
-	external/ExRootAnalysis/ExRootFilter.h \
-	external/ExRootAnalysis/ExRootResult.h
-tmp/modules/Hector.$(ObjSuf): \
-	modules/Hector.$(SrcSuf) \
-	modules/Hector.h \
-	classes/DelphesClasses.h \
-	classes/DelphesFactory.h \
-	classes/DelphesFormula.h \
-	external/ExRootAnalysis/ExRootClassifier.h \
-	external/ExRootAnalysis/ExRootFilter.h \
-	external/ExRootAnalysis/ExRootResult.h \
-	external/Hector/H_BeamLine.h \
-	external/Hector/H_BeamParticle.h \
-	external/Hector/H_RecRPObject.h
-tmp/modules/IdentificationMap.$(ObjSuf): \
-	modules/IdentificationMap.$(SrcSuf) \
-	modules/IdentificationMap.h \
-	classes/DelphesClasses.h \
-	classes/DelphesFactory.h \
-	classes/DelphesFormula.h \
-	external/ExRootAnalysis/ExRootClassifier.h \
-	external/ExRootAnalysis/ExRootFilter.h \
-	external/ExRootAnalysis/ExRootResult.h
-tmp/modules/ImpactParameterSmearing.$(ObjSuf): \
-	modules/ImpactParameterSmearing.$(SrcSuf) \
-	modules/ImpactParameterSmearing.h \
-	classes/DelphesClasses.h \
-	classes/DelphesFactory.h \
-	classes/DelphesFormula.h \
-	external/ExRootAnalysis/ExRootClassifier.h \
-	external/ExRootAnalysis/ExRootFilter.h \
-	external/ExRootAnalysis/ExRootResult.h
-tmp/modules/Isolation.$(ObjSuf): \
-	modules/Isolation.$(SrcSuf) \
-	modules/Isolation.h \
-	classes/DelphesClasses.h \
-	classes/DelphesFactory.h \
-	classes/DelphesFormula.h \
-	external/ExRootAnalysis/ExRootClassifier.h \
-	external/ExRootAnalysis/ExRootFilter.h \
-	external/ExRootAnalysis/ExRootResult.h
-tmp/modules/JetFakeParticle.$(ObjSuf): \
-	modules/JetFakeParticle.$(SrcSuf) \
-	modules/JetFakeParticle.h \
-	classes/DelphesClasses.h \
-	classes/DelphesFactory.h \
-	classes/DelphesFormula.h \
-	external/ExRootAnalysis/ExRootClassifier.h \
-	external/ExRootAnalysis/ExRootFilter.h \
-	external/ExRootAnalysis/ExRootResult.h
-tmp/modules/JetFlavorAssociation.$(ObjSuf): \
-	modules/JetFlavorAssociation.$(SrcSuf) \
-	modules/JetFlavorAssociation.h \
-	classes/DelphesClasses.h \
-	classes/DelphesFactory.h \
-	classes/DelphesFormula.h \
-	external/ExRootAnalysis/ExRootClassifier.h \
-	external/ExRootAnalysis/ExRootFilter.h \
-	external/ExRootAnalysis/ExRootResult.h
-tmp/modules/JetPileUpSubtractor.$(ObjSuf): \
-	modules/JetPileUpSubtractor.$(SrcSuf) \
-	modules/JetPileUpSubtractor.h \
-	classes/DelphesClasses.h \
-	classes/DelphesFactory.h \
-	classes/DelphesFormula.h \
-	external/ExRootAnalysis/ExRootClassifier.h \
-	external/ExRootAnalysis/ExRootFilter.h \
-	external/ExRootAnalysis/ExRootResult.h
-tmp/modules/LeptonDressing.$(ObjSuf): \
-	modules/LeptonDressing.$(SrcSuf) \
-	modules/LeptonDressing.h \
-	classes/DelphesClasses.h \
-	classes/DelphesFactory.h \
-	classes/DelphesFormula.h \
-	external/ExRootAnalysis/ExRootClassifier.h \
-	external/ExRootAnalysis/ExRootFilter.h \
-	external/ExRootAnalysis/ExRootResult.h
-tmp/modules/Merger.$(ObjSuf): \
-	modules/Merger.$(SrcSuf) \
-	modules/Merger.h \
-	classes/DelphesClasses.h \
-	classes/DelphesFactory.h \
-	classes/DelphesFormula.h \
-	external/ExRootAnalysis/ExRootClassifier.h \
-	external/ExRootAnalysis/ExRootFilter.h \
-	external/ExRootAnalysis/ExRootResult.h
-tmp/modules/MomentumSmearing.$(ObjSuf): \
-	modules/MomentumSmearing.$(SrcSuf) \
-	modules/MomentumSmearing.h \
-	classes/DelphesClasses.h \
-	classes/DelphesFactory.h \
-	classes/DelphesFormula.h \
-	external/ExRootAnalysis/ExRootClassifier.h \
-	external/ExRootAnalysis/ExRootFilter.h \
-	external/ExRootAnalysis/ExRootResult.h
-tmp/modules/OldCalorimeter.$(ObjSuf): \
-	modules/OldCalorimeter.$(SrcSuf) \
-	modules/OldCalorimeter.h \
-	classes/DelphesClasses.h \
-	classes/DelphesFactory.h \
-	classes/DelphesFormula.h \
-	external/ExRootAnalysis/ExRootClassifier.h \
-	external/ExRootAnalysis/ExRootFilter.h \
-	external/ExRootAnalysis/ExRootResult.h
-tmp/modules/ParticleDensity.$(ObjSuf): \
-	modules/ParticleDensity.$(SrcSuf) \
-	modules/ParticleDensity.h \
-	classes/DelphesClasses.h \
-	classes/DelphesFactory.h \
-	classes/DelphesFormula.h \
-	external/ExRootAnalysis/ExRootClassifier.h \
-	external/ExRootAnalysis/ExRootFilter.h \
-	external/ExRootAnalysis/ExRootResult.h
-tmp/modules/ParticlePropagator.$(ObjSuf): \
-	modules/ParticlePropagator.$(SrcSuf) \
-	modules/ParticlePropagator.h \
-	classes/DelphesClasses.h \
-	classes/DelphesFactory.h \
-	classes/DelphesFormula.h \
-	external/ExRootAnalysis/ExRootClassifier.h \
-	external/ExRootAnalysis/ExRootFilter.h \
-	external/ExRootAnalysis/ExRootResult.h
-tmp/modules/PdgCodeFilter.$(ObjSuf): \
-	modules/PdgCodeFilter.$(SrcSuf) \
-	modules/PdgCodeFilter.h \
-	classes/DelphesClasses.h \
-	classes/DelphesFactory.h \
-	classes/DelphesFormula.h \
-	external/ExRootAnalysis/ExRootClassifier.h \
-	external/ExRootAnalysis/ExRootFilter.h \
-	external/ExRootAnalysis/ExRootResult.h
-tmp/modules/PhotonConversions.$(ObjSuf): \
-	modules/PhotonConversions.$(SrcSuf) \
-	modules/PhotonConversions.h \
-	classes/DelphesClasses.h \
-	classes/DelphesCylindricalFormula.h \
-	classes/DelphesFactory.h \
-	external/ExRootAnalysis/ExRootClassifier.h \
-	external/ExRootAnalysis/ExRootFilter.h \
-	external/ExRootAnalysis/ExRootResult.h
-tmp/modules/PhotonID.$(ObjSuf): \
-	modules/PhotonID.$(SrcSuf) \
-	modules/PhotonID.h \
-	classes/DelphesClasses.h \
-	classes/DelphesFactory.h \
-	classes/DelphesFormula.h \
-	external/ExRootAnalysis/ExRootClassifier.h \
-	external/ExRootAnalysis/ExRootFilter.h \
-	external/ExRootAnalysis/ExRootResult.h
-tmp/modules/PileUpJetID.$(ObjSuf): \
-	modules/PileUpJetID.$(SrcSuf) \
-	modules/PileUpJetID.h \
-	classes/DelphesClasses.h \
-	classes/DelphesFactory.h \
-	classes/DelphesFormula.h \
-	external/ExRootAnalysis/ExRootClassifier.h \
-	external/ExRootAnalysis/ExRootFilter.h \
-	external/ExRootAnalysis/ExRootResult.h
-tmp/modules/PileUpMerger.$(ObjSuf): \
-	modules/PileUpMerger.$(SrcSuf) \
-	modules/PileUpMerger.h \
-	classes/DelphesClasses.h \
-	classes/DelphesFactory.h \
-	classes/DelphesPileUpReader.h \
-	classes/DelphesTF2.h \
-	external/ExRootAnalysis/ExRootClassifier.h \
-	external/ExRootAnalysis/ExRootFilter.h \
-	external/ExRootAnalysis/ExRootResult.h
-tmp/modules/PileUpMergerPythia8.$(ObjSuf): \
-	modules/PileUpMergerPythia8.$(SrcSuf) \
-	modules/PileUpMergerPythia8.h \
-	classes/DelphesClasses.h \
-	classes/DelphesFactory.h \
-	classes/DelphesPileUpReader.h \
-	classes/DelphesTF2.h \
-	external/ExRootAnalysis/ExRootClassifier.h \
-	external/ExRootAnalysis/ExRootFilter.h \
-	external/ExRootAnalysis/ExRootResult.h
-tmp/modules/RecoPuFilter.$(ObjSuf): \
-	modules/RecoPuFilter.$(SrcSuf) \
-	modules/RecoPuFilter.h \
-	classes/DelphesClasses.h \
-	classes/DelphesFactory.h \
-	classes/DelphesFormula.h \
-	external/ExRootAnalysis/ExRootClassifier.h \
-	external/ExRootAnalysis/ExRootFilter.h \
-	external/ExRootAnalysis/ExRootResult.h
-tmp/modules/SimpleCalorimeter.$(ObjSuf): \
-	modules/SimpleCalorimeter.$(SrcSuf) \
-	modules/SimpleCalorimeter.h \
-	classes/DelphesClasses.h \
-	classes/DelphesFactory.h \
-	classes/DelphesFormula.h \
-	external/ExRootAnalysis/ExRootClassifier.h \
-	external/ExRootAnalysis/ExRootFilter.h \
-	external/ExRootAnalysis/ExRootResult.h
-tmp/modules/StatusPidFilter.$(ObjSuf): \
-	modules/StatusPidFilter.$(SrcSuf) \
-	modules/StatusPidFilter.h \
-	classes/DelphesClasses.h \
-	classes/DelphesFactory.h \
-	classes/DelphesFormula.h \
-	external/ExRootAnalysis/ExRootClassifier.h \
-	external/ExRootAnalysis/ExRootFilter.h \
-	external/ExRootAnalysis/ExRootResult.h
-tmp/modules/TaggingParticlesSkimmer.$(ObjSuf): \
-	modules/TaggingParticlesSkimmer.$(SrcSuf) \
-	modules/TaggingParticlesSkimmer.h \
-	modules/TauTagging.h \
-	classes/DelphesClasses.h \
-	classes/DelphesFactory.h \
-	classes/DelphesFormula.h \
-	external/ExRootAnalysis/ExRootClassifier.h \
-	external/ExRootAnalysis/ExRootFilter.h \
-	external/ExRootAnalysis/ExRootResult.h
-tmp/modules/TauTagging.$(ObjSuf): \
-	modules/TauTagging.$(SrcSuf) \
-	modules/TauTagging.h \
-	classes/DelphesClasses.h \
-	classes/DelphesFactory.h \
-	classes/DelphesFormula.h
-tmp/modules/TimeOfFlight.$(ObjSuf): \
-	modules/TimeOfFlight.$(SrcSuf) \
-	modules/TimeOfFlight.h \
-	classes/DelphesClasses.h \
-	classes/DelphesFactory.h \
-	classes/DelphesFormula.h \
-	external/ExRootAnalysis/ExRootClassifier.h \
-	external/ExRootAnalysis/ExRootFilter.h \
-	external/ExRootAnalysis/ExRootResult.h
-tmp/modules/TimeSmearing.$(ObjSuf): \
-	modules/TimeSmearing.$(SrcSuf) \
-	modules/TimeSmearing.h \
-	classes/DelphesClasses.h \
-	classes/DelphesFactory.h \
-	classes/DelphesFormula.h \
-	external/ExRootAnalysis/ExRootClassifier.h \
-	external/ExRootAnalysis/ExRootFilter.h \
-	external/ExRootAnalysis/ExRootResult.h
-tmp/modules/TrackCountingBTagging.$(ObjSuf): \
-	modules/TrackCountingBTagging.$(SrcSuf) \
-	modules/TrackCountingBTagging.h \
-	classes/DelphesClasses.h \
-	classes/DelphesFactory.h \
-	classes/DelphesFormula.h
-tmp/modules/TrackCountingTauTagging.$(ObjSuf): \
-	modules/TrackCountingTauTagging.$(SrcSuf) \
-	modules/TrackCountingTauTagging.h \
-	classes/DelphesClasses.h \
-	classes/DelphesFactory.h \
-	classes/DelphesFormula.h \
-	external/ExRootAnalysis/ExRootClassifier.h \
-	external/ExRootAnalysis/ExRootFilter.h \
-	external/ExRootAnalysis/ExRootResult.h
-tmp/modules/TrackCovariance.$(ObjSuf): \
-	modules/TrackCovariance.$(SrcSuf) \
-	modules/TrackCovariance.h \
-	classes/DelphesClasses.h \
-	external/TrackCovariance/SolGeom.h \
-	external/TrackCovariance/SolGridCov.h \
-	external/TrackCovariance/ObsTrk.h
-tmp/modules/TrackPileUpSubtractor.$(ObjSuf): \
-	modules/TrackPileUpSubtractor.$(SrcSuf) \
-	modules/TrackPileUpSubtractor.h \
-	classes/DelphesClasses.h \
-	classes/DelphesFactory.h \
-	classes/DelphesFormula.h \
-	external/ExRootAnalysis/ExRootClassifier.h \
-	external/ExRootAnalysis/ExRootFilter.h \
-	external/ExRootAnalysis/ExRootResult.h
-tmp/modules/TrackSmearing.$(ObjSuf): \
-	modules/TrackSmearing.$(SrcSuf) \
-	modules/TrackSmearing.h \
-	classes/DelphesClasses.h \
-	classes/DelphesFactory.h \
-	classes/DelphesFormula.h \
-	external/ExRootAnalysis/ExRootClassifier.h \
-	external/ExRootAnalysis/ExRootFilter.h \
-	external/ExRootAnalysis/ExRootResult.h
-tmp/modules/TreeWriter.$(ObjSuf): \
-	modules/TreeWriter.$(SrcSuf) \
-	modules/TreeWriter.h \
-	classes/DelphesClasses.h \
-	classes/DelphesFactory.h \
-	classes/DelphesFormula.h \
-	external/ExRootAnalysis/ExRootClassifier.h \
-	external/ExRootAnalysis/ExRootFilter.h \
-	external/ExRootAnalysis/ExRootResult.h \
-	external/ExRootAnalysis/ExRootTreeBranch.h
-tmp/modules/TruthVertexFinder.$(ObjSuf): \
-	modules/TruthVertexFinder.$(SrcSuf) \
-	modules/TruthVertexFinder.h \
-	classes/DelphesClasses.h \
-	classes/DelphesFactory.h \
-	classes/DelphesPileUpReader.h \
-	classes/DelphesTF2.h \
-	external/ExRootAnalysis/ExRootClassifier.h \
-	external/ExRootAnalysis/ExRootFilter.h \
-	external/ExRootAnalysis/ExRootResult.h
-tmp/modules/UniqueObjectFinder.$(ObjSuf): \
-	modules/UniqueObjectFinder.$(SrcSuf) \
-	modules/UniqueObjectFinder.h \
-	classes/DelphesClasses.h \
-	classes/DelphesFactory.h \
-	classes/DelphesFormula.h \
-	external/ExRootAnalysis/ExRootClassifier.h \
-	external/ExRootAnalysis/ExRootFilter.h \
-	external/ExRootAnalysis/ExRootResult.h
-tmp/modules/VertexFinder.$(ObjSuf): \
-	modules/VertexFinder.$(SrcSuf) \
-	modules/VertexFinder.h \
-	classes/DelphesClasses.h \
-	classes/DelphesFactory.h \
-	classes/DelphesFormula.h \
-	classes/DelphesPileUpReader.h \
-	external/ExRootAnalysis/ExRootClassifier.h \
-	external/ExRootAnalysis/ExRootFilter.h \
-	external/ExRootAnalysis/ExRootResult.h
-tmp/modules/VertexFinderDA4D.$(ObjSuf): \
-	modules/VertexFinderDA4D.$(SrcSuf) \
-	modules/VertexFinderDA4D.h \
-	classes/DelphesClasses.h \
-	classes/DelphesFactory.h \
-	classes/DelphesFormula.h \
-	classes/DelphesPileUpReader.h \
-	external/ExRootAnalysis/ExRootClassifier.h \
-	external/ExRootAnalysis/ExRootFilter.h \
-	external/ExRootAnalysis/ExRootResult.h
-tmp/modules/VertexSorter.$(ObjSuf): \
-	modules/VertexSorter.$(SrcSuf) \
-	modules/VertexSorter.h \
-	classes/DelphesClasses.h \
-	classes/DelphesFactory.h \
-	classes/DelphesFormula.h \
-	classes/DelphesPileUpReader.h \
-	external/ExRootAnalysis/ExRootClassifier.h \
-	external/ExRootAnalysis/ExRootFilter.h \
-	external/ExRootAnalysis/ExRootResult.h
-tmp/modules/Weighter.$(ObjSuf): \
-	modules/Weighter.$(SrcSuf) \
-	modules/Weighter.h \
-	classes/DelphesClasses.h \
-	classes/DelphesFactory.h \
-	classes/DelphesFormula.h \
-	external/ExRootAnalysis/ExRootClassifier.h \
-	external/ExRootAnalysis/ExRootFilter.h \
-	external/ExRootAnalysis/ExRootResult.h
-DELPHES_OBJ +=  \
-	tmp/classes/DelphesClasses.$(ObjSuf) \
-	tmp/classes/DelphesCylindricalFormula.$(ObjSuf) \
-	tmp/classes/DelphesFactory.$(ObjSuf) \
-	tmp/classes/DelphesFormula.$(ObjSuf) \
-	tmp/classes/DelphesHepMC2Reader.$(ObjSuf) \
-	tmp/classes/DelphesHepMC3Reader.$(ObjSuf) \
-	tmp/classes/DelphesLHEFReader.$(ObjSuf) \
-	tmp/classes/DelphesModule.$(ObjSuf) \
-	tmp/classes/DelphesPileUpReader.$(ObjSuf) \
-	tmp/classes/DelphesPileUpWriter.$(ObjSuf) \
-	tmp/classes/DelphesSTDHEPReader.$(ObjSuf) \
-	tmp/classes/DelphesStream.$(ObjSuf) \
-	tmp/classes/DelphesTF2.$(ObjSuf) \
-	tmp/classes/DelphesXDRReader.$(ObjSuf) \
-	tmp/classes/DelphesXDRWriter.$(ObjSuf) \
-	tmp/external/ExRootAnalysis/ExRootConfReader.$(ObjSuf) \
-	tmp/external/ExRootAnalysis/ExRootFilter.$(ObjSuf) \
-	tmp/external/ExRootAnalysis/ExRootProgressBar.$(ObjSuf) \
-	tmp/external/ExRootAnalysis/ExRootResult.$(ObjSuf) \
-	tmp/external/ExRootAnalysis/ExRootTask.$(ObjSuf) \
-	tmp/external/ExRootAnalysis/ExRootTreeBranch.$(ObjSuf) \
-	tmp/external/ExRootAnalysis/ExRootTreeReader.$(ObjSuf) \
-	tmp/external/ExRootAnalysis/ExRootTreeWriter.$(ObjSuf) \
-	tmp/external/ExRootAnalysis/ExRootUtilities.$(ObjSuf) \
-	tmp/external/Hector/H_AbstractBeamLine.$(ObjSuf) \
-	tmp/external/Hector/H_Aperture.$(ObjSuf) \
-	tmp/external/Hector/H_Beam.$(ObjSuf) \
-	tmp/external/Hector/H_BeamLine.$(ObjSuf) \
-	tmp/external/Hector/H_BeamLineParser.$(ObjSuf) \
-	tmp/external/Hector/H_BeamParticle.$(ObjSuf) \
-	tmp/external/Hector/H_CircularAperture.$(ObjSuf) \
-	tmp/external/Hector/H_Dipole.$(ObjSuf) \
-	tmp/external/Hector/H_Drift.$(ObjSuf) \
-	tmp/external/Hector/H_EllipticAperture.$(ObjSuf) \
-	tmp/external/Hector/H_HorizontalKicker.$(ObjSuf) \
-	tmp/external/Hector/H_HorizontalQuadrupole.$(ObjSuf) \
-	tmp/external/Hector/H_Kicker.$(ObjSuf) \
-	tmp/external/Hector/H_Marker.$(ObjSuf) \
-	tmp/external/Hector/H_OpticalElement.$(ObjSuf) \
-	tmp/external/Hector/H_Parameters.$(ObjSuf) \
-	tmp/external/Hector/H_Quadrupole.$(ObjSuf) \
-	tmp/external/Hector/H_RecRPObject.$(ObjSuf) \
-	tmp/external/Hector/H_RectEllipticAperture.$(ObjSuf) \
-	tmp/external/Hector/H_RectangularAperture.$(ObjSuf) \
-	tmp/external/Hector/H_RectangularCollimator.$(ObjSuf) \
-	tmp/external/Hector/H_RectangularDipole.$(ObjSuf) \
-	tmp/external/Hector/H_RomanPot.$(ObjSuf) \
-	tmp/external/Hector/H_SectorDipole.$(ObjSuf) \
-	tmp/external/Hector/H_TransportMatrices.$(ObjSuf) \
-	tmp/external/Hector/H_VerticalKicker.$(ObjSuf) \
-	tmp/external/Hector/H_VerticalQuadrupole.$(ObjSuf) \
-	tmp/external/HepMC3/GenCrossSection.$(ObjSuf) \
-	tmp/external/HepMC3/GenEvent.$(ObjSuf) \
-	tmp/external/HepMC3/GenHeavyIon.$(ObjSuf) \
-	tmp/external/HepMC3/GenParticle.$(ObjSuf) \
-	tmp/external/HepMC3/GenPdfInfo.$(ObjSuf) \
-	tmp/external/HepMC3/GenRunInfo.$(ObjSuf) \
-	tmp/external/HepMC3/GenVertex.$(ObjSuf) \
-	tmp/external/HepMC3/ReaderAscii.$(ObjSuf) \
-	tmp/external/HepMC3/ReaderAsciiHepMC2.$(ObjSuf) \
-	tmp/external/HepMC3/Setup.$(ObjSuf) \
-	tmp/external/TrackCovariance/AcceptanceClx.$(ObjSuf) \
-	tmp/external/TrackCovariance/ObsTrk.$(ObjSuf) \
-	tmp/external/TrackCovariance/SolGeom.$(ObjSuf) \
-	tmp/external/TrackCovariance/SolGridCov.$(ObjSuf) \
-	tmp/external/TrackCovariance/SolTrack.$(ObjSuf) \
-	tmp/external/TrackCovariance/TrkUtil.$(ObjSuf) \
-	tmp/external/TrackCovariance/VertexFit.$(ObjSuf) \
-	tmp/modules/AngularSmearing.$(ObjSuf) \
-	tmp/modules/BTagging.$(ObjSuf) \
-	tmp/modules/BeamSpotFilter.$(ObjSuf) \
-	tmp/modules/Calorimeter.$(ObjSuf) \
-	tmp/modules/Cloner.$(ObjSuf) \
-	tmp/modules/ClusterCounting.$(ObjSuf) \
-	tmp/modules/ConstituentFilter.$(ObjSuf) \
-	tmp/modules/DecayFilter.$(ObjSuf) \
-	tmp/modules/Delphes.$(ObjSuf) \
-	tmp/modules/DenseTrackFilter.$(ObjSuf) \
-	tmp/modules/DualReadoutCalorimeter.$(ObjSuf) \
-	tmp/modules/Efficiency.$(ObjSuf) \
-	tmp/modules/EnergyScale.$(ObjSuf) \
-	tmp/modules/EnergySmearing.$(ObjSuf) \
-	tmp/modules/ExampleModule.$(ObjSuf) \
-	tmp/modules/Hector.$(ObjSuf) \
-	tmp/modules/IdentificationMap.$(ObjSuf) \
-	tmp/modules/ImpactParameterSmearing.$(ObjSuf) \
-	tmp/modules/Isolation.$(ObjSuf) \
-	tmp/modules/JetFakeParticle.$(ObjSuf) \
-	tmp/modules/JetFlavorAssociation.$(ObjSuf) \
-	tmp/modules/JetPileUpSubtractor.$(ObjSuf) \
-	tmp/modules/LeptonDressing.$(ObjSuf) \
-	tmp/modules/Merger.$(ObjSuf) \
-	tmp/modules/MomentumSmearing.$(ObjSuf) \
-	tmp/modules/OldCalorimeter.$(ObjSuf) \
-	tmp/modules/ParticleDensity.$(ObjSuf) \
-	tmp/modules/ParticlePropagator.$(ObjSuf) \
-	tmp/modules/PdgCodeFilter.$(ObjSuf) \
-	tmp/modules/PhotonConversions.$(ObjSuf) \
-	tmp/modules/PhotonID.$(ObjSuf) \
-	tmp/modules/PileUpJetID.$(ObjSuf) \
-	tmp/modules/PileUpMerger.$(ObjSuf) \
-	tmp/modules/RecoPuFilter.$(ObjSuf) \
-	tmp/modules/SimpleCalorimeter.$(ObjSuf) \
-	tmp/modules/StatusPidFilter.$(ObjSuf) \
-	tmp/modules/TaggingParticlesSkimmer.$(ObjSuf) \
-	tmp/modules/TauTagging.$(ObjSuf) \
-	tmp/modules/TimeOfFlight.$(ObjSuf) \
-	tmp/modules/TimeSmearing.$(ObjSuf) \
-	tmp/modules/TrackCountingBTagging.$(ObjSuf) \
-	tmp/modules/TrackCountingTauTagging.$(ObjSuf) \
-	tmp/modules/TrackCovariance.$(ObjSuf) \
-	tmp/modules/TrackPileUpSubtractor.$(ObjSuf) \
-	tmp/modules/TrackSmearing.$(ObjSuf) \
-	tmp/modules/TreeWriter.$(ObjSuf) \
-	tmp/modules/TruthVertexFinder.$(ObjSuf) \
-	tmp/modules/UniqueObjectFinder.$(ObjSuf) \
-	tmp/modules/VertexFinder.$(ObjSuf) \
-	tmp/modules/VertexFinderDA4D.$(ObjSuf) \
-	tmp/modules/VertexSorter.$(ObjSuf) \
-	tmp/modules/Weighter.$(ObjSuf)
-
-ifeq ($(HAS_PYTHIA8),true)
-DELPHES_OBJ +=  \
-	tmp/modules/PileUpMergerPythia8.$(ObjSuf)
-endif
-
-tmp/external/PUPPI/PuppiAlgo.$(ObjSuf): \
-	external/PUPPI/PuppiAlgo.$(SrcSuf)
-tmp/external/PUPPI/PuppiContainer.$(ObjSuf): \
-	external/PUPPI/PuppiContainer.$(SrcSuf) \
-	external/fastjet/Selector.hh
-tmp/external/PUPPI/puppiCleanContainer.$(ObjSuf): \
-	external/PUPPI/puppiCleanContainer.$(SrcSuf) \
-	external/fastjet/Selector.hh
-tmp/external/fastjet/AreaDefinition.$(ObjSuf): \
-	external/fastjet/AreaDefinition.$(SrcSuf) \
-	external/fastjet/AreaDefinition.hh
-tmp/external/fastjet/BasicRandom.$(ObjSuf): \
-	external/fastjet/BasicRandom.$(SrcSuf) \
-	external/fastjet/internal/BasicRandom.hh
-tmp/external/fastjet/ClosestPair2D.$(ObjSuf): \
-	external/fastjet/ClosestPair2D.$(SrcSuf) \
-	external/fastjet/internal/ClosestPair2D.hh
-tmp/external/fastjet/ClusterSequence.$(ObjSuf): \
-	external/fastjet/ClusterSequence.$(SrcSuf) \
-	external/fastjet/Error.hh \
-	external/fastjet/PseudoJet.hh \
-	external/fastjet/ClusterSequence.hh \
-	external/fastjet/ClusterSequenceStructure.hh \
-	external/fastjet/version.hh \
-	external/fastjet/internal/LazyTiling9Alt.hh \
-	external/fastjet/internal/LazyTiling9.hh \
-	external/fastjet/internal/LazyTiling25.hh \
-	external/fastjet/internal/LazyTiling9SeparateGhosts.hh
-tmp/external/fastjet/ClusterSequence1GhostPassiveArea.$(ObjSuf): \
-	external/fastjet/ClusterSequence1GhostPassiveArea.$(SrcSuf) \
-	external/fastjet/ClusterSequence1GhostPassiveArea.hh
-tmp/external/fastjet/ClusterSequenceActiveArea.$(ObjSuf): \
-	external/fastjet/ClusterSequenceActiveArea.$(SrcSuf) \
-	external/fastjet/PseudoJet.hh \
-	external/fastjet/ClusterSequence.hh \
-	external/fastjet/ClusterSequenceActiveArea.hh \
-	external/fastjet/ClusterSequenceActiveAreaExplicitGhosts.hh
-tmp/external/fastjet/ClusterSequenceActiveAreaExplicitGhosts.$(ObjSuf): \
-	external/fastjet/ClusterSequenceActiveAreaExplicitGhosts.$(SrcSuf) \
-	external/fastjet/ClusterSequenceActiveAreaExplicitGhosts.hh
-tmp/external/fastjet/ClusterSequenceArea.$(ObjSuf): \
-	external/fastjet/ClusterSequenceArea.$(SrcSuf) \
-	external/fastjet/ClusterSequenceArea.hh
-tmp/external/fastjet/ClusterSequenceAreaBase.$(ObjSuf): \
-	external/fastjet/ClusterSequenceAreaBase.$(SrcSuf) \
-	external/fastjet/ClusterSequenceAreaBase.hh
-tmp/external/fastjet/ClusterSequencePassiveArea.$(ObjSuf): \
-	external/fastjet/ClusterSequencePassiveArea.$(SrcSuf) \
-	external/fastjet/ClusterSequencePassiveArea.hh \
-	external/fastjet/ClusterSequenceVoronoiArea.hh
-tmp/external/fastjet/ClusterSequenceStructure.$(ObjSuf): \
-	external/fastjet/ClusterSequenceStructure.$(SrcSuf) \
-	external/fastjet/ClusterSequenceStructure.hh \
-	external/fastjet/Error.hh \
-	external/fastjet/PseudoJet.hh \
-	external/fastjet/ClusterSequence.hh \
-	external/fastjet/ClusterSequenceAreaBase.hh
-tmp/external/fastjet/ClusterSequenceVoronoiArea.$(ObjSuf): \
-	external/fastjet/ClusterSequenceVoronoiArea.$(SrcSuf) \
-	external/fastjet/ClusterSequenceVoronoiArea.hh \
-	external/fastjet/internal/Voronoi.hh
-tmp/external/fastjet/ClusterSequence_CP2DChan.$(ObjSuf): \
-	external/fastjet/ClusterSequence_CP2DChan.$(SrcSuf) \
-	external/fastjet/ClusterSequence.hh \
-	external/fastjet/internal/ClosestPair2D.hh
-tmp/external/fastjet/ClusterSequence_Delaunay.$(ObjSuf): \
-	external/fastjet/ClusterSequence_Delaunay.$(SrcSuf) \
-	external/fastjet/Error.hh \
-	external/fastjet/PseudoJet.hh \
-	external/fastjet/ClusterSequence.hh \
-	external/fastjet/internal/DynamicNearestNeighbours.hh \
-	external/fastjet/internal/Dnn4piCylinder.hh \
-	external/fastjet/internal/Dnn3piCylinder.hh \
-	external/fastjet/internal/Dnn2piCylinder.hh
-tmp/external/fastjet/ClusterSequence_DumbN3.$(ObjSuf): \
-	external/fastjet/ClusterSequence_DumbN3.$(SrcSuf) \
-	external/fastjet/PseudoJet.hh \
-	external/fastjet/ClusterSequence.hh
-tmp/external/fastjet/ClusterSequence_N2.$(ObjSuf): \
-	external/fastjet/ClusterSequence_N2.$(SrcSuf)
-tmp/external/fastjet/ClusterSequence_TiledN2.$(ObjSuf): \
-	external/fastjet/ClusterSequence_TiledN2.$(SrcSuf) \
-	external/fastjet/PseudoJet.hh \
-	external/fastjet/ClusterSequence.hh \
-	external/fastjet/internal/MinHeap.hh \
-	external/fastjet/internal/TilingExtent.hh
-tmp/external/fastjet/CompositeJetStructure.$(ObjSuf): \
-	external/fastjet/CompositeJetStructure.$(SrcSuf)
-tmp/external/fastjet/Dnn2piCylinder.$(ObjSuf): \
-	external/fastjet/Dnn2piCylinder.$(SrcSuf) \
-	external/fastjet/internal/Dnn2piCylinder.hh
-tmp/external/fastjet/Dnn3piCylinder.$(ObjSuf): \
-	external/fastjet/Dnn3piCylinder.$(SrcSuf) \
-	external/fastjet/internal/Dnn3piCylinder.hh
-tmp/external/fastjet/Dnn4piCylinder.$(ObjSuf): \
-	external/fastjet/Dnn4piCylinder.$(SrcSuf) \
-	external/fastjet/internal/Dnn4piCylinder.hh
-tmp/external/fastjet/DnnPlane.$(ObjSuf): \
-	external/fastjet/DnnPlane.$(SrcSuf) \
-	external/fastjet/internal/DnnPlane.hh
-tmp/external/fastjet/Error.$(ObjSuf): \
-	external/fastjet/Error.$(SrcSuf) \
-	external/fastjet/Error.hh \
-	external/fastjet/config.h
-tmp/external/fastjet/FunctionOfPseudoJet.$(ObjSuf): \
-	external/fastjet/FunctionOfPseudoJet.$(SrcSuf)
-tmp/external/fastjet/GhostedAreaSpec.$(ObjSuf): \
-	external/fastjet/GhostedAreaSpec.$(SrcSuf) \
-	external/fastjet/GhostedAreaSpec.hh \
-	external/fastjet/Error.hh
-tmp/external/fastjet/JetDefinition.$(ObjSuf): \
-	external/fastjet/JetDefinition.$(SrcSuf) \
-	external/fastjet/JetDefinition.hh \
-	external/fastjet/Error.hh \
-	external/fastjet/CompositeJetStructure.hh
-tmp/external/fastjet/LazyTiling25.$(ObjSuf): \
-	external/fastjet/LazyTiling25.$(SrcSuf) \
-	external/fastjet/internal/LazyTiling25.hh \
-	external/fastjet/internal/TilingExtent.hh
-tmp/external/fastjet/LazyTiling9.$(ObjSuf): \
-	external/fastjet/LazyTiling9.$(SrcSuf) \
-	external/fastjet/internal/LazyTiling9.hh \
-	external/fastjet/internal/TilingExtent.hh
-tmp/external/fastjet/LazyTiling9Alt.$(ObjSuf): \
-	external/fastjet/LazyTiling9Alt.$(SrcSuf) \
-	external/fastjet/internal/LazyTiling9Alt.hh \
-	external/fastjet/internal/TilingExtent.hh
-tmp/external/fastjet/LazyTiling9SeparateGhosts.$(ObjSuf): \
-	external/fastjet/LazyTiling9SeparateGhosts.$(SrcSuf) \
-	external/fastjet/internal/LazyTiling9SeparateGhosts.hh \
-	external/fastjet/internal/TilingExtent.hh
-tmp/external/fastjet/LimitedWarning.$(ObjSuf): \
-	external/fastjet/LimitedWarning.$(SrcSuf) \
-	external/fastjet/LimitedWarning.hh
-tmp/external/fastjet/MinHeap.$(ObjSuf): \
-	external/fastjet/MinHeap.$(SrcSuf) \
-	external/fastjet/internal/MinHeap.hh
-tmp/external/fastjet/PseudoJet.$(ObjSuf): \
-	external/fastjet/PseudoJet.$(SrcSuf) \
-	external/fastjet/Error.hh \
-	external/fastjet/PseudoJet.hh \
-	external/fastjet/ClusterSequence.hh \
-	external/fastjet/ClusterSequenceAreaBase.hh \
-	external/fastjet/CompositeJetStructure.hh
-tmp/external/fastjet/PseudoJetStructureBase.$(ObjSuf): \
-	external/fastjet/PseudoJetStructureBase.$(SrcSuf) \
-	external/fastjet/PseudoJetStructureBase.hh \
-	external/fastjet/Error.hh \
-	external/fastjet/PseudoJet.hh \
-	external/fastjet/ClusterSequence.hh \
-	external/fastjet/ClusterSequenceAreaBase.hh
-tmp/external/fastjet/RangeDefinition.$(ObjSuf): \
-	external/fastjet/RangeDefinition.$(SrcSuf) \
-	external/fastjet/RangeDefinition.hh
-tmp/external/fastjet/RectangularGrid.$(ObjSuf): \
-	external/fastjet/RectangularGrid.$(SrcSuf) \
-	external/fastjet/RectangularGrid.hh
-tmp/external/fastjet/Selector.$(ObjSuf): \
-	external/fastjet/Selector.$(SrcSuf) \
-	external/fastjet/Selector.hh \
-	external/fastjet/GhostedAreaSpec.hh
-tmp/external/fastjet/TilingExtent.$(ObjSuf): \
-	external/fastjet/TilingExtent.$(SrcSuf) \
-	external/fastjet/internal/TilingExtent.hh
-tmp/external/fastjet/Voronoi.$(ObjSuf): \
-	external/fastjet/Voronoi.$(SrcSuf) \
-	external/fastjet/internal/Voronoi.hh
-tmp/external/fastjet/contribs/Nsubjettiness/AxesDefinition.$(ObjSuf): \
-	external/fastjet/contribs/Nsubjettiness/AxesDefinition.$(SrcSuf)
-tmp/external/fastjet/contribs/Nsubjettiness/ExtraRecombiners.$(ObjSuf): \
-	external/fastjet/contribs/Nsubjettiness/ExtraRecombiners.$(SrcSuf)
-tmp/external/fastjet/contribs/Nsubjettiness/MeasureDefinition.$(ObjSuf): \
-	external/fastjet/contribs/Nsubjettiness/MeasureDefinition.$(SrcSuf)
-tmp/external/fastjet/contribs/Nsubjettiness/Njettiness.$(ObjSuf): \
-	external/fastjet/contribs/Nsubjettiness/Njettiness.$(SrcSuf)
-tmp/external/fastjet/contribs/Nsubjettiness/NjettinessPlugin.$(ObjSuf): \
-	external/fastjet/contribs/Nsubjettiness/NjettinessPlugin.$(SrcSuf)
-tmp/external/fastjet/contribs/Nsubjettiness/Nsubjettiness.$(ObjSuf): \
-	external/fastjet/contribs/Nsubjettiness/Nsubjettiness.$(SrcSuf)
-tmp/external/fastjet/contribs/Nsubjettiness/TauComponents.$(ObjSuf): \
-	external/fastjet/contribs/Nsubjettiness/TauComponents.$(SrcSuf)
-tmp/external/fastjet/contribs/Nsubjettiness/XConePlugin.$(ObjSuf): \
-	external/fastjet/contribs/Nsubjettiness/XConePlugin.$(SrcSuf)
-tmp/external/fastjet/contribs/RecursiveTools/BottomUpSoftDrop.$(ObjSuf): \
-	external/fastjet/contribs/RecursiveTools/BottomUpSoftDrop.$(SrcSuf) \
-	external/fastjet/ClusterSequenceActiveAreaExplicitGhosts.hh \
-	external/fastjet/Selector.hh \
-	external/fastjet/config.h
-tmp/external/fastjet/contribs/RecursiveTools/IteratedSoftDrop.$(ObjSuf): \
-	external/fastjet/contribs/RecursiveTools/IteratedSoftDrop.$(SrcSuf)
-tmp/external/fastjet/contribs/RecursiveTools/ModifiedMassDropTagger.$(ObjSuf): \
-	external/fastjet/contribs/RecursiveTools/ModifiedMassDropTagger.$(SrcSuf) \
-	external/fastjet/JetDefinition.hh \
-	external/fastjet/ClusterSequenceAreaBase.hh
-tmp/external/fastjet/contribs/RecursiveTools/Recluster.$(ObjSuf): \
-	external/fastjet/contribs/RecursiveTools/Recluster.$(SrcSuf)
-tmp/external/fastjet/contribs/RecursiveTools/RecursiveSoftDrop.$(ObjSuf): \
-	external/fastjet/contribs/RecursiveTools/RecursiveSoftDrop.$(SrcSuf) \
-	external/fastjet/ClusterSequence.hh
-tmp/external/fastjet/contribs/RecursiveTools/RecursiveSymmetryCutBase.$(ObjSuf): \
-	external/fastjet/contribs/RecursiveTools/RecursiveSymmetryCutBase.$(SrcSuf) \
-	external/fastjet/JetDefinition.hh \
-	external/fastjet/ClusterSequenceAreaBase.hh
-tmp/external/fastjet/contribs/RecursiveTools/SoftDrop.$(ObjSuf): \
-	external/fastjet/contribs/RecursiveTools/SoftDrop.$(SrcSuf)
-tmp/external/fastjet/contribs/SoftKiller/SoftKiller.$(ObjSuf): \
-	external/fastjet/contribs/SoftKiller/SoftKiller.$(SrcSuf)
-tmp/external/fastjet/contribs/ValenciaPlugin/ValenciaPlugin.$(ObjSuf): \
-	external/fastjet/contribs/ValenciaPlugin/ValenciaPlugin.$(SrcSuf) \
-	external/fastjet/NNH.hh
-tmp/external/fastjet/plugins/ATLASCone/ATLASConePlugin.$(ObjSuf): \
-	external/fastjet/plugins/ATLASCone/ATLASConePlugin.$(SrcSuf) \
-	external/fastjet/ClusterSequence.hh
-tmp/external/fastjet/plugins/ATLASCone/Jet.$(ObjSuf): \
-	external/fastjet/plugins/ATLASCone/Jet.$(SrcSuf)
-tmp/external/fastjet/plugins/ATLASCone/JetConeFinderTool.$(ObjSuf): \
-	external/fastjet/plugins/ATLASCone/JetConeFinderTool.$(SrcSuf)
-tmp/external/fastjet/plugins/ATLASCone/JetSplitMergeTool.$(ObjSuf): \
-	external/fastjet/plugins/ATLASCone/JetSplitMergeTool.$(SrcSuf)
-tmp/external/fastjet/plugins/CDFCones/CDFJetCluPlugin.$(ObjSuf): \
-	external/fastjet/plugins/CDFCones/CDFJetCluPlugin.$(SrcSuf) \
-	external/fastjet/ClusterSequence.hh
-tmp/external/fastjet/plugins/CDFCones/CDFMidPointPlugin.$(ObjSuf): \
-	external/fastjet/plugins/CDFCones/CDFMidPointPlugin.$(SrcSuf) \
-	external/fastjet/ClusterSequence.hh \
-	external/fastjet/Error.hh
-tmp/external/fastjet/plugins/CDFCones/JetCluAlgorithm.$(ObjSuf): \
-	external/fastjet/plugins/CDFCones/JetCluAlgorithm.$(SrcSuf)
-tmp/external/fastjet/plugins/CDFCones/MidPointAlgorithm.$(ObjSuf): \
-	external/fastjet/plugins/CDFCones/MidPointAlgorithm.$(SrcSuf)
-tmp/external/fastjet/plugins/CMSIterativeCone/CMSIterativeConePlugin.$(ObjSuf): \
-	external/fastjet/plugins/CMSIterativeCone/CMSIterativeConePlugin.$(SrcSuf) \
-	external/fastjet/ClusterSequence.hh
-tmp/external/fastjet/plugins/D0RunICone/D0RunIBaseConePlugin.$(ObjSuf): \
-	external/fastjet/plugins/D0RunICone/D0RunIBaseConePlugin.$(SrcSuf) \
-	external/fastjet/ClusterSequence.hh \
-	external/fastjet/Error.hh
-tmp/external/fastjet/plugins/D0RunIICone/D0RunIIConePlugin.$(ObjSuf): \
-	external/fastjet/plugins/D0RunIICone/D0RunIIConePlugin.$(SrcSuf) \
-	external/fastjet/ClusterSequence.hh \
-	external/fastjet/Error.hh
-tmp/external/fastjet/plugins/EECambridge/EECambridgePlugin.$(ObjSuf): \
-	external/fastjet/plugins/EECambridge/EECambridgePlugin.$(SrcSuf) \
-	external/fastjet/ClusterSequence.hh \
-	external/fastjet/NNH.hh
-tmp/external/fastjet/plugins/GridJet/GridJetPlugin.$(ObjSuf): \
-	external/fastjet/plugins/GridJet/GridJetPlugin.$(SrcSuf) \
-	external/fastjet/ClusterSequence.hh
-tmp/external/fastjet/plugins/Jade/JadePlugin.$(ObjSuf): \
-	external/fastjet/plugins/Jade/JadePlugin.$(SrcSuf) \
-	external/fastjet/ClusterSequence.hh \
-	external/fastjet/NNH.hh \
-	external/fastjet/NNFJN2Plain.hh
-tmp/external/fastjet/plugins/NestedDefs/NestedDefsPlugin.$(ObjSuf): \
-	external/fastjet/plugins/NestedDefs/NestedDefsPlugin.$(SrcSuf) \
-	external/fastjet/ClusterSequence.hh
-tmp/external/fastjet/plugins/SISCone/SISConePlugin.$(ObjSuf): \
-	external/fastjet/plugins/SISCone/SISConePlugin.$(SrcSuf) \
-	external/fastjet/ClusterSequence.hh
-tmp/external/fastjet/plugins/SISCone/area.$(ObjSuf): \
-	external/fastjet/plugins/SISCone/area.$(SrcSuf)
-tmp/external/fastjet/plugins/SISCone/geom_2d.$(ObjSuf): \
-	external/fastjet/plugins/SISCone/geom_2d.$(SrcSuf)
-tmp/external/fastjet/plugins/SISCone/hash.$(ObjSuf): \
-	external/fastjet/plugins/SISCone/hash.$(SrcSuf)
-tmp/external/fastjet/plugins/SISCone/momentum.$(ObjSuf): \
-	external/fastjet/plugins/SISCone/momentum.$(SrcSuf)
-tmp/external/fastjet/plugins/SISCone/protocones.$(ObjSuf): \
-	external/fastjet/plugins/SISCone/protocones.$(SrcSuf)
-tmp/external/fastjet/plugins/SISCone/quadtree.$(ObjSuf): \
-	external/fastjet/plugins/SISCone/quadtree.$(SrcSuf)
-tmp/external/fastjet/plugins/SISCone/ranlux.$(ObjSuf): \
-	external/fastjet/plugins/SISCone/ranlux.$(SrcSuf)
-tmp/external/fastjet/plugins/SISCone/reference.$(ObjSuf): \
-	external/fastjet/plugins/SISCone/reference.$(SrcSuf)
-tmp/external/fastjet/plugins/SISCone/siscone.$(ObjSuf): \
-	external/fastjet/plugins/SISCone/siscone.$(SrcSuf)
-tmp/external/fastjet/plugins/SISCone/siscone_error.$(ObjSuf): \
-	external/fastjet/plugins/SISCone/siscone_error.$(SrcSuf)
-tmp/external/fastjet/plugins/SISCone/split_merge.$(ObjSuf): \
-	external/fastjet/plugins/SISCone/split_merge.$(SrcSuf)
-tmp/external/fastjet/plugins/SISCone/vicinity.$(ObjSuf): \
-	external/fastjet/plugins/SISCone/vicinity.$(SrcSuf)
-tmp/external/fastjet/plugins/TrackJet/TrackJetPlugin.$(ObjSuf): \
-	external/fastjet/plugins/TrackJet/TrackJetPlugin.$(SrcSuf) \
-	external/fastjet/ClusterSequence.hh
-tmp/external/fastjet/tools/BackgroundEstimatorBase.$(ObjSuf): \
-	external/fastjet/tools/BackgroundEstimatorBase.$(SrcSuf) \
-	external/fastjet/tools/BackgroundEstimatorBase.hh
-tmp/external/fastjet/tools/CASubJetTagger.$(ObjSuf): \
-	external/fastjet/tools/CASubJetTagger.$(SrcSuf)
-tmp/external/fastjet/tools/Filter.$(ObjSuf): \
-	external/fastjet/tools/Filter.$(SrcSuf) \
-	external/fastjet/tools/Filter.hh \
-	external/fastjet/tools/Recluster.hh \
-	external/fastjet/tools/Subtractor.hh
-tmp/external/fastjet/tools/GridMedianBackgroundEstimator.$(ObjSuf): \
-	external/fastjet/tools/GridMedianBackgroundEstimator.$(SrcSuf) \
-	external/fastjet/tools/GridMedianBackgroundEstimator.hh
-tmp/external/fastjet/tools/JHTopTagger.$(ObjSuf): \
-	external/fastjet/tools/JHTopTagger.$(SrcSuf)
-tmp/external/fastjet/tools/JetMedianBackgroundEstimator.$(ObjSuf): \
-	external/fastjet/tools/JetMedianBackgroundEstimator.$(SrcSuf) \
-	external/fastjet/tools/JetMedianBackgroundEstimator.hh
-tmp/external/fastjet/tools/MassDropTagger.$(ObjSuf): \
-	external/fastjet/tools/MassDropTagger.$(SrcSuf)
-tmp/external/fastjet/tools/Pruner.$(ObjSuf): \
-	external/fastjet/tools/Pruner.$(SrcSuf) \
-	external/fastjet/tools/Pruner.hh \
-	external/fastjet/ClusterSequenceActiveAreaExplicitGhosts.hh \
-	external/fastjet/Selector.hh
-tmp/external/fastjet/tools/Recluster.$(ObjSuf): \
-	external/fastjet/tools/Recluster.$(SrcSuf) \
-	external/fastjet/tools/Recluster.hh \
-	external/fastjet/CompositeJetStructure.hh
-tmp/external/fastjet/tools/RestFrameNSubjettinessTagger.$(ObjSuf): \
-	external/fastjet/tools/RestFrameNSubjettinessTagger.$(SrcSuf)
-tmp/external/fastjet/tools/Subtractor.$(ObjSuf): \
-	external/fastjet/tools/Subtractor.$(SrcSuf) \
-	external/fastjet/tools/Subtractor.hh
-tmp/external/fastjet/tools/TopTaggerBase.$(ObjSuf): \
-	external/fastjet/tools/TopTaggerBase.$(SrcSuf)
-tmp/modules/FastJetFinder.$(ObjSuf): \
-	modules/FastJetFinder.$(SrcSuf) \
-	modules/FastJetFinder.h \
-	classes/DelphesClasses.h \
-	classes/DelphesFactory.h \
-	classes/DelphesFormula.h \
-	external/ExRootAnalysis/ExRootClassifier.h \
-	external/ExRootAnalysis/ExRootFilter.h \
-	external/ExRootAnalysis/ExRootResult.h \
-	external/fastjet/ClusterSequence.hh \
-	external/fastjet/ClusterSequenceArea.hh \
-	external/fastjet/JetDefinition.hh \
-	external/fastjet/PseudoJet.hh \
-	external/fastjet/Selector.hh \
-	external/fastjet/tools/JetMedianBackgroundEstimator.hh \
-	external/fastjet/plugins/CDFCones/fastjet/CDFJetCluPlugin.hh \
-	external/fastjet/plugins/CDFCones/fastjet/CDFMidPointPlugin.hh \
-	external/fastjet/plugins/SISCone/fastjet/SISConePlugin.hh \
-	external/fastjet/contribs/Nsubjettiness/ExtraRecombiners.hh \
-	external/fastjet/contribs/Nsubjettiness/Njettiness.hh \
-	external/fastjet/contribs/Nsubjettiness/NjettinessPlugin.hh \
-	external/fastjet/contribs/Nsubjettiness/Nsubjettiness.hh \
-	external/fastjet/contribs/ValenciaPlugin/ValenciaPlugin.hh \
-	external/fastjet/contribs/RecursiveTools/SoftDrop.hh \
-	external/fastjet/tools/Filter.hh \
-	external/fastjet/tools/Pruner.hh
-tmp/modules/FastJetGridMedianEstimator.$(ObjSuf): \
-	modules/FastJetGridMedianEstimator.$(SrcSuf) \
-	modules/FastJetGridMedianEstimator.h \
-	classes/DelphesClasses.h \
-	classes/DelphesFactory.h \
-	classes/DelphesFormula.h \
-	external/ExRootAnalysis/ExRootClassifier.h \
-	external/ExRootAnalysis/ExRootFilter.h \
-	external/ExRootAnalysis/ExRootResult.h \
-	external/fastjet/ClusterSequence.hh \
-	external/fastjet/ClusterSequenceArea.hh \
-	external/fastjet/JetDefinition.hh \
-	external/fastjet/PseudoJet.hh \
-	external/fastjet/RectangularGrid.hh \
-	external/fastjet/Selector.hh \
-	external/fastjet/tools/JetMedianBackgroundEstimator.hh \
-	external/fastjet/tools/GridMedianBackgroundEstimator.hh \
-	external/fastjet/plugins/CDFCones/fastjet/CDFJetCluPlugin.hh \
-	external/fastjet/plugins/CDFCones/fastjet/CDFMidPointPlugin.hh \
-	external/fastjet/plugins/SISCone/fastjet/SISConePlugin.hh \
-	external/fastjet/contribs/Nsubjettiness/ExtraRecombiners.hh \
-	external/fastjet/contribs/Nsubjettiness/Njettiness.hh \
-	external/fastjet/contribs/Nsubjettiness/NjettinessPlugin.hh \
-	external/fastjet/contribs/Nsubjettiness/Nsubjettiness.hh
-tmp/modules/RunPUPPI.$(ObjSuf): \
-	modules/RunPUPPI.$(SrcSuf) \
-	modules/RunPUPPI.h \
-	external/PUPPI/AlgoObj.hh \
-	external/PUPPI/PuppiContainer.hh \
-	external/PUPPI/RecoObj2.hh \
-	external/fastjet/PseudoJet.hh \
-	classes/DelphesClasses.h \
-	classes/DelphesFactory.h \
-	classes/DelphesFormula.h
-FASTJET_OBJ +=  \
-	tmp/external/PUPPI/PuppiAlgo.$(ObjSuf) \
-	tmp/external/PUPPI/PuppiContainer.$(ObjSuf) \
-	tmp/external/PUPPI/puppiCleanContainer.$(ObjSuf) \
-	tmp/external/fastjet/AreaDefinition.$(ObjSuf) \
-	tmp/external/fastjet/BasicRandom.$(ObjSuf) \
-	tmp/external/fastjet/ClosestPair2D.$(ObjSuf) \
-	tmp/external/fastjet/ClusterSequence.$(ObjSuf) \
-	tmp/external/fastjet/ClusterSequence1GhostPassiveArea.$(ObjSuf) \
-	tmp/external/fastjet/ClusterSequenceActiveArea.$(ObjSuf) \
-	tmp/external/fastjet/ClusterSequenceActiveAreaExplicitGhosts.$(ObjSuf) \
-	tmp/external/fastjet/ClusterSequenceArea.$(ObjSuf) \
-	tmp/external/fastjet/ClusterSequenceAreaBase.$(ObjSuf) \
-	tmp/external/fastjet/ClusterSequencePassiveArea.$(ObjSuf) \
-	tmp/external/fastjet/ClusterSequenceStructure.$(ObjSuf) \
-	tmp/external/fastjet/ClusterSequenceVoronoiArea.$(ObjSuf) \
-	tmp/external/fastjet/ClusterSequence_CP2DChan.$(ObjSuf) \
-	tmp/external/fastjet/ClusterSequence_Delaunay.$(ObjSuf) \
-	tmp/external/fastjet/ClusterSequence_DumbN3.$(ObjSuf) \
-	tmp/external/fastjet/ClusterSequence_N2.$(ObjSuf) \
-	tmp/external/fastjet/ClusterSequence_TiledN2.$(ObjSuf) \
-	tmp/external/fastjet/CompositeJetStructure.$(ObjSuf) \
-	tmp/external/fastjet/Dnn2piCylinder.$(ObjSuf) \
-	tmp/external/fastjet/Dnn3piCylinder.$(ObjSuf) \
-	tmp/external/fastjet/Dnn4piCylinder.$(ObjSuf) \
-	tmp/external/fastjet/DnnPlane.$(ObjSuf) \
-	tmp/external/fastjet/Error.$(ObjSuf) \
-	tmp/external/fastjet/FunctionOfPseudoJet.$(ObjSuf) \
-	tmp/external/fastjet/GhostedAreaSpec.$(ObjSuf) \
-	tmp/external/fastjet/JetDefinition.$(ObjSuf) \
-	tmp/external/fastjet/LazyTiling25.$(ObjSuf) \
-	tmp/external/fastjet/LazyTiling9.$(ObjSuf) \
-	tmp/external/fastjet/LazyTiling9Alt.$(ObjSuf) \
-	tmp/external/fastjet/LazyTiling9SeparateGhosts.$(ObjSuf) \
-	tmp/external/fastjet/LimitedWarning.$(ObjSuf) \
-	tmp/external/fastjet/MinHeap.$(ObjSuf) \
-	tmp/external/fastjet/PseudoJet.$(ObjSuf) \
-	tmp/external/fastjet/PseudoJetStructureBase.$(ObjSuf) \
-	tmp/external/fastjet/RangeDefinition.$(ObjSuf) \
-	tmp/external/fastjet/RectangularGrid.$(ObjSuf) \
-	tmp/external/fastjet/Selector.$(ObjSuf) \
-	tmp/external/fastjet/TilingExtent.$(ObjSuf) \
-	tmp/external/fastjet/Voronoi.$(ObjSuf) \
-	tmp/external/fastjet/contribs/Nsubjettiness/AxesDefinition.$(ObjSuf) \
-	tmp/external/fastjet/contribs/Nsubjettiness/ExtraRecombiners.$(ObjSuf) \
-	tmp/external/fastjet/contribs/Nsubjettiness/MeasureDefinition.$(ObjSuf) \
-	tmp/external/fastjet/contribs/Nsubjettiness/Njettiness.$(ObjSuf) \
-	tmp/external/fastjet/contribs/Nsubjettiness/NjettinessPlugin.$(ObjSuf) \
-	tmp/external/fastjet/contribs/Nsubjettiness/Nsubjettiness.$(ObjSuf) \
-	tmp/external/fastjet/contribs/Nsubjettiness/TauComponents.$(ObjSuf) \
-	tmp/external/fastjet/contribs/Nsubjettiness/XConePlugin.$(ObjSuf) \
-	tmp/external/fastjet/contribs/RecursiveTools/BottomUpSoftDrop.$(ObjSuf) \
-	tmp/external/fastjet/contribs/RecursiveTools/IteratedSoftDrop.$(ObjSuf) \
-	tmp/external/fastjet/contribs/RecursiveTools/ModifiedMassDropTagger.$(ObjSuf) \
-	tmp/external/fastjet/contribs/RecursiveTools/Recluster.$(ObjSuf) \
-	tmp/external/fastjet/contribs/RecursiveTools/RecursiveSoftDrop.$(ObjSuf) \
-	tmp/external/fastjet/contribs/RecursiveTools/RecursiveSymmetryCutBase.$(ObjSuf) \
-	tmp/external/fastjet/contribs/RecursiveTools/SoftDrop.$(ObjSuf) \
-	tmp/external/fastjet/contribs/SoftKiller/SoftKiller.$(ObjSuf) \
-	tmp/external/fastjet/contribs/ValenciaPlugin/ValenciaPlugin.$(ObjSuf) \
-	tmp/external/fastjet/plugins/ATLASCone/ATLASConePlugin.$(ObjSuf) \
-	tmp/external/fastjet/plugins/ATLASCone/Jet.$(ObjSuf) \
-	tmp/external/fastjet/plugins/ATLASCone/JetConeFinderTool.$(ObjSuf) \
-	tmp/external/fastjet/plugins/ATLASCone/JetSplitMergeTool.$(ObjSuf) \
-	tmp/external/fastjet/plugins/CDFCones/CDFJetCluPlugin.$(ObjSuf) \
-	tmp/external/fastjet/plugins/CDFCones/CDFMidPointPlugin.$(ObjSuf) \
-	tmp/external/fastjet/plugins/CDFCones/JetCluAlgorithm.$(ObjSuf) \
-	tmp/external/fastjet/plugins/CDFCones/MidPointAlgorithm.$(ObjSuf) \
-	tmp/external/fastjet/plugins/CMSIterativeCone/CMSIterativeConePlugin.$(ObjSuf) \
-	tmp/external/fastjet/plugins/D0RunICone/D0RunIBaseConePlugin.$(ObjSuf) \
-	tmp/external/fastjet/plugins/D0RunIICone/D0RunIIConePlugin.$(ObjSuf) \
-	tmp/external/fastjet/plugins/EECambridge/EECambridgePlugin.$(ObjSuf) \
-	tmp/external/fastjet/plugins/GridJet/GridJetPlugin.$(ObjSuf) \
-	tmp/external/fastjet/plugins/Jade/JadePlugin.$(ObjSuf) \
-	tmp/external/fastjet/plugins/NestedDefs/NestedDefsPlugin.$(ObjSuf) \
-	tmp/external/fastjet/plugins/SISCone/SISConePlugin.$(ObjSuf) \
-	tmp/external/fastjet/plugins/SISCone/area.$(ObjSuf) \
-	tmp/external/fastjet/plugins/SISCone/geom_2d.$(ObjSuf) \
-	tmp/external/fastjet/plugins/SISCone/hash.$(ObjSuf) \
-	tmp/external/fastjet/plugins/SISCone/momentum.$(ObjSuf) \
-	tmp/external/fastjet/plugins/SISCone/protocones.$(ObjSuf) \
-	tmp/external/fastjet/plugins/SISCone/quadtree.$(ObjSuf) \
-	tmp/external/fastjet/plugins/SISCone/ranlux.$(ObjSuf) \
-	tmp/external/fastjet/plugins/SISCone/reference.$(ObjSuf) \
-	tmp/external/fastjet/plugins/SISCone/siscone.$(ObjSuf) \
-	tmp/external/fastjet/plugins/SISCone/siscone_error.$(ObjSuf) \
-	tmp/external/fastjet/plugins/SISCone/split_merge.$(ObjSuf) \
-	tmp/external/fastjet/plugins/SISCone/vicinity.$(ObjSuf) \
-	tmp/external/fastjet/plugins/TrackJet/TrackJetPlugin.$(ObjSuf) \
-	tmp/external/fastjet/tools/BackgroundEstimatorBase.$(ObjSuf) \
-	tmp/external/fastjet/tools/CASubJetTagger.$(ObjSuf) \
-	tmp/external/fastjet/tools/Filter.$(ObjSuf) \
-	tmp/external/fastjet/tools/GridMedianBackgroundEstimator.$(ObjSuf) \
-	tmp/external/fastjet/tools/JHTopTagger.$(ObjSuf) \
-	tmp/external/fastjet/tools/JetMedianBackgroundEstimator.$(ObjSuf) \
-	tmp/external/fastjet/tools/MassDropTagger.$(ObjSuf) \
-	tmp/external/fastjet/tools/Pruner.$(ObjSuf) \
-	tmp/external/fastjet/tools/Recluster.$(ObjSuf) \
-	tmp/external/fastjet/tools/RestFrameNSubjettinessTagger.$(ObjSuf) \
-	tmp/external/fastjet/tools/Subtractor.$(ObjSuf) \
-	tmp/external/fastjet/tools/TopTaggerBase.$(ObjSuf) \
-	tmp/modules/FastJetFinder.$(ObjSuf) \
-	tmp/modules/FastJetGridMedianEstimator.$(ObjSuf) \
-	tmp/modules/RunPUPPI.$(ObjSuf)
-
-ifeq ($(HAS_PYTHIA8),true)
-FASTJET_OBJ +=  \
-	
-endif
-
-tmp/display/Delphes3DGeometry.$(ObjSuf): \
-	display/Delphes3DGeometry.$(SrcSuf) \
-	display/Delphes3DGeometry.h \
-	classes/DelphesClasses.h \
-	external/ExRootAnalysis/ExRootConfReader.h
-tmp/display/DelphesBranchElement.$(ObjSuf): \
-	display/DelphesBranchElement.$(SrcSuf) \
-	display/DelphesBranchElement.h \
-	classes/DelphesClasses.h
-tmp/display/DelphesCaloData.$(ObjSuf): \
-	display/DelphesCaloData.$(SrcSuf) \
-	display/DelphesCaloData.h
-tmp/display/DelphesDisplay.$(ObjSuf): \
-	display/DelphesDisplay.$(SrcSuf) \
-	display/DelphesDisplay.h
-tmp/display/DelphesEventDisplay.$(ObjSuf): \
-	display/DelphesEventDisplay.$(SrcSuf) \
-	display/Delphes3DGeometry.h \
-	display/DelphesBranchElement.h \
-	display/DelphesCaloData.h \
-	display/DelphesDisplay.h \
-	display/DelphesEventDisplay.h \
-	display/DelphesHtmlSummary.h \
-	display/DelphesPlotSummary.h \
-	classes/DelphesClasses.h \
-	external/ExRootAnalysis/ExRootConfReader.h \
-	external/ExRootAnalysis/ExRootTreeReader.h
-tmp/display/DelphesHtmlSummary.$(ObjSuf): \
-	display/DelphesHtmlSummary.$(SrcSuf) \
-	display/DelphesHtmlSummary.h
-tmp/display/DelphesPlotSummary.$(ObjSuf): \
-	display/DelphesPlotSummary.$(SrcSuf) \
-	display/DelphesPlotSummary.h
-DISPLAY_OBJ +=  \
-	tmp/display/Delphes3DGeometry.$(ObjSuf) \
-	tmp/display/DelphesBranchElement.$(ObjSuf) \
-	tmp/display/DelphesCaloData.$(ObjSuf) \
-	tmp/display/DelphesDisplay.$(ObjSuf) \
-	tmp/display/DelphesEventDisplay.$(ObjSuf) \
-	tmp/display/DelphesHtmlSummary.$(ObjSuf) \
-	tmp/display/DelphesPlotSummary.$(ObjSuf)
-
-ifeq ($(HAS_PYTHIA8),true)
-DISPLAY_OBJ +=  \
-	
-endif
-
-tmp/external/tcl/panic.$(ObjSuf): \
-	external/tcl/panic.c
-tmp/external/tcl/tclAlloc.$(ObjSuf): \
-	external/tcl/tclAlloc.c
-tmp/external/tcl/tclAsync.$(ObjSuf): \
-	external/tcl/tclAsync.c
-tmp/external/tcl/tclBasic.$(ObjSuf): \
-	external/tcl/tclBasic.c
-tmp/external/tcl/tclCkalloc.$(ObjSuf): \
-	external/tcl/tclCkalloc.c
-tmp/external/tcl/tclCmdAH.$(ObjSuf): \
-	external/tcl/tclCmdAH.c
-tmp/external/tcl/tclCmdIL.$(ObjSuf): \
-	external/tcl/tclCmdIL.c
-tmp/external/tcl/tclCmdMZ.$(ObjSuf): \
-	external/tcl/tclCmdMZ.c
-tmp/external/tcl/tclCompExpr.$(ObjSuf): \
-	external/tcl/tclCompExpr.c
-tmp/external/tcl/tclCompile.$(ObjSuf): \
-	external/tcl/tclCompile.c
-tmp/external/tcl/tclExecute.$(ObjSuf): \
-	external/tcl/tclExecute.c
-tmp/external/tcl/tclGet.$(ObjSuf): \
-	external/tcl/tclGet.c
-tmp/external/tcl/tclHash.$(ObjSuf): \
-	external/tcl/tclHash.c
-tmp/external/tcl/tclIndexObj.$(ObjSuf): \
-	external/tcl/tclIndexObj.c
-tmp/external/tcl/tclLink.$(ObjSuf): \
-	external/tcl/tclLink.c
-tmp/external/tcl/tclListObj.$(ObjSuf): \
-	external/tcl/tclListObj.c
-tmp/external/tcl/tclNamesp.$(ObjSuf): \
-	external/tcl/tclNamesp.c
-tmp/external/tcl/tclObj.$(ObjSuf): \
-	external/tcl/tclObj.c
-tmp/external/tcl/tclParse.$(ObjSuf): \
-	external/tcl/tclParse.c
-tmp/external/tcl/tclPreserve.$(ObjSuf): \
-	external/tcl/tclPreserve.c
-tmp/external/tcl/tclProc.$(ObjSuf): \
-	external/tcl/tclProc.c
-tmp/external/tcl/tclResolve.$(ObjSuf): \
-	external/tcl/tclResolve.c
-tmp/external/tcl/tclStringObj.$(ObjSuf): \
-	external/tcl/tclStringObj.c
-tmp/external/tcl/tclUtil.$(ObjSuf): \
-	external/tcl/tclUtil.c
-tmp/external/tcl/tclVar.$(ObjSuf): \
-	external/tcl/tclVar.c
-TCL_OBJ +=  \
-	tmp/external/tcl/panic.$(ObjSuf) \
-	tmp/external/tcl/tclAlloc.$(ObjSuf) \
-	tmp/external/tcl/tclAsync.$(ObjSuf) \
-	tmp/external/tcl/tclBasic.$(ObjSuf) \
-	tmp/external/tcl/tclCkalloc.$(ObjSuf) \
-	tmp/external/tcl/tclCmdAH.$(ObjSuf) \
-	tmp/external/tcl/tclCmdIL.$(ObjSuf) \
-	tmp/external/tcl/tclCmdMZ.$(ObjSuf) \
-	tmp/external/tcl/tclCompExpr.$(ObjSuf) \
-	tmp/external/tcl/tclCompile.$(ObjSuf) \
-	tmp/external/tcl/tclExecute.$(ObjSuf) \
-	tmp/external/tcl/tclGet.$(ObjSuf) \
-	tmp/external/tcl/tclHash.$(ObjSuf) \
-	tmp/external/tcl/tclIndexObj.$(ObjSuf) \
-	tmp/external/tcl/tclLink.$(ObjSuf) \
-	tmp/external/tcl/tclListObj.$(ObjSuf) \
-	tmp/external/tcl/tclNamesp.$(ObjSuf) \
-	tmp/external/tcl/tclObj.$(ObjSuf) \
-	tmp/external/tcl/tclParse.$(ObjSuf) \
-	tmp/external/tcl/tclPreserve.$(ObjSuf) \
-	tmp/external/tcl/tclProc.$(ObjSuf) \
-	tmp/external/tcl/tclResolve.$(ObjSuf) \
-	tmp/external/tcl/tclStringObj.$(ObjSuf) \
-	tmp/external/tcl/tclUtil.$(ObjSuf) \
-	tmp/external/tcl/tclVar.$(ObjSuf)
-
-modules/DenseTrackFilter.h: \
-	classes/DelphesModule.h
-	@touch $@
-
-modules/VertexFinderDA4D.h: \
-	classes/DelphesModule.h
-	@touch $@
-
-modules/TrackSmearing.h: \
-	classes/DelphesModule.h
-	@touch $@
-
-external/HepMC3/Units.h: \
-	external/HepMC3/Errors.h \
-	external/HepMC3/Setup.h \
-	external/HepMC3/FourVector.h
-	@touch $@
-
-external/fastjet/ClusterSequence.hh: \
-	external/fastjet/PseudoJet.hh \
-	external/fastjet/Error.hh \
-	external/fastjet/JetDefinition.hh \
-	external/fastjet/SharedPtr.hh \
-	external/fastjet/LimitedWarning.hh \
-	external/fastjet/FunctionOfPseudoJet.hh \
-	external/fastjet/ClusterSequenceStructure.hh \
-	external/fastjet/internal/deprecated.hh
-	@touch $@
-
-external/fastjet/internal/ClosestPair2D.hh: \
-	external/fastjet/internal/ClosestPair2DBase.hh \
-	external/fastjet/internal/SearchTree.hh \
-	external/fastjet/internal/MinHeap.hh \
-	external/fastjet/SharedPtr.hh
-	@touch $@
-
-modules/FastJetGridMedianEstimator.h: \
-	classes/DelphesModule.h
-	@touch $@
-
-external/fastjet/internal/MinHeap.hh: \
-	external/fastjet/internal/base.hh
-	@touch $@
-
-modules/EnergySmearing.h: \
-	classes/DelphesModule.h
-	@touch $@
-
-modules/LeptonDressing.h: \
-	classes/DelphesModule.h
-	@touch $@
-
-external/fastjet/internal/Voronoi.hh: \
-	external/fastjet/LimitedWarning.hh
-	@touch $@
-
-external/fastjet/ClusterSequenceActiveAreaExplicitGhosts.hh: \
-	external/fastjet/PseudoJet.hh \
-	external/fastjet/ClusterSequenceAreaBase.hh \
-	external/fastjet/GhostedAreaSpec.hh \
-	external/fastjet/LimitedWarning.hh
-	@touch $@
-
-external/fastjet/JetDefinition.hh: \
-	external/fastjet/internal/numconsts.hh \
-	external/fastjet/PseudoJet.hh \
-	external/fastjet/internal/deprecated.hh \
-	external/fastjet/ClusterSequence.hh
-	@touch $@
-
-modules/ConstituentFilter.h: \
-	classes/DelphesModule.h
-	@touch $@
-
-modules/Calorimeter.h: \
-	classes/DelphesModule.h
-	@touch $@
-
-classes/DelphesModule.h: \
-	external/ExRootAnalysis/ExRootTask.h
-	@touch $@
-
-modules/AngularSmearing.h: \
-	classes/DelphesModule.h
-	@touch $@
-
-modules/IdentificationMap.h: \
-	classes/DelphesModule.h
-	@touch $@
-
-modules/TrackCovariance.h: \
-	classes/DelphesModule.h
-	@touch $@
-
-modules/ExampleModule.h: \
-	classes/DelphesModule.h
-	@touch $@
-
-modules/Merger.h: \
-	classes/DelphesModule.h
-	@touch $@
-
-modules/EnergyScale.h: \
-	classes/DelphesModule.h
-	@touch $@
-
-modules/Isolation.h: \
-	classes/DelphesModule.h
-	@touch $@
-
-external/fastjet/internal/Dnn2piCylinder.hh: \
-	external/fastjet/internal/DynamicNearestNeighbours.hh \
-	external/fastjet/internal/DnnPlane.hh \
-	external/fastjet/internal/numconsts.hh
-	@touch $@
-
-external/fastjet/Selector.hh: \
-	external/fastjet/PseudoJet.hh \
-	external/fastjet/RangeDefinition.hh
-	@touch $@
-
-modules/JetPileUpSubtractor.h: \
-	classes/DelphesModule.h
-	@touch $@
-
-external/fastjet/contribs/Nsubjettiness/Njettiness.hh: \
-	external/fastjet/PseudoJet.hh \
-	external/fastjet/SharedPtr.hh
-	@touch $@
-
-external/fastjet/internal/LazyTiling25.hh: \
-	external/fastjet/internal/MinHeap.hh \
-	external/fastjet/ClusterSequence.hh \
-	external/fastjet/internal/LazyTiling9Alt.hh \
-	external/fastjet/internal/LazyTiling9.hh
-	@touch $@
-
-external/fastjet/Error.hh: \
-	external/fastjet/internal/base.hh \
-	external/fastjet/config.h \
-	external/fastjet/LimitedWarning.hh
-	@touch $@
-
-modules/DecayFilter.h: \
-	classes/DelphesModule.h
-	@touch $@
-
-external/fastjet/internal/TilingExtent.hh: \
-	external/fastjet/ClusterSequence.hh
-	@touch $@
-
-modules/TrackPileUpSubtractor.h: \
-	classes/DelphesModule.h
-	@touch $@
-
-external/HepMC3/ReaderAscii.h: \
-	external/HepMC3/Reader.h \
-	external/HepMC3/GenEvent.h
-	@touch $@
-
-modules/Efficiency.h: \
-	classes/DelphesModule.h
-	@touch $@
-
-external/fastjet/tools/GridMedianBackgroundEstimator.hh: \
-	external/fastjet/tools/BackgroundEstimatorBase.hh \
-	external/fastjet/RectangularGrid.hh
-	@touch $@
-
-external/fastjet/internal/DnnPlane.hh: \
-	external/fastjet/internal/Triangulation.hh \
-	external/fastjet/internal/DynamicNearestNeighbours.hh
-	@touch $@
-
-external/fastjet/ClusterSequenceArea.hh: \
-	external/fastjet/ClusterSequenceAreaBase.hh \
-	external/fastjet/ClusterSequenceActiveArea.hh \
-	external/fastjet/ClusterSequenceActiveAreaExplicitGhosts.hh \
-	external/fastjet/ClusterSequencePassiveArea.hh \
-	external/fastjet/ClusterSequenceVoronoiArea.hh \
-	external/fastjet/AreaDefinition.hh
-	@touch $@
-
-modules/JetFakeParticle.h: \
-	classes/DelphesModule.h
-	@touch $@
-
-modules/OldCalorimeter.h: \
-	classes/DelphesModule.h
-	@touch $@
-
-external/fastjet/ClusterSequence1GhostPassiveArea.hh: \
-	external/fastjet/PseudoJet.hh \
-	external/fastjet/ClusterSequenceAreaBase.hh \
-	external/fastjet/ClusterSequenceActiveArea.hh
-	@touch $@
-
-external/fastjet/internal/LazyTiling9Alt.hh: \
-	external/fastjet/internal/MinHeap.hh \
-	external/fastjet/ClusterSequence.hh
-	@touch $@
-
-modules/TrackCountingTauTagging.h: \
-	classes/DelphesModule.h
-	@touch $@
-
-external/fastjet/contribs/ValenciaPlugin/ValenciaPlugin.hh: \
-	external/fastjet/JetDefinition.hh \
-	external/fastjet/ClusterSequence.hh
-	@touch $@
-
-external/fastjet/RectangularGrid.hh: \
-	external/fastjet/PseudoJet.hh \
-	external/fastjet/Selector.hh
-	@touch $@
-
-external/HepMC3/Data/GenEventData.h: \
-	external/HepMC3/Data/GenParticleData.h \
-	external/HepMC3/Data/GenVertexData.h \
-	external/HepMC3/Units.h
-	@touch $@
-
-modules/PileUpMerger.h: \
-	classes/DelphesModule.h
-	@touch $@
-
-external/HepMC3/GenPdfInfo.h: \
-	external/HepMC3/Attribute.h
-	@touch $@
-
-external/fastjet/contribs/Nsubjettiness/ExtraRecombiners.hh: \
-	external/fastjet/PseudoJet.hh \
-	external/fastjet/JetDefinition.hh
-	@touch $@
-
-display/DelphesBranchElement.h: \
-	display/DelphesCaloData.h
-	@touch $@
-
-modules/TimeOfFlight.h: \
-	classes/DelphesModule.h
-	@touch $@
-
-external/fastjet/contribs/Nsubjettiness/NjettinessPlugin.hh: \
-	external/fastjet/ClusterSequence.hh \
-	external/fastjet/JetDefinition.hh
-	@touch $@
-
-external/fastjet/internal/DynamicNearestNeighbours.hh: \
-	external/fastjet/internal/numconsts.hh \
-	external/fastjet/Error.hh
-	@touch $@
-
-modules/RunPUPPI.h: \
-	classes/DelphesModule.h
-	@touch $@
-
-modules/Cloner.h: \
-	classes/DelphesModule.h
-	@touch $@
-
-external/HepMC3/ReaderAsciiHepMC2.h: \
-	external/HepMC3/Reader.h \
-	external/HepMC3/GenEvent.h
-	@touch $@
-
-external/fastjet/PseudoJet.hh: \
-	external/fastjet/internal/numconsts.hh \
-	external/fastjet/internal/IsBase.hh \
-	external/fastjet/SharedPtr.hh \
-	external/fastjet/Error.hh \
-	external/fastjet/PseudoJetStructureBase.hh
-	@touch $@
-
-modules/PhotonID.h: \
-	classes/DelphesModule.h
-	@touch $@
-
-external/fastjet/tools/Pruner.hh: \
-	external/fastjet/ClusterSequence.hh \
-	external/fastjet/WrappedStructure.hh \
-	external/fastjet/tools/Transformer.hh
-	@touch $@
-
-external/fastjet/internal/LazyTiling9.hh: \
-	external/fastjet/internal/MinHeap.hh \
-	external/fastjet/ClusterSequence.hh \
-	external/fastjet/internal/LazyTiling9Alt.hh
-	@touch $@
-
-modules/PileUpJetID.h: \
-	classes/DelphesModule.h
-	@touch $@
-
-external/fastjet/version.hh: \
-	external/fastjet/config.h
-	@touch $@
-
-modules/MomentumSmearing.h: \
-	classes/DelphesModule.h
-	@touch $@
-
-modules/TauTagging.h: \
-	external/ExRootAnalysis/ExRootClassifier.h \
-	external/ExRootAnalysis/ExRootFilter.h \
-	external/ExRootAnalysis/ExRootResult.h \
-	classes/DelphesModule.h
-	@touch $@
-
-external/fastjet/GhostedAreaSpec.hh: \
-	external/fastjet/PseudoJet.hh \
-	external/fastjet/internal/BasicRandom.hh \
-	external/fastjet/Selector.hh \
-	external/fastjet/LimitedWarning.hh \
-	external/fastjet/internal/deprecated.hh
-	@touch $@
-
-external/fastjet/internal/Dnn4piCylinder.hh: \
-	external/fastjet/internal/DynamicNearestNeighbours.hh \
-	external/fastjet/internal/DnnPlane.hh \
-	external/fastjet/internal/numconsts.hh
-	@touch $@
-
-external/HepMC3/Attribute.h: \
-	external/HepMC3/GenParticle_fwd.h \
-	external/HepMC3/GenVertex_fwd.h
-	@touch $@
-
-modules/VertexSorter.h: \
-	classes/DelphesModule.h
-	@touch $@
-
-modules/Delphes.h: \
-	classes/DelphesModule.h
-	@touch $@
-
-modules/VertexFinder.h: \
-	classes/DelphesModule.h
-	@touch $@
-
-modules/UniqueObjectFinder.h: \
-	classes/DelphesModule.h
-	@touch $@
-
-modules/TrackCountingBTagging.h: \
-	classes/DelphesModule.h
-	@touch $@
-
-modules/PileUpMergerPythia8.h: \
-	classes/DelphesModule.h
-	@touch $@
-
-external/fastjet/ClusterSequenceActiveArea.hh: \
-	external/fastjet/PseudoJet.hh \
-	external/fastjet/ClusterSequenceAreaBase.hh \
-	external/fastjet/ClusterSequenceActiveAreaExplicitGhosts.hh
-	@touch $@
-
-modules/JetFlavorAssociation.h: \
-	classes/DelphesClasses.h \
-	classes/DelphesModule.h
-	@touch $@
-
-modules/ParticlePropagator.h: \
-	classes/DelphesModule.h
-	@touch $@
-
-external/HepMC3/GenRunInfo.h: \
-	external/HepMC3/Units.h \
-	external/HepMC3/Attribute.h
-	@touch $@
-
-modules/PdgCodeFilter.h: \
-	classes/DelphesModule.h
-	@touch $@
-
-modules/TruthVertexFinder.h: \
-	classes/DelphesModule.h
-	@touch $@
-
-classes/DelphesSTDHEPReader.h: \
-	classes/DelphesXDRReader.h
-	@touch $@
-
-external/HepMC3/GenEvent.h: \
-	external/HepMC3/Units.h \
-	external/HepMC3/GenParticle_fwd.h \
-	external/HepMC3/GenVertex_fwd.h \
-	external/HepMC3/GenPdfInfo_fwd.h \
-	external/HepMC3/GenHeavyIon_fwd.h \
-	external/HepMC3/GenCrossSection_fwd.h \
-	external/HepMC3/GenHeavyIon.h \
-	external/HepMC3/GenPdfInfo.h \
-	external/HepMC3/GenCrossSection.h \
-	external/HepMC3/GenRunInfo.h
-	@touch $@
-
-external/HepMC3/GenHeavyIon.h: \
-	external/HepMC3/Attribute.h
-	@touch $@
-
-external/fastjet/plugins/CDFCones/fastjet/CDFMidPointPlugin.hh: \
-	external/fastjet/JetDefinition.hh
-	@touch $@
-
-external/PUPPI/PuppiContainer.hh: \
-	external/fastjet/PseudoJet.hh
-	@touch $@
-
-external/fastjet/RangeDefinition.hh: \
-	external/fastjet/PseudoJet.hh \
-	external/fastjet/Error.hh \
-	external/fastjet/LimitedWarning.hh \
-	external/fastjet/internal/deprecated.hh
-	@touch $@
-
-external/fastjet/PseudoJetStructureBase.hh: \
-	external/fastjet/internal/base.hh
-	@touch $@
-
-external/fastjet/ClusterSequenceAreaBase.hh: \
-	external/fastjet/ClusterSequence.hh \
-	external/fastjet/LimitedWarning.hh \
-	external/fastjet/Selector.hh \
-	external/fastjet/internal/deprecated.hh
-	@touch $@
-
-modules/PhotonConversions.h: \
-	classes/DelphesModule.h
-	@touch $@
-
-external/fastjet/ClusterSequenceVoronoiArea.hh: \
-	external/fastjet/PseudoJet.hh \
-	external/fastjet/AreaDefinition.hh \
-	external/fastjet/ClusterSequenceAreaBase.hh
-	@touch $@
-
-modules/BTagging.h: \
-	classes/DelphesModule.h
-	@touch $@
-
-modules/RecoPuFilter.h: \
-	classes/DelphesModule.h
-	@touch $@
-
-modules/Hector.h: \
-	classes/DelphesModule.h
-	@touch $@
-
-modules/ImpactParameterSmearing.h: \
-	classes/DelphesModule.h
-	@touch $@
-
-display/DelphesPlotSummary.h: \
-	external/ExRootAnalysis/ExRootTreeReader.h
-	@touch $@
-
-modules/Weighter.h: \
-	classes/DelphesModule.h
-	@touch $@
-
-modules/TaggingParticlesSkimmer.h: \
-	classes/DelphesModule.h
-	@touch $@
-
-external/fastjet/internal/BasicRandom.hh: \
-	external/fastjet/internal/base.hh
-	@touch $@
-
-external/HepMC3/GenVertex.h: \
-	external/HepMC3/GenParticle_fwd.h \
-	external/HepMC3/GenVertex_fwd.h \
-	external/HepMC3/Data/GenVertexData.h \
-	external/HepMC3/FourVector.h \
-	external/HepMC3/GenEvent.h
-	@touch $@
-
-modules/ClusterCounting.h: \
-	classes/DelphesModule.h
-	@touch $@
-
-modules/SimpleCalorimeter.h: \
-	classes/DelphesModule.h
-	@touch $@
-
-external/fastjet/plugins/CDFCones/fastjet/CDFJetCluPlugin.hh: \
-	external/fastjet/JetDefinition.hh \
-	external/fastjet/PseudoJet.hh
-	@touch $@
-
-external/HepMC3/GenCrossSection.h: \
-	external/HepMC3/Attribute.h
-	@touch $@
-
-external/ExRootAnalysis/ExRootTask.h: \
-	external/ExRootAnalysis/ExRootConfReader.h
-	@touch $@
-
-external/fastjet/tools/Subtractor.hh: \
-	external/fastjet/internal/base.hh \
-	external/fastjet/tools/Transformer.hh \
-	external/fastjet/tools/BackgroundEstimatorBase.hh
-	@touch $@
-
-external/fastjet/internal/LazyTiling9SeparateGhosts.hh: \
-	external/fastjet/internal/MinHeap.hh \
-	external/fastjet/ClusterSequence.hh \
-	external/fastjet/internal/LazyTiling9Alt.hh
-	@touch $@
-
-external/fastjet/internal/Dnn3piCylinder.hh: \
-	external/fastjet/internal/DynamicNearestNeighbours.hh \
-	external/fastjet/internal/DnnPlane.hh \
-	external/fastjet/internal/numconsts.hh
-	@touch $@
-
-external/fastjet/AreaDefinition.hh: \
-	external/fastjet/GhostedAreaSpec.hh
-	@touch $@
-
-modules/ParticleDensity.h: \
-	classes/DelphesModule.h
-	@touch $@
-
-modules/TreeWriter.h: \
-	classes/DelphesModule.h
-	@touch $@
-
-modules/TimeSmearing.h: \
-	classes/DelphesModule.h
-	@touch $@
-
-external/fastjet/contribs/Nsubjettiness/Nsubjettiness.hh: \
-	external/fastjet/FunctionOfPseudoJet.hh
-	@touch $@
-
-external/fastjet/ClusterSequenceStructure.hh: \
-	external/fastjet/internal/base.hh \
-	external/fastjet/SharedPtr.hh \
-	external/fastjet/PseudoJetStructureBase.hh
-	@touch $@
-
-modules/StatusPidFilter.h: \
-	classes/DelphesModule.h
-	@touch $@
-
-external/HepMC3/GenParticle.h: \
-	external/HepMC3/Data/GenParticleData.h \
-	external/HepMC3/FourVector.h \
-	external/HepMC3/GenParticle_fwd.h \
-	external/HepMC3/GenVertex_fwd.h \
-	external/HepMC3/GenEvent.h
-	@touch $@
-
-external/fastjet/LimitedWarning.hh: \
-	external/fastjet/internal/base.hh
-	@touch $@
-
-external/fastjet/config.h: \
-	external/fastjet/config_win.h
-	@touch $@
-
-classes/DelphesClasses.h: \
-	classes/SortableObject.h
-	@touch $@
-
-external/fastjet/ClusterSequencePassiveArea.hh: \
-	external/fastjet/PseudoJet.hh \
-	external/fastjet/ClusterSequence1GhostPassiveArea.hh
-	@touch $@
-
-modules/FastJetFinder.h: \
-	classes/DelphesModule.h
-	@touch $@
-
-modules/BeamSpotFilter.h: \
-	classes/DelphesModule.h
-	@touch $@
-
-modules/DualReadoutCalorimeter.h: \
-	classes/DelphesModule.h
-	@touch $@
-
-
-
-###
-
-ifeq ($(ROOT_MAJOR),6)
-all: $(NOFASTJET) $(DELPHES) $(DELPHES_DICT_PCM) $(FASTJET_DICT_PCM) $(EXECUTABLE)
-display: $(DISPLAY) $(DISPLAY_DICT_PCM)
-else
-all: $(NOFASTJET) $(DELPHES) $(EXECUTABLE)
-display: $(DISPLAY)
-endif
-
-$(NOFASTJET): $(DELPHES_DICT_OBJ) $(DELPHES_OBJ) $(TCL_OBJ)
-	@mkdir -p $(@D)
-	@echo ">> Building $@"
-ifeq ($(ARCH),aix5)
-	@$(MAKESHARED) $(OutPutOpt) $@ $(DELPHES_LIBS) -p 0 $^
-else
-ifeq ($(PLATFORM),macosx)
-# We need to make both the .dylib and the .so
-	@$(LD) $(SOFLAGS)$@ $(LDFLAGS) $^ $(OutPutOpt) $@ $(DELPHES_LIBS)
-ifneq ($(subst $(MACOSX_MINOR),,1234),1234)
-ifeq ($(MACOSX_MINOR),4)
-	@ln -sf $@ $(subst .$(DllSuf),.so,$@)
-endif
-endif
-else
-ifeq ($(PLATFORM),win32)
-	@bindexplib $* $^ > $*.def
-	@lib -nologo -MACHINE:IX86 $^ -def:$*.def $(OutPutOpt)$(NOFASTJETLIB)
-	@$(LD) $(SOFLAGS) $(LDFLAGS) $^ $*.exp $(DELPHES_LIBS) $(OutPutOpt)$@
-	@$(MT_DLL)
-else
-	@$(LD) $(SOFLAGS) $(LDFLAGS) $^ $(OutPutOpt) $@ $(DELPHES_LIBS)
-	@$(MT_DLL)
-endif
-endif
-endif
-
-$(DELPHES): $(DELPHES_DICT_OBJ) $(FASTJET_DICT_OBJ) $(DELPHES_OBJ) $(FASTJET_OBJ) $(TCL_OBJ)
-	@mkdir -p $(@D)
-	@echo ">> Building $@"
-ifeq ($(ARCH),aix5)
-	@$(MAKESHARED) $(OutPutOpt) $@ $(DELPHES_LIBS) -p 0 $^
-else
-ifeq ($(PLATFORM),macosx)
-# We need to make both the .dylib and the .so
-	@$(LD) $(SOFLAGS)$@ $(LDFLAGS) $^ $(OutPutOpt) $@ $(DELPHES_LIBS)
-ifneq ($(subst $(MACOSX_MINOR),,1234),1234)
-ifeq ($(MACOSX_MINOR),4)
-	@ln -sf $@ $(subst .$(DllSuf),.so,$@)
-endif
-endif
-else
-ifeq ($(PLATFORM),win32)
-	@bindexplib $* $^ > $*.def
-	@lib -nologo -MACHINE:IX86 $^ -def:$*.def $(OutPutOpt)$(DELPHESLIB)
-	@$(LD) $(SOFLAGS) $(LDFLAGS) $^ $*.exp $(DELPHES_LIBS) $(OutPutOpt)$@
-	@$(MT_DLL)
-else
-	@$(LD) $(SOFLAGS) $(LDFLAGS) $^ $(OutPutOpt) $@ $(DELPHES_LIBS)
-	@$(MT_DLL)
-endif
-endif
-endif
-
-$(DISPLAY): $(DELPHES_DICT_OBJ) $(FASTJET_DICT_OBJ) $(DISPLAY_DICT_OBJ) $(DELPHES_OBJ) $(FASTJET_OBJ) $(DISPLAY_OBJ) $(TCL_OBJ)
-	@mkdir -p $(@D)
-	@echo ">> Building $@"
-ifeq ($(ARCH),aix5)
-	@$(MAKESHARED) $(OutPutOpt) $@ $(DISPLAY_LIBS) -p 0 $^
-else
-ifeq ($(PLATFORM),macosx)
-# We need to make both the .dylib and the .so
-	@$(LD) $(SOFLAGS)$@ $(LDFLAGS) $^ $(OutPutOpt) $@ $(DISPLAY_LIBS)
-ifneq ($(subst $(MACOSX_MINOR),,1234),1234)
-ifeq ($(MACOSX_MINOR),4)
-	@ln -sf $@ $(subst .$(DllSuf),.so,$@)
-endif
-endif
-else
-ifeq ($(PLATFORM),win32)
-	@bindexplib $* $^ > $*.def
-	@lib -nologo -MACHINE:IX86 $^ -def:$*.def $(OutPutOpt)$(DISPLAYLIB)
-	@$(LD) $(SOFLAGS) $(LDFLAGS) $^ $*.exp $(DISPLAY_LIBS) $(OutPutOpt)$@
-	@$(MT_DLL)
-else
-	@$(LD) $(SOFLAGS) $(LDFLAGS) $^ $(OutPutOpt) $@ $(DISPLAY_LIBS)
-	@$(MT_DLL)
-endif
-endif
-endif
-
+# CMAKE generated file: DO NOT EDIT!
+# Generated by "Unix Makefiles" Generator, CMake Version 3.18
+
+# Default target executed when no arguments are given to make.
+default_target: all
+
+.PHONY : default_target
+
+# Allow only one "make -f Makefile2" at a time, but pass parallelism.
+.NOTPARALLEL:
+
+
+#=============================================================================
+# Special targets provided by cmake.
+
+# Disable implicit rules so canonical targets will work.
+.SUFFIXES:
+
+
+# Disable VCS-based implicit rules.
+% : %,v
+
+
+# Disable VCS-based implicit rules.
+% : RCS/%
+
+
+# Disable VCS-based implicit rules.
+% : RCS/%,v
+
+
+# Disable VCS-based implicit rules.
+% : SCCS/s.%
+
+
+# Disable VCS-based implicit rules.
+% : s.%
+
+
+.SUFFIXES: .hpux_make_needs_suffix_list
+
+
+# Command-line flag to silence nested $(MAKE).
+$(VERBOSE)MAKESILENT = -s
+
+#Suppress display of executed commands.
+$(VERBOSE).SILENT:
+
+# A target that is always out of date.
+cmake_force:
+
+.PHONY : cmake_force
+
+#=============================================================================
+# Set environment variables for the build.
+
+# The shell in which to execute make rules.
+SHELL = /bin/sh
+
+# The CMake executable.
+CMAKE_COMMAND = /usr/bin/cmake
+
+# The command to remove a file.
+RM = /usr/bin/cmake -E rm -f
+
+# Escaping for special characters.
+EQUALS = =
+
+# The top-level source directory on which CMake was run.
+CMAKE_SOURCE_DIR = /home/andriish/Projects/delphes
+
+# The top-level build directory on which CMake was run.
+CMAKE_BINARY_DIR = /home/andriish/Projects/delphes
+
+#=============================================================================
+# Targets provided globally by CMake.
+
+# Special rule for the target install/local
+install/local: preinstall
+	@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..."
+	/usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake
+.PHONY : install/local
+
+# Special rule for the target install/local
+install/local/fast: preinstall/fast
+	@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..."
+	/usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake
+.PHONY : install/local/fast
+
+# Special rule for the target install/strip
+install/strip: preinstall
+	@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..."
+	/usr/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake
+.PHONY : install/strip
+
+# Special rule for the target install/strip
+install/strip/fast: preinstall/fast
+	@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..."
+	/usr/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake
+.PHONY : install/strip/fast
+
+# Special rule for the target edit_cache
+edit_cache:
+	@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake cache editor..."
+	/usr/bin/ccmake -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
+.PHONY : edit_cache
+
+# Special rule for the target edit_cache
+edit_cache/fast: edit_cache
+
+.PHONY : edit_cache/fast
+
+# Special rule for the target rebuild_cache
+rebuild_cache:
+	@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..."
+	/usr/bin/cmake --regenerate-during-build -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
+.PHONY : rebuild_cache
+
+# Special rule for the target rebuild_cache
+rebuild_cache/fast: rebuild_cache
+
+.PHONY : rebuild_cache/fast
+
+# Special rule for the target list_install_components
+list_install_components:
+	@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Available install components are: \"Unspecified\""
+.PHONY : list_install_components
+
+# Special rule for the target list_install_components
+list_install_components/fast: list_install_components
+
+.PHONY : list_install_components/fast
+
+# Special rule for the target install
+install: preinstall
+	@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..."
+	/usr/bin/cmake -P cmake_install.cmake
+.PHONY : install
+
+# Special rule for the target install
+install/fast: preinstall/fast
+	@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..."
+	/usr/bin/cmake -P cmake_install.cmake
+.PHONY : install/fast
+
+# The main all target
+all: cmake_check_build_system
+	$(CMAKE_COMMAND) -E cmake_progress_start /home/andriish/Projects/delphes/CMakeFiles /home/andriish/Projects/delphes//CMakeFiles/progress.marks
+	$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 all
+	$(CMAKE_COMMAND) -E cmake_progress_start /home/andriish/Projects/delphes/CMakeFiles 0
+.PHONY : all
+
+# The main clean target
 clean:
-	@rm -f $(DELPHES_DICT_OBJ) $(DISPLAY_DICT_OBJ) $(DELPHES_OBJ) $(FASTJET_OBJ) $(DISPLAY_OBJ) $(TCL_OBJ) core
-	@rm -rf tmp
-
-distclean: clean
-	@rm -f $(NOFASTJET) $(NOFASTJETLIB) $(DELPHES) $(DELPHESLIB) $(DELPHES_DICT_PCM) $(FASTJET_DICT_PCM) $(DISPLAY) $(DISPLAYLIB) $(DISPLAY_DICT_PCM) $(EXECUTABLE)
-
-dist:
-	@echo ">> Building $(DISTTAR)"
-	@mkdir -p $(DISTDIR)
-	@cp -a AUTHORS CHANGELOG CMakeLists.txt COPYING DelphesEnv.sh LICENSE NOTICE README README_4LHCb Makefile MinBias.pileup configure cards classes converters display doc examples external modules python readers validation $(DISTDIR)
-	@find $(DISTDIR) -depth -name .\* -exec rm -rf {} \;
-	@tar -czf $(DISTTAR) $(DISTDIR)
-	@rm -rf $(DISTDIR)
-
-###
-
-.SUFFIXES: .$(SrcSuf) .$(ObjSuf) .$(DllSuf) $(PcmSuf)
-
-%Dict.$(SrcSuf):
-	@mkdir -p $(@D)
-	@echo ">> Generating $@"
-	@rootcint -f $@ -c -Iexternal $<
-	@mv $@ $@.base
-	@cat $< $@.base > $@
-	@rm $@.base
-
-$(DELPHES_DICT_PCM): %Dict$(PcmSuf):
-	@echo ">> Copying $@"
-	@cp $< $@
-
-$(FASTJET_DICT_PCM): %Dict$(PcmSuf):
-	@echo ">> Copying $@"
-	@cp $< $@
-
-$(DISPLAY_DICT_PCM): %Dict$(PcmSuf):
-	@echo ">> Copying $@"
-	@cp $< $@
-
-$(DELPHES_OBJ): tmp/%.$(ObjSuf): %.$(SrcSuf)
-	@mkdir -p $(@D)
-	@echo ">> Compiling $<"
-	@$(CXX) $(CXXFLAGS) -c $< $(OutPutOpt)$@
-
-$(FASTJET_OBJ): tmp/%.$(ObjSuf): %.$(SrcSuf)
-	@mkdir -p $(@D)
-	@echo ">> Compiling $<"
-	@$(CXX) $(CXXFLAGS) -c $< $(OutPutOpt)$@
-
-$(DISPLAY_OBJ): tmp/%.$(ObjSuf): %.$(SrcSuf)
-	@mkdir -p $(@D)
-	@echo ">> Compiling $<"
-	@$(CXX) $(CXXFLAGS) -c $< $(OutPutOpt)$@
-
-$(DELPHES_DICT_OBJ): %.$(ObjSuf): %.$(SrcSuf)
-	@mkdir -p $(@D)
-	@echo ">> Compiling $<"
-	@$(CXX) $(CXXFLAGS) -c $< $(OutPutOpt)$@
-
-$(FASTJET_DICT_OBJ): %.$(ObjSuf): %.$(SrcSuf)
-	@mkdir -p $(@D)
-	@echo ">> Compiling $<"
-	@$(CXX) $(CXXFLAGS) -c $< $(OutPutOpt)$@
-
-$(DISPLAY_DICT_OBJ): %.$(ObjSuf): %.$(SrcSuf)
-	@mkdir -p $(@D)
-	@echo ">> Compiling $<"
-	@$(CXX) $(CXXFLAGS) -c $< $(OutPutOpt)$@
-
-$(TCL_OBJ): tmp/%.$(ObjSuf): %.c
-	@mkdir -p $(@D)
-	@echo ">> Compiling $<"
-	@$(CC) $(patsubst -std=%,,$(CXXFLAGS)) -c $< $(OutPutOpt)$@
-
-$(EXECUTABLE_OBJ): tmp/%.$(ObjSuf): %.cpp
-	@mkdir -p $(@D)
-	@echo ">> Compiling $<"
-	@$(CXX) $(CXXFLAGS) -c $< $(OutPutOpt)$@
-
-$(EXECUTABLE): %$(ExeSuf): $(DELPHES_DICT_OBJ) $(FASTJET_DICT_OBJ) $(DELPHES_OBJ) $(FASTJET_OBJ) $(TCL_OBJ)
-	@echo ">> Building $@"
-	@$(LD) $(LDFLAGS) $^ $(DELPHES_LIBS) $(OutPutOpt)$@
-
-###
-
-
+	$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 clean
+.PHONY : clean
+
+# The main clean target
+clean/fast: clean
+
+.PHONY : clean/fast
+
+# Prepare targets for installation.
+preinstall: all
+	$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 preinstall
+.PHONY : preinstall
+
+# Prepare targets for installation.
+preinstall/fast:
+	$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 preinstall
+.PHONY : preinstall/fast
+
+# clear depends
+depend:
+	$(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1
+.PHONY : depend
+
+#=============================================================================
+# Target rules for targets named DelphesDisplay
+
+# Build rule for target.
+DelphesDisplay: cmake_check_build_system
+	$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 DelphesDisplay
+.PHONY : DelphesDisplay
+
+# fast build rule for target.
+DelphesDisplay/fast:
+	$(MAKE) $(MAKESILENT) -f CMakeFiles/DelphesDisplay.dir/build.make CMakeFiles/DelphesDisplay.dir/build
+.PHONY : DelphesDisplay/fast
+
+#=============================================================================
+# Target rules for targets named Delphes
+
+# Build rule for target.
+Delphes: cmake_check_build_system
+	$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 Delphes
+.PHONY : Delphes
+
+# fast build rule for target.
+Delphes/fast:
+	$(MAKE) $(MAKESILENT) -f CMakeFiles/Delphes.dir/build.make CMakeFiles/Delphes.dir/build
+.PHONY : Delphes/fast
+
+#=============================================================================
+# Target rules for targets named classes
+
+# Build rule for target.
+classes: cmake_check_build_system
+	$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 classes
+.PHONY : classes
+
+# fast build rule for target.
+classes/fast:
+	$(MAKE) $(MAKESILENT) -f classes/CMakeFiles/classes.dir/build.make classes/CMakeFiles/classes.dir/build
+.PHONY : classes/fast
+
+#=============================================================================
+# Target rules for targets named ClassesDict
+
+# Build rule for target.
+ClassesDict: cmake_check_build_system
+	$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 ClassesDict
+.PHONY : ClassesDict
+
+# fast build rule for target.
+ClassesDict/fast:
+	$(MAKE) $(MAKESILENT) -f classes/CMakeFiles/ClassesDict.dir/build.make classes/CMakeFiles/ClassesDict.dir/build
+.PHONY : ClassesDict/fast
+
+#=============================================================================
+# Target rules for targets named lhco2root
+
+# Build rule for target.
+lhco2root: cmake_check_build_system
+	$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 lhco2root
+.PHONY : lhco2root
+
+# fast build rule for target.
+lhco2root/fast:
+	$(MAKE) $(MAKESILENT) -f converters/CMakeFiles/lhco2root.dir/build.make converters/CMakeFiles/lhco2root.dir/build
+.PHONY : lhco2root/fast
+
+#=============================================================================
+# Target rules for targets named hepmc2pileup
+
+# Build rule for target.
+hepmc2pileup: cmake_check_build_system
+	$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 hepmc2pileup
+.PHONY : hepmc2pileup
+
+# fast build rule for target.
+hepmc2pileup/fast:
+	$(MAKE) $(MAKESILENT) -f converters/CMakeFiles/hepmc2pileup.dir/build.make converters/CMakeFiles/hepmc2pileup.dir/build
+.PHONY : hepmc2pileup/fast
+
+#=============================================================================
+# Target rules for targets named root2lhco
+
+# Build rule for target.
+root2lhco: cmake_check_build_system
+	$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 root2lhco
+.PHONY : root2lhco
+
+# fast build rule for target.
+root2lhco/fast:
+	$(MAKE) $(MAKESILENT) -f converters/CMakeFiles/root2lhco.dir/build.make converters/CMakeFiles/root2lhco.dir/build
+.PHONY : root2lhco/fast
+
+#=============================================================================
+# Target rules for targets named pileup2root
+
+# Build rule for target.
+pileup2root: cmake_check_build_system
+	$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 pileup2root
+.PHONY : pileup2root
+
+# fast build rule for target.
+pileup2root/fast:
+	$(MAKE) $(MAKESILENT) -f converters/CMakeFiles/pileup2root.dir/build.make converters/CMakeFiles/pileup2root.dir/build
+.PHONY : pileup2root/fast
+
+#=============================================================================
+# Target rules for targets named root2pileup
+
+# Build rule for target.
+root2pileup: cmake_check_build_system
+	$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 root2pileup
+.PHONY : root2pileup
+
+# fast build rule for target.
+root2pileup/fast:
+	$(MAKE) $(MAKESILENT) -f converters/CMakeFiles/root2pileup.dir/build.make converters/CMakeFiles/root2pileup.dir/build
+.PHONY : root2pileup/fast
+
+#=============================================================================
+# Target rules for targets named stdhep2pileup
+
+# Build rule for target.
+stdhep2pileup: cmake_check_build_system
+	$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 stdhep2pileup
+.PHONY : stdhep2pileup
+
+# fast build rule for target.
+stdhep2pileup/fast:
+	$(MAKE) $(MAKESILENT) -f converters/CMakeFiles/stdhep2pileup.dir/build.make converters/CMakeFiles/stdhep2pileup.dir/build
+.PHONY : stdhep2pileup/fast
+
+#=============================================================================
+# Target rules for targets named display
+
+# Build rule for target.
+display: cmake_check_build_system
+	$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 display
+.PHONY : display
+
+# fast build rule for target.
+display/fast:
+	$(MAKE) $(MAKESILENT) -f display/CMakeFiles/display.dir/build.make display/CMakeFiles/display.dir/build
+.PHONY : display/fast
+
+#=============================================================================
+# Target rules for targets named DisplayDict
+
+# Build rule for target.
+DisplayDict: cmake_check_build_system
+	$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 DisplayDict
+.PHONY : DisplayDict
+
+# fast build rule for target.
+DisplayDict/fast:
+	$(MAKE) $(MAKESILENT) -f display/CMakeFiles/DisplayDict.dir/build.make display/CMakeFiles/DisplayDict.dir/build
+.PHONY : DisplayDict/fast
+
+#=============================================================================
+# Target rules for targets named Example1
+
+# Build rule for target.
+Example1: cmake_check_build_system
+	$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 Example1
+.PHONY : Example1
+
+# fast build rule for target.
+Example1/fast:
+	$(MAKE) $(MAKESILENT) -f examples/CMakeFiles/Example1.dir/build.make examples/CMakeFiles/Example1.dir/build
+.PHONY : Example1/fast
+
+#=============================================================================
+# Target rules for targets named CaloGrid
+
+# Build rule for target.
+CaloGrid: cmake_check_build_system
+	$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 CaloGrid
+.PHONY : CaloGrid
+
+# fast build rule for target.
+CaloGrid/fast:
+	$(MAKE) $(MAKESILENT) -f examples/CMakeFiles/CaloGrid.dir/build.make examples/CMakeFiles/CaloGrid.dir/build
+.PHONY : CaloGrid/fast
+
+#=============================================================================
+# Target rules for targets named fastjet
+
+# Build rule for target.
+fastjet: cmake_check_build_system
+	$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 fastjet
+.PHONY : fastjet
+
+# fast build rule for target.
+fastjet/fast:
+	$(MAKE) $(MAKESILENT) -f external/fastjet/CMakeFiles/fastjet.dir/build.make external/fastjet/CMakeFiles/fastjet.dir/build
+.PHONY : fastjet/fast
+
+#=============================================================================
+# Target rules for targets named ExRootAnalysis
+
+# Build rule for target.
+ExRootAnalysis: cmake_check_build_system
+	$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 ExRootAnalysis
+.PHONY : ExRootAnalysis
+
+# fast build rule for target.
+ExRootAnalysis/fast:
+	$(MAKE) $(MAKESILENT) -f external/ExRootAnalysis/CMakeFiles/ExRootAnalysis.dir/build.make external/ExRootAnalysis/CMakeFiles/ExRootAnalysis.dir/build
+.PHONY : ExRootAnalysis/fast
+
+#=============================================================================
+# Target rules for targets named ExRootAnalysisDict
+
+# Build rule for target.
+ExRootAnalysisDict: cmake_check_build_system
+	$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 ExRootAnalysisDict
+.PHONY : ExRootAnalysisDict
+
+# fast build rule for target.
+ExRootAnalysisDict/fast:
+	$(MAKE) $(MAKESILENT) -f external/ExRootAnalysis/CMakeFiles/ExRootAnalysisDict.dir/build.make external/ExRootAnalysis/CMakeFiles/ExRootAnalysisDict.dir/build
+.PHONY : ExRootAnalysisDict/fast
+
+#=============================================================================
+# Target rules for targets named Hector
+
+# Build rule for target.
+Hector: cmake_check_build_system
+	$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 Hector
+.PHONY : Hector
+
+# fast build rule for target.
+Hector/fast:
+	$(MAKE) $(MAKESILENT) -f external/Hector/CMakeFiles/Hector.dir/build.make external/Hector/CMakeFiles/Hector.dir/build
+.PHONY : Hector/fast
+
+#=============================================================================
+# Target rules for targets named HepMC3
+
+# Build rule for target.
+HepMC3: cmake_check_build_system
+	$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 HepMC3
+.PHONY : HepMC3
+
+# fast build rule for target.
+HepMC3/fast:
+	$(MAKE) $(MAKESILENT) -f external/HepMC3/CMakeFiles/HepMC3.dir/build.make external/HepMC3/CMakeFiles/HepMC3.dir/build
+.PHONY : HepMC3/fast
+
+#=============================================================================
+# Target rules for targets named G__HepMC3rootIO
+
+# Build rule for target.
+G__HepMC3rootIO: cmake_check_build_system
+	$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 G__HepMC3rootIO
+.PHONY : G__HepMC3rootIO
+
+# fast build rule for target.
+G__HepMC3rootIO/fast:
+	$(MAKE) $(MAKESILENT) -f external/HepMC3/CMakeFiles/G__HepMC3rootIO.dir/build.make external/HepMC3/CMakeFiles/G__HepMC3rootIO.dir/build
+.PHONY : G__HepMC3rootIO/fast
+
+#=============================================================================
+# Target rules for targets named tcl
+
+# Build rule for target.
+tcl: cmake_check_build_system
+	$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 tcl
+.PHONY : tcl
+
+# fast build rule for target.
+tcl/fast:
+	$(MAKE) $(MAKESILENT) -f external/tcl/CMakeFiles/tcl.dir/build.make external/tcl/CMakeFiles/tcl.dir/build
+.PHONY : tcl/fast
+
+#=============================================================================
+# Target rules for targets named PUPPI
+
+# Build rule for target.
+PUPPI: cmake_check_build_system
+	$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 PUPPI
+.PHONY : PUPPI
+
+# fast build rule for target.
+PUPPI/fast:
+	$(MAKE) $(MAKESILENT) -f external/PUPPI/CMakeFiles/PUPPI.dir/build.make external/PUPPI/CMakeFiles/PUPPI.dir/build
+.PHONY : PUPPI/fast
+
+#=============================================================================
+# Target rules for targets named TrackCovariance
+
+# Build rule for target.
+TrackCovariance: cmake_check_build_system
+	$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 TrackCovariance
+.PHONY : TrackCovariance
+
+# fast build rule for target.
+TrackCovariance/fast:
+	$(MAKE) $(MAKESILENT) -f external/TrackCovariance/CMakeFiles/TrackCovariance.dir/build.make external/TrackCovariance/CMakeFiles/TrackCovariance.dir/build
+.PHONY : TrackCovariance/fast
+
+#=============================================================================
+# Target rules for targets named FastJetDict
+
+# Build rule for target.
+FastJetDict: cmake_check_build_system
+	$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 FastJetDict
+.PHONY : FastJetDict
+
+# fast build rule for target.
+FastJetDict/fast:
+	$(MAKE) $(MAKESILENT) -f modules/CMakeFiles/FastJetDict.dir/build.make modules/CMakeFiles/FastJetDict.dir/build
+.PHONY : FastJetDict/fast
+
+#=============================================================================
+# Target rules for targets named modules
+
+# Build rule for target.
+modules: cmake_check_build_system
+	$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 modules
+.PHONY : modules
+
+# fast build rule for target.
+modules/fast:
+	$(MAKE) $(MAKESILENT) -f modules/CMakeFiles/modules.dir/build.make modules/CMakeFiles/modules.dir/build
+.PHONY : modules/fast
+
+#=============================================================================
+# Target rules for targets named Pythia8Dict
+
+# Build rule for target.
+Pythia8Dict: cmake_check_build_system
+	$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 Pythia8Dict
+.PHONY : Pythia8Dict
+
+# fast build rule for target.
+Pythia8Dict/fast:
+	$(MAKE) $(MAKESILENT) -f modules/CMakeFiles/Pythia8Dict.dir/build.make modules/CMakeFiles/Pythia8Dict.dir/build
+.PHONY : Pythia8Dict/fast
+
+#=============================================================================
+# Target rules for targets named ModulesDict
+
+# Build rule for target.
+ModulesDict: cmake_check_build_system
+	$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 ModulesDict
+.PHONY : ModulesDict
+
+# fast build rule for target.
+ModulesDict/fast:
+	$(MAKE) $(MAKESILENT) -f modules/CMakeFiles/ModulesDict.dir/build.make modules/CMakeFiles/ModulesDict.dir/build
+.PHONY : ModulesDict/fast
+
+#=============================================================================
+# Target rules for targets named DelphesHepMC3
+
+# Build rule for target.
+DelphesHepMC3: cmake_check_build_system
+	$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 DelphesHepMC3
+.PHONY : DelphesHepMC3
+
+# fast build rule for target.
+DelphesHepMC3/fast:
+	$(MAKE) $(MAKESILENT) -f readers/CMakeFiles/DelphesHepMC3.dir/build.make readers/CMakeFiles/DelphesHepMC3.dir/build
+.PHONY : DelphesHepMC3/fast
+
+#=============================================================================
+# Target rules for targets named DelphesHepMC2
+
+# Build rule for target.
+DelphesHepMC2: cmake_check_build_system
+	$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 DelphesHepMC2
+.PHONY : DelphesHepMC2
+
+# fast build rule for target.
+DelphesHepMC2/fast:
+	$(MAKE) $(MAKESILENT) -f readers/CMakeFiles/DelphesHepMC2.dir/build.make readers/CMakeFiles/DelphesHepMC2.dir/build
+.PHONY : DelphesHepMC2/fast
+
+#=============================================================================
+# Target rules for targets named DelphesPythia8
+
+# Build rule for target.
+DelphesPythia8: cmake_check_build_system
+	$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 DelphesPythia8
+.PHONY : DelphesPythia8
+
+# fast build rule for target.
+DelphesPythia8/fast:
+	$(MAKE) $(MAKESILENT) -f readers/CMakeFiles/DelphesPythia8.dir/build.make readers/CMakeFiles/DelphesPythia8.dir/build
+.PHONY : DelphesPythia8/fast
+
+#=============================================================================
+# Target rules for targets named DelphesLHEF
+
+# Build rule for target.
+DelphesLHEF: cmake_check_build_system
+	$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 DelphesLHEF
+.PHONY : DelphesLHEF
+
+# fast build rule for target.
+DelphesLHEF/fast:
+	$(MAKE) $(MAKESILENT) -f readers/CMakeFiles/DelphesLHEF.dir/build.make readers/CMakeFiles/DelphesLHEF.dir/build
+.PHONY : DelphesLHEF/fast
+
+#=============================================================================
+# Target rules for targets named DelphesROOT
+
+# Build rule for target.
+DelphesROOT: cmake_check_build_system
+	$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 DelphesROOT
+.PHONY : DelphesROOT
+
+# fast build rule for target.
+DelphesROOT/fast:
+	$(MAKE) $(MAKESILENT) -f readers/CMakeFiles/DelphesROOT.dir/build.make readers/CMakeFiles/DelphesROOT.dir/build
+.PHONY : DelphesROOT/fast
+
+#=============================================================================
+# Target rules for targets named DelphesSTDHEP
+
+# Build rule for target.
+DelphesSTDHEP: cmake_check_build_system
+	$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 DelphesSTDHEP
+.PHONY : DelphesSTDHEP
+
+# fast build rule for target.
+DelphesSTDHEP/fast:
+	$(MAKE) $(MAKESILENT) -f readers/CMakeFiles/DelphesSTDHEP.dir/build.make readers/CMakeFiles/DelphesSTDHEP.dir/build
+.PHONY : DelphesSTDHEP/fast
+
+# Help Target
+help:
+	@echo "The following are some of the valid targets for this Makefile:"
+	@echo "... all (the default if no target is provided)"
+	@echo "... clean"
+	@echo "... depend"
+	@echo "... edit_cache"
+	@echo "... install"
+	@echo "... install/local"
+	@echo "... install/strip"
+	@echo "... list_install_components"
+	@echo "... rebuild_cache"
+	@echo "... ClassesDict"
+	@echo "... DisplayDict"
+	@echo "... ExRootAnalysisDict"
+	@echo "... FastJetDict"
+	@echo "... G__HepMC3rootIO"
+	@echo "... ModulesDict"
+	@echo "... Pythia8Dict"
+	@echo "... CaloGrid"
+	@echo "... Delphes"
+	@echo "... DelphesDisplay"
+	@echo "... DelphesHepMC2"
+	@echo "... DelphesHepMC3"
+	@echo "... DelphesLHEF"
+	@echo "... DelphesPythia8"
+	@echo "... DelphesROOT"
+	@echo "... DelphesSTDHEP"
+	@echo "... ExRootAnalysis"
+	@echo "... Example1"
+	@echo "... Hector"
+	@echo "... HepMC3"
+	@echo "... PUPPI"
+	@echo "... TrackCovariance"
+	@echo "... classes"
+	@echo "... display"
+	@echo "... fastjet"
+	@echo "... hepmc2pileup"
+	@echo "... lhco2root"
+	@echo "... modules"
+	@echo "... pileup2root"
+	@echo "... root2lhco"
+	@echo "... root2pileup"
+	@echo "... stdhep2pileup"
+	@echo "... tcl"
+.PHONY : help
+
+
+
+#=============================================================================
+# Special targets to cleanup operation of make.
+
+# Special rule to run CMake to check the build system integrity.
+# No rule that depends on this can have commands that come from listfiles
+# because they might be regenerated.
+cmake_check_build_system:
+	$(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
+.PHONY : cmake_check_build_system
+
Index: ternal/HepMC3/Attribute.h
===================================================================
--- external/HepMC3/Attribute.h	(revision 224c92984d9377110561f2a4250faea3daad2b5e)
+++ 	(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 224c92984d9377110561f2a4250faea3daad2b5e)
+++ external/HepMC3/CMakeLists.txt	(revision b30245b0657b11c14403abbcf01ed63b738a06b8)
@@ -4,5 +4,16 @@
 )
 
-file(GLOB sources *.cc)
-
-add_library(HepMC3 OBJECT ${sources})
+file(GLOB src_sources ${CMAKE_CURRENT_SOURCE_DIR}/src/*.cc)
+if(${ROOT_VERSION} LESS 6.0)
+  message(STATUS "ROOT was not found or the version of ROOT ->${ROOT_VERSION}<- is too old. HepMC3 will be built without root I/O")
+  add_library(HepMC3 OBJECT ${src_sources})
+  target_include_directories(HepMC3 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include) 
+else()
+  message(STATUS "ROOT was found. The version of ROOT is ->${ROOT_VERSION}<-. HepMC3 will be built with root I/O")
+  file(GLOB rootIO_sources ${CMAKE_CURRENT_SOURCE_DIR}/rootIO/src/*.cc)
+  ROOT_GENERATE_DICTIONARY(G__HepMC3rootIODelphes ${CMAKE_CURRENT_SOURCE_DIR}/rootIO/include/rootIO_Classes.hh LINKDEF ${CMAKE_CURRENT_SOURCE_DIR}/rootIO/include/LinkDef.hh NOINSTALL OPTIONS -inlineInputHeader)
+  add_library(HepMC3 OBJECT ${src_sources} ${rootIO_sources} G__HepMC3rootIODelphes.cxx)
+  target_include_directories(HepMC3 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include ${CMAKE_CURRENT_SOURCE_DIR}/rootIO/include ${ROOT_INCLUDE_DIRS})
+  install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libHepMC3rootIODelphes_rdict.pcm DESTINATION  ${CMAKE_INSTALL_LIBDIR})
+  install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libHepMC3rootIODelphes.rootmap   DESTINATION  ${CMAKE_INSTALL_LIBDIR})
+endif()
Index: ternal/HepMC3/Data/GenEventData.h
===================================================================
--- external/HepMC3/Data/GenEventData.h	(revision 224c92984d9377110561f2a4250faea3daad2b5e)
+++ 	(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: ternal/HepMC3/Data/GenParticleData.h
===================================================================
--- external/HepMC3/Data/GenParticleData.h	(revision 224c92984d9377110561f2a4250faea3daad2b5e)
+++ 	(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: ternal/HepMC3/Data/GenRunInfoData.h
===================================================================
--- external/HepMC3/Data/GenRunInfoData.h	(revision 224c92984d9377110561f2a4250faea3daad2b5e)
+++ 	(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: ternal/HepMC3/Data/GenVertexData.h
===================================================================
--- external/HepMC3/Data/GenVertexData.h	(revision 224c92984d9377110561f2a4250faea3daad2b5e)
+++ 	(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: ternal/HepMC3/Errors.h
===================================================================
--- external/HepMC3/Errors.h	(revision 224c92984d9377110561f2a4250faea3daad2b5e)
+++ 	(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: ternal/HepMC3/FourVector.h
===================================================================
--- external/HepMC3/FourVector.h	(revision 224c92984d9377110561f2a4250faea3daad2b5e)
+++ 	(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: ternal/HepMC3/GenCrossSection.cc
===================================================================
--- external/HepMC3/GenCrossSection.cc	(revision 224c92984d9377110561f2a4250faea3daad2b5e)
+++ 	(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: ternal/HepMC3/GenCrossSection.h
===================================================================
--- external/HepMC3/GenCrossSection.h	(revision 224c92984d9377110561f2a4250faea3daad2b5e)
+++ 	(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: ternal/HepMC3/GenCrossSection_fwd.h
===================================================================
--- external/HepMC3/GenCrossSection_fwd.h	(revision 224c92984d9377110561f2a4250faea3daad2b5e)
+++ 	(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: ternal/HepMC3/GenEvent.cc
===================================================================
--- external/HepMC3/GenEvent.cc	(revision 224c92984d9377110561f2a4250faea3daad2b5e)
+++ 	(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: ternal/HepMC3/GenEvent.h
===================================================================
--- external/HepMC3/GenEvent.h	(revision 224c92984d9377110561f2a4250faea3daad2b5e)
+++ 	(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: ternal/HepMC3/GenHeavyIon.cc
===================================================================
--- external/HepMC3/GenHeavyIon.cc	(revision 224c92984d9377110561f2a4250faea3daad2b5e)
+++ 	(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: ternal/HepMC3/GenHeavyIon.h
===================================================================
--- external/HepMC3/GenHeavyIon.h	(revision 224c92984d9377110561f2a4250faea3daad2b5e)
+++ 	(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: ternal/HepMC3/GenHeavyIon_fwd.h
===================================================================
--- external/HepMC3/GenHeavyIon_fwd.h	(revision 224c92984d9377110561f2a4250faea3daad2b5e)
+++ 	(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: ternal/HepMC3/GenParticle.cc
===================================================================
--- external/HepMC3/GenParticle.cc	(revision 224c92984d9377110561f2a4250faea3daad2b5e)
+++ 	(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: ternal/HepMC3/GenParticle.h
===================================================================
--- external/HepMC3/GenParticle.h	(revision 224c92984d9377110561f2a4250faea3daad2b5e)
+++ 	(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: ternal/HepMC3/GenParticle_fwd.h
===================================================================
--- external/HepMC3/GenParticle_fwd.h	(revision 224c92984d9377110561f2a4250faea3daad2b5e)
+++ 	(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: ternal/HepMC3/GenPdfInfo.cc
===================================================================
--- external/HepMC3/GenPdfInfo.cc	(revision 224c92984d9377110561f2a4250faea3daad2b5e)
+++ 	(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: ternal/HepMC3/GenPdfInfo.h
===================================================================
--- external/HepMC3/GenPdfInfo.h	(revision 224c92984d9377110561f2a4250faea3daad2b5e)
+++ 	(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: ternal/HepMC3/GenPdfInfo_fwd.h
===================================================================
--- external/HepMC3/GenPdfInfo_fwd.h	(revision 224c92984d9377110561f2a4250faea3daad2b5e)
+++ 	(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: ternal/HepMC3/GenRunInfo.cc
===================================================================
--- external/HepMC3/GenRunInfo.cc	(revision 224c92984d9377110561f2a4250faea3daad2b5e)
+++ 	(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: ternal/HepMC3/GenRunInfo.h
===================================================================
--- external/HepMC3/GenRunInfo.h	(revision 224c92984d9377110561f2a4250faea3daad2b5e)
+++ 	(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: ternal/HepMC3/GenVertex.cc
===================================================================
--- external/HepMC3/GenVertex.cc	(revision 224c92984d9377110561f2a4250faea3daad2b5e)
+++ 	(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: ternal/HepMC3/GenVertex.h
===================================================================
--- external/HepMC3/GenVertex.h	(revision 224c92984d9377110561f2a4250faea3daad2b5e)
+++ 	(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: ternal/HepMC3/GenVertex_fwd.h
===================================================================
--- external/HepMC3/GenVertex_fwd.h	(revision 224c92984d9377110561f2a4250faea3daad2b5e)
+++ 	(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: ternal/HepMC3/Reader.h
===================================================================
--- external/HepMC3/Reader.h	(revision 224c92984d9377110561f2a4250faea3daad2b5e)
+++ 	(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: ternal/HepMC3/ReaderAscii.cc
===================================================================
--- external/HepMC3/ReaderAscii.cc	(revision 224c92984d9377110561f2a4250faea3daad2b5e)
+++ 	(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: ternal/HepMC3/ReaderAscii.h
===================================================================
--- external/HepMC3/ReaderAscii.h	(revision 224c92984d9377110561f2a4250faea3daad2b5e)
+++ 	(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: ternal/HepMC3/ReaderAsciiHepMC2.cc
===================================================================
--- external/HepMC3/ReaderAsciiHepMC2.cc	(revision 224c92984d9377110561f2a4250faea3daad2b5e)
+++ 	(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: ternal/HepMC3/ReaderAsciiHepMC2.h
===================================================================
--- external/HepMC3/ReaderAsciiHepMC2.h	(revision 224c92984d9377110561f2a4250faea3daad2b5e)
+++ 	(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: ternal/HepMC3/Setup.cc
===================================================================
--- external/HepMC3/Setup.cc	(revision 224c92984d9377110561f2a4250faea3daad2b5e)
+++ 	(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: ternal/HepMC3/Setup.h
===================================================================
--- external/HepMC3/Setup.h	(revision 224c92984d9377110561f2a4250faea3daad2b5e)
+++ 	(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: ternal/HepMC3/Units.h
===================================================================
--- external/HepMC3/Units.h	(revision 224c92984d9377110561f2a4250faea3daad2b5e)
+++ 	(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
Index: external/HepMC3/include/HepMC3/Attribute.h
===================================================================
--- external/HepMC3/include/HepMC3/Attribute.h	(revision b30245b0657b11c14403abbcf01ed63b738a06b8)
+++ external/HepMC3/include/HepMC3/Attribute.h	(revision b30245b0657b11c14403abbcf01ed63b738a06b8)
@@ -0,0 +1,1182 @@
+// -*- 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/include/HepMC3/Data/GenEventData.h
===================================================================
--- external/HepMC3/include/HepMC3/Data/GenEventData.h	(revision b30245b0657b11c14403abbcf01ed63b738a06b8)
+++ external/HepMC3/include/HepMC3/Data/GenEventData.h	(revision b30245b0657b11c14403abbcf01ed63b738a06b8)
@@ -0,0 +1,61 @@
+// -*- 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/include/HepMC3/Data/GenParticleData.h
===================================================================
--- external/HepMC3/include/HepMC3/Data/GenParticleData.h	(revision b30245b0657b11c14403abbcf01ed63b738a06b8)
+++ external/HepMC3/include/HepMC3/Data/GenParticleData.h	(revision b30245b0657b11c14403abbcf01ed63b738a06b8)
@@ -0,0 +1,34 @@
+// -*- 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/include/HepMC3/Data/GenRunInfoData.h
===================================================================
--- external/HepMC3/include/HepMC3/Data/GenRunInfoData.h	(revision b30245b0657b11c14403abbcf01ed63b738a06b8)
+++ external/HepMC3/include/HepMC3/Data/GenRunInfoData.h	(revision b30245b0657b11c14403abbcf01ed63b738a06b8)
@@ -0,0 +1,36 @@
+// -*- 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/include/HepMC3/Data/GenVertexData.h
===================================================================
--- external/HepMC3/include/HepMC3/Data/GenVertexData.h	(revision b30245b0657b11c14403abbcf01ed63b738a06b8)
+++ external/HepMC3/include/HepMC3/Data/GenVertexData.h	(revision b30245b0657b11c14403abbcf01ed63b738a06b8)
@@ -0,0 +1,36 @@
+// -*- 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/include/HepMC3/Errors.h
===================================================================
--- external/HepMC3/include/HepMC3/Errors.h	(revision b30245b0657b11c14403abbcf01ed63b738a06b8)
+++ external/HepMC3/include/HepMC3/Errors.h	(revision b30245b0657b11c14403abbcf01ed63b738a06b8)
@@ -0,0 +1,50 @@
+// -*- 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/include/HepMC3/FourVector.h
===================================================================
--- external/HepMC3/include/HepMC3/FourVector.h	(revision b30245b0657b11c14403abbcf01ed63b738a06b8)
+++ external/HepMC3/include/HepMC3/FourVector.h	(revision b30245b0657b11c14403abbcf01ed63b738a06b8)
@@ -0,0 +1,338 @@
+// -*- 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/include/HepMC3/GenCrossSection.h
===================================================================
--- external/HepMC3/include/HepMC3/GenCrossSection.h	(revision b30245b0657b11c14403abbcf01ed63b738a06b8)
+++ external/HepMC3/include/HepMC3/GenCrossSection.h	(revision b30245b0657b11c14403abbcf01ed63b738a06b8)
@@ -0,0 +1,161 @@
+// -*- 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/include/HepMC3/GenCrossSection_fwd.h
===================================================================
--- external/HepMC3/include/HepMC3/GenCrossSection_fwd.h	(revision b30245b0657b11c14403abbcf01ed63b738a06b8)
+++ external/HepMC3/include/HepMC3/GenCrossSection_fwd.h	(revision b30245b0657b11c14403abbcf01ed63b738a06b8)
@@ -0,0 +1,25 @@
+// -*- 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/include/HepMC3/GenEvent.h
===================================================================
--- external/HepMC3/include/HepMC3/GenEvent.h	(revision b30245b0657b11c14403abbcf01ed63b738a06b8)
+++ external/HepMC3/include/HepMC3/GenEvent.h	(revision b30245b0657b11c14403abbcf01ed63b738a06b8)
@@ -0,0 +1,426 @@
+// -*- 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/include/HepMC3/GenHeavyIon.h
===================================================================
--- external/HepMC3/include/HepMC3/GenHeavyIon.h	(revision b30245b0657b11c14403abbcf01ed63b738a06b8)
+++ external/HepMC3/include/HepMC3/GenHeavyIon.h	(revision b30245b0657b11c14403abbcf01ed63b738a06b8)
@@ -0,0 +1,254 @@
+// -*- 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/include/HepMC3/GenHeavyIon_fwd.h
===================================================================
--- external/HepMC3/include/HepMC3/GenHeavyIon_fwd.h	(revision b30245b0657b11c14403abbcf01ed63b738a06b8)
+++ external/HepMC3/include/HepMC3/GenHeavyIon_fwd.h	(revision b30245b0657b11c14403abbcf01ed63b738a06b8)
@@ -0,0 +1,25 @@
+// -*- 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/include/HepMC3/GenParticle.h
===================================================================
--- external/HepMC3/include/HepMC3/GenParticle.h	(revision b30245b0657b11c14403abbcf01ed63b738a06b8)
+++ external/HepMC3/include/HepMC3/GenParticle.h	(revision b30245b0657b11c14403abbcf01ed63b738a06b8)
@@ -0,0 +1,163 @@
+// -*- 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/include/HepMC3/GenParticle_fwd.h
===================================================================
--- external/HepMC3/include/HepMC3/GenParticle_fwd.h	(revision b30245b0657b11c14403abbcf01ed63b738a06b8)
+++ external/HepMC3/include/HepMC3/GenParticle_fwd.h	(revision b30245b0657b11c14403abbcf01ed63b738a06b8)
@@ -0,0 +1,35 @@
+// -*- 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/include/HepMC3/GenPdfInfo.h
===================================================================
--- external/HepMC3/include/HepMC3/GenPdfInfo.h	(revision b30245b0657b11c14403abbcf01ed63b738a06b8)
+++ external/HepMC3/include/HepMC3/GenPdfInfo.h	(revision b30245b0657b11c14403abbcf01ed63b738a06b8)
@@ -0,0 +1,66 @@
+// -*- 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/include/HepMC3/GenPdfInfo_fwd.h
===================================================================
--- external/HepMC3/include/HepMC3/GenPdfInfo_fwd.h	(revision b30245b0657b11c14403abbcf01ed63b738a06b8)
+++ external/HepMC3/include/HepMC3/GenPdfInfo_fwd.h	(revision b30245b0657b11c14403abbcf01ed63b738a06b8)
@@ -0,0 +1,25 @@
+// -*- 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/include/HepMC3/GenRunInfo.h
===================================================================
--- external/HepMC3/include/HepMC3/GenRunInfo.h	(revision b30245b0657b11c14403abbcf01ed63b738a06b8)
+++ external/HepMC3/include/HepMC3/GenRunInfo.h	(revision b30245b0657b11c14403abbcf01ed63b738a06b8)
@@ -0,0 +1,202 @@
+// -*- 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/include/HepMC3/GenVertex.h
===================================================================
--- external/HepMC3/include/HepMC3/GenVertex.h	(revision b30245b0657b11c14403abbcf01ed63b738a06b8)
+++ external/HepMC3/include/HepMC3/GenVertex.h	(revision b30245b0657b11c14403abbcf01ed63b738a06b8)
@@ -0,0 +1,167 @@
+// -*- 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/include/HepMC3/GenVertex_fwd.h
===================================================================
--- external/HepMC3/include/HepMC3/GenVertex_fwd.h	(revision b30245b0657b11c14403abbcf01ed63b738a06b8)
+++ external/HepMC3/include/HepMC3/GenVertex_fwd.h	(revision b30245b0657b11c14403abbcf01ed63b738a06b8)
@@ -0,0 +1,28 @@
+// -*- 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/include/HepMC3/Reader.h
===================================================================
--- external/HepMC3/include/HepMC3/Reader.h	(revision b30245b0657b11c14403abbcf01ed63b738a06b8)
+++ external/HepMC3/include/HepMC3/Reader.h	(revision b30245b0657b11c14403abbcf01ed63b738a06b8)
@@ -0,0 +1,77 @@
+// -*- 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/include/HepMC3/ReaderAscii.h
===================================================================
--- external/HepMC3/include/HepMC3/ReaderAscii.h	(revision b30245b0657b11c14403abbcf01ed63b738a06b8)
+++ external/HepMC3/include/HepMC3/ReaderAscii.h	(revision b30245b0657b11c14403abbcf01ed63b738a06b8)
@@ -0,0 +1,174 @@
+// -*- 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/include/HepMC3/ReaderAsciiHepMC2.h
===================================================================
--- external/HepMC3/include/HepMC3/ReaderAsciiHepMC2.h	(revision b30245b0657b11c14403abbcf01ed63b738a06b8)
+++ external/HepMC3/include/HepMC3/ReaderAsciiHepMC2.h	(revision b30245b0657b11c14403abbcf01ed63b738a06b8)
@@ -0,0 +1,145 @@
+// -*- 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/include/HepMC3/Setup.h
===================================================================
--- external/HepMC3/include/HepMC3/Setup.h	(revision b30245b0657b11c14403abbcf01ed63b738a06b8)
+++ external/HepMC3/include/HepMC3/Setup.h	(revision b30245b0657b11c14403abbcf01ed63b738a06b8)
@@ -0,0 +1,72 @@
+// -*- 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/include/HepMC3/Units.h
===================================================================
--- external/HepMC3/include/HepMC3/Units.h	(revision b30245b0657b11c14403abbcf01ed63b738a06b8)
+++ external/HepMC3/include/HepMC3/Units.h	(revision b30245b0657b11c14403abbcf01ed63b738a06b8)
@@ -0,0 +1,113 @@
+// -*- 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
Index: external/HepMC3/rootIO/include/HepMC3/ReaderRoot.h
===================================================================
--- external/HepMC3/rootIO/include/HepMC3/ReaderRoot.h	(revision b30245b0657b11c14403abbcf01ed63b738a06b8)
+++ external/HepMC3/rootIO/include/HepMC3/ReaderRoot.h	(revision b30245b0657b11c14403abbcf01ed63b738a06b8)
@@ -0,0 +1,69 @@
+// -*- C++ -*-
+//
+// This file is part of HepMC
+// Copyright (C) 2014-2020 The HepMC collaboration (see AUTHORS for details)
+//
+#ifndef HEPMC3_READERROOT_H
+#define HEPMC3_READERROOT_H
+/**
+ *  @file  ReaderRoot.h
+ *  @brief Definition of \b class ReaderRoot
+ *
+ *  @class HepMC3::ReaderRoot
+ *  @brief GenEvent I/O parsing and serialization for root files
+ *
+ *  If HepMC was compiled with path to ROOT available, this class can be used
+ *  for root file I/O in the same manner as with HepMC::ReaderAscii class.
+ *
+ *  @ingroup IO
+ *
+ */
+#include <string>
+#include "HepMC3/Reader.h"
+#include "HepMC3/GenEvent.h"
+#include "HepMC3/Data/GenEventData.h"
+#include "HepMC3/Data/GenRunInfoData.h"
+
+// ROOT header files
+#include "TFile.h"
+#include "TKey.h"
+
+namespace HepMC3 {
+
+class ReaderRoot : public Reader {
+//
+// Constructors
+//
+public:
+    /** @brief Default constructor */
+    ReaderRoot(const std::string &filename);
+
+//
+// Functions
+//
+public:
+    /// @brief skip events
+    bool skip(const int)  override;
+
+    /** @brief Read event from file
+     *
+     *  @param[out] evt Contains parsed event
+     */
+    bool read_event(GenEvent &evt)  override;
+
+    /** @brief Close file stream */
+    void close()  override;
+
+    /** @brief Get stream error state */
+    bool failed()  override;
+//
+// Fields
+//
+private:
+    TFile* m_file; //!< File handler
+    TIter* m_next; //!< Iterator for event reading
+};
+
+} // namespace HepMC3
+
+#endif
Index: external/HepMC3/rootIO/include/HepMC3/ReaderRootTree.h
===================================================================
--- external/HepMC3/rootIO/include/HepMC3/ReaderRootTree.h	(revision b30245b0657b11c14403abbcf01ed63b738a06b8)
+++ external/HepMC3/rootIO/include/HepMC3/ReaderRootTree.h	(revision b30245b0657b11c14403abbcf01ed63b738a06b8)
@@ -0,0 +1,85 @@
+// -*- C++ -*-
+//
+// This file is part of HepMC
+// Copyright (C) 2014-2020 The HepMC collaboration (see AUTHORS for details)
+//
+#ifndef HEPMC3_READERROOTTREE_H
+#define HEPMC3_READERROOTTREE_H
+/**
+ *  @file  ReaderRootTree.h
+ *  @brief Definition of \b class ReaderRootTree
+ *
+ *  @class HepMC3::ReaderRootTree
+ *  @brief GenEvent I/O parsing and serialization for root files  based on root TTree
+ *
+ *  If HepMC was compiled with path to ROOT available, this class can be used
+ *  for root file I/O in the same manner as with HepMC::ReaderAscii class.
+ *
+ *  @ingroup IO
+ *
+ */
+#include <string>
+#include "HepMC3/Reader.h"
+#include "HepMC3/GenEvent.h"
+#include "HepMC3/Data/GenEventData.h"
+#include "HepMC3/Data/GenRunInfoData.h"
+
+// ROOT header files
+#include "TFile.h"
+#include "TTree.h"
+#include "TBranch.h"
+
+namespace HepMC3
+{
+
+class ReaderRootTree : public Reader
+{
+//
+// Constructors
+//
+public:
+    /** @brief Default constructor */
+    ReaderRootTree(const std::string &filename);
+    /** @brief Constructor with tree name*/
+    ReaderRootTree(const std::string &filename, const std::string &treename, const std::string &branchname);
+
+//
+// Functions
+//
+public:
+    /// @brief skip events
+    bool skip(const int)  override;
+
+    /** @brief Read event from file
+     *
+     *  @param[out] evt Contains parsed event
+     */
+    bool read_event(GenEvent &evt)   override;
+
+    /** @brief Close file */
+    void close()  override;
+
+    /** @brief Get file  error state */
+    bool failed()  override;
+
+private:
+    /** @brief init routine */
+    bool init();
+//
+// Fields
+//
+private:
+    TFile* m_file;         //!< File handler
+public:
+    TTree* m_tree;//!< Tree handler. Public to allow simple access, e.g. custom branches.
+private:
+    int   m_events_count; //!< Events count. Needed to read the tree
+    GenEventData* m_event_data; //!< Pointer to structure that holds event data
+    GenRunInfoData* m_run_info_data; //!< Pointer to structure that holds run info data
+    std::string m_tree_name; //!< Name of TTree
+    std::string m_branch_name; //!< Name of TBranch in TTree
+};
+
+} // namespace HepMC3
+
+#endif
Index: external/HepMC3/rootIO/include/HepMC3/WriterRoot.h
===================================================================
--- external/HepMC3/rootIO/include/HepMC3/WriterRoot.h	(revision b30245b0657b11c14403abbcf01ed63b738a06b8)
+++ external/HepMC3/rootIO/include/HepMC3/WriterRoot.h	(revision b30245b0657b11c14403abbcf01ed63b738a06b8)
@@ -0,0 +1,76 @@
+// -*- C++ -*-
+//
+// This file is part of HepMC
+// Copyright (C) 2014-2020 The HepMC collaboration (see AUTHORS for details)
+//
+#ifndef HEPMC3_WRITERROOT_H
+#define HEPMC3_WRITERROOT_H
+/**
+ *  @file  WriterRoot.h
+ *  @brief Definition of \b class WriterRoot
+ *
+ *  @class HepMC3::WriterRoot
+ *  @brief GenEvent I/O serialization for root files
+ *
+ *  If HepMC was compiled with path to ROOT available, this class can be used
+ *  for root writing in the same manner as with HepMC::WriterAscii class.
+ *
+ *  @ingroup IO
+ *
+ */
+#include <string>
+#include <memory>
+#include "HepMC3/Writer.h"
+#include "HepMC3/GenEvent.h"
+#include "HepMC3/Data/GenEventData.h"
+#include "HepMC3/Data/GenRunInfoData.h"
+
+// ROOT header files
+#ifdef __CINT__
+#include "TFile.h"
+#else
+class TFile;
+#endif
+
+namespace HepMC3 {
+
+class WriterRoot : public Writer {
+//
+// Constructors
+//
+public:
+    /** @brief Default constructor
+     *  @warning If file exists, it will be overwritten
+     */
+    WriterRoot(const std::string& filename,
+               std::shared_ptr<GenRunInfo> run = std::shared_ptr<GenRunInfo>());
+
+//
+// Functions
+//
+public:
+    /** @brief Write event to file
+     *
+     *  @param[in] evt Event to be serialized
+     */
+    void write_event(const GenEvent &evt) override;
+
+    /** @brief Write the GenRunInfo object to file. */
+    void write_run_info();
+
+    /** @brief Close file stream */
+    void close() override;
+
+    /** @brief Get stream error state flag */
+    bool failed() override;
+//
+// Fields
+//
+private:
+    TFile* m_file;         //!< File handler
+    int    m_events_count; //!< Events count. Needed to generate unique object name
+};
+
+} // namespace HepMC3
+
+#endif
Index: external/HepMC3/rootIO/include/HepMC3/WriterRootTree.h
===================================================================
--- external/HepMC3/rootIO/include/HepMC3/WriterRootTree.h	(revision b30245b0657b11c14403abbcf01ed63b738a06b8)
+++ external/HepMC3/rootIO/include/HepMC3/WriterRootTree.h	(revision b30245b0657b11c14403abbcf01ed63b738a06b8)
@@ -0,0 +1,93 @@
+// -*- C++ -*-
+//
+// This file is part of HepMC
+// Copyright (C) 2014-2020 The HepMC collaboration (see AUTHORS for details)
+//
+#ifndef HEPMC3_WRITERROOTTREE_H
+#define HEPMC3_WRITERROOTTREE_H
+/**
+ *  @file  WriterRootTree.h
+ *  @brief Definition of \b class WriterRootTree
+ *
+ *  @class HepMC3::WriterRootTree
+ *  @brief GenEvent I/O serialization for root files based on root TTree
+ *
+ *  If HepMC was compiled with path to ROOT available, this class can be used
+ *  for root writing in the same manner as with HepMC::WriterAscii class.
+ *
+ *  @ingroup IO
+ *
+ */
+#include <string>
+#include <memory>
+#include "HepMC3/Writer.h"
+#include "HepMC3/GenEvent.h"
+#include "HepMC3/Data/GenEventData.h"
+#include "HepMC3/Data/GenRunInfoData.h"
+
+
+// ROOT header files
+#ifdef __CINT__
+#include "TFile.h"
+#include "TTree.h"
+#else
+class TFile;
+class TTree;
+#endif
+
+namespace HepMC3
+{
+class WriterRootTree : public Writer
+{
+//
+// Constructors
+//
+public:
+    /** @brief Default constructor
+     *  @warning If file exists, it will be overwritten
+     */
+    WriterRootTree(const std::string &filename,
+                   std::shared_ptr<GenRunInfo> run = std::shared_ptr<GenRunInfo>());
+    /** @brief Constructor with tree name*/
+    WriterRootTree(const std::string &filename, const std::string &treename, const std::string &branchname,
+                   std::shared_ptr<GenRunInfo> run = std::shared_ptr<GenRunInfo>());
+//
+// Functions
+//
+public:
+    /** @brief Write event to file
+     *
+     *  @param[in] evt Event to be serialized
+     */
+    void write_event(const GenEvent &evt) override;
+
+    /** @brief Write the GenRunInfo object to file. */
+    void write_run_info();
+
+    /** @brief Close file stream */
+    void close() override;
+
+    /** @brief Get stream error state flag */
+    bool failed()  override;
+
+private:
+    /** @brief init routine */
+    bool init(std::shared_ptr<GenRunInfo> run);
+//
+// Fields
+//
+private:
+    TFile* m_file;         //!< File handler
+public:
+    TTree* m_tree;//!< Tree handler. Public to allow simple access, e.g. custom branches.
+private:
+    int   m_events_count; //!< Events count. Needed to read the tree
+    GenEventData* m_event_data; //!< Pointer to structure that holds event data
+    GenRunInfoData* m_run_info_data; //!< Pointer to structure that holds run info data
+    std::string m_tree_name;//!< Name of TTree
+    std::string m_branch_name; //!< Name of TBranch in TTree
+};
+
+} // namespace HepMC3
+
+#endif
Index: external/HepMC3/rootIO/include/LinkDef.hh
===================================================================
--- external/HepMC3/rootIO/include/LinkDef.hh	(revision b30245b0657b11c14403abbcf01ed63b738a06b8)
+++ external/HepMC3/rootIO/include/LinkDef.hh	(revision b30245b0657b11c14403abbcf01ed63b738a06b8)
@@ -0,0 +1,27 @@
+#ifdef __CINT__
+
+#pragma link C++ struct HepMC3::GenEventData+;
+#pragma link C++ struct HepMC3::GenRunInfoData+;
+#pragma link C++ struct HepMC3::GenParticleData+;
+#pragma link C++ struct HepMC3::GenVertexData+;
+#pragma link C++ class std::vector<HepMC3::GenParticleData>+;
+#pragma link C++ class std::vector<HepMC3::GenVertexData>+;
+#pragma link C++ class std::vector<int>+;
+#pragma link C++ class std::vector<std::string>+;
+#pragma link C++ class HepMC3::FourVector+;
+#pragma link C++ class HepMC3::Units+;
+#pragma link C++ class HepMC3::Setup+;
+
+/* To generate dictionaries for compatibility with HepMC3.0*/
+#pragma link C++ typedef HepMC::GenEventData+;
+#pragma link C++ typedef HepMC::GenRunInfoData+;
+#pragma link C++ typedef HepMC::GenParticleData+;
+#pragma link C++ typedef HepMC::GenVertexData+;
+#pragma link C++ typedef std::vector<HepMC::GenParticleData>+;
+#pragma link C++ typedef std::vector<HepMC::GenVertexData>+;
+#pragma link C++ typedef HepMC::FourVector+;
+#pragma link C++ typedef HepMC::Units+;
+#pragma link C++ typedef HepMC::Setup+;
+
+
+#endif
Index: external/HepMC3/rootIO/include/rootIO_Classes.hh
===================================================================
--- external/HepMC3/rootIO/include/rootIO_Classes.hh	(revision b30245b0657b11c14403abbcf01ed63b738a06b8)
+++ external/HepMC3/rootIO/include/rootIO_Classes.hh	(revision b30245b0657b11c14403abbcf01ed63b738a06b8)
@@ -0,0 +1,13 @@
+#include "HepMC3/Data/GenEventData.h"
+#include "HepMC3/Data/GenRunInfoData.h"
+/* To generate dictionaries for compatibility with HepMC3.0*/
+namespace HepMC
+{
+typedef HepMC3::GenEventData GenEventData;
+typedef HepMC3::GenRunInfoData GenRunInfoData ;
+typedef HepMC3::GenParticleData GenParticleData ;
+typedef HepMC3::GenVertexData GenVertexData ;
+typedef HepMC3::FourVector FourVector ;
+typedef HepMC3::Units Units ;
+typedef HepMC3::Setup Setup ;
+}
Index: external/HepMC3/rootIO/src/ReaderRoot.cc
===================================================================
--- external/HepMC3/rootIO/src/ReaderRoot.cc	(revision b30245b0657b11c14403abbcf01ed63b738a06b8)
+++ external/HepMC3/rootIO/src/ReaderRoot.cc	(revision b30245b0657b11c14403abbcf01ed63b738a06b8)
@@ -0,0 +1,96 @@
+// -*- C++ -*-
+//
+// This file is part of HepMC
+// Copyright (C) 2014-2019 The HepMC collaboration (see AUTHORS for details)
+//
+/**
+ *  @file ReaderRoot.cc
+ *  @brief Implementation of \b class ReaderRoot
+ *
+ */
+#include "HepMC3/ReaderRoot.h"
+#include "HepMC3/Version.h"
+
+namespace HepMC3 {
+HEPMC3_DECLARE_READER_FILE(ReaderRoot)
+
+ReaderRoot::ReaderRoot(const std::string &filename) {
+    m_file = TFile::Open(filename.c_str());
+    m_next = new TIter(m_file->GetListOfKeys());
+
+    if ( !m_file->IsOpen() ) {
+        HEPMC3_ERROR("ReaderRoot: problem opening file: " << filename)
+        return;
+    }
+
+    std::shared_ptr<GenRunInfo> ri = std::make_shared<GenRunInfo>();
+
+    GenRunInfoData *run = reinterpret_cast<GenRunInfoData*>(m_file->Get("GenRunInfoData"));
+
+    if (run) {
+        ri->read_data(*run);
+        delete run;
+    }
+
+    set_run_info(ri);
+}
+
+bool ReaderRoot::skip(const int n)
+{
+    GenEvent evt;
+    for (int nn = n; nn > 0; --nn)
+    {
+        if (!read_event(evt)) return false;
+        evt.clear();
+    }
+    return !failed();
+}
+
+bool ReaderRoot::read_event(GenEvent& evt) {
+    // Skip object of different type than GenEventData
+    GenEventData *data = nullptr;
+
+    while (true) {
+        TKey *key = (TKey*) (*m_next)();
+
+        if ( !key ) {
+            m_file->Close();
+            return false;
+        }
+
+        const char *cl = key->GetClassName();
+
+        if ( !cl ) continue;
+        size_t geneventdata30 = strncmp(cl, "HepMC::GenEventData", 19);
+        size_t geneventdata31 = strncmp(cl, "HepMC3::GenEventData", 20);
+        if ( geneventdata31 == 0 || geneventdata30 == 0 ) {
+            if (geneventdata30 == 0) HEPMC3_WARNING("ReaderRoot::read_event: The object was written with HepMC3 version 3.0")
+                data = reinterpret_cast<GenEventData*>(key->ReadObj());
+            break;
+        }
+    }
+
+    if ( !data ) {
+        HEPMC3_ERROR("ReaderRoot: could not read event from root file")
+        m_file->Close();
+        return false;
+    }
+
+    evt.read_data(*data);
+    evt.set_run_info(run_info());
+
+    delete data;
+    return true;
+}
+
+void ReaderRoot::close() {
+    m_file->Close();
+}
+
+bool ReaderRoot::failed() {
+    if ( !m_file->IsOpen() ) return true;
+
+    return false;
+}
+
+} // namespace HepMC3
Index: external/HepMC3/rootIO/src/ReaderRootTree.cc
===================================================================
--- external/HepMC3/rootIO/src/ReaderRootTree.cc	(revision b30245b0657b11c14403abbcf01ed63b738a06b8)
+++ external/HepMC3/rootIO/src/ReaderRootTree.cc	(revision b30245b0657b11c14403abbcf01ed63b738a06b8)
@@ -0,0 +1,125 @@
+// -*- C++ -*-
+//
+// This file is part of HepMC
+// Copyright (C) 2014-2019 The HepMC collaboration (see AUTHORS for details)
+//
+/**
+ *  @file ReaderRootTree.cc
+ *  @brief Implementation of \b class ReaderRootTree
+ *
+ */
+#include "HepMC3/ReaderRootTree.h"
+#include "HepMC3/Units.h"
+#include "HepMC3/Version.h"
+namespace HepMC3
+{
+HEPMC3_DECLARE_READER_FILE(ReaderRootTree)
+
+ReaderRootTree::ReaderRootTree(const std::string &filename):
+    m_tree(0), m_events_count(0), m_tree_name("hepmc3_tree"), m_branch_name("hepmc3_event")
+{
+    m_file = TFile::Open(filename.c_str());
+    if (!init()) return;
+}
+
+
+ReaderRootTree::ReaderRootTree(const std::string &filename, const std::string &treename, const std::string &branchname):
+    m_tree(0), m_events_count(0), m_tree_name(treename.c_str()), m_branch_name(branchname.c_str())
+{
+    m_file = TFile::Open(filename.c_str());
+    if (!init()) return;
+}
+
+bool ReaderRootTree::init()
+{
+    if ( !m_file->IsOpen() )
+    {
+        HEPMC3_ERROR("ReaderRootTree: problem opening file: " << m_file->GetName())
+        return false;
+    }
+
+
+    m_tree = reinterpret_cast<TTree*>(m_file->Get(m_tree_name.c_str()));
+    if (!m_tree)
+    {
+        HEPMC3_ERROR("ReaderRootTree: problem opening tree:  " << m_tree_name)
+        return false;
+    }
+    m_event_data = new GenEventData();
+    int result = m_tree->SetBranchAddress(m_branch_name.c_str(), &m_event_data);
+    if (result < 0)
+    {
+        HEPMC3_ERROR("ReaderRootTree: problem reading branch tree:  " << m_tree_name)
+        return false;
+    }
+    m_run_info_data = new GenRunInfoData();
+    result = m_tree->SetBranchAddress("GenRunInfo", &m_run_info_data);
+    if (result < 0)
+    {
+        HEPMC3_WARNING("ReaderRootTree: problem reading branch tree: GenRunInfo. Will attempt to read GenRunInfoData object.")
+        std::shared_ptr<GenRunInfo> ri = std::make_shared<GenRunInfo>();
+        GenRunInfoData *run = reinterpret_cast<GenRunInfoData*>(m_file->Get("GenRunInfoData"));
+        if (run) {
+            ri->read_data(*run);
+            delete run;
+            set_run_info(ri);
+            HEPMC3_WARNING("ReaderRootTree::init The object was written with HepMC3 version 3.0")
+        } else {
+            HEPMC3_ERROR("ReaderRootTree: problem reading object GenRunInfoData")
+            return false;
+        }
+    }
+    set_run_info(std::make_shared<GenRunInfo>());
+    return true;
+}
+
+bool ReaderRootTree::skip(const int n)
+{
+    m_events_count+=n;
+    if (m_events_count > m_tree->GetEntries()) return false;
+    return true;
+}
+
+
+
+bool ReaderRootTree::read_event(GenEvent& evt)
+{
+    if (m_events_count > m_tree->GetEntries()) return false;
+    m_event_data->particles.clear();
+    m_event_data->vertices.clear();
+    m_event_data->links1.clear();
+    m_event_data->links2.clear();
+    m_event_data->attribute_id.clear();
+    m_event_data->attribute_name.clear();
+    m_event_data->attribute_string.clear();
+
+
+    m_run_info_data->weight_names.clear();
+    m_run_info_data->tool_name.clear();
+    m_run_info_data->tool_version.clear();
+    m_run_info_data->tool_description.clear();
+    m_run_info_data->attribute_name.clear();
+    m_run_info_data->attribute_string.clear();
+
+
+    m_tree->GetEntry(m_events_count);
+    evt.read_data(*m_event_data);
+    run_info()->read_data(*m_run_info_data);
+    evt.set_run_info(run_info());
+    m_events_count++;
+    return true;
+}
+
+void ReaderRootTree::close()
+{
+    m_file->Close();
+}
+
+bool ReaderRootTree::failed()
+{
+    if ( !m_file->IsOpen() ) return true;
+    if (m_events_count > m_tree->GetEntries()) return true;
+    return false;
+}
+
+} // namespace HepMC3
Index: external/HepMC3/rootIO/src/Streamers.cc
===================================================================
--- external/HepMC3/rootIO/src/Streamers.cc	(revision b30245b0657b11c14403abbcf01ed63b738a06b8)
+++ external/HepMC3/rootIO/src/Streamers.cc	(revision b30245b0657b11c14403abbcf01ed63b738a06b8)
@@ -0,0 +1,62 @@
+// -*- C++ -*-
+//
+// This file is part of HepMC
+// Copyright (C) 2014-2019 The HepMC collaboration (see AUTHORS for details)
+//
+/**
+ *  @file Streamers.cc
+ *  @brief Implementation of \b methods GenEvent::Streamer and GenRunInfo::Streamer
+ *
+ */
+
+#include "HepMC3/GenEvent.h"
+
+#include "HepMC3/Data/GenEventData.h"
+#include "HepMC3/Data/GenRunInfoData.h"
+
+#ifdef HEPMC3_ROOTIO
+#include "TBuffer.h"
+#include "TClass.h"
+#endif
+
+
+namespace HepMC3 {
+
+#ifdef HEPMC3_ROOTIO
+
+void GenEvent::Streamer(TBuffer &b) {
+    if (b.IsReading()) {
+        GenEventData data;
+
+        b.ReadClassBuffer(TClass::GetClass("HepMC3::GenEventData"), &data);
+
+        read_data(data);
+    } else {
+        // fill the GenEventData structures
+        GenEventData data;
+        write_data(data);
+
+        b.WriteClassBuffer(TClass::GetClass("HepMC3::GenEventData"), &data);
+    }
+}
+
+
+void GenRunInfo::Streamer(TBuffer &b) {
+    if (b.IsReading()) {
+        GenRunInfoData data;
+
+        b.ReadClassBuffer(TClass::GetClass("HepMC3::GenRunInfoData"), &data);
+
+        read_data(data);
+    } else {
+        // fill the GenRunInfo structures
+        GenRunInfoData data;
+        write_data(data);
+
+        b.WriteClassBuffer(TClass::GetClass("HepMC3::GenRunInfoData"), &data);
+    }
+}
+
+#endif
+
+} // namespace HepMC3
Index: external/HepMC3/rootIO/src/WriterRoot.cc
===================================================================
--- external/HepMC3/rootIO/src/WriterRoot.cc	(revision b30245b0657b11c14403abbcf01ed63b738a06b8)
+++ external/HepMC3/rootIO/src/WriterRoot.cc	(revision b30245b0657b11c14403abbcf01ed63b738a06b8)
@@ -0,0 +1,85 @@
+// -*- C++ -*-
+//
+// This file is part of HepMC
+// Copyright (C) 2014-2019 The HepMC collaboration (see AUTHORS for details)
+//
+/**
+ *  @file WriterRoot.cc
+ *  @brief Implementation of \b class WriterRoot
+ *
+ */
+#include <cstdio>  // sprintf
+#include "HepMC3/WriterRoot.h"
+#include "HepMC3/Version.h"
+// ROOT header files
+#include "TFile.h"
+#include "TTree.h"
+
+namespace HepMC3 {
+HEPMC3_DECLARE_WRITER_FILE(WriterRoot)
+
+WriterRoot::WriterRoot(const std::string &filename, std::shared_ptr<GenRunInfo> run):
+    m_events_count(0) {
+    set_run_info(run);
+
+    m_file = TFile::Open(filename.c_str(), "RECREATE");
+    if ( !m_file->IsOpen() ) {
+        HEPMC3_ERROR("WriterRoot: problem opening file: " << filename)
+        return;
+    }
+
+    if ( run_info() ) write_run_info();
+}
+
+void WriterRoot::write_event(const GenEvent &evt) {
+    if ( !m_file->IsOpen() ) return;
+
+    if ( !run_info() ) {
+        set_run_info(evt.run_info());
+        write_run_info();
+    } else {
+        if ( evt.run_info() && run_info() != evt.run_info() )
+            HEPMC3_WARNING("WriterRoot::write_event: GenEvents contain "
+                           "different GenRunInfo objects from - only the "
+                           "first such object will be serialized.")
+        }
+
+    GenEventData data;
+    evt.write_data(data);
+
+    char buf[16] = "";
+    sprintf(buf, "%15i", ++m_events_count);
+
+    int nbytes = m_file->WriteObject(&data, buf);
+
+    if ( nbytes == 0 ) {
+        HEPMC3_ERROR("WriterRoot: error writing event")
+        m_file->Close();
+    }
+}
+
+void WriterRoot::write_run_info() {
+    if ( !m_file->IsOpen() || !run_info() ) return;
+
+    GenRunInfoData data;
+    run_info()->write_data(data);
+
+    int nbytes = m_file->WriteObject(&data, "GenRunInfoData");
+
+    if ( nbytes == 0 ) {
+        HEPMC3_ERROR("WriterRoot: error writing GenRunInfo")
+        m_file->Close();
+    }
+}
+
+void WriterRoot::close() {
+    m_file->Close();
+}
+
+bool WriterRoot::failed() {
+    if ( !m_file->IsOpen() ) return true;
+
+    return false;
+}
+
+} // namespace HepMC3
Index: external/HepMC3/rootIO/src/WriterRootTree.cc
===================================================================
--- external/HepMC3/rootIO/src/WriterRootTree.cc	(revision b30245b0657b11c14403abbcf01ed63b738a06b8)
+++ external/HepMC3/rootIO/src/WriterRootTree.cc	(revision b30245b0657b11c14403abbcf01ed63b738a06b8)
@@ -0,0 +1,108 @@
+// -*- C++ -*-
+//
+// This file is part of HepMC
+// Copyright (C) 2014-2019 The HepMC collaboration (see AUTHORS for details)
+//
+/**
+ *  @file WriterRootTree.cc
+ *  @brief Implementation of \b class WriterRootTree
+ *
+ */
+#include <cstdio>  // sprintf
+#include "HepMC3/WriterRootTree.h"
+#include "HepMC3/Version.h"
+// ROOT header files
+#include "TFile.h"
+#include "TTree.h"
+
+namespace HepMC3
+{
+HEPMC3_DECLARE_WRITER_FILE(WriterRootTree)
+
+WriterRootTree::WriterRootTree(const std::string &filename, std::shared_ptr<GenRunInfo> run):
+    m_tree(0),
+    m_events_count(0),
+    m_tree_name("hepmc3_tree"),
+    m_branch_name("hepmc3_event")
+{
+    m_file = TFile::Open(filename.c_str(), "RECREATE");
+    if (!init(run)) return;
+}
+
+WriterRootTree::WriterRootTree(const std::string &filename, const std::string &treename, const std::string &branchname, std::shared_ptr<GenRunInfo> run):
+    m_tree(0),
+    m_events_count(0),
+    m_tree_name(treename.c_str()),
+    m_branch_name(branchname.c_str())
+{
+    m_file = TFile::Open(filename.c_str(), "RECREATE");
+    if (!init(run)) return;
+}
+
+bool WriterRootTree::init(std::shared_ptr<GenRunInfo> run )
+{
+    if ( !m_file->IsOpen() )
+    {
+        HEPMC3_ERROR("WriterRootTree: problem opening file: " << m_file->GetName())
+        return false;
+    }
+    m_event_data = new GenEventData();
+    m_run_info_data = new GenRunInfoData();
+    set_run_info(run);
+    if ( run_info() ) run_info()->write_data(*m_run_info_data);
+    m_tree = new TTree(m_tree_name.c_str(), "hepmc3_tree");
+    m_tree->Branch(m_branch_name.c_str(), m_event_data);
+    m_tree->Branch("GenRunInfo", m_run_info_data);
+    return true;
+}
+
+void WriterRootTree::write_event(const GenEvent &evt)
+{
+    if ( !m_file->IsOpen() ) return;
+    bool refill = false;
+    if ( evt.run_info()&&(!run_info() || (run_info() != evt.run_info())))  { set_run_info(evt.run_info()); refill = true;}
+    if (refill)
+    {
+        m_run_info_data->weight_names.clear();
+        m_run_info_data->tool_name.clear();
+        m_run_info_data->tool_version.clear();
+        m_run_info_data->tool_description.clear();
+        m_run_info_data->attribute_name.clear();
+        m_run_info_data->attribute_string.clear();
+        run_info()->write_data(*m_run_info_data);
+    }
+
+
+
+    m_event_data->particles.clear();
+    m_event_data->vertices.clear();
+    m_event_data->links1.clear();
+    m_event_data->links2.clear();
+    m_event_data->attribute_id.clear();
+    m_event_data->attribute_name.clear();
+    m_event_data->attribute_string.clear();
+
+    evt.write_data(*m_event_data);
+    m_tree->Fill();
+    ++m_events_count;
+}
+
+
+void WriterRootTree::write_run_info() {}
+
+void WriterRootTree::close()
+{
+    m_file->WriteTObject(m_tree);
+    m_file->Close();
+    delete m_event_data;
+    delete m_run_info_data;
+}
+
+bool WriterRootTree::failed()
+{
+    if ( !m_file->IsOpen() ) return true;
+
+    return false;
+}
+
+} // namespace HepMC3
Index: external/HepMC3/src/GenCrossSection.cc
===================================================================
--- external/HepMC3/src/GenCrossSection.cc	(revision b30245b0657b11c14403abbcf01ed63b738a06b8)
+++ external/HepMC3/src/GenCrossSection.cc	(revision b30245b0657b11c14403abbcf01ed63b738a06b8)
@@ -0,0 +1,113 @@
+// -*- 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/src/GenEvent.cc
===================================================================
--- external/HepMC3/src/GenEvent.cc	(revision b30245b0657b11c14403abbcf01ed63b738a06b8)
+++ external/HepMC3/src/GenEvent.cc	(revision b30245b0657b11c14403abbcf01ed63b738a06b8)
@@ -0,0 +1,820 @@
+// -*- 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/src/GenHeavyIon.cc
===================================================================
--- external/HepMC3/src/GenHeavyIon.cc	(revision b30245b0657b11c14403abbcf01ed63b738a06b8)
+++ external/HepMC3/src/GenHeavyIon.cc	(revision b30245b0657b11c14403abbcf01ed63b738a06b8)
@@ -0,0 +1,157 @@
+// -*- 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/src/GenParticle.cc
===================================================================
--- external/HepMC3/src/GenParticle.cc	(revision b30245b0657b11c14403abbcf01ed63b738a06b8)
+++ external/HepMC3/src/GenParticle.cc	(revision b30245b0657b11c14403abbcf01ed63b738a06b8)
@@ -0,0 +1,114 @@
+// -*- 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/src/GenPdfInfo.cc
===================================================================
--- external/HepMC3/src/GenPdfInfo.cc	(revision b30245b0657b11c14403abbcf01ed63b738a06b8)
+++ external/HepMC3/src/GenPdfInfo.cc	(revision b30245b0657b11c14403abbcf01ed63b738a06b8)
@@ -0,0 +1,106 @@
+// -*- 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/src/GenRunInfo.cc
===================================================================
--- external/HepMC3/src/GenRunInfo.cc	(revision b30245b0657b11c14403abbcf01ed63b738a06b8)
+++ external/HepMC3/src/GenRunInfo.cc	(revision b30245b0657b11c14403abbcf01ed63b738a06b8)
@@ -0,0 +1,133 @@
+// -*- 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/src/GenVertex.cc
===================================================================
--- external/HepMC3/src/GenVertex.cc	(revision b30245b0657b11c14403abbcf01ed63b738a06b8)
+++ external/HepMC3/src/GenVertex.cc	(revision b30245b0657b11c14403abbcf01ed63b738a06b8)
@@ -0,0 +1,141 @@
+// -*- 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/src/ReaderAscii.cc
===================================================================
--- external/HepMC3/src/ReaderAscii.cc	(revision b30245b0657b11c14403abbcf01ed63b738a06b8)
+++ external/HepMC3/src/ReaderAscii.cc	(revision b30245b0657b11c14403abbcf01ed63b738a06b8)
@@ -0,0 +1,561 @@
+// -*- 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/src/ReaderAsciiHepMC2.cc
===================================================================
--- external/HepMC3/src/ReaderAsciiHepMC2.cc	(revision b30245b0657b11c14403abbcf01ed63b738a06b8)
+++ external/HepMC3/src/ReaderAsciiHepMC2.cc	(revision b30245b0657b11c14403abbcf01ed63b738a06b8)
@@ -0,0 +1,724 @@
+// -*- 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/src/Setup.cc
===================================================================
--- external/HepMC3/src/Setup.cc	(revision b30245b0657b11c14403abbcf01ed63b738a06b8)
+++ external/HepMC3/src/Setup.cc	(revision b30245b0657b11c14403abbcf01ed63b738a06b8)
@@ -0,0 +1,27 @@
+// -*- 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
