Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-03-17 11:11:25

0001 //-------------------------------------------------
0002 //
0003 //   Class: L1MuGMTLFSortRankCombineLUT
0004 //
0005 //
0006 //
0007 //   Author :
0008 //   H. Sakulin            HEPHY Vienna
0009 //
0010 //   Migrated to CMSSW:
0011 //   I. Mikulec
0012 //
0013 //--------------------------------------------------
0014 
0015 //-----------------------
0016 // This Class's Header --
0017 //-----------------------
0018 #include "L1Trigger/GlobalMuonTrigger/src/L1MuGMTLFSortRankCombineLUT.h"
0019 
0020 //---------------
0021 // C++ Headers --
0022 //---------------
0023 
0024 //-------------------------------
0025 // Collaborating Class Headers --
0026 //-------------------------------
0027 
0028 //-------------------
0029 // InitParameters  --
0030 //-------------------
0031 
0032 void L1MuGMTLFSortRankCombineLUT::InitParameters() {}
0033 
0034 //--------------------------------------------------------------------------------
0035 // Sort Rank Combination LUT
0036 //
0037 // This LUT combines the three contributioons to the sort-rank.
0038 // It can be used to lower the rank of or to disable muons in certain
0039 // hot detector regions
0040 //
0041 // Inputs:  rank_etaq(2-bit), rank_ptq(7-bit), rank_etaphi(2-bit)
0042 // Outputs: Sort Rank (8-bit)
0043 //
0044 //--------------------------------------------------------------------------------
0045 
0046 unsigned L1MuGMTLFSortRankCombineLUT::TheLookupFunction(int idx,
0047                                                         unsigned rank_etaq,
0048                                                         unsigned rank_ptq,
0049                                                         unsigned rank_etaphi) const {
0050   // idx is DT, BRPC, CSC, FRPC
0051   // INPUTS:  rank_etaq(2) rank_ptq(7) rank_etaphi(2)
0052   // OUTPUTS: sort_rank(8)
0053 
0054   //  int isRPC = idx % 2;
0055   //  int isFWD = idx / 2;
0056 
0057   // by default return maximum
0058   unsigned int rank_combined = rank_etaphi * 32 + rank_ptq;
0059   // max is 127 + 32*2
0060   if (rank_etaphi == 3)
0061     rank_combined = 0;
0062 
0063   return rank_combined;
0064 }