I would like to import primary event data written by pythia as an ascii hepmc3 file into my geant4 code.
It looks like the examples extended/eventgenerator/HepMC/HepMCEx01 and 02 should do this. However when I try to build them, I get an error message
undefined reference to `HepMC::IO_GenEvent::IO_GenEvent(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::_Ios_Openmode)’
which I think is because the examples are written for HepMC2 not HepMC3. I have tried a lot of things to get it working without success.
My questions are:
- Is there a simple way to get these examples working?
- Are there any other examples showing how to import hepmc files which work with HepMC3?
- If hepmc is not the way to go, is there a better way to transfer pythia output into geant4? Is there an example that will show how to do this?
Thanks