-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Filter nexus delayed hits in detsim #823
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR raises a warning instead of filtering the delayed hits after max_time
. It also computed the s1
using the active and buffer volumes. Well done @gondiaz!
S1 simulation was performed by sampling the s1-times distribution, but if the S1 total pes is large the sampling might produce a memory overflow. In this commit the simulation is changed from sampling to computing the S1 distribution in the waveform by using the distribution pdf.
This is a muon-induced xenon activation. The muon induces the recoil of 137Xe which generates a very low energy hit. The 137Xe atom decays much later producing the regular hits. The energy of the recoil hit has been artificially reduced in order to have a more stable test. The idea here is to have an event that "always" produces 0 electrons.
These events consist of a very low-energy hit (in this case produced by the recoil of 137Xe) followed by very delayed regular hits. When these hits are filtered out due to their high delay, only the low-energy hit remains, which sometimes does not produce electrons, leading to a crash.
Events that do not produce any photons are discarded
This addition to the code fixes the error raised occasionally in low energy events. Thanks @gonzaponte!! |
My addition filters out events that do not produce any photons, which generated an error. |
detsim
contains a parametermax_time
such that all hits ocurring afterwards this threshold are not included in the waveform simulation. For example, a nucleus can decay to its ground state via two gamma deexcitations, being the decay halt-life of the latter much larger than the initial.In such a case, if the second decay is within the limit set by
max_time
,detsim
will be able to process both signals and split them in two different events if the second decay occurs at time larger than thebuffer_length
of the waveform.But if the second decay time is larger than
max_time
,detsim
is not filtering these hits and an error is raised in the waveform creation.This PR solves this issue by adding a function that filters the hits at times larger than
max_time
. A warning is raised for these events for the user to be aware that the simulation might not provide the expected output.This PR also fixes the fact that S1 has to be computed using the hits at the active and buffer volumes, not only in the active as was previously done.