Please fill out the following information to help in answering your question, and also see tips for posting code snippets. If you don’t provide this information it will take more time to help with your problem!
Geant4 Version: 11.3.2
Operating System: Ubuntu 22.04
Compiler/Version: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0
CMake Version: 3.22.1
I have a file that contains Energy and Count information for an electron Spectrum. I want my particle gun to to take this file as inpute spectra and generate the particle according to the file. At the end, I want to recover this spectrum after it falls onto the defined geometry, with the material and physics list.
Can anyone suggest how to do that? Please let me know if there are any examples available in Geant4 for this exercise. If you find anything releated to this, please reply