CMS 3D CMS Logo

L1MuGMTLFSortRankCombineLUT.cc
Go to the documentation of this file.
1 //-------------------------------------------------
2 //
3 // Class: L1MuGMTLFSortRankCombineLUT
4 //
5 //
6 //
7 // Author :
8 // H. Sakulin HEPHY Vienna
9 //
10 // Migrated to CMSSW:
11 // I. Mikulec
12 //
13 //--------------------------------------------------
14 
15 //-----------------------
16 // This Class's Header --
17 //-----------------------
19 
20 //---------------
21 // C++ Headers --
22 //---------------
23 
24 //-------------------------------
25 // Collaborating Class Headers --
26 //-------------------------------
27 
28 //-------------------
29 // InitParameters --
30 //-------------------
31 
33 }
34 
35 //--------------------------------------------------------------------------------
36 // Sort Rank Combination LUT
37 //
38 // This LUT combines the three contributioons to the sort-rank.
39 // It can be used to lower the rank of or to disable muons in certain
40 // hot detector regions
41 //
42 // Inputs: rank_etaq(2-bit), rank_ptq(7-bit), rank_etaphi(2-bit)
43 // Outputs: Sort Rank (8-bit)
44 //
45 //--------------------------------------------------------------------------------
46 
47 unsigned L1MuGMTLFSortRankCombineLUT::TheLookupFunction (int idx, unsigned rank_etaq, unsigned rank_ptq, unsigned rank_etaphi) const {
48  // idx is DT, BRPC, CSC, FRPC
49  // INPUTS: rank_etaq(2) rank_ptq(7) rank_etaphi(2)
50  // OUTPUTS: sort_rank(8)
51 
52  // int isRPC = idx % 2;
53  // int isFWD = idx / 2;
54 
55  // by default return maximum
56  unsigned int rank_combined = rank_etaphi * 32 + rank_ptq;
57  // max is 127 + 32*2
58  if (rank_etaphi == 3) rank_combined = 0;
59 
60  return rank_combined;
61 }
62 
63 
64 
65 
66 
67 
68 
69 
70 
71 
72 
73 
74 
75 
76 
77 
78 
79 
80 
unsigned TheLookupFunction(int idx, unsigned rank_etaq, unsigned rank_ptq, unsigned rank_etaphi) const
The lookup function - here the functionality of the LUT is implemented.
void InitParameters()
Initialize scales, configuration parameters, alignment constants, ...