pyg4ometry API extensions

Detector registration

class pyg4ometry.geant4.PhysicalVolume
set_pygeom_active_detector(det_info)
Parameters:

det_info (RemageDetectorInfo | None)

Set the remage detector info on this physical volume instance.

get_pygeom_active_detector()
Return type:

RemageDetectorInfo | None

Get the remage detector info on this physical volume instance.

Important

this only returns instances previously set via set_pygeom_active_detector() or pygeom_active_detector, not data loaded from GDML.

pygeom_active_detector
Type:

RemageDetectorInfo | None

Deprecated:

use set_pygeom_active_detector()/get_pygeom_active_detector() instead

get or set the active detector instance.

Visualization

class pyg4ometry.geant4.LogicalVolume
pygeom_color_rgba
Type:

False | tuple[float, float, float, float]

Value:

(initially not set)

False (hidden) or a RGBA color tuple (range 0-1)

Warning

will raise an AttributeError if trying to access without setting first.