Multiple sources

_Geant4 Version: 10.04.p03
_Operating System:_Ubuntu 16.04
_Compiler/Version:_gcc 5.4
_CMake Version:_3.5.2

Hi again,

If I create multiple sources is it possible to define the proportion of primaries emanating from each? Eg if I create 2 can I make 70% emanate from source 1 and 30% emanate from source 2?



If this is with the G4GeneralParticleSource then yes, this can be done with the /gps/source/add <intensity> command. This adds a new source with a relative intensity, e.g. if you add three sources with 1 as the intensity, each would be sampled 1/3 of the time.

If you’re writing your own particle gun, then it’s up to you to sample appropriately.

Thanks Ben. Much appreciated.