opengate.sources.phspsources ============================ .. py:module:: opengate.sources.phspsources Classes ------- .. autoapisummary:: opengate.sources.phspsources.PhaseSpaceSourceGenerator opengate.sources.phspsources.PhaseSpaceSource Module Contents --------------- .. py:class:: PhaseSpaceSourceGenerator Class that read phase space root file and extract position/direction/energy/weights of particles. Particles information will be copied to the c++ side to be used as a source .. py:attribute:: current_index :value: None .. py:attribute:: user_info :value: None .. py:attribute:: root_file :value: None .. py:attribute:: num_entries :value: 0 .. py:attribute:: cycle_count :value: 0 .. py:attribute:: batch :value: None .. py:attribute:: points :value: None .. py:attribute:: w :value: None .. py:method:: __getstate__() .. py:method:: initialize(user_info) .. py:method:: read_phsp_and_keys() .. py:method:: get_entry_start() .. py:method:: generate(source) Main function that will be called from the cpp side every time a batch of particles should be created. Once created here, the particles are copied to cpp. (Yes maybe the copy could be avoided, but I did not manage to do it) .. py:class:: PhaseSpaceSource(user_info) Bases: :py:obj:`opengate.sources.generic.SourceBase` Source of particles from a (root) phase space. Read position + direction + energy + weight from the root and use them as event. if global flag is True, the position/direction are global, not in the coordinate system of the mother volume. if the global flag is False, the position/direction are relative to the mother volume - Timing is not used (yet) - NOT ready for multithread (yet) - type of particle not read in the phase space but set by user .. py:attribute:: type_name :value: 'PhaseSpaceSource' .. py:method:: set_default_user_info(user_info) :staticmethod: .. py:method:: create_g4_source() .. py:attribute:: particle_generator .. py:method:: initialize(run_timing_intervals)