Hi G4ers!
I am still new to Geant4 and just starting to get the hang of it. However, I do not know how to solve this problem. I am simulating environmental neutron flux with a gps. Because I can’t make an energy-dependent angle distribution I have divided the energy spectrum in fast, epithermal and thermal. My macro looks somewhat like this:
#thermal region
/gps/ang/type iso
/gps/ene/type User
/gps/hist/type energy
/gps/hist/point 0.001 0.1
/gps/hist/point …
/run/beamOn 1000
#epithermal region
/gps/ang/type cos
/gps/ene/type User
/gps/hist/type energy
/gps/hist/point 0.4 0.2
/gps/hist/point …
/run/beamOn 1000
#fast region
…
You get the idea. So everytime the beamOn is called, an ntuple is created (in myRunAction) but it overwrites leaving me with only the data from the last region.
Is there a way to get the analysismanager to record multiple runs? Is there a way to merge ntuples? Or is there a way to change the filename for every run so it does not overwrite and I can do the merging afterwards?
Thanks in advance!