opengate.physics ================ .. py:module:: opengate.physics Attributes ---------- .. autoapisummary:: opengate.physics.cut_particle_names Classes ------- .. autoapisummary:: opengate.physics.UserLimitsPhysics opengate.physics.Region opengate.physics.OpticalSurface Functions --------- .. autoapisummary:: opengate.physics.translate_particle_name_gate_to_geant4 opengate.physics.get_enum_values opengate.physics.load_optical_surface_properties_from_xml opengate.physics.load_optical_properties_from_xml opengate.physics.create_g4_optical_properties_table Module Contents --------------- .. py:data:: cut_particle_names .. py:function:: translate_particle_name_gate_to_geant4(name) Convenience function to translate from names used in Gate to those in G4, if necessary. Concerns e.g. 'electron' -> 'e-' .. py:class:: UserLimitsPhysics Bases: :py:obj:`opengate_core.G4VPhysicsConstructor` Class to be registered to physics list. It is essentially a refined version of StepLimiterPhysics which considers the user's particles choice of particles to which the step limiter should be added. .. py:attribute:: physics_engine :value: None .. py:attribute:: g4_step_limiter_storage .. py:attribute:: g4_special_user_cuts_storage .. py:method:: close() .. py:method:: ConstructParticle() Needs to be defined because C++ base class declares this as purely virtual member. .. py:method:: ConstructProcess() Overrides method from G4VPhysicsConstructor that is called when the physics list is constructed. .. py:class:: Region(*args, **kwargs) Bases: :py:obj:`opengate.base.GateObject` FIXME: Documentation of the Region class. .. py:attribute:: user_info_defaults .. py:attribute:: physics_engine :value: None .. py:attribute:: root_logical_volumes .. py:attribute:: g4_region :value: None .. py:attribute:: g4_user_limits :value: None .. py:attribute:: g4_production_cuts :value: None .. py:attribute:: _g4_region_initialized :value: False .. py:attribute:: _g4_user_limits_initialized :value: False .. py:attribute:: _g4_production_cuts_initialized :value: False .. py:property:: physics_manager .. py:method:: reset() .. py:method:: close() Dummy implementation for inherited classes which do not implement this method. .. py:method:: release_g4_references() Dummy implementation for inherited classes which do not implement this method. .. py:method:: to_dictionary() .. py:method:: from_dictionary(d) .. py:method:: need_step_limiter() .. py:method:: need_user_special_cut() .. py:method:: associate_volume(volume) .. py:method:: dump_production_cuts() .. py:method:: initialize() This method wraps around all initialization methods of this class. It should be called from the physics_engine, after setting the self.physics_engine attribute. .. py:method:: initialize_volume_dictionaries() .. py:method:: initialize_g4_region() .. py:method:: initialize_g4_production_cuts() .. py:method:: initialize_g4_user_limits() .. py:method:: initialize_em_switches() .. py:function:: get_enum_values(enum_class) .. py:function:: load_optical_surface_properties_from_xml(surface_properties_file, surface_name) This function extracts the information related to multiple surfaces from SurfaceProperties.xml .. py:function:: load_optical_properties_from_xml(optical_properties_file, material_name) This function parses an xml file containing optical material properties. Fetches property elements and property vector elements. Returns a dictionary with the properties or None if the material is not found in the file. .. py:function:: create_g4_optical_properties_table(material_properties_dictionary) Creates and fills a G4MaterialPropertiesTable with values from a dictionary created by a parsing function, e.g. from an xml file. Returns G4MaterialPropertiesTable. .. py:class:: OpticalSurface(*args, **kwargs) Bases: :py:obj:`opengate.base.GateObject` Class used to create an Optical Surface between two volumes G4OpticalSurface is used to create an optical surface G4LogicalBorderSurface is used to assign the optical surface between two volumes. .. py:attribute:: user_info_defaults .. py:attribute:: physics_engine :value: None .. py:attribute:: optical_surface_properties_dict :value: None .. py:attribute:: g4_optical_surface :value: None .. py:attribute:: g4_logical_border_surface :value: None .. py:attribute:: g4_optical_surface_table :value: None .. py:property:: physics_manager .. py:method:: release_g4_references() Dummy implementation for inherited classes which do not implement this method. .. py:method:: close() Dummy implementation for inherited classes which do not implement this method. .. py:method:: reset() .. py:method:: __getstate__() Method needed for pickling. May be overridden in inheriting classes. .. py:method:: initialize()