3.1.1.7.2.4. opengate.source.GANSourceDefaultGenerator¶
3.1.1.7.2.4.1. Module Contents¶
3.1.1.7.2.4.1.1. Classes¶
This class manage the base components of a particle generator. |
- class opengate.source.GANSourceDefaultGenerator.GANSourceDefaultGenerator(user_info)[source]¶
This class manage the base components of a particle generator.
In the constructor, the module ‘gaga’ is imported. It is only imported in the constructor to only required
this module if it is used
‘initialize’ function: the GAN is loaded and the list of keys is initialized
‘generator’ function: default generator
‘get_output_keys’ function: map the user defined keys to the ones of the generator. There are two usages, either
with on single primary (3 values for position, direction), or paired primary (6 values).
‘move_backward’ function: consider all particles positions and move their backward according to their direction,
using the factor provided by the user in ‘user_info.backward_distance’. This is useful to allow generating particles that do not intersect with the detector.
‘copy_generated_particle_to_g4’ function: copy all the particles (pos, dir, time, energy) to the cpp part.