Skip to content

Commit e15e91f

Browse files
committed
Adding doc for G4JLGunGenerator. Fixes #39
1 parent 3d8772c commit e15e91f

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/G4ParticleGenerators.jl

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,15 @@ function G4JLPrimaryGenerator{G4JLParticleGunData}(;particle="e-", energy=10., d
4949
end
5050
G4JLPrimaryGenerator("ParticleGun", data; init_method=init, generate_method=gen)
5151
end
52-
52+
"""
53+
G4JLGunGenerator(; particle="e-", energy=10., direction=G4ThreeVector(), position=G4ThreeVector())
54+
Create a Particle Gun generator with specified particle type, energy, direction, and position.
55+
# Arguments
56+
- `particle::String="e-"`: The name of the particle to be generated (default is electron).
57+
- `energy::Float64=10.`: The energy of the particle in Me V (default is 10 MeV).
58+
- `direction::G4ThreeVector=G4ThreeVector()`: The momentum direction of the particle (default is zero vector).
59+
- `position::G4ThreeVector=G4ThreeVector()`: The position of the particle (default is zero vector).
60+
"""
5361
const G4JLGunGenerator = G4JLPrimaryGenerator{G4JLParticleGunData}
5462

5563
function SetParticleByName(gen::G4JLGunGenerator, particle::String)

0 commit comments

Comments
 (0)