reboost.spms package

Submodules

reboost.spms.pe module

reboost.spms.pe._nested_unflatten(data, lengths)
Parameters:
  • data (Array)

  • lengths (Array)

reboost.spms.pe.corrected_photoelectrons(simulated_pe, simulated_uids, data_pe, data_uids, *, seed=None)

Add a correction to the observed number of photoelectrons (p.e.) using forced trigger data.

For every simulated event a corresponding forced trigger event in data is chosen and the resulting number of p.e. for each channel (i) is:

\[n_i = n_{\text{sim},i} + n_{\text{data},i}\]

Warning

The number of supplied forced trigger events in data should ideally be more than that in the simulations. If this is not the case and “allow_data_reuse” is True then some data events will be used multiple times. This introduces a small amount of correlation between the simulated events, but is probably acceptable in most circumstances.

Parameters:
  • simulated_pe (Array) – The number of number of detected pe per sipm channel.

  • simulated_uids (Array) – The unique identifier (uid) for each sipm hit.

  • data_pe (Array) – The collection of forced trigger pe.

  • data_uids (Array) – The uids for each forced trigger event.

  • seed (int | None) – Seed for random number generator

Returns:

a tuple of the corrected pe and sipm uids.

Return type:

tuple[Array, Array]

reboost.spms.pe.detected_photoelectrons(num_scint_ph, particle, time, xloc, yloc, zloc, optmap, material, spm_detector, map_scaling=1, map_scaling_sigma=0)

Derive the number of detected photoelectrons (p.e.) from scintillator hits using an optical map.

Parameters:
  • num_scint_ph (Array) – array of emitted scintillation photons, as generated by emitted_scintillation_photons().

  • particle (Array) – array of particle PDG IDs of scintillation events.

  • time (Array) – array of timestamps of scintillation events.

  • xloc (Array) – array of x coordinate position of scintillation events.

  • yloc (Array) – array of y coordinate position of scintillation events.

  • zloc (Array) – array of z coordinate position of scintillation events.

  • optmap (OptmapForConvolve) – the optical map loaded via py:func:load_optmap.

  • material (str) – scintillating material name.

  • spm_detector (str) – SiPM detector name as used in the optical map.

  • map_scaling (float) – scale the detection probability in the map for this detector by this factor.

  • map_scaling_sigma (float) – if larger than zero, sample the used scaling factor for each (reshaped) event from a normal distribution with this standard deviation.

Return type:

VectorOfVectors

reboost.spms.pe.emitted_scintillation_photons(edep, particle, material)

Derive the number of emitted scintillation photons from scintillator hits.

Parameters:
  • edep (Array) – array of deposited energy in scintillation events.

  • particle (Array) – array of particle PDG IDs of scintillation events.

  • material (str) – scintillating material name.

Return type:

VectorOfVectors

reboost.spms.pe.load_optmap(map_file, spm_det_uid)

Load an optical map file for later use with detected_photoelectrons().

Parameters:
  • map_file (str)

  • spm_det_uid (int)

Return type:

OptmapForConvolve

reboost.spms.pe.load_optmap_all(map_file)

Load an optical map file for later use with detected_photoelectrons().

Parameters:

map_file (str)

Return type:

OptmapForConvolve