#include <L1MuGMTLFCOUDeltaEtaLUT.h>
Public Types | |
enum | { DTCSC, CSCDT, CSCbRPC, DTfRPC } |
Public Member Functions | |
L1MuGMTLFCOUDeltaEtaLUT () | |
constuctor using function-lookup | |
virtual unsigned | LookupFunctionPacked (int idx, unsigned address) const |
access to lookup function with packed input and output | |
unsigned | SpecificLookup (int idx, unsigned eta1, unsigned eta2) const |
specific lookup function for entire output field | |
unsigned | SpecificLookup_delta_eta (int idx, unsigned eta1, unsigned eta2) const |
specific lookup function for delta_eta | |
virtual | ~L1MuGMTLFCOUDeltaEtaLUT () |
destructor | |
Private Member Functions | |
void | InitParameters () |
Initialize scales, configuration parameters, alignment constants, ... | |
unsigned | TheLookupFunction (int idx, unsigned eta1, unsigned eta2) const |
The lookup function - here the functionality of the LUT is implemented. |
LFCOUDeltaEta look-up table
this class was automatically generated by L1MuGMTLUT::MakeSubClass()
Definition at line 42 of file L1MuGMTLFCOUDeltaEtaLUT.h.
anonymous enum |
L1MuGMTLFCOUDeltaEtaLUT::L1MuGMTLFCOUDeltaEtaLUT | ( | ) | [inline] |
constuctor using function-lookup
Definition at line 48 of file L1MuGMTLFCOUDeltaEtaLUT.h.
References InitParameters().
: L1MuGMTLUT("LFCOUDeltaEta", "DTCSC CSCDT CSCbRPC DTfRPC", "eta1(4) eta2(4)", "delta_eta(4)", 8, true) { InitParameters(); } ;
virtual L1MuGMTLFCOUDeltaEtaLUT::~L1MuGMTLFCOUDeltaEtaLUT | ( | ) | [inline, virtual] |
void L1MuGMTLFCOUDeltaEtaLUT::InitParameters | ( | ) | [private] |
Initialize scales, configuration parameters, alignment constants, ...
Definition at line 39 of file L1MuGMTLFCOUDeltaEtaLUT.cc.
Referenced by L1MuGMTLFCOUDeltaEtaLUT().
{ }
virtual unsigned L1MuGMTLFCOUDeltaEtaLUT::LookupFunctionPacked | ( | int | idx, |
unsigned | address | ||
) | const [inline, virtual] |
access to lookup function with packed input and output
Reimplemented from L1MuGMTLUT.
Definition at line 78 of file L1MuGMTLFCOUDeltaEtaLUT.h.
References L1MuGMTLUT::m_Inputs, TheLookupFunction(), and L1MuGMTLUT::u2vec().
{ std::vector<unsigned> addr = u2vec(address, m_Inputs); return TheLookupFunction(idx ,addr[0] ,addr[1]); };
unsigned L1MuGMTLFCOUDeltaEtaLUT::SpecificLookup | ( | int | idx, |
unsigned | eta1, | ||
unsigned | eta2 | ||
) | const [inline] |
specific lookup function for entire output field
Definition at line 67 of file L1MuGMTLFCOUDeltaEtaLUT.h.
References L1MuGMTLUT::LookupPacked().
{ std::vector<unsigned> addr(2); addr[0] = eta1; addr[1] = eta2; return LookupPacked(idx, addr); };
unsigned L1MuGMTLFCOUDeltaEtaLUT::SpecificLookup_delta_eta | ( | int | idx, |
unsigned | eta1, | ||
unsigned | eta2 | ||
) | const [inline] |
specific lookup function for delta_eta
Definition at line 59 of file L1MuGMTLFCOUDeltaEtaLUT.h.
References L1MuGMTLUT::Lookup().
Referenced by L1MuGMTMatcher::lookup_mq().
{ std::vector<unsigned> addr(2); addr[0] = eta1; addr[1] = eta2; return Lookup(idx, addr) [0]; };
unsigned L1MuGMTLFCOUDeltaEtaLUT::TheLookupFunction | ( | int | idx, |
unsigned | eta1, | ||
unsigned | eta2 | ||
) | const [private] |
The lookup function - here the functionality of the LUT is implemented.
Definition at line 54 of file L1MuGMTLFCOUDeltaEtaLUT.cc.
References kinem::delta_eta(), L1MuScale::getCenter(), L1MuGMTScales::getDeltaEtaScale(), L1MuGMTConfig::getGMTScales(), L1MuGMTScales::getOvlEtaScale(), L1MuScale::getPacked(), L1MuScale::getScaleMax(), timeUnitHelper::pack(), and L1MuSignedPacking< Bits >::packedFromIdx().
Referenced by LookupFunctionPacked().
{ // idx is DTCSC, CSCDT, bRPCCSC, fRPCDT // INPUTS: eta1(4) eta2(4) // OUTPUTS: delta_eta(4) const L1MuGMTScales* theGMTScales = L1MuGMTConfig::getGMTScales(); // check out of range in inputs L1MuSignedPacking<4> pack; unsigned delta_eta_OOR = pack.packedFromIdx (-8); if (eta1==7 || eta2 ==7) return delta_eta_OOR; int type1=0, type2=0; switch (idx) { case 0: type1 = 0; type2 = 2; break; // DT, CSC case 1: type1 = 2; type2 = 0; break; // CSC, DT case 2: type1 = 1; type2 = 2; break; // bRPC, CSC case 3: type1 = 3; type2 = 0; break; // fRPC, DT } float etaValue1 = theGMTScales->getOvlEtaScale(type1)->getCenter(eta1); float etaValue2 = theGMTScales->getOvlEtaScale(type2)->getCenter(eta2); float delta_eta = etaValue1 - etaValue2; unsigned delta_eta_4bit = 0; // check out of range if (delta_eta < theGMTScales->getDeltaEtaScale(idx+2)->getScaleMin() || delta_eta > theGMTScales->getDeltaEtaScale(idx+2)->getScaleMax()) { delta_eta_4bit = delta_eta_OOR; } else { delta_eta_4bit = theGMTScales->getDeltaEtaScale(idx+2)->getPacked( delta_eta ); } return delta_eta_4bit; }