I’m currently giving a collegue some advice on constructing a Geant4 simulation and their particular needs are a bit different from the software I’ve developed before. Specifically, they want to export a histogram (fluence) for each voxel in some parameterized volume. I can think of at least two ways to approach this:
1.) Using G4AnalysisManager, with some sort of looping statement, create an enormous number of histograms. Then implement a numbering system such that each volume and volume copy number can map to the appropriate histogram. The advantage of this is that G4AnalysisManager will take care of merging thread local information without any further work. However, I’m not sure that G4AnalysisManager was designed with a use case like this in mind, or how performance might be affected.
2.) Go the more conventional approach and develop a scorer as well as a G4THitsMap. Personally, I’m not sure I can wrap my head around what a HitsMap which contains a 1D histogram for 1000’s of voxels would look like or how this would be implemented. If anyone can direct me towards one of the Geant4 examples which possibly takes an approach like this I would be extremely grateful.
If anyone has any advice – or if I’m missing an easier/more obvious way of approaching the problem I would be glad to hear your input.
Thanks in advance for your help,