GEANT4 GPS single particle sources

I am trying to create two particle sources using the GEANT4 gps source. I want each source to produce a single electron per event so that I have two simultaneous electrons in the detector. Currently using the intensity parameter means that there is a 1/2 probability one of the sources will fire twice as opposed to each source once. Any recommendations of how to fix this?

Current gps macro:

/gps/source/add 5.
/gps/particle e-
/gps/ene/type Mono
/gps/ene/mono 5 GeV
/gps/ene/sigma 0 GeV
/gps/direction 0 0 1
/gps/pos/type Point
/gps/pos/centre -13.81256 0 -5 mm


/gps/source/add 5.
/gps/particle e-
/gps/ene/type Mono
/gps/ene/mono 10 GeV
/gps/ene/sigma 0 GeV
/gps/direction 0 0 1
/gps/pos/type Point
/gps/pos/centre 0 0 -5 mm

I guess that you would prefer use GPS. But in case …
This configuration can be done with simple G4ParticleGun and C++ code.
See examples/extended/eventgenerator/particleGun: Readme and PrimaryGeneratorAction1

Or even without G4ParticleGun: example userPrimaryGenerator

Hi,

You can take a look to this example about how to configure a GPS made up by two different GPS which are fired at the same time,

geant4/share/Geant4-11.0.2/examples/extended/eventgenerator/exgps/macros/test34.mac

Particularly this is the key code:

# Source  1
/gps/particle proton
#
# the incident surface is a disc in the y-z plane at -10 cm
/gps/pos/type Plane
/gps/pos/rot1 0 1 0
/gps/pos/rot2 0 0 1
/gps/pos/shape Circle 
/gps/pos/centre -10. 0. 0. cm
/gps/pos/radius 10. cm
#
# angular distribution
/gps/ang/type cos
#  
# the proton energy is in gaussian profile centered at 2.5 MeV
/gps/ene/type Gauss
/gps/ene/mono 2.5 MeV
/gps/ene/sigma 0.5 MeV
#
#
# source #2
/gps/source/add 1
#
# this is gamma source
/gps/particle gamma
#
# the incident surface is a square in the x-y plane at 10 cm
/gps/pos/type Plane
/gps/pos/centre 0. 0. 10. cm
/gps/pos/shape Square
/gps/pos/halfx 2 cm
/gps/pos/halfy 2 cm
#
# normal incident  
/gps/direction 0 0 -1
#
# mono energy 
/gps/energy 1 MeV
#
# both guns will be fired at the same time
/gps/source/multiplevertex true

Best,
Alvaro