63 m_gmt(gmt), m_id(id),
first(MaxMatch),
second(MaxMatch),
64 matchQuality(MaxMatch,MaxMatch), pairMatrix(MaxMatch,MaxMatch) {
203 maxMatrix.
init(
false);
204 disableMatrix.
init(
false);
227 for (
unsigned i1 = 0; i1 <
MaxMatch; i1++ )
228 if ( i1 != i ) disableMatrix(i,j) = disableMatrix(i,j) || maxMatrix(i1,j);
230 for (
unsigned j1 = 0; j1 <
MaxMatch; j1++ )
231 if ( j1 != j ) disableMatrix(i,j) = disableMatrix(i,j) || maxMatrix(i,j1);
241 for (
unsigned i1 = 0; i1 <
i; i1++ ) {
243 disableMatrix(i1,j));
246 for (
unsigned i1 = i+1; i1 <
MaxMatch; i1++ ) {
248 disableMatrix(i1,j));
251 for (
unsigned j1 = 0; j1 <
j; j1++ ) {
253 disableMatrix(i,j1));
256 for (
unsigned j1 = j+1; j1 <
MaxMatch; j1++ ) {
258 disableMatrix(i,j1));
277 if ( empty1 || empty2)
return 0;
282 unsigned phi1 =
first[
i]->phi_packed();
283 unsigned phi2 =
second[
j]->phi_packed();
285 int delta_phi = ( ( phi1 - phi2 + 3*72 ) % 144 ) - 72;
287 if (delta_phi < -3 || delta_phi >3)
291 unsigned delta_phi_packed = DPhiPacking.
packedFromIdx (delta_phi);
296 unsigned eta1 =
first[
i]->eta_packed();
297 unsigned eta2 =
second[
j]->eta_packed();
299 unsigned delta_eta_packed = 0;
307 if (disable1 || disable2)
return 0;
314 int idx1 =
first[
i]->type_idx();
315 int idx1_dcrr = (idx1==1)?2:(idx1==2)?1:idx1;
317 int idx2 =
second[
j]->type_idx();
318 int idx2_dcrr = (idx2==1)?2:(idx2==2)?1:idx2;
325 second[j]->phi_packed()) == 1;
327 if (disable1 || disable2)
return 0;
virtual unsigned packedFromIdx(int idx) const
get the packed notation of a value, check range
const L1MuGlobalMuonTrigger & m_gmt
void init(T v=0)
initialize matrix
bool isMax(int r, int c) const
is the element (r,c) the max. entry in its row and column?
virtual ~L1MuGMTMatcher()
destructor
static bool isDisabled(const L1MuRegionalCand *)
Diable bit.
unsigned SpecificLookup_eta_ovl(int idx, unsigned eta6) const
specific lookup function for eta_ovl
static L1MuGMTLFMatchQualLUT * getLFMatchQualLUT()
static L1MuGMTLFOvlEtaConvLUT * getLFOvlEtaConvLUT()
unsigned SpecificLookup_mq(int idx, unsigned delta_eta, unsigned delta_phi) const
specific lookup function for mq
void print()
print matching results
const L1MuRegionalCand * CSCMuon(int index) const
get CSC muon
std::vector< const L1MuRegionalCand * > second
U second(std::pair< T, U > const &p)
static L1MuGMTLFDeltaEtaLUT * getLFDeltaEtaLUT()
int lookup_mq(int i, int j)
const T & max(const T &a, const T &b)
void SetPairMatrix(int idx, L1MuGMTMatrix< bool > pm)
Set pair matrices.
unsigned SpecificLookup_delta_eta(int idx, unsigned eta_dtcsc, unsigned eta_rpc) const
specific lookup function for delta_eta
const L1MuGMTPSB * Data() const
return pointer to PSB
const L1MuRegionalCand * RPCMuon(int index) const
get RPC muon
void print() const
print matrix
static const unsigned int MAXCSC
static const unsigned int MAXDTBX
static const unsigned int MAXRPCendcap
static L1MuGMTLFDisableHotLUT * getLFDisableHotLUT()
std::vector< const L1MuRegionalCand * > first
void SetMQMatrix(int idx, L1MuGMTMatrix< int > mqm)
Set match quality matrices.
double delta_phi(double ph11, double phi2)
L1MuGMTMatrix< bool > pairMatrix
void reset()
clear Matcher
const L1MuRegionalCand * DTBXMuon(int index) const
get DTBX muon
static L1MuGMTLFCOUDeltaEtaLUT * getLFCOUDeltaEtaLUT()
static const unsigned int MaxMatch
L1MuGMTMatcher(const L1MuGlobalMuonTrigger &gmt, int id)
constructor
static const unsigned int MAXRPCbarrel
L1MuGMTMatrix< int > matchQuality
L1MuGMTDebugBlock * DebugBlockForFill() const
for debug: return the debug block (in order to fill it)
unsigned SpecificLookup_disable_hot(int idx, unsigned eta, unsigned phi) const
specific lookup function for disable_hot
unsigned SpecificLookup_delta_eta(int idx, unsigned eta1, unsigned eta2) const
specific lookup function for delta_eta