npac_detector.detector
Classes
Encapsulates the information on a surface of a detector. |
|
Describes a detector |
Functions
|
Converts a detector in json. |
|
Converts a detector's json in the detector. |
|
Computes the uncertainty induced by the scattering angle symmetry between two surfaces |
Module Contents
- class npac_detector.detector.Surface(position_z, thickness, material_slab, active_surface=True)
Encapsulates the information on a surface of a detector.
- position_z
Surface positon in mm
- Type:
float
- thickness
Thickness of the slab
- Type:
float
- material_slab
slab of the surface
- Type:
- active_surface
True if the surface is active, False if it’s not
- Type:
bool
- position_z
- material_slab
- thickness
- active_surface = True
- class npac_detector.detector.Detector(surfaces: list[Surface])
Describes a detector
- surfaces
- visualize()
Allows to vizualize the detector sufraces with a plot
- npac_detector.detector.to_json(detector: Detector) str
Converts a detector in json.
- Parameters:
detector (Detector) – The detector you want to convert in json
- Returns:
json string of the detector
- npac_detector.detector.from_json(json_thing: str) Detector
Converts a detector’s json in the detector.
- Parameters:
json_thing (str) – detector’s json
- Returns:
The detector
- npac_detector.detector.uncertainty_hits(surface_a: Surface, surface_b: Surface, theta: float) float
Computes the uncertainty induced by the scattering angle symmetry between two surfaces
- Parameters:
surface_a – Surface from which the particle is coming
surface_b – Surface to which the particle is going
angle – Incoming angle in rad
- Returns:
Uncertainty on x and y in mm