DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
AVXFrugalPedestalSubtractProcessor.hpp
Go to the documentation of this file.
1
10
11#ifndef TPGLIBS_AVXFRUGALPEDESTALSUBTRACTPROCESSOR_HPP_
12#define TPGLIBS_AVXFRUGALPEDESTALSUBTRACTPROCESSOR_HPP_
13
14namespace tpglibs {
15
23 protected:
25 __m256i m_pedestal = _mm256_set1_epi16(0x4000); // Set initial start to 14-bit max. Prevents garbage TPs at start.
26
28 __m256i m_accum = _mm256_setzero_si256();
29
31 int16_t m_accum_limit{10};
32
33 public:
39 __m256i process(const __m256i& signal) override;
40
46 void configure(const nlohmann::json& config, const int16_t* plane_numbers) override;
47};
48
49} // namespace tpglibs
50
51#endif // TPGLIBS_AVXFRUGALPEDESTALSUBTRACTPROCESSOR_HPP_
AVX signal processor: Estimates the pedestal and subtracts.
void configure(const nlohmann::json &config, const int16_t *plane_numbers) override
Configure the accumulation limit according to plane number.
__m256i process(const __m256i &signal) override
Estimate the pedestal using the given signal and subtract.
__m256i m_pedestal
Vector of estimated pedestals for each channel.
int16_t m_accum_limit
Count limit before committing to a pedestal shift.
__m256i m_accum
Vector of counts that a channel's signal was above or below m_pedestal.
AVX typed abstract signal processor.