reboost.math package

Submodules

reboost.math.functions module

reboost.math.functions.piecewise_linear_activeness(distances, fccd, dlf)

Piecewise linear HPGe activeness model.

Based on:

\[\begin{split}f(d) = \begin{cases} 0 & \text{if } d < f*l, \\ \frac{x-f*l}{f - f*l} & \text{if } t \leq d < f, \\ 1 & \text{otherwise.} \end{cases}\end{split}\]

Where:

  • d: Distance to surface,

  • l: Dead layer fraction, the fraction of the FCCD which is fully inactive

  • f: Full charge collection depth (FCCD).

In addition, any distance of np.nan (for example if the calculation was not performed for some steps) is assigned an activeness of one.

Parameters:
  • distances (VectorOfVectors | Array) – the distance from each step to the detector surface. Can be either a numpy or awkward array, or a LGDO VectorOfVectors or Array. The computation is performed for each element and the shape preserved in the output.

  • fccd (float) – the value of the FCCD

  • dlf (float) – the fraction of the FCCD which is fully inactive.

Returns:

a VectorOfVectors or Array of the activeness

Return type:

VectorOfVectors | Array

reboost.math.functions.vectorised_active_energy(distances, edep, fccd, dlf)

Energy after piecewise linear HPGe activeness model vectorised over FCCD or dead layer fraction.

Based on the same linear activeness function as piecewise_linear_activeness(). However, this function vectorises the calculation to provide a range of output energies varying the fccd or dead layer fraction. Either fccd or dlf can be a list. This adds an extra dimension to the output, with the same length as the input fccd or dlf list.

Parameters:
  • distances (VectorOfVectors | Array) – the distance from each step to the detector surface. Can be either a awkward array, or a LGDO VectorOfVectors . The computation is performed for each element and the first dimension is preserved, a new dimension is added vectorising over the FCCD or DLF.

  • edep (VectorOfVectors | Array) – the energy for each step.

  • fccd (float | list) – the value of the FCCD, can be a list.

  • dlf (float | list) – the fraction of the FCCD which is fully inactive, can be a list.

Returns:

a VectorOfVectors or Array of the activeness

Return type:

VectorOfVectors | Array

reboost.math.stats module

reboost.math.stats.gaussian_sample(mu, sigma, *, seed=999)

Generate samples from a gaussian.

Based on:

\[y_i \sim \mathcal{N}(\mu_i,\sigma_i)\]

where $y_i$ is the output, $x_i$ the input (mu) and $sigma$ is the standard deviation for each point.

Parameters:
Returns:

sampled values.

Return type:

Array