Example of Simulating GCR spectrum in Geant4

Hi I am working on project to simulate the radiation model (Hadronic + Electromagnetic interaction) for space radiation environment.
Here I have one query is that is there any example available in Geant4 to generate GCR spectrum (proton, heavy ions) for space application, where I can start with?
Also I have to define the altitude, inclination etc information for the same in Geant4.
Can I do generation part and setting of altitude/inclination with gps source class?
If yes, then can you please point me that example/method with which I can start?

Hello,

You can use third-party tools such as ESA space environment information system, SPENVIS, or TRADs OMERE to generate GCR spectrum. These tools take information about altitude, mission duration etc. and allow you to generate the data for different particle sources. You can then use this to create GPS macros to generate the particles. Slide 18 of this presentiation gives a discussion of using the GPS to simulate the isotropic radiation in space.

I am not aware of an example which specifically includes a GCR spectrum, however, there are two examples in Geant4 related to space. These are eRosita and the x-ray telescope examples which may be of some use for you.

I hope this gives you a starting point and helps

Hi, thanks for clarification.
Started to extract the data (fluence vs kinetic energy by setting up different model in space plus altitude info. from Spenvis.

Just want to confirm method which I am planning is:

  1. Now I have data of fluence and kinetic energy in text file for example for proton from spenvis. So if I understood correctly this is my environment in space (for specific model). Now gps in Geant4 will help me to generate and simulate the corresponding particles(proton) in isotropic form.
  2. Then I can define my detector geometry using Detector Construction class and throw this particle source from gps to my detector geometry right?
  3. So If I want to generate ions in space together with proton, can I define in single gps mac file for both ( ions as well as for proton) one after one? (see sample code of gps, I plan to use)

##########################
====Source One (proton)=================
#define incident particle
/gps/particle proton
##########################

type and distribution of beam

/gps/pos/type Surface
/gps/pos/shape Sphere

Set angular distribution

/gps/ang/type cos
/gps/ang/mintheta 0. deg
/gps/ang/maxtheta 0.003 deg
/gps/ang/minphi 0. deg
/gps/ang/maxphi 360. deg
##########################

Setting position

/gps/pos/centre 0. 0. 0. mm
/gps/pos/radius 0.2 m
##########################
/gps/ene/type Arb
/gps/ene/diffspec 1
/gps/hist/type arb
##########################
/gps/hist/point 1.0023 202.26
/gps/hist/point 1.0162 207.42
/gps/hist/point 1.0304 212.75
/gps/hist/point 1.0447 218.26

Similarly for Source 2: Oxygen
##########################
====Source One (oxygen)=================
#define incident particle
/gps/particle oxygen
##########################

type and distribution of beam

/gps/pos/type Surface
/gps/pos/shape Sphere

Set angular distribution

/gps/ang/type cos
/gps/ang/mintheta 0. deg
/gps/ang/maxtheta 0.003 deg
/gps/ang/minphi 0. deg
/gps/ang/maxphi 360. deg
##########################

Setting position

/gps/pos/centre 0. 0. 0. mm
/gps/pos/radius 0.2 m
##########################
/gps/ene/type Arb
/gps/ene/diffspec 1
/gps/hist/type arb
##########################
/gps/hist/point 1.0023 202.26
/gps/hist/point 1.0162 207.42
/gps/hist/point 1.0304 212.75
/gps/hist/point 1.0447 218.26

something like that?

  1. For existing example to start with, I use Radio Protection as it help to set up gps and analysis part and I am modifying for my purpose.

No problem.
Answer/comments on your planning steps:

  1. Yes, using SPENVIS allows you to generate the fluences that correspond to the orbit etc. You use this information to populate the /gps/hist/points in the macro file.

  2. Yes, using general particle source in your primary generation allows you to use the particle source macro. Then use the Detector Construction class as usual.

  3. I would just define two macro files one for proton and another for ions. Run the simulation with each and then combine the data at the end.

  4. Thank you for letting me know about the example. I somehow I had not stumbled upon it despite working in the field.

you can start from the radioprotection advanced example.

Cheers
Susanna