31 unsigned int absEx = std::abs(Ex);
32 unsigned int absEy = std::abs(Ey);
33 int max = (absEx > absEy ? absEx : absEy);
44 for (
unsigned int range = 0; range <
m_nRanges; ++range) {
51 METQ = absEx*absEx + absEy*absEy;
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);
80 for (
unsigned int range = 0; range <
m_nRanges; ++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;
109 calcL1METSig(
MET,
Range, SumET,
a, b, XEmin, XEmax, sqrtTEmin, sqrtTEmax, XS, OutOfRange);
114 float& XS,
int& OutOfRange) {
144 int sqrtSumET = sqrt(SumET);
147 if (XE < XEmin || sqrtSumET >= sqrtTEmax || sqrtSumET < sqrtTEmin) {
154 if (sqrtSumET > b) XS = float(XE)/(
a*(sqrtSumET-b));
void calcL1MET(int Ex, int Ey, int &MET, unsigned int &Range, bool &Overflow)
Return MET value as output by MET LUT (7 bit value + 2 bit range)
void calcL1METQ(int Ex, int Ey, int &METQ, bool &Overflow)
Return MET**2 value at precision used in threshold calculation.
static const unsigned int m_nRanges
Number of ET ranges to encode in.
static const int m_xsSqrtTEmax
static const int m_xsXEmax
Limits on inputs to XS LUT.
static const unsigned int m_mask
Mask to select Ex/Ey bits.
void calcL1METSig(int Ex, int Ey, int SumET, float a, float b, int XEmin, int XEmax, int sqrtTEmin, int sqrtTEmax, float &XS, int &OutOfRange)
Return MET value at floating point precision used in threshold calculation.
static const unsigned int m_valueMask
Masks for integer MET word setting.
static const unsigned int m_nBits
Number of bits in range.
static const unsigned int m_rangeMask
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...