XENONnT / straxen

Streaming analysis for XENON
BSD 3-Clause "New" or "Revised" License
20 stars 32 forks source link

Correct elife for `cs2_wo_timecorr` #1260

Closed dachengx closed 1 year ago

dachengx commented 1 year ago

What does the code in this PR do / what does it improve?

In https://github.com/XENONnT/straxen/pull/1258, the elife correction of cs2_wo_timecorr in corrected_areas was removed. To be aligned with PeakCorrectedAreas https://github.com/XENONnT/straxen/blob/7e49677eead6e88d9dffb12e6f6d457a67daeb6b/straxen/plugins/peaks/peak_corrections.py#L10, we should correct the elife also for cs2_wo_timecorr.

Can you briefly describe how it works?

Can you give a minimal working example (or illustrate with a figure)?

From https://straxen--1260.org.readthedocs.build/en/1260/reference/datastructure_nT.html#corrected-areas: image

Comparison between old and new results of run 051806, blinded events removed:

----------
old nan cs2 23.2%
new nan cs2 23.2%
difference cs2 0.0%
mean abs difference cs2 0.0e+00
----------
old nan cs2_area_fraction_top 0.0%
new nan cs2_area_fraction_top 0.0%
difference cs2_area_fraction_top 0.0%
mean abs difference cs2_area_fraction_top 0.0e+00
----------
old nan cs2_area_fraction_top_wo_elifecorr 0.0%
new nan cs2_area_fraction_top_wo_elifecorr 0.0%
difference cs2_area_fraction_top_wo_elifecorr 0.0%
mean abs difference cs2_area_fraction_top_wo_elifecorr 0.0e+00
----------
old nan cs2_area_fraction_top_wo_picorr 0.0%
new nan cs2_area_fraction_top_wo_picorr 0.0%
difference cs2_area_fraction_top_wo_picorr 0.0%
mean abs difference cs2_area_fraction_top_wo_picorr 0.0e+00
----------
old nan cs2_area_fraction_top_wo_timecorr 0.0%
new nan cs2_area_fraction_top_wo_timecorr 0.0%
difference cs2_area_fraction_top_wo_timecorr 27.9%
mean abs difference cs2_area_fraction_top_wo_timecorr 1.6e-08
----------
old nan cs2_wo_elifecorr 0.0%
new nan cs2_wo_elifecorr 0.0%
difference cs2_wo_elifecorr 0.0%
mean abs difference cs2_wo_elifecorr 0.0e+00
----------
old nan cs2_wo_picorr 0.0%
new nan cs2_wo_picorr 0.0%
difference cs2_wo_picorr 0.0%
mean abs difference cs2_wo_picorr 0.0e+00
----------
old nan cs2_wo_timecorr 0.0%
new nan cs2_wo_timecorr 23.2%
difference cs2_wo_timecorr 100.0%
mean abs difference cs2_wo_timecorr 4.9e+03
----------
old nan endtime 0.0%
new nan endtime 0.0%
difference endtime 0.0%
mean abs difference endtime 0.0e+00
----------
old nan time 0.0%
new nan time 0.0%
difference time 0.0%
mean abs difference time 0.0e+00
----------

Please include the following if applicable: