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

Fix peaks merging #506

Merged
merged 2 commits into from Aug 4, 2021
Merged

Fix peaks merging #506

merged 2 commits into from Aug 4, 2021

Conversation

WenzDaniel
Copy link
Collaborator

@WenzDaniel WenzDaniel commented Aug 3, 2021

What is the problem / what does the code in this PR do
When comparing the reconstructed S2 area with raw data covered by S2s we have a bias of few percent. The bias comes from the fact that we are not considering lone hits in between peaklets during the merging step. This affects especially few electron S2s.

Can you briefly describe how it works?
In this PR we are adding a tiny function which adds the are of lone hits to merged S2s if they are fully contained in a S2. Further, we updated the peak-data fields with a delta pulse as approximated representative for the corresponding lone_hits.
This approximation allows us to get a better estimate on the peak width and rise time. This overcomes the issue of loading records again which would make playing around with peak building more cumbersome.

See also: XENONnT/straxen#623

Copy link
Contributor

@jmosbacher jmosbacher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks fine to me.

@WenzDaniel WenzDaniel merged commit ff729f3 into master Aug 4, 2021
@WenzDaniel WenzDaniel deleted the fix_peaks_merging branch August 4, 2021 11:43
@JoranAngevaare
Copy link
Member

Would it have been worth writing a small test for this PR?

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.

None yet

3 participants