Addition of a line algorithm for PLUME activity
Related
Key component of #437 (closed)
Description
This MR creates a new line algorithm for selecting events based on PLUME activity. The new algorithm is named plume_activity_line_t
.
The implementation counts the number of PLUME ADC counts in an event that are at least as large as a configurable threshold. If the number of PLUME ADCs over that threshold is great or equal to a configurable minimum, then the event is accepted.
A new maker for lines of this type is added to hlt1_monitoring_lines.py
.
An instance of the new line type is added to the set of lines returned by HLT1.default_bgi_activity_lines()
.
plume_activity_line_t
Implementation of This implementation of plume_activity_line_t
is an EventLine
.
Inputs
In addition to the standard input required for an EventLine
, plume_activity_line_t
requires the following device input:
-
dev_plume_t
: the decoded PLUME data
Properties
In addition to the standard properties provided by an EventLine
, plume_activity_line_t
has the following configurable properties:
-
plume_channel_mask
: typeuint64_t
: a bitset that defines which of the 64 PLUME FEB channels will be used/allowed in the trigger decision. Defaults to0x003FFFFF003FFFFF
(channels [0, 21] and [32, 53]). -
min_plume_adc
: typeunsigned
: the threshold for ADC counts. In order to contribute to a positive trigger decision, a PLUME channel must have an ADC count>= min_plume_adc
. -
min_number_plume_adcs_over_min
: typeunsigned
: the threshold for the number of used/allowed channels with ADC counts over threshold. An event is accepted if the number of channels that are allowed byplume_channel_mask
and that have ADC counts>= min_plume_adc
is>= min_number_plume_adcs_over_min
How it works
plume_activity_line_t
implements the following required class methods:
plume_activity_line_t::get_input()
plume_activity_line_t::select()
plume_activity_line_t::get_input()
analyzes the PLUME ADC counts and returns a 64-bit bitset that indicates which of the channels have ADC counts >= min_plume_adc
.
plume_activity_line_t::select()
performs a bitwise &
of the plume_channel_mask
and the over-threshold-bitset returned by plume_activity_line_t::get_input()
to get a bitset of used/allowed channels that are over threshold. It counts the number of set bits with a while
loop that should emulate a popcount. The decision returned by select()
is true
iff this number is >= min_number_plume_adcs_over_min
.