61 m_gmt(gmt), m_id(id),
first(MaxMatch),
second(MaxMatch),
62 matchQuality(MaxMatch,MaxMatch), pairMatrix(MaxMatch,MaxMatch) {
201 maxMatrix.
init(
false);
202 disableMatrix.
init(
false);
225 for (
unsigned i1 = 0; i1 <
MaxMatch; i1++ )
226 if ( i1 != i ) disableMatrix(i,j) = disableMatrix(i,j) || maxMatrix(i1,j);
228 for (
unsigned j1 = 0; j1 <
MaxMatch; j1++ )
229 if ( j1 != j ) disableMatrix(i,j) = disableMatrix(i,j) || maxMatrix(i,j1);
239 for (
unsigned i1 = 0; i1 <
i; i1++ ) {
241 disableMatrix(i1,j));
244 for (
unsigned i1 = i+1; i1 <
MaxMatch; i1++ ) {
246 disableMatrix(i1,j));
249 for (
unsigned j1 = 0; j1 <
j; j1++ ) {
251 disableMatrix(i,j1));
254 for (
unsigned j1 = j+1; j1 <
MaxMatch; j1++ ) {
256 disableMatrix(i,j1));
275 if ( empty1 || empty2)
return 0;
280 unsigned phi1 =
first[
i]->phi_packed();
281 unsigned phi2 =
second[
j]->phi_packed();
283 int delta_phi = ( ( phi1 - phi2 + 3*72 ) % 144 ) - 72;
285 if (delta_phi < -3 || delta_phi >3)
289 unsigned delta_phi_packed = DPhiPacking.
packedFromIdx (delta_phi);
294 unsigned eta1 =
first[
i]->eta_packed();
295 unsigned eta2 =
second[
j]->eta_packed();
297 unsigned delta_eta_packed = 0;
305 if (disable1 || disable2)
return 0;
312 int idx1 =
first[
i]->type_idx();
313 int idx1_dcrr = (idx1==1)?2:(idx1==2)?1:idx1;
315 int idx2 =
second[
j]->type_idx();
316 int idx2_dcrr = (idx2==1)?2:(idx2==2)?1:idx2;
323 second[j]->phi_packed()) == 1;
325 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)
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