31 unsigned int absEx = std::abs(Ex);
32 unsigned int absEy = std::abs(Ey);
33 int max = (absEx > absEy ? absEx : absEy);
37 if (
max >= (1<<(m_nBits+m_nRanges-1)) ) {
46 absEx &= (m_mask<<
range);
47 absEy &= (m_mask<<
range);
51 METQ = absEx*absEx + absEy*absEy;
59 calcL1METQ(Ex, Ey, METQ, Overflow);
60 MET = sqrt(
static_cast<float>(METQ));
66 unsigned int absEx = std::abs(Ex);
67 unsigned int absEy = std::abs(Ey);
68 int max = (absEx > absEy ? absEx : absEy);
72 if (
max >= (1<<(m_nBits+m_nRanges-1)) ) {
73 MET = m_rangeMask + m_valueMask;
82 absEx &= (m_mask<<
range);
83 absEy &= (m_mask<<
range);
89 absEx = (absEx >>
Range);
90 absEy = (absEy >>
Range);
92 int METQ = absEx*absEx + absEy*absEy;
93 MET = ceil(sqrt(
static_cast<float>(METQ)));
100 float& XS,
int& OutOfRange) {
103 bool overflow =
false;
105 unsigned int Range = 0;
106 calcL1MET(Ex, Ey,
MET,
Range, overflow);
109 calcL1METSig(
MET,
Range, SumET,
a,
b, XEmin, XEmax, sqrtTEmin, sqrtTEmax, XS, OutOfRange);
114 float& XS,
int& OutOfRange) {
121 if (XEmax > m_xsXEmax) XEmax = m_xsXEmax;
122 if (sqrtTEmax > m_xsSqrtTEmax) sqrtTEmax = m_xsSqrtTEmax;
128 if (XE > m_xsXEmax) XE = m_xsXEmax;
144 int sqrtSumET = sqrt(SumET);
145 if (sqrtSumET > m_xsSqrtTEmax) sqrtSumET = m_xsSqrtTEmax;
147 if (XE < XEmin || sqrtSumET >= sqrtTEmax || sqrtSumET < sqrtTEmin) {
154 if (sqrtSumET >
b) XS =
float(XE)/(
a*(sqrtSumET-
b));