pyPENELOPE

multilayers – Multi-layers geometry

Inheritance diagram of penelopetools.api.input.pengeom.usergeometry.multilayers

class penelopetools.api.input.pengeom.usergeometry.multilayers.HorizontalLayers(substrate)

Bases: penelopetools.api.input.pengeom.usergeometry.util._Layers

Creates a new HorizontalLayers to store the layers definition of a MultiLayers geometry. The class is a list of Layer.

The substrate layer cannot be deleted, and can only be modified by another layer with an infinite thickness. Also, the list can only contain one infinite thickness layer.

Parameters:substrate (Layer) – layer for the substrate. It must have a infinite thickness.
assert_add_layer(layer)

Asserts that no new layer should have an infinite thickness.

assert_add_position(position)

Asserts that no layer can be added after the substrate.

assert_delete(position)

Asserts that the substrate layer cannot be deleted.

assert_update(position, layer)

Asserts that the substrate layer can only be updated by a layer with an infinite thickness. Asserts also that no other layer should have an infinite thickness except the substrate layer.

classmethod from_xml(element)

Creates a HorizontalLayers from a XML element.

Parameters:element – XML element
validate()
class penelopetools.api.input.pengeom.usergeometry.multilayers.MaximumStepLengthsHook

Bases: penelopetools.api.input.penelope.hook.Hook

post_build(options)
class penelopetools.api.input.pengeom.usergeometry.multilayers.MultiLayers(substrate_material_id=0, title='Multi-Layers', filename='multilayers.geo', surfaces=None, modules=None)

Bases: penelopetools.api.input.pengeom.usergeometry._UserGeometry

Creates a new MultiLayers geometry. A multi-layers is defined by horizontal layers of different thicknesses. The surfaces and modules of the geometry are automatically generated when the build is called. The surfaces and modules arguments are therefore optional.

The value of the diameter is 3.0 cm. The depth of the multi-layers is therefore the sum of the layers’ thickness plus the depth of the substrate. By default, the depth of the substrate is 3.0 cm. By default, no rotation and no shift is imposed on the geometry.

Parameters:
  • substrate_material_id – id of the material for the substrate
  • title – title of the geometry
  • filename – filename of the GEO file
DIAMETER = (3.000000000000 +- 0.000000000000) cm
build(options)

Build the surfaces and modules of the geometry according to the information stored.

classmethod from_xml(element, multilayers=None)

Creates a MultiLayers from a XML element.

Parameters:element – XML element
get_parameters(prefix)
layers

Layers of the multi-layers. The layers can be added and removed from this attribute.

to_html(header_level=1)

Returns a HTML representation of this option.

to_xml()

Returns a XML representation of this geometry.

validate()
class penelopetools.api.input.pengeom.usergeometry.multilayers.PhotonDetectorsHook(takeoffangle, energy_low=0.0, energy_high=1000000.0)

Bases: penelopetools.api.input.pengeom.usergeometry.substrate.PhotonDetectorsHook

Creates default photon detectors for a MultiLayers geometry. Hemispherical detectors with an opening of 2 to 20 degrees are created from a specified take-off angle.

Parameters:
  • takeoffangle – take off angle (deg)
  • energy_low – lower limit of the energy window (eV)
  • energy_high – upper limit of the energy window (eV)