CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
L1MuGMTLFSortRankCombineLUT.cc
Go to the documentation of this file.
1 //-------------------------------------------------
2 //
3 // Class: L1MuGMTLFSortRankCombineLUT
4 //
5 //
6 // $Date: 2007/04/02 15:45:39 $
7 // $Revision: 1.3 $
8 //
9 // Author :
10 // H. Sakulin HEPHY Vienna
11 //
12 // Migrated to CMSSW:
13 // I. Mikulec
14 //
15 //--------------------------------------------------
16 
17 //-----------------------
18 // This Class's Header --
19 //-----------------------
21 
22 //---------------
23 // C++ Headers --
24 //---------------
25 
26 //-------------------------------
27 // Collaborating Class Headers --
28 //-------------------------------
29 
30 //-------------------
31 // InitParameters --
32 //-------------------
33 
35 }
36 
37 //--------------------------------------------------------------------------------
38 // Sort Rank Combination LUT
39 //
40 // This LUT combines the three contributioons to the sort-rank.
41 // It can be used to lower the rank of or to disable muons in certain
42 // hot detector regions
43 //
44 // Inputs: rank_etaq(2-bit), rank_ptq(7-bit), rank_etaphi(2-bit)
45 // Outputs: Sort Rank (8-bit)
46 //
47 //--------------------------------------------------------------------------------
48 
49 unsigned L1MuGMTLFSortRankCombineLUT::TheLookupFunction (int idx, unsigned rank_etaq, unsigned rank_ptq, unsigned rank_etaphi) const {
50  // idx is DT, BRPC, CSC, FRPC
51  // INPUTS: rank_etaq(2) rank_ptq(7) rank_etaphi(2)
52  // OUTPUTS: sort_rank(8)
53 
54  // int isRPC = idx % 2;
55  // int isFWD = idx / 2;
56 
57  // by default return maximum
58  unsigned int rank_combined = rank_etaphi * 32 + rank_ptq;
59  // max is 127 + 32*2
60  if (rank_etaphi == 3) rank_combined = 0;
61 
62  return rank_combined;
63 }
64 
65 
66 
67 
68 
69 
70 
71 
72 
73 
74 
75 
76 
77 
78 
79 
80 
81 
82 
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, ...