Currently, volume repetitions are handled via the repeat parameter which takes a list of dictionaries as input. This interface is a bit clumsy and I think error-prone. What happens behind the scenes is actually very simple: If an object is to be repeated, Gate will simply instruct Geant4 to construct multiple physical volumes, each with its own translation (with respect to the mother volume) and rotation.
It would be much more natural for the user to simply specify multiple translations for a volume, i.e., instead of setting vol.translation to one 3-vector, it could be a list of 3-vectors. The same for rotation. If only one rotation is provided, this will be applied to all copies. Otherwise, the list of rotations and of translations will have to match.
Helper functions can be implemented to generate such lists of translations/rotations for typical arrangements.
The name of the repetitions should be generated automatically.
Currently, volume repetitions are handled via the repeat parameter which takes a list of dictionaries as input. This interface is a bit clumsy and I think error-prone. What happens behind the scenes is actually very simple: If an object is to be repeated, Gate will simply instruct Geant4 to construct multiple physical volumes, each with its own translation (with respect to the mother volume) and rotation.
It would be much more natural for the user to simply specify multiple translations for a volume, i.e., instead of setting vol.translation to one 3-vector, it could be a list of 3-vectors. The same for rotation. If only one rotation is provided, this will be applied to all copies. Otherwise, the list of rotations and of translations will have to match.
Helper functions can be implemented to generate such lists of translations/rotations for typical arrangements.
The name of the repetitions should be generated automatically.