Skip to content

Commit ee24f4e

Browse files
authored
Merge pull request #210 from jvmead/feature/sum_hits_fprompt
Feature/sum hits fprompt
2 parents d7ba4fe + 9afcb9d commit ee24f4e

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([
@@ -354,7 +356,7 @@ def run(self, source_name, source_slice, cache):
354356

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

357-
if self.hit_level=="sum_tpc":
359+
if self.hit_level=="sum_tpc" or self.hit_level=="sum":
358360
integrals, fprompts = self.calculate_fprompt(wvfms, peaks_found,
359361
self.prompt_window,
360362
self.long_window,
@@ -436,6 +438,8 @@ def run(self, source_name, source_slice, cache):
436438
hit_data['tpc'] = peaks[1].ravel()
437439
hit_data['det'] = wvfm_det[peaks[:3]].ravel()
438440
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())]
441+
hit_data['integral'] = integrals.ravel()
442+
hit_data['fprompt'] = fprompts.ravel()
439443

440444
elif self.hit_level=="sipm":
441445
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)