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 and arrival times of detected photoelectrons (p.e.) from scintillator hits using an optical map.
Deprecated since version 0.8.5: Use the other, more fine-granular and split processors
number_of_detected_photoelectrons()andphotoelectron_times()to replace this legacy processor.- 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:
- 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:
- reboost.spms.pe.load_optmap(map_file, spm_det_uid)¶
Load an optical map file for later use with
detected_photoelectrons().- Parameters:
- Return type:
- 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:
- reboost.spms.pe.number_of_detected_photoelectrons(xloc, yloc, zloc, num_scint_ph, optmap, 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:
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.
num_scint_ph (Array) – array of emitted scintillation photons, as generated by
emitted_scintillation_photons().detp
optmap (OptmapForConvolve)
spm_detector (str)
map_scaling (float)
map_scaling_sigma (float)
- Return type:
- reboost.spms.pe.photoelectron_times(num_det_ph, particle, time, material)¶
Derive the arrival times of scintillation photons.
- Parameters:
num_det_ph (Array) – array of detected 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.
material (str) – scintillating material name.
- Return type: