View on GitHub

Geant4 Zero to Hero

The Definitive Guide for End Users

General Particle Source (GPS)

YouTube shape

Geant4 provides 3 ways for a user to generate primary particles for a simulation:

An outdated webpage contains most demonstrations in exgps. In addition, it shows resulted distribution plots, which are very helpful to visualize effects of GPS macro commands.

Default Settings of GPS

/run/beamOn with tracking verbosity of 2 without any setting on GPS reveals the default settings of GPS:

Idle> /tracking/verbose 2
Idle> /run/beamOn
G4WT3 > *********************************************************************************************************
G4WT3 > * G4Track Information:   Particle = geantino,   Track ID = 1,   Parent ID = 0
G4WT3 > *********************************************************************************************************
G4WT3 >
G4WT3 > Step#    X(mm)    Y(mm)    Z(mm) KinE(MeV)  dE(MeV) StepLeng TrackLeng  NextVolume ProcName
G4WT3 >     0        0        0        0         1        0        0         0        hall initStep
G4WT3 >     1        0        0   -1e+03         1        0    1e+03     1e+03  OutOfWorld CoupledTransportation