How to define a solid toroidal source using GPS

Hi Geant4ers
I want to use GPS to define a solid annulus source. But when using the command
/gps/pos/type volume,
I can not found annulus that define in volume. Only Sphere, Ellipsoid, Cylinder ,Para
(parallelepiped) could be used.
So I desire to use the command /gps/pos/confine to confine my gps .
However not sure I define the gps is solid.
This is my code
/control/verbose 0
/tracking/verbose 0
/event/verbose 0
/gps/verbose 2

/gps/pos/type Volume
/gps/pos/shape Cylinder
/gps/pos/centre 0 0 0
#/gps/pos/inner_radius 4.293 cm
/gps/pos/radius 25 cm
/gps/pos/halfz 1 cm
/gps/pos/confine sourcefillPy

/gps/ang/type iso

/gps/particle ion
/gps/ion 27 60
/gps/ene/type Mono
/gps/ene/mono 0 eV

/run/beamOn 10000
As a beginner I really appreciate your advice and guidance,Thank you for your help

1 Like

Isn’t test29.g4mac here what you are looking for?

Thanks for the advice I will look at the files you mentioned

The suggested source is a planar source, for which you could use anulus, but if a sourcefillPy is a name of a PhysicalVolume annulus defined inside DetectorConstruction with dimensions inside your defined cylinder, it should work.