pylegendgeom.LegendBaseline.L1000Baseline package#

L1000Baseline: Baseline L1000 simulation geometry.


Package depends on pyG4ometry and its dependencies.

LegendGeom.LegendBaseline.L1000Baseline

Submodules#

pylegendgeom.LegendBaseline.L1000Baseline.L1000CompleteSetup module#

L1000 baseline complete setup file.

Build the complete setup of the baseline L1000 experiment.

class pylegendgeom.LegendBaseline.L1000Baseline.L1000CompleteSetup.L1000Baseline(hall_a=True, filled=False, det_config_file='')#

Bases: object

Define (simplified) Legend 1000 Baseline setup.

Construct L1000Baseline object and call world building.

Parameters:
  • hallA (bool, optional) – Choose LNGS lab (true) or SNOLab. The default is True.

  • filled (bool, optional) – Build fully filled infrastructure or without crystals.

  • detConfigFile (str, optional file name) – Depends on filled boolean, only filled geometry places crystals. Use ideal crystals (default) or realistic crystals from JSON files. This case requires a configuration file as input, assumed CSV for now.

Returns:

  • None.

  • After construction, drawGeometry() or writeGDML()

  • or continue with the stored pyg4ometry registry (self.reg).

_build_world(lngs, filled, det_config_file)#

Build the entire geometry using module objects, see imports.

Parameters:
  • hallA (bool, optional) – Choose LNGS lab (true) or SNOLab. The default is True.

  • filled (bool, optional) – Build fully filled infrastructure or without crystals.

  • detConfigFile (str, optional file name) – Depends on filled boolean, only filled geometry places crystals. Use ideal crystals (default) or realistic crystals from JSON files. This case requires a configuration file as input, assumed CSV for now.

Return type:

None. Stores geometry in registry.

_place_crystals(coord_map, det_config_file)#

Place the Germanium crystals in template slots.

Parameters:
  • coordMap (dict) – dictionary of detector locations; key by tuple (tower number, string number, layer number and copy number)

  • detConfigFile (str, optional file name) – Depends on filled boolean, only filled geometry places crystals. Use ideal crystals (default) or realistic crystals from JSON files. This case requires a configuration file as input, assumed CSV for now. Copy number in coordMap key not required in this case.

Return type:

None. Stores geometry in registry.

draw_geometry()#

Draw the geometry held in the World volume.

TODO: Improve/standardize colour scheme

write_gdml(filename)#

Create GDML file from stored pyg4ometry registry.

Parameters:

filename (string) – Full GDML file name for storing data, append ‘.gdml’.

Return type:

None.

pylegendgeom.LegendBaseline.L1000Baseline.LInfrastructure module#

Build infrastructure objects for Legend Geometry.

class pylegendgeom.LegendBaseline.L1000Baseline.LInfrastructure.LTank(reg, materials)#

Bases: object

Define Legend Tank volume.

Build LEGEND tankl volume.

Parameters:
  • reg (pg4.geant4.Registry, optional) – if None, (almost, see next) standalone construction

  • materials (dict) – predefined materials dictionary, required input.

Return type:

None.

build_copper_inserts(lar_lv, reg, materials)#

Build the copper inserts into the LAr volume.

Arrange for placeholder coordinates which determine locations for crystal placements later.

Parameters:
  • reg (registry) – geometry storage registry from pyg4ometry.

  • materials (dict) – dictionary of predefined materials.

Return type:

None.

build_cryostat(reg, materials)#

Build the cryostat and its liquid argon filling.

Parameters:
  • reg (registry) – geometry storage registry from pyg4ometry.

  • materials (dict) – dictionary of predefined materials.

Return type:

None.

build_tank(reg, materials)#

Build the experiment infrastructure, excluding crystals.

Parameters:
  • reg (registry) – geometry storage registry from pyg4ometry.

  • materials (dict) – dictionary of predefined materials.

Returns:

  • None; but creates tank logical volume attribute for return

  • method.

get_det_loc_map()#

Return location map of positions of detector placements.

Return type:

pg4.geant4.LogicalVolume

get_tank_lv()#

Return tank logical volume.

Return type:

pg4.geant4.LogicalVolume

pylegendgeom.LegendBaseline.L1000Baseline.LMaterials module#

Build all materials for Legend Geometry structures.

class pylegendgeom.LegendBaseline.L1000Baseline.LMaterials.LMaterials(reg=None)#

Bases: object

Define all Legend Geometry materials.

Construct materials dictionary.

Parameters:

reg (pg4.geant4.Registry, optional) – if None, standalone construction

Return type:

None.

define_materials(reg)#

Define all materials required to build the geometry in one place for look-up.

Predefined materials could be avoided here but prevents use of materials commands elsewhere.

Parameters:

reg (pg4.geant4.Registry or None (standalone construction)) –

Returns:

store – Dictionary of materials objects as values and simple strings as key. Once constructed, should be data member for geometry construction.

Return type:

dict

get_materials_dict()#

Return materials dictionary.

Returns:

Materials dictionary

Return type:

Dict