Parallel Geometry

This adds a new package ParallelGeometry that allows for adding external detectors (from ExternalDetector package) in parallel worlds on top of mass geometry. This can be used in studies where we would like to have volumes / sensitive detectors overlapping each other.

Embedding a volume / sensitive detector in a parallel world is almost the same as for the mass geometry with the exception that materials are not required to be defined i.e. can be nullptr. If that is the case, then all the particles just “see” the boundaries coming from the parallel world.

If you actually want to set any material in your parallel world, then make sure you have LayeredMass=True in the configuration of parallel world physics. Otherwise, it won’t work. If LayeredMass=True, then all the worlds below in your stack will see the material of that world.

ParallelGeometry class description

class ParallelGeometry.Configuration.ParallelGeometry(*args, **kwargs)[source]

Bases: ConfigurableUser

This class sets up external detectors (from ExternalDetector package) in parallel worlds on top of mass geometry. This can be used in studies where we would like to have volumes / sensitive detectors overlapping each other.

Variables
  • ParallelWorlds (dict, required) – Properties of the parallel worlds (there can be more than one parallel world).

  • ParallelPhysics (dict, required) – Properties of the physics factories that add a special behaviour of the particles tracked in the parallel worlds.

Note

Note! Make sure that all your detectors have materials if you want to export a GDML ( in parallel geometry volumes do not have have materials defined) i.e. material != nullptr, as G4GDMLParser will most likely crash

Example
from Gaussino.Simulation import SimPhase
SimPhase().ParallelGeometry = True


from Configurables import ParallelGeometry
ParallelGeometry().ParallelWorlds = {
    'ParallelWorld1': {
        'ExternalDetectorEmbedder': 'ParallelEmbedder',
        'ExportGDML': {
            'GDMLFileName': 'ParallelWorld1.gdml',
            'GDMLFileNameOverwrite': True,
            'GDMLExportSD': True,
            'GDMLExportEnergyCuts': True,
        },
    },
}

ParallelGeometry().ParallelPhysics = {
    'ParallelWorld1': {
        'LayeredMass': False,
        # -> False = see material of the world below in stack
        'ParticlePIDs': [22],
        # -> empty means track all particles
    },
}

# then define ParallelEmbedder as in the ``ExternalDetector``
# section
attach(dettool)[source]

Takes care of setting up the right tools and factories responsible for the parallel geometries as defined in ParallelWorlds property.

Parameters

dettool – Detector construction tool, should be GiGaMTDetectorConstructionFAC

attach_physics(modular_list)[source]

Takes care of setting up the right tools and factories responsible for the parallel physics factories that correspond to the parallel worlds. All these properties should be provided in ParallelPhysics property.

Parameters

modular_list – Modular physics list tool, should be GiGaMTModularPhysListFAC