Skip to content

How to link RAINIER with Geant4 #26

@fzeiser

Description

@fzeiser

Several times the question came up on how RAINIER can be linked with GEANT4. Of course, there is many ways, but I will describe one possible solution here.

Idea

  • Simulate all cascades with RAINIER
  • Make sure to save the cascades to a root tree:
    // #define bSaveTree // to save cascades to a ROOT tree in the RunXXXX.root file
  • Extract cascades from the root tree to some format readable by your GEANT4 simulations
  • Run the geant4 simulation
  • (Extract the information you care for from there)

Example

  • Run RAINIER e.g. with the FullRxn population method (or just the standard example as you like, but then you'll have the events from one level only). Make sure bSaveTree is defined.
  • A small script root_to_geant.py converts the cascades from the root tree to one file per multiplicity, and the file contents simply give the gamma-ray energies of each cascade. I use pyroot here, which can sometimes be challenging to install. In any case, one could write a pure root version. But for me speed was not an issue
  • One could create gps macro commands, but with SUN it was easiest to adopt the source code slightly. Following private repo https://github.com/fzeiser/SUNresponse/tree/many_runs (on the many_runs branch) has an example of this. Due to some small changes in sunShare-e14505e.cc, it simply reads the files that the script above produces.
  • For the Oslo Method analysis with SuN, you may then want to add the simulated spectra for all cascades (and multiplicities), see e.g. root2spe.c in the repo above. (TChains the files for each multiplicity)

Notes:

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions