#include <L1MuGMTLFMatchQualLUT.h>
Public Types | |
enum | { DTRPC, CSCRPC, DTCSC, CSCDT, CSCbRPC, DTfRPC } |
Public Member Functions | |
L1MuGMTLFMatchQualLUT () | |
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 delta_eta, unsigned delta_phi) const |
specific lookup function for entire output field | |
unsigned | SpecificLookup_mq (int idx, unsigned delta_eta, unsigned delta_phi) const |
specific lookup function for mq | |
virtual | ~L1MuGMTLFMatchQualLUT () |
destructor | |
Private Member Functions | |
void | InitParameters () |
Initialize scales, configuration parameters, alignment constants, ... | |
unsigned | TheLookupFunction (int idx, unsigned delta_eta, unsigned delta_phi) const |
The lookup function - here the functionality of the LUT is implemented. | |
Private Attributes | |
float | m_EtaPhiThresholds [6] |
float | m_EtaWeights [6] |
Private data members (LUT parameters);. | |
float | m_PhiWeights [6] |
LFMatchQual look-up table
this class was automatically generated by L1MuGMTLUT::MakeSubClass()
Definition at line 42 of file L1MuGMTLFMatchQualLUT.h.
anonymous enum |
L1MuGMTLFMatchQualLUT::L1MuGMTLFMatchQualLUT | ( | ) | [inline] |
constuctor using function-lookup
Definition at line 48 of file L1MuGMTLFMatchQualLUT.h.
References InitParameters().
: L1MuGMTLUT("LFMatchQual", "DTRPC CSCRPC DTCSC CSCDT CSCbRPC DTfRPC", "delta_eta(4) delta_phi(3)", "mq(6)", 7, true) { InitParameters(); } ;
virtual L1MuGMTLFMatchQualLUT::~L1MuGMTLFMatchQualLUT | ( | ) | [inline, virtual] |
void L1MuGMTLFMatchQualLUT::InitParameters | ( | ) | [private] |
Initialize scales, configuration parameters, alignment constants, ...
Definition at line 39 of file L1MuGMTLFMatchQualLUT.cc.
References L1MuGMTConfig::getEtaPhiThresholdBarrel(), L1MuGMTConfig::getEtaPhiThresholdCOU(), L1MuGMTConfig::getEtaPhiThresholdEndcap(), L1MuGMTConfig::getEtaWeightBarrel(), L1MuGMTConfig::getEtaWeightCOU(), L1MuGMTConfig::getEtaWeightEndcap(), L1MuGMTConfig::getPhiWeightBarrel(), L1MuGMTConfig::getPhiWeightCOU(), L1MuGMTConfig::getPhiWeightEndcap(), i, m_EtaPhiThresholds, m_EtaWeights, and m_PhiWeights.
Referenced by L1MuGMTLFMatchQualLUT().
{ m_EtaWeights[0]=L1MuGMTConfig::getEtaWeightBarrel(); m_PhiWeights[0]=L1MuGMTConfig::getPhiWeightBarrel(); m_EtaPhiThresholds[0]=L1MuGMTConfig::getEtaPhiThresholdBarrel(); m_EtaWeights[1]=L1MuGMTConfig::getEtaWeightEndcap(); m_PhiWeights[1]=L1MuGMTConfig::getPhiWeightEndcap(); m_EtaPhiThresholds[1]=L1MuGMTConfig::getEtaPhiThresholdEndcap(); for (int i=2; i<6; i++) { m_EtaWeights[i]=L1MuGMTConfig::getEtaWeightCOU(); m_PhiWeights[i]=L1MuGMTConfig::getPhiWeightCOU(); m_EtaPhiThresholds[i]=L1MuGMTConfig::getEtaPhiThresholdCOU(); } }
virtual unsigned L1MuGMTLFMatchQualLUT::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 L1MuGMTLFMatchQualLUT.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 L1MuGMTLFMatchQualLUT::SpecificLookup | ( | int | idx, |
unsigned | delta_eta, | ||
unsigned | delta_phi | ||
) | const [inline] |
specific lookup function for entire output field
Definition at line 67 of file L1MuGMTLFMatchQualLUT.h.
References kinem::delta_eta(), kinem::delta_phi(), and L1MuGMTLUT::LookupPacked().
{ std::vector<unsigned> addr(2); addr[0] = delta_eta; addr[1] = delta_phi; return LookupPacked(idx, addr); };
unsigned L1MuGMTLFMatchQualLUT::SpecificLookup_mq | ( | int | idx, |
unsigned | delta_eta, | ||
unsigned | delta_phi | ||
) | const [inline] |
specific lookup function for mq
Definition at line 59 of file L1MuGMTLFMatchQualLUT.h.
References kinem::delta_eta(), kinem::delta_phi(), and L1MuGMTLUT::Lookup().
Referenced by L1MuGMTMatcher::lookup_mq().
unsigned L1MuGMTLFMatchQualLUT::TheLookupFunction | ( | int | idx, |
unsigned | delta_eta, | ||
unsigned | delta_phi | ||
) | const [private] |
The lookup function - here the functionality of the LUT is implemented.
Definition at line 60 of file L1MuGMTLFMatchQualLUT.cc.
References L1MuScale::getCenter(), L1MuGMTScales::getDeltaEtaScale(), L1MuGMTScales::getDeltaPhiScale(), L1MuGMTConfig::getGMTScales(), UserOptions_cff::idx, L1MuSignedPacking< Bits >::idxFromPacked(), m_EtaPhiThresholds, m_EtaWeights, m_PhiWeights, and mathSSE::sqrt().
Referenced by LookupFunctionPacked().
{ // idx is DTRPC, CSCRPC, DTCSC, CSCDT, CSCbRPC, DTfRPC // INPUTS: delta_eta(4) delta_phi(3) // OUTPUTS: mq(6) const L1MuGMTScales* theGMTScales = L1MuGMTConfig::getGMTScales(); float deta = theGMTScales->getDeltaEtaScale(idx)->getCenter( delta_eta ); float dphi = theGMTScales->getDeltaPhiScale()->getCenter( delta_phi ); // check out-of range code L1MuSignedPacking<4> EtaPacking; int delta_eta_signed = EtaPacking.idxFromPacked(delta_eta); L1MuSignedPacking<3> PhiPacking; int delta_phi_signed = PhiPacking.idxFromPacked(delta_phi); bool dphi_outofrange = (delta_phi_signed == -4); // limit delta-phi even further **FIXME: make this configurable if (delta_phi_signed >=3 || delta_phi_signed <=-3) dphi_outofrange = true; // check out-of range code bool deta_outofrange = (delta_eta_signed == -8); // limit delta-eta even further **FIXME: make this configurable if (delta_eta_signed >=7 || delta_eta_signed <=-7) deta_outofrange = true; double delta_etaphi = sqrt(m_EtaWeights[idx]*deta*deta + m_PhiWeights[idx]*dphi*dphi); // cout << "MQ LUT : delta_phi = " << dphi // << ", delta_eta = " << deta // << ", delta_etaphi = " << delta_etaphi // << endl; int matchqual = 0; if ( dphi_outofrange || deta_outofrange || delta_etaphi > m_EtaPhiThresholds[idx] ) { matchqual = 0; } else { double mq = 64. * (m_EtaPhiThresholds[idx] - delta_etaphi) / m_EtaPhiThresholds[idx]; matchqual = static_cast<int>(mq); } if (matchqual > 63) matchqual = 63; return matchqual; }
float L1MuGMTLFMatchQualLUT::m_EtaPhiThresholds[6] [private] |
Definition at line 94 of file L1MuGMTLFMatchQualLUT.h.
Referenced by InitParameters(), and TheLookupFunction().
float L1MuGMTLFMatchQualLUT::m_EtaWeights[6] [private] |
Private data members (LUT parameters);.
Definition at line 92 of file L1MuGMTLFMatchQualLUT.h.
Referenced by InitParameters(), and TheLookupFunction().
float L1MuGMTLFMatchQualLUT::m_PhiWeights[6] [private] |
Definition at line 93 of file L1MuGMTLFMatchQualLUT.h.
Referenced by InitParameters(), and TheLookupFunction().