General Particle Source in GEANT4

In summary, the conversation discusses the creation of a macro file to produce a Gaussian distribution of gamma particles ranging in energy from 0 to 250 keV using the General Particle Source command. However, upon examination in Matlab, the distribution appears as a mono-energetic distribution. There is confusion as to whether the macro commands executed at the prompt can override underlying C++ code. The speaker also mentions a problem with creating a gamma source of conic shape in Geant4 and seeks guidance.
  • #1
Jehan Jayanetti
1
0
I have created a macro file that should produce a Gaussian (Normal) distribution of gamma particles ranging in energy from 0 to 250 keV as follows:

/control/verbose 0
/run/verbose 0
/tracking/verbose 0
/gps/particle gamma
/gps/ene/type Gauss
/gps/ene/min 0 keV
/gps/ene/max 250 keV
/run/beamOn 10000000

I have used the gps (General Particle Source) command to generate this distribution.
However, when I examine the distribution in Matlab it appears as a mono-energetic distribution. I thought the macro commands executed at the Idle> prompt should override the underlying C++ code, but it appears that they do not.
 
Physics news on Phys.org
  • #2
Jehan Jayanetti said:
I thought the macro commands executed at the Idle> prompt should override the underlying C++ code, but it appears that they do not.

How could it? Suppose you have something hard coded in the C++. How could the macro possibly override that?
 
  • #3
Hi
i have a problem related Geant4 source,i wana creat a gamma source of conic shape..any one help or guide me..
kind regards
 

Related to General Particle Source in GEANT4

1. What is a General Particle Source in GEANT4?

A General Particle Source (GPS) in GEANT4 is a tool used to generate primary particles for a simulation. It allows the user to specify the type, energy, and direction of the particles, as well as their position in the simulation. This allows for more control and flexibility in creating the initial particles for a simulation.

2. How do I use the GPS in GEANT4?

To use the GPS, you must first define it in your GEANT4 macro file. This can be done by setting the source type, position, and direction of the particles. You can also specify additional properties such as energy, particle type, and angular distribution. Once the GPS is defined, you can use it to generate primary particles for your simulation.

3. What types of particles can be generated with the GPS in GEANT4?

The GPS in GEANT4 allows for the generation of various types of particles, including electrons, protons, neutrons, photons, and ions. You can also specify the energy and direction of these particles, as well as their position in the simulation.

4. Can I customize the GPS in GEANT4 for my specific needs?

Yes, the GPS in GEANT4 is highly customizable. You can specify the properties of the primary particles, such as energy, type, and angular distribution, to suit your specific needs. You can also add additional features, such as user-defined distributions, to the GPS to further customize it for your simulation.

5. Is the GPS in GEANT4 suitable for all types of simulations?

Yes, the GPS is suitable for a wide range of simulations, from basic physics studies to more complex experiments. It allows for precise control over the properties of the primary particles, making it a versatile tool for various types of simulations.

Similar threads

Replies
7
Views
2K
  • High Energy, Nuclear, Particle Physics
Replies
20
Views
16K
  • Programming and Computer Science
Replies
5
Views
1K
Back
Top