I’m new to Geant4 and trying to make a simple application which is supposed to be very similar to example B1. So I started with that example and tweaked it a little. My particlegun shoots neutrons on a polyethylene box and I want to know the energy spectrum of the neutrons coming out of the polyethylene. I set up a sensitive detector directly behind the polyethylene and in the ProcessHits method I get the kineticEnergy.
But I don’t know how I can get this energy to output in a csv. In general, I am quite lost in the application of Hit, Hitcollections and Analysis altogether. Could someone help me out?
Thanks in advance