Please fill out the following information to help in answering your question, and also see tips for posting code snippets. If you don’t provide this information it will take more time to help with your problem!
Thank you for you’re reply.I would like to know if there exists an angle that can define the energy at any given point, similar to how an energy spectrum is defined, and then perform fitting procedures. The document contains a histogram related to angular distribution.
If it is something special, use histograms. The interpolation is built in and can be selected. Please see the documentation. You can also run a cosine distribution or a uniform one without histograms. A dense histogram likely will be good with a linear interpolation, but you should be the expert on what is better. If none helps, you can write your own PrimaryGeneratorAction. It also works with the GPS in parts, such as a GPS-defined energy spectrum and a custom angular distribution.