Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

The GPS can be used to generate events with multiple, different particle types in the same event.

The macro below generates a muon and a pion within the same event.

No Format
/gps/verbose 2

# muon
/gps/source/intensity 1.0
/gps/particle mu-
/gps/position 0 0 0
/gps/direction 0 1 0
/gps/energy 10 GeV

# pion
/gps/source/add 1.
/gps/particle pi-
/gps/position 0 0 0
/gps/direction .25 .75 0
/gps/energy 10 GeV

/gps/source/list

/gps/source/multiplevertex true

/run/beamOn 1

The multiplevertex command tells the GPS to cycle through the sources and generate a vertex for each one.