Skip to content

Commit

Permalink
classification update (#576)
Browse files Browse the repository at this point in the history
  • Loading branch information
feigaodm authored May 31, 2017
1 parent dee53a4 commit 2bbf2c4
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions pax/plugins/peak_processing/ClassifyPeaks.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@
class AdHocClassification1T(plugin.TransformPlugin):

def startup(self):
self.s1_rise_time_bound = interpolate.interp1d([0, 10, 25, 100],
self.s1_rise_time_bound = interpolate.interp1d([0, 5, 10, 100],
[100, 100, 70, 70],
fill_value='extrapolate', kind='linear')
self.s1_rise_time_aft = interpolate.interp1d([0, 0.3, 0.4, 0.5, 0.70, 0.70, 1.0],
[70, 70, 65, 60, 35, 0, 0], kind='linear')

def transform_event(self, event):

Expand All @@ -21,8 +23,14 @@ def transform_event(self, event):
if peak.tight_coincidence <= 2:
# Too few PMTs contributing, hard to distinguish from junk
peak.type = 'unknown'
else:
elif peak.area > 100 or peak.area < 5:
# Apply single electron s2 cut only in 5 - 100 PE range, otherwise only rely on rise time
peak.type = 's1'
elif -peak.area_decile_from_midpoint[1] < self.s1_rise_time_aft(peak.area_fraction_top):
# Rise time and AFT as multi-demensional discriminator
peak.type = 's1'
else:
peak.type = 's2'
else:
# No fast rise
if peak.n_contributing_channels > 4:
Expand Down

0 comments on commit 2bbf2c4

Please sign in to comment.