1 #include "../interface/MicroGMTMatchQualLUT.h"
4 l1t::MicroGMTMatchQualLUT::MicroGMTMatchQualLUT (
const std::string&
fname,
const double maxDR,
cancel_t cancelType) :
MicroGMTLUT(), m_dEtaRedMask(0), m_dPhiRedMask(0), m_dEtaRedInWidth(4), m_dPhiRedInWidth(3), m_etaScale(0), m_phiScale(0), m_maxDR(maxDR), m_cancelType(cancelType)
30 return data((
unsigned)hashInput(checkedInput(dEtaRed, m_dEtaRedInWidth), checkedInput(dPhiRed, m_dPhiRedInWidth)));
32 double dEta = dEtaRed*m_etaScale;
33 double dPhi = dPhiRed*m_phiScale;
37 int retVal = dR < m_maxDR ? 1 : 0;
53 return data((
unsigned)in);
58 unHashInput(in, dEtaRed, dPhiRed);
59 return lookup(dEtaRed, dPhiRed);
68 result += dEtaRed << m_dPhiRedInWidth;
75 dPhiRed = input & m_dPhiRedMask;
76 dEtaRed = (input & m_dEtaRedMask) >> m_dPhiRedInWidth;
int load(const std::string &inFileName)
std::vector< MicroGMTConfiguration::input_t > m_inputs
static std::string const input
double dPhi(double phi1, double phi2)
int lookup(int dEta, int dPhi) const
void unHashInput(int input, int &dEta, int &dPhi) const
int hashInput(int dEta, int dPhi) const
virtual int lookupPacked(int in) const