Using G4hepevtInterface in a macro


I would like assistance using the G4hepevtInterface (I am using Geant4 10.6.3 on linux). I’ve had trouble finding many resources online to help me understand it and how to use it. I need to be able to take as input a hepevt text file to read in a list of particles to G4. I am using an application that is a wrapper for G4, where I can only use a geant4 macro (I cannot run G4 in any other way). So I was hoping someone could help me with how to use the G4hepevtInterface within a macro to do what I want to do (do let me know if there is a better alternative). I’ve seen some references to macro commands for that interface, but none of them work. Is there is a macro command which makes those commands available?

Thank you for your assistance. Let me know if you need any more information.

It would also be helpful if someone explained in general how to use G4hepevtInterface, in case that’s easier than using it in a macro.

The ability to use G4HepEvtInterface via macro commands depends on whether your application supports that or not in its primary generator action. You can find more details and some examples in this presentation and on the official documentation.