Open rosannadeckert opened 4 months ago
Sure, why not.
What do we use wf_fwhm
for?
sometimes there are "noise trains" in the traces that we can tag with wf_fwhm
Hm, we'll have to see how to make this performant. Variance would be easy, but for FWHM we have to build per-waveform histograms, right?
So the max
pars are no problemo. That is just adding something. The wf_fwhm
could be a bit harder since you have to build histograms. I wouldn't recommend that since it will really take a lot of time. We could just get some signalstats
from some part of the waveform if that is fine with you? Or we really calculate the sigma of the distribution. I can think about something.
The is_valid_hit
I would add in the event building stage.
that's how the build the histogram in pygama: https://github.com/legend-exp/dspeed/blob/main/src/dspeed/processors/histogram.py. Maybe we can do something similar. I agree that is_valid_hit
can go in the evt tier.
that's how the build the histogram in pygam
We should be able to use StatsBase.Histogram
or FHist.Hist1D
without high mem-alloc cost if we preallocate the hist weights as an ArrayOfSimilarArray
for all waveforms, and then just wrap histogram objects around them.
Now we have the following parameters:
blfc
,timestamp
,eventID_fadc
,e_fc
,trig_pos
,trig_max
,trig_pos_DC
,trig_max_DC
. Can we add the following parameters:tp_max
,tp_min
,wf_max
,wf_min
(finds max and min of waveform with corresponding time points)tp_max_lar
,tp_min_lar
,wf_max_lar
,wf_min_lar
(finds max and min of waveform with corresponding time points in a LAr scintillation window around 48 us, i.e. from 47 us to 53 us)wf_fwhm
(FWHM of waveform projected on y axis)is_valid_hit
(for each trig_pos, True or False if there was a crosstalk (DC) event close)Let me know what you think.