CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
L1MuGMTSortRankUnit.cc
Go to the documentation of this file.
1 //-------------------------------------------------
2 //
3 // Class: L1MuGMTSortRankUnit
4 //
5 // Description: GMT Sort Rank Unit
6 //
7 //
8 // $Date $
9 // $Revision $
10 //
11 // Author :
12 // H. Sakulin HEPHY Vienna
13 //
14 // Migrated to CMSSW:
15 // I. Mikulec
16 //
17 //--------------------------------------------------
18 
19 //-----------------------
20 // This Class's Header --
21 //-----------------------
22 
24 
25 //---------------
26 // C++ Headers --
27 //---------------
28 
29 //-------------------------------
30 // Collaborating Class Headers --
31 //-------------------------------
38 
39 
40 //---------------------------------
41 // class L1MuGMTSortRankUnit
42 //---------------------------------
43 
45 
46  if ( muon == 0 || muon->empty() ) return 0;
47 
48  unsigned lut_idx= muon->type_idx();
49 
50  // obtain inputs as coded in HW
51  unsigned eta = muon->eta_packed();
52  unsigned q = muon->quality_packed();
53  unsigned pt = muon->pt_packed();
54  unsigned phi = muon->phi_packed();
55 
56  // lookup eta-q
58  unsigned rank_etaq = etaq_lut->SpecificLookup_rank_etaq (lut_idx, eta, q);
59 
60  // lookup pt-q
62  unsigned rank_ptq = ptq_lut->SpecificLookup_rank_ptq (lut_idx, q, pt);
63 
64  // lookup etaphi
66  unsigned rank_etaphi = etaphi_lut->SpecificLookup_rank_etaphi (lut_idx, eta, phi);
67 
68  // combine
70  unsigned rank = combine_lut->SpecificLookup_sort_rank (lut_idx, rank_etaq, rank_ptq, rank_etaphi);
71 
72  return rank;
73 }
74 
76 
77  if ( muon == 0 || muon->empty() ) return 0;
78 
79  unsigned lut_idx= muon->type_idx();
80 
81  // obtain inputs as coded in HW
82  unsigned eta = muon->eta_packed();
83  unsigned q = muon->quality_packed();
84 
85  // lookup eta-q
87  return etaq_lut->SpecificLookup_vlq (lut_idx, eta, q);
88 }
89 
91 
92  if ( muon == 0 || muon->empty() ) return 1;
93 
94  unsigned lut_idx= muon->type_idx();
95 
96  // obtain inputs as coded in HW
97  unsigned eta = muon->eta_packed();
98  unsigned phi = muon->phi_packed();
99 
100  // lookup eta-q
102 
103  return etaphi_lut->SpecificLookup_rank_etaphi (lut_idx, eta, phi) == 3;
104 }
unsigned SpecificLookup_rank_ptq(int idx, unsigned q, unsigned pt) const
specific lookup function for rank_ptq
static L1MuGMTLFSortRankEtaPhiLUT * getLFSortRankEtaPhiLUT()
unsigned SpecificLookup_rank_etaphi(int idx, unsigned eta, unsigned phi) const
specific lookup function for rank_etaphi
static bool isDisabled(const L1MuRegionalCand *)
Diable bit.
virtual bool empty() const
return empty flag
unsigned SpecificLookup_rank_etaq(int idx, unsigned eta, unsigned q) const
specific lookup function for rank_etaq
T eta() const
static unsigned getVeryLowQualityLevel(const L1MuRegionalCand *)
Very low quality bits.
static L1MuGMTLFSortRankCombineLUT * getLFSortRankCombineLUT()
static L1MuGMTLFSortRankPtQLUT * getLFSortRankPtQLUT()
unsigned eta_packed() const
return eta packed as in hardware
static unsigned sort_rank(const L1MuRegionalCand *)
Sort Rank Table.
unsigned SpecificLookup_vlq(int idx, unsigned eta, unsigned q) const
specific lookup function for vlq
static L1MuGMTLFSortRankEtaQLUT * getLFSortRankEtaQLUT()
unsigned SpecificLookup_sort_rank(int idx, unsigned rank_etaq, unsigned rank_ptq, unsigned rank_etaphi) const
specific lookup function for sort_rank
unsigned int quality_packed() const
return quality packed as in hardware
unsigned pt_packed() const
return pt packed as in hardware
unsigned type_idx() const
return type: 0 DT, 1 bRPC, 2 CSC, 3 fRPC
unsigned phi_packed() const
return phi packed as in hardware
Definition: DDAxes.h:10