Skip to content

Commit 9afcb9d

Browse files
author
James Vincent Mead
committed
adding fprompt for sum_hits
1 parent afcf5e0 commit 9afcb9d

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

src/proto_nd_flow/reco/light/hit_finder.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,9 @@ def hits_dtype(self, near_samples):
115115
('ns_spline', 'f4'),
116116
('rising_spline', 'f4'),
117117
('rising_err_spline', 'f4'),
118-
('fwhm_spline', 'f4')
118+
('fwhm_spline', 'f4'),
119+
('integral', 'f4'),
120+
('fprompt', 'f4')
119121
])
120122
elif self.hit_level=="sipm":
121123
return np.dtype([
@@ -347,7 +349,7 @@ def run(self, source_name, source_slice, cache):
347349

348350
threshold_mask = peak_max >=self.threshold[peaks[1:-1]].ravel()
349351

350-
if self.hit_level=="sum_tpc":
352+
if self.hit_level=="sum_tpc" or self.hit_level=="sum":
351353
integrals, fprompts = self.calculate_fprompt(wvfms, peaks_found,
352354
self.prompt_window,
353355
self.long_window,
@@ -429,6 +431,8 @@ def run(self, source_name, source_slice, cache):
429431
hit_data['tpc'] = peaks[1].ravel()
430432
hit_data['det'] = wvfm_det[peaks[:3]].ravel()
431433
hit_data['boundary'] = [np.array(resources['Geometry'].det_bounds[(tpc,det)][0]) for tpc, det in zip(peaks[1].ravel(),wvfm_det[peaks[:3]].ravel())]
434+
hit_data['integral'] = integrals.ravel()
435+
hit_data['fprompt'] = fprompts.ravel()
432436

433437
elif self.hit_level=="sipm":
434438
hit_data['adc'] = peaks[1].ravel()

yamls/proto_nd_flow/reco/light/SumHitFinder.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ params:
1313
hits_dset_name: 'light/sum_hits' # new dataset to produce
1414

1515
#threshold: !include yamls/proto_nd_flow/reco/light/sipm_threshold.yaml
16-
# threshold:
16+
# threshold:
1717
threshold: 4
1818

1919
# configuration parameters
@@ -25,4 +25,7 @@ params:
2525
rt_sqrt_factor: 5.0
2626
pe_weight: 1.0
2727
rising_edge: False
28-
local_maxima: True
28+
local_maxima: True
29+
prompt_window: 200.0
30+
long_window: 3200.0
31+
tick_duration: 16.0

0 commit comments

Comments
 (0)