General Particle Source in GEANT4

Click For Summary
SUMMARY

The forum discussion focuses on generating a Gaussian distribution of gamma particles using the General Particle Source (GPS) in GEANT4. The user implemented a macro file with specific commands to produce gamma particles with energies ranging from 0 to 250 keV but observed a mono-energetic distribution in MATLAB instead. The issue arises from the misconception that macro commands can override hard-coded C++ settings within GEANT4, which they cannot. Additionally, another user seeks guidance on creating a conic-shaped gamma source in GEANT4.

PREREQUISITES
  • Familiarity with GEANT4 framework and its command structure
  • Understanding of Gaussian distributions in particle physics
  • Basic knowledge of MATLAB for data analysis
  • Experience with C++ programming, particularly in the context of GEANT4
NEXT STEPS
  • Explore GEANT4 documentation on the General Particle Source (GPS) commands
  • Learn how to implement custom C++ code in GEANT4 for particle source configurations
  • Investigate methods for visualizing particle distributions in MATLAB
  • Research techniques for creating non-standard geometries in GEANT4, such as conic shapes
USEFUL FOR

This discussion is beneficial for physicists, simulation engineers, and researchers working with particle simulations in GEANT4, particularly those interested in gamma particle generation and data analysis using MATLAB.

Jehan Jayanetti
Messages
1
Reaction score
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
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?
 
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
 

Similar threads

Replies
7
Views
4K
  • · Replies 20 ·
Replies
20
Views
20K
  • · Replies 5 ·
Replies
5
Views
2K