pygeoml200 package

Subpackages

Submodules

pygeoml200.calibration module

pygeoml200.calibration._get_cu_cap(b, dimens)
Parameters:
Return type:

tuple[LogicalVolume, LogicalVolume | None]

pygeoml200.calibration._get_ta_absorber(b)
Parameters:

b (InstrumentationData)

pygeoml200.calibration._parse_source_spec(source_spec)
Parameters:

source_spec (str)

Return type:

dict

pygeoml200.calibration._place_source(b, suffix, xy, delta_z, source_type, cu_absorber, bare=False)

Place a single source container.

delta_z

to source container holder top from top plate top

source_type

controls the interior design of the source container

cu_absorber

include a copper absorber cap of the given dimensions. The dimensions have to be the same for all sources in this geometry.

bare

Do not encapsulate the source. only use if you know what you do; this does not correspond to any physical source geometry used in LEGEND.

Parameters:
Return type:

None

pygeoml200.calibration._place_ta_absorber(b, sis_number, xy, delta_z)

Place tantalum absorber plus source container.

delta_z

to absorber top from top plate top

Parameters:
Return type:

None

pygeoml200.calibration._sis_to_pygeoml200(sis_coord)
Parameters:

sis_coord (float)

Return type:

float

pygeoml200.calibration.place_calibration_system(b)

Construct LEGEND-200 calibration system.

Parameters:

b (InstrumentationData)

Return type:

None

pygeoml200.cli module

pygeoml200.cli._config_or_cli_arg(args, config, name, default)

Fallback of cli args, to config file, and to default value (in this order).

Parameters:
Return type:

None

pygeoml200.cli._parse_assemblies(arg)

Parse an argument string into a set of assemblies to build the geometry for.

Parameters:

arg (str | Collection[str] | None) – if it is a string, it will be split on commas. Parts can be prefixed by “set operators” ‘+’ or ‘-‘, to add or remove items from the list of default assemblies. But either all parts have to be prefixed with such an operator, or none.

Return type:

set[str]

pygeoml200.cli._parse_cli_args(argv=None)
Parameters:

argv (list[str] | None)

Return type:

tuple[Namespace, dict]

pygeoml200.cli.dump_gdml_cli(argv=None)
Parameters:

argv (list[str] | None)

Return type:

None

pygeoml200.core module

class pygeoml200.core.InstrumentationData(mother_lv, mother_pv, materials, registry, channelmap, special_metadata, runtime_config, top_plate_z_pos)

Bases: NamedTuple

Create new instance of InstrumentationData(mother_lv, mother_pv, materials, registry, channelmap, special_metadata, runtime_config, top_plate_z_pos)

Parameters:
channelmap: AttrsDict

LEGEND-200 channel map containing germanium/spms detectors configuration in the string and their geometry.

materials: OpticalMaterialRegistry

Material properties for common materials

mother_lv: LogicalVolume

Argon LogicalVolume instance in which all components are to be placed.

mother_pv: PhysicalVolume

Argon PhysicalVolume instance in which all components are to be placed.

registry: Registry

pyg4ometry registry instance.

runtime_config: AttrsDict

Volatile runtime config, settings that are not tied to a specific detector configuration.

special_metadata: AttrsDict

LEGEND-200 special geometry metadata file. Used to reconstruct the spatial position of each string, detector and calibration tube.

top_plate_z_pos: float

The z coordinate of the top face of the array top plate.

pygeoml200.core._assign_common_copper_surface(b)
Parameters:

b (InstrumentationData)

Return type:

None

pygeoml200.core.construct(assemblies={'calibration', 'fibers', 'strings', 'top', 'wlsr'}, pmt_configuration_mv='LEGEND200', use_detailed_fiber_model=False, config=None, public_geometry=False)

Construct the LEGEND-200 geometry and return the pyg4ometry Registry containing the world volume.

Parameters:
Return type:

Registry

pygeoml200.cryo module

Construct the LEGEND-200/GERDA cryostat including the liquid argon volume.

Dimensions from [Knoepfle2022] and P. Krause.

[Knoepfle2022]

T. Knöpfle and B. Schwingenheuer “Design and Performance of the GERDA Low-Background Cryostat for Operation in Water” In: Journal of Instrumentation 17 P02038 (2022). https://doi.org/10.1088/1748-0221/17/02/P02038

pygeoml200.cryo.construct_argon(lar_material, reg)

Construct an approximate LEGEND-200 argon volume.

Returns:

  • logical volume instance and height of the cryostat neck relative to the origin of the argon volume.

  • .. note:: – the constructed volume’s center (i.e. for children placed at 0,0,0) is not the barycenter of the volume, but the center of the central tubular section of the cryostat.

Parameters:
Return type:

tuple[LogicalVolume, float]

pygeoml200.cryo.construct_cryostat(cryostat_material, reg)
Parameters:
Return type:

LogicalVolume

pygeoml200.cryo.place_argon(lar_lv, cryostat_lv, cryostat_displacement_z, reg)
Parameters:
Return type:

PhysicalVolume

pygeoml200.cryo.place_cryostat(cryostat_lv, wl, cryostat_displacement_z, reg)
Parameters:
Return type:

PhysicalVolume

pygeoml200.fibers module

class pygeoml200.fibers.FiberModuleData(barrel: 'str', name: 'str', tpb_thickness: 'float', channel_top_name: 'str' = None, channel_bottom_name: 'str' = None, channel_top_rawid: 'int' = None, channel_bottom_rawid: 'int' = None)

Bases: object

Parameters:
  • barrel (str)

  • name (str)

  • tpb_thickness (float)

  • channel_top_name (str)

  • channel_bottom_name (str)

  • channel_top_rawid (int)

  • channel_bottom_rawid (int)

barrel: str
channel_bottom_name: str = None
channel_bottom_rawid: int = None
channel_top_name: str = None
channel_top_rawid: int = None
name: str
tpb_thickness: float
class pygeoml200.fibers.ModuleFactoryBase(radius_mm, fiber_length_mm, fiber_count_per_module, bend_radius_mm, number_of_modules, zero_angle_module, z_displacement_mm, barrel, b)

Bases: ABC

Create a fiber module factory.

Parameters:
  • radius_mm (float) – radius of the fiber barrel

  • fiber_length_mm (float) – length of the straight section of this fiber module

  • fiber_count_per_module (int) – number of single fibers per module

  • bend_radius_mm (float | None) – radius of the bottom bend, or None if the fibers are not bent at the bottom end.

  • number_of_modules (int) – number of modules that cover the full circle

  • zero_angle_module (int) – module number of the module with a zero angle in polar coordinates (at the center of the module).

  • z_displacement_mm (float) – displacement of the top of the fiber barrel, relative to the global zero point.

  • barrel (str) – barrel name

  • b (core.InstrumentationData)

ANGLE_SAFETY = 1e-09
FIBER_DIM = 1
FIBER_THICKNESS_CL1 = 0.04
FIBER_THICKNESS_CL2 = 0.02
SIPM_GAP = 0.05
SIPM_GAP_SIDE = 0.01
SIPM_HEIGHT = 1
SIPM_OUTER_EXTRA = 0.2
SIPM_OVERLAP = 0.3
_abc_impl = <_abc._abc_data object>
_add_tpb_surfaces(fiber_pvs)
Parameters:

fiber_pvs (list[PhysicalVolume])

_cached_sipm_volumes()

Creates (dummy) SiPM volumes for use at the top/bottom of straight fiber sections.

Return type:

None

_create_sipm(module_num, fibers, is_top, sipm_name, sipm_detector_id, z_displacement_straight)

Creates a (dummy) SiPM physical volume for use at the top/bottom of straight fiber sections.

Parameters:
Return type:

None

abstract create_module(mod)
Parameters:

mod (FiberModuleData)

Return type:

None

start_angle(module_num)
Parameters:

module_num (int)

Return type:

float

class pygeoml200.fibers.ModuleFactorySegment(radius_mm, fiber_length_mm, fiber_count_per_module, bend_radius_mm, number_of_modules, zero_angle_module, z_displacement_mm, barrel, b)

Bases: ModuleFactoryBase

Create a fiber module factory.

Parameters:
  • radius_mm (float) – radius of the fiber barrel

  • fiber_length_mm (float) – length of the straight section of this fiber module

  • fiber_count_per_module (int) – number of single fibers per module

  • bend_radius_mm (float | None) – radius of the bottom bend, or None if the fibers are not bent at the bottom end.

  • number_of_modules (int) – number of modules that cover the full circle

  • zero_angle_module (int) – module number of the module with a zero angle in polar coordinates (at the center of the module).

  • z_displacement_mm (float) – displacement of the top of the fiber barrel, relative to the global zero point.

  • barrel (str) – barrel name

  • b (core.InstrumentationData)

_abc_impl = <_abc._abc_data object>
_cached_fiber_volumes()

Create solids, logical and physical volumes for the fibers, as specified by the parameters of this instance.

Return type:

None

_cached_sipm_volumes_bend()

Creates (dummy) SiPM volumes for use at the bottom of bent fiber sections.

Return type:

None

_cached_tpb_coating_volume(name, mod_name, tpb_thickness_nm, bend=False)

Create and cache a TPB coating layer of the specified thickness.

The TPB-Layer is dependent on the module (i.e. the applied thickness varies slightly), so we cannot cache it globally on this instance.

Parameters:
Return type:

LogicalVolume

_get_bend_polycone(inner_r, outer_r)

In the segmented model, there is no fundamental shape for the fiber bent available, so we use a polycone as a replacement.

Parameters:
Return type:

tuple[_Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes], _Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes]]

create_module(mod)
Parameters:

mod (FiberModuleData)

Return type:

None

class pygeoml200.fibers.ModuleFactorySingleFibers(radius_mm, fiber_length_mm, fiber_count_per_module, bend_radius_mm, number_of_modules, zero_angle_module, z_displacement_mm, barrel, b)

Bases: ModuleFactoryBase

Create a fiber module factory.

Parameters:
  • radius_mm (float) – radius of the fiber barrel

  • fiber_length_mm (float) – length of the straight section of this fiber module

  • fiber_count_per_module (int) – number of single fibers per module

  • bend_radius_mm (float | None) – radius of the bottom bend, or None if the fibers are not bent at the bottom end.

  • number_of_modules (int) – number of modules that cover the full circle

  • zero_angle_module (int) – module number of the module with a zero angle in polar coordinates (at the center of the module).

  • z_displacement_mm (float) – displacement of the top of the fiber barrel, relative to the global zero point.

  • barrel (str) – barrel name

  • b (core.InstrumentationData)

ALLOWED_DELTA_LENGTHS = array([-7.6, -5.7, -3.8, -1.9,  0. ,  1.9,  3.8,  5.7,  7.6])
_abc_impl = <_abc._abc_data object>
_cached_fiber_volumes()

Create solids, logical and physical volumes for the fibers, as specified by the parameters of this instance.

Return type:

None

_cached_sipm_volumes_bend()

Creates (dummy) SiPM volumes for use at the bottom of bent fiber sections.

Return type:

None

_cached_tpb_coating_volume(name, mod_name, tpb_thickness_nm, bend=False, delta_length=0)

Create and cache a TPB coating layer of the specified thickness.

The TPB-Layer is dependent on the module (i.e. the applied thickness varies slightly), so we cannot cache it globally on this instance.

Parameters:
Return type:

LogicalVolume

create_module(mod)
Parameters:

mod (FiberModuleData)

Return type:

None

pygeoml200.fibers._module_name_to_num(mod_name)
Parameters:

mod_name (str)

Return type:

int

pygeoml200.fibers.create_fiber_support_inner(b, z_pos)
Parameters:
Return type:

LogicalVolume

pygeoml200.fibers.create_fiber_support_outer(b, z_pos)
Parameters:
Return type:

LogicalVolume

pygeoml200.fibers.place_fiber_modules(fiber_metadata, b, use_detailed_fiber_model=False)

Construct LEGEND-200 liquid argon instrumentation.

Parameters:
  • use_detailed_fiber_model (bool) – Switch between an implementation of single fibers (“detailed”) or slabs of fiber material (“segmented”).

  • fiber_metadata (TextDB)

  • b (InstrumentationData)

Return type:

None

pygeoml200.hpge_strings module

class pygeoml200.hpge_strings.HPGeDetUnit(name: 'str', manufacturer: 'str', rawid: 'int', lv: 'geant4.LogicalVolume', height: 'float', radius: 'float', baseplate: 'str', rodlength: 'float', rodlength_cold: 'float', has_top_insulators: 'bool', meta: 'AttrsDict')

Bases: object

Parameters:
baseplate: str
has_top_insulators: bool
height: float
lv: LogicalVolume
manufacturer: str
meta: AttrsDict
name: str
radius: float
rawid: int
rodlength: float
rodlength_cold: float
pygeoml200.hpge_strings._add_nms_surfaces(nms_pv, mother_pv, mats, reg)
Parameters:
pygeoml200.hpge_strings._add_pen_surfaces(pen_pv, mother_pv, mats, reg)
Parameters:
pygeoml200.hpge_strings._get_cu_pin(length, b)
Parameters:
pygeoml200.hpge_strings._get_hv_cable(cable_thickness, cable_length, b)
Parameters:
pygeoml200.hpge_strings._get_hv_clamp(clamp_thickness, b)
Parameters:
pygeoml200.hpge_strings._get_insulator(insulator_du_holder_flap_thickness, insulator_top_length, b)
Parameters:
pygeoml200.hpge_strings._get_nylon_mini_shroud(radius, length, top_open, materials, registry, min_radius=0, minishroud_name='minishroud')

Create a nylon/TPB funnel of the given outer dimensions, which will be closed at the bottom.

Note

this can also be used for calibration tubes.

Parameters:
Return type:

LogicalVolume

pygeoml200.hpge_strings._get_pen_plate(size, b)
Parameters:
Return type:

LogicalVolume

pygeoml200.hpge_strings._get_phbr_spring(b)
Parameters:

b (InstrumentationData)

pygeoml200.hpge_strings._get_phbr_washer(thickness, b)
Parameters:
pygeoml200.hpge_strings._get_signal_cable(cable_thickness, cable_length, b)
Parameters:
pygeoml200.hpge_strings._get_signal_clamp_and_lmfe(clamp_thickness, b)
Parameters:
pygeoml200.hpge_strings._get_support_structure(size, b)

Get the (simplified) support structure and the tristar of the requested size.

Note

Both models’ coordinate origins are a the top face of the tristar structure.

Parameters:
Return type:

tuple[LogicalVolume, LogicalVolume]

pygeoml200.hpge_strings._get_weldment(weldment_flap_thickness, b)
Parameters:
pygeoml200.hpge_strings._hpge_unit_get_z(bottom, det_unit)
Parameters:
Return type:

tuple[dict, dict]

pygeoml200.hpge_strings._place_empty_string(string_id, b)

Place an empty string (i.e. with no HPGe detectors), optionally with a counterweight.

Parameters:
pygeoml200.hpge_strings._place_front_end_and_insulators(det_unit, string_info, b, z_pos, thickness, parts_origin)
Parameters:
pygeoml200.hpge_strings._place_hpge_string(string_id, string_slots, b)

Place a single HPGe detector string (with at least one detector).

This includes all PEN plates and the nylon shroud around the string.

Parameters:
pygeoml200.hpge_strings._place_hpge_unit(z_unit_bottom, det_unit, string_info, b)
Parameters:
pygeoml200.hpge_strings.place_hpge_strings(hpge_metadata, b)

Construct LEGEND-200 HPGe strings.

Parameters:
Return type:

None

pygeoml200.metadata module

class pygeoml200.metadata.PublicMetadataProxy

Bases: object

Provides proxies to transparently replace legend hardware metadata with sample data.

update_special_metadata(special_metadata)
Parameters:

special_metadata (AttrsDict)

Return type:

AttrsDict

class pygeoml200.metadata._DiodeProxy(dummy_detectors)

Bases: object

Parameters:

dummy_detectors (TextDB)

class pygeoml200.metadata._FiberProxy

Bases: object

pygeoml200.top module

pygeoml200.top.place_top_plate(b)

Construct LEGEND-200 copper top plate.

Parameters:

b (InstrumentationData)

Return type:

None

pygeoml200.utils module

pygeoml200.utils._read_model(file, name, material, b)

Construct a logical volume for an STL mesh.

Note

This function honours the no_meshes runtime configuration, which can either be True to disable all meshes, or be a list of logical volume names to disable mesh loading.

Return type:

A geant4.LogicalVolume for the mesh or None, if loading of this mesh is disabled.

Parameters:

pygeoml200.watertank module

Construct the LEGEND-200/GERDA watertank including the water volume and the reflective foil VM2000.

pygeoml200.watertank.construct_air_buffer(reg, air_material)
Parameters:
Return type:

LogicalVolume

pygeoml200.watertank.construct_pillbox(reg, pillbox_material)
Parameters:
Return type:

LogicalVolume

pygeoml200.watertank.construct_tank(reg, tank_material)
Parameters:
Return type:

LogicalVolume

pygeoml200.watertank.construct_water(reg, water_material)
Parameters:
Return type:

LogicalVolume

pygeoml200.watertank.insert_muon_veto(reg, world_lv, tank_z_displacement, cryo_z_displacement, mats, pmt_configuration_mv='LEGEND200')
Parameters:
pygeoml200.watertank.insert_pmts(reg, pmt_steel_material, cathode_al, pmt_air_material, surfaces, water_lv, water_pv, acryl_material, borosilicate_material, pmt_configuration='LEGEND200')
Parameters:
pygeoml200.watertank.insert_vm2000(reg, vm2000_material, surfaces, water_lv, water_pv, manhole_pillbox, manhole_rotation, man_hole_offset, cryo_displacement_z)
Parameters:
Return type:

tuple[PhysicalVolume, …]

pygeoml200.watertank.place_air_buffer(reg, air_buffer_lv, water_lv)
Parameters:
Return type:

PhysicalVolume

pygeoml200.watertank.place_pillbox(reg, pillbox_lv, water_lv)
Parameters:
Return type:

PhysicalVolume

pygeoml200.watertank.place_tank(reg, water_tank_lv, world_lv, tank_offset)
Parameters:
Return type:

PhysicalVolume

pygeoml200.watertank.place_water(reg, water_lv, tank_lv)
Parameters:
Return type:

PhysicalVolume

pygeoml200.wlsr module

Construct the LEGEND-200 Wavelength-Shifting Reflector (WLSR).

Dimensions mainly from [Krause2023] (general construction) and [Araujo2022] (TPB layer thickness).

[Krause2023]

P. Krause “Shining Light on Backgrounds: An Advanced Liquid Argon Scintillation Light Detector for Boosting Background Suppression in LEGEND’s Neutrinoless Double Beta Decay Search”. PhD thesis (2023).

[Araujo2022]

G. R. Araujo et al. “R&D of wavelength-shifting reflectors and characterization of the quantum efficiency of tetraphenyl butadiene and polyethylene naphthalate in liquid argon.” In: The European Physical Journal C 82.5 (May 2022). https://doi.org/10.1140/epjc/s10052-022-10383-0

pygeoml200.wlsr._add_surfaces_wlsr(wlsr_ttx_pv, wlsr_tpb_pv, b)
Parameters:
Return type:

None

pygeoml200.wlsr._construct_wlsr(mats, reg)
Parameters:
Return type:

tuple[LogicalVolume, …]

pygeoml200.wlsr.place_wlsr(b, z_displacement, reg)
Parameters:
Return type:

tuple[PhysicalVolume, …]