11#include <vxd/dataobjects/VxdID.h>
12#include <svd/dataobjects/SVDShaperDigit.h>
67 B2ERROR(
"APV25 samples less than 3!?");
69 std::vector<float> Sum2bin(
m_samples.size() - 1, 0);
71 for (
int iBin = 0; iBin < static_cast<int>(
m_samples.size()) - 1; ++iBin)
74 auto itSum = std::max_element(std::begin(Sum2bin), std::end(Sum2bin));
76 int ctrFrame = std::distance(std::begin(Sum2bin), itSum);
78 if (ctrFrame == 0) ctrFrame = 1;
std::array< APVFloatSampleType, c_nAPVSamples > APVFloatSamples
array of APVFloatSampleType objects
Class implementing the MaxSum algorithm.
virtual ~SVDMaxSumAlgorithm()
virtual destructor
Belle2::SVDShaperDigit::APVFloatSamples m_samples
strip samples
std::vector< float > getSelectedSamples()
void applyAlgorithm()
applies the algorithm
SVDMaxSumAlgorithm(const Belle2::SVDShaperDigit::APVFloatSamples samples)
Constructor with the APVFloatSamples.
std::pair< int, std::vector< float > > m_result
ADC of the acquired samples.
Namespace to encapsulate code needed for simulation and reconstrucion of the SVD.