Hello everyone,
I am running a gamma spectrometry simulation (Eu-152 source, CZT detector, 60 million events) using a pre-compiled Geant4 application (Anubis). Because of this, I only have access to the .mac and .tg files, and I cannot easily modify the underlying C++ source code (like EventAction or SteppingAction).
It is clear that the application is saving every single microscopic step (fluorescence, Auger electrons, etc.) in the .root file. However, for my analysis, I only need the total energy deposited in the sensitive volume per event (to build a classic MCA channel/counts spectrum). I do not need the tracking/stepping info. So, is there a standard Geant4 UI command (e.g., via /analysis/…) that I can put in my .mac file to disable the saving of all the stepping/tracking branches and force ROOT to output ONLY the final summed energy deposit per event? Or is this purely dependent on how the G4AnalysisManager was hardcoded in the C++ of the specific application I am using?
Any advice on how to reduce this massive file size using only macro commands would be greatly appreciated.
Thank you!
Hallo G, My simplest suggestion is make the root files smaller by running fewer events and then change the seed (if you can) and run again- 6E7 presumably leads to tens of Gigabytes. That way you can either merge the root files and do the analysis or do the analysis on the different root files and add the results. It’s difficult as I don’t know the ANUBIS pre-compiled application- I looked at the ANUBIS site but didn’t find it. So I don’t know what it can do, how it does it (ANUBIS is I think is real HEP). So im not certain how Eu-152 source, CZT. fits in, but egal. It would be interesting to see, know. A simple histogram may not be there. As said I don’t know the pre-compiled ANUBIS application. I hope the above helps.
Hi David, thanks for the reply and the suggestion.
My problem is that the Anubis application seems to be programmed to save every single microscopic step in the ROOT file. Since I only have the macro files and I cannot change the underlying Anubis code, I was wondering if Geant4 has a basic, standard macro command (maybe under /analysis/) to force the output to just save the total energy per event instead. If the answer is ‘no, it depends entirely on how the Anubis developers wrote the program’, then I will just process the massive files as they are using a custom script to extract only the data I need. Thanks again for your time!
I don’t know as said I don’t have this pre compiled version. Probably not. I suspect the analysis has to run through the root file looking at the individual events chucking irrelevant ones and so on- This is I think not necessarily easy/simple. Is it possible to see the analysis custom file? (probably a .C file, this can be speeded up by compiling) this might make it easier to understand But of course a link to the pre compiled version is better if it’s available. If that’s not the case then you will have to go to the ANUBIS developers and ask if they have an answer- ergo they know what their code does.
maybe sharing the Mac and tg files could also help?