Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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