ATLAS Offline Software
|
L1METvalue encoding is used for transmission of ET/Ex/Ey sums from JEM to CMM. More...
#include <L1METvalue.h>
Public Member Functions | |
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) More... | |
void | calcL1MET (int Ex, int Ey, float &MET, bool &Overflow) |
Return MET value at floating point precision used in threshold calculation. More... | |
void | calcL1METQ (int Ex, int Ey, int &METQ, bool &Overflow) |
Return MET**2 value at precision used in threshold calculation. More... | |
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. More... | |
void | calcL1METSig (int MET, unsigned int Range, int SumET, float a, float b, int XEmin, int XEmax, int sqrtTEmin, int sqrtTEmax, float &XS, int &OutOfRange) |
Static Private Attributes | |
static const unsigned int | m_nBits = 6 |
Number of bits in range. More... | |
static const unsigned int | m_nRanges = 4 |
Number of ET ranges to encode in. More... | |
static const unsigned int | m_mask = 0x3F |
Mask to select Ex/Ey bits. More... | |
static const unsigned int | m_valueMask = 0x7F |
Masks for integer MET word setting. More... | |
static const unsigned int | m_rangeMask = 0x180 |
static const int | m_xsXEmax = 127 |
Limits on inputs to XS LUT. More... | |
static const int | m_xsSqrtTEmax = 63 |
L1METvalue encoding is used for transmission of ET/Ex/Ey sums from JEM to CMM.
This class compresses/uncompresses 8 bit ET (JEM energy sums) to/from quad linear scale
Definition at line 26 of file L1METvalue.h.
void LVL1::L1METvalue::calcL1MET | ( | int | Ex, |
int | Ey, | ||
float & | MET, | ||
bool & | Overflow | ||
) |
Return MET value at floating point precision used in threshold calculation.
Definition at line 73 of file L1METvalue.cxx.
void LVL1::L1METvalue::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)
Greater of 2 values determines range of bits used
If Ex/Ey overflows the LUT input range, trigger fires all thresholds. Indicate this with overflow flag and an out of range ETmiss value
Otherwise, emulate precision by checking which ET range we are in and zeroing bits below that.
Definition at line 79 of file L1METvalue.cxx.
void LVL1::L1METvalue::calcL1METQ | ( | int | Ex, |
int | Ey, | ||
int & | METQ, | ||
bool & | Overflow | ||
) |
Return MET**2 value at precision used in threshold calculation.
Greater of 2 values determines range of bits used
If Ex/Ey overflows the LUT input range, trigger fires all thresholds. Indicate this with overflow flag and an out of range ETmiss value
Otherwise, emulate precision by checking which ET range we are in and zeroing bits below that.
Definition at line 44 of file L1METvalue.cxx.
void LVL1::L1METvalue::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.
Calculate MET value with correct precision and format
Use that plus provided SumET and coefficients to calculate METSig
Definition at line 115 of file L1METvalue.cxx.
void LVL1::L1METvalue::calcL1METSig | ( | int | MET, |
unsigned int | Range, | ||
int | SumET, | ||
float | a, | ||
float | b, | ||
int | XEmin, | ||
int | XEmax, | ||
int | sqrtTEmin, | ||
int | sqrtTEmax, | ||
float & | XS, | ||
int & | OutOfRange | ||
) |
Initialise default values
Impose firmware limitations on specified ranges
Convert MET value to single linear scale
Impose hardware limits on MET input to LUT
MET overflow check takes precedence over all other conditions
Protection against invalid input (can never happen in reality, but this is software)
Calculate sqrt(SumET) with integer precision & hardware limits
If in range, calculate XS
Definition at line 129 of file L1METvalue.cxx.
|
staticprivate |
Mask to select Ex/Ey bits.
Definition at line 54 of file L1METvalue.h.
|
staticprivate |
Number of bits in range.
Definition at line 50 of file L1METvalue.h.
|
staticprivate |
Number of ET ranges to encode in.
Definition at line 52 of file L1METvalue.h.
|
staticprivate |
Definition at line 57 of file L1METvalue.h.
|
staticprivate |
Masks for integer MET word setting.
Definition at line 56 of file L1METvalue.h.
|
staticprivate |
Definition at line 60 of file L1METvalue.h.
|
staticprivate |
Limits on inputs to XS LUT.
Definition at line 59 of file L1METvalue.h.