Skip to content
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

Merged
merged 10 commits into from
May 25, 2023
Merged

Filter nexus delayed hits in detsim #823

merged 10 commits into from
May 25, 2023

Conversation

gondiaz
Copy link
Collaborator

@gondiaz gondiaz commented Jul 15, 2022

detsim contains a parameter max_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 the buffer_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.

@gondiaz gondiaz closed this Jan 30, 2023
@gondiaz gondiaz deleted the long branch January 30, 2023 14:39
@gondiaz gondiaz restored the long branch January 30, 2023 14:40
@gondiaz gondiaz reopened this Jan 30, 2023
@gondiaz gondiaz closed this Jan 30, 2023
@gondiaz gondiaz deleted the long branch January 30, 2023 14:41
@gondiaz gondiaz restored the long branch January 30, 2023 14:43
@gondiaz gondiaz reopened this Jan 30, 2023
Copy link
Collaborator

@MiryamMV MiryamMV left a 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!

@MiryamMV MiryamMV self-requested a review May 17, 2023 10:06
gondiaz and others added 10 commits May 22, 2023 12:28
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
@MiryamMV
Copy link
Collaborator

This addition to the code fixes the error raised occasionally in low energy events. Thanks @gonzaponte!!

@gonzaponte
Copy link
Collaborator

My addition filters out events that do not produce any photons, which generated an error.

@carhc carhc merged commit 4d138b5 into next-exp:master May 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants