GPS: Angular dependent energy distribution

Hi All,

Sorry for the potentially basic question, I am fairly new to G4.

I am trying to implement the energy spectrum for cosmic ray muons at sea level into Geant4. What I have is a histogram of the intensity as a function of energy, which I understand can be included into GPS as a custom energy distribution. The problem is that this spectrum also varies as a function of zenith angle and I am unsure as to how to go about implementing this angular dependence.

Has anyone had any experience doing this or any advice on how to go with this?

Thanks in advance for any replies.

Best regards,

You can provide custom energy and angular distributions to GPS simultaneously, but they are uncorrelated. For correlated energy-angle spectra, I think you’ll have to do something more complicated outside GPS. Lots of GPS examples here to help you:

Check this out too,

much of the heavy lifting has already been done in your case.



Thanks for the reply Evan,

This MATLAB example looks like it should be pretty useful for me!

Also thanks for the GPS examples :slight_smile: