#include <ProtoDUNEBSMWindow.hpp>
Definition at line 20 of file ProtoDUNEBSMWindow.hpp.
◆ add()
Definition at line 13 of file ProtoDUNEBSMWindow.cpp.
13 {
14
15
16
19 tot_sum += input_tp.samples_over_threshold;
21};
std::vector< TriggerPrimitive > tp_list
◆ bin_window()
| void triggeralgs::ProtoDUNEBSMWindow::bin_window |
( |
std::vector< float > & | input, |
|
|
timestamp_t | time_bin_width, |
|
|
channel_t | chan_bin_width, |
|
|
int | num_time_bins, |
|
|
int | num_chan_bins, |
|
|
channel_t | first_channel, |
|
|
std::unique_ptr< PDVDEffectiveChannelMap > const & | effective_channel_mapper, |
|
|
bool | use_pdvd_map ) |
Definition at line 65 of file ProtoDUNEBSMWindow.cpp.
70 {
71 std::fill(input.begin(), input.end(), 0.0f);
72
73 const float inv_time_bin_width = 1.0f / time_bin_width;
74 const float inv_chan_bin_width = 1.0f / chan_bin_width;
75
78
79 if (effective_channel_mapper && use_pdvd_map) {
80 temp_tp_channel = effective_channel_mapper->remapCollectionPlaneChannel(temp_tp_channel);
81 }
82 size_t time_bin =
static_cast<size_t>((tp.time_start -
time_start) * inv_time_bin_width);
83 size_t channel_bin = static_cast<size_t>((temp_tp_channel - first_channel) * inv_chan_bin_width);
84 if (time_bin < num_time_bins && channel_bin < num_chan_bins) {
85 size_t index = channel_bin * num_time_bins + time_bin;
86 input[
index] += tp.adc_integral;
87 }
88 }
90};
dunedaq::trgdataformats::TriggerPrimitive TriggerPrimitive
dunedaq::trgdataformats::channel_t channel_t
◆ clear()
| void triggeralgs::ProtoDUNEBSMWindow::clear |
( |
| ) |
|
◆ fill_entry_window()
| void triggeralgs::ProtoDUNEBSMWindow::fill_entry_window |
( |
std::vector< Entry > & | entry_input, |
|
|
std::vector< float > & | input ) |
Definition at line 92 of file ProtoDUNEBSMWindow.cpp.
92 {
93 for (size_t i = 0; i < input.size(); i++) {
94 entry_input[i].fvalue = input[i];
95 }
96}
◆ is_empty()
| bool triggeralgs::ProtoDUNEBSMWindow::is_empty |
( |
| ) |
const |
◆ mean_adc_peak()
| float triggeralgs::ProtoDUNEBSMWindow::mean_adc_peak |
( |
| ) |
|
◆ mean_sadc()
| float triggeralgs::ProtoDUNEBSMWindow::mean_sadc |
( |
| ) |
|
◆ mean_tot()
| float triggeralgs::ProtoDUNEBSMWindow::mean_tot |
( |
| ) |
|
◆ move()
Definition at line 27 of file ProtoDUNEBSMWindow.cpp.
27 {
28
29
30
31
32 uint32_t n_tps_to_erase = 0;
34 if(!(input_tp.time_start-tp.time_start < window_length)){
35 n_tps_to_erase++;
38 tot_sum -= tp.samples_over_threshold;
39 }
40 else break;
41 }
42
44
45
49 }
51};
void add(TriggerPrimitive const &input_tp)
void reset(TriggerPrimitive const &input_tp)
◆ reset()
| void triggeralgs::ProtoDUNEBSMWindow::reset |
( |
TriggerPrimitive const & | input_tp | ) |
|
◆ operator<<
Definition at line 108 of file ProtoDUNEBSMWindow.cpp.
108 {
109 if(window.is_empty()) os << "Window is empty!\n";
110 else{
111 os << "Window start: " << window.time_start << ", end: " << window.tp_list.back().time_start;
112 os << ". Total of: " << window.adc_integral << " ADC counts with " << window.tp_list.size() << " TPs.\n";
113 }
114 return os;
115};
◆ adc_integral
| uint32_t triggeralgs::ProtoDUNEBSMWindow::adc_integral |
◆ adc_peak_sum
| uint64_t triggeralgs::ProtoDUNEBSMWindow::adc_peak_sum |
◆ time_start
| timestamp_t triggeralgs::ProtoDUNEBSMWindow::time_start |
◆ tot_sum
| uint64_t triggeralgs::ProtoDUNEBSMWindow::tot_sum |
◆ tp_list
The documentation for this class was generated from the following files: