9 m_cscHelper(nullptr), m_sourceID(0), m_moduleType(0), m_rodId(0), m_subDetectorId(0), m_amp1(0), m_amp2(0), m_address(0) {
45 m_cscHelper(nullptr), m_sourceID(0), m_moduleType(0), m_rodId(0), m_subDetectorId(0), m_amp1(0), m_amp2(0), m_address(0) {
67 int numberOfFragments = amplitude.size();
73 while (j < numberOfFragments) {
89 int numberOfSamplings = amplitude.size();
93 for (
int i = 0;
i < numberOfSamplings;
i++) {
94 if (amplitude[
i] >
max) {
101 if (maxIndex < 0 || maxIndex >= numberOfSamplings)
return charge;
106 else if (maxIndex == (numberOfSamplings - 1))
107 return amplitude[numberOfSamplings - 1];
110 double y1 = amplitude[maxIndex - 1];
111 double y2 = amplitude[maxIndex];
112 double y3 = amplitude[maxIndex + 1];
113 a = 0.5 * (y3 +
y1 - 2 *
y2);
119 double offset = (
a == 0) ? 0 : -
b / (2 *
a);