How can I generate particle source using specific Galactic Cosmic Ray (GCR) model

Hello!
I have been tried to simulate detector in GEANT4 with space environment.
I want to get cosmic ray flux from specific galactic cosmic ray model for using the cosmic ray source.
How can I generate particle source using specific model?
I want to shot generated cosmic ray source to detector by model.
Could you give some comments?

Thanks!

Hello,

Welcome to the Geant4 forum.

Maybe the General Particle Source is the way to go?

Here you may find the documentation, and some examples are distributed with the source code and installation. In my case, I can find the GPS examples in the following path:

$G4INSTALL/share/Geant4/examples/extended/eventgenerator/exgps

I hope this may help.

Best,
Alvaro

Hello,
Oh, I see.
I will try it.

Thank you very much!
It will be helpful for me.

Best regards,
Sangwoo