CMS 3D CMS Logo

L1MuGMTLFSortRankEtaQLUT.cc
Go to the documentation of this file.
1 //-------------------------------------------------
2 //
3 // Class: L1MuGMTLFSortRankEtaQLUT
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 //-------------------------------
30 
31 //-------------------
32 // InitParameters --
33 //-------------------
34 
37 }
38 
39 //------------------------------------------------------------------------------------
40 // Sort Rank LUT, Eta-Quality part
41 //
42 // This LUT determines the dependency of the sort rank on Eta and Quality.
43 // Inputs: Eta(6 bit) and Quality(3 bit)
44 // Outputs: Very-low-quality bits (2 bit)
45 // Rank contribution 2-bit
46 //
47 // The very-low quality bits are used to suppress unmatched muons in certain
48 // trigger-algorithms. By default vlq(1)(MSB) means: not to be used in di-muon trigger
49 // and vlq(0)(LSB) means not to be used in single-muon trigger.
50 //
51 // The Rank-contribution from Eta-Quality is currently not used. Its influence on the
52 // sort-rank can be determined in the Sort-Rank Combine LUT.
53 //
54 // Explanation of the meaning of m_version:
55 //
56 // m_version split to 4bit fields:
57 // bits 0-3: qCSC=2 code
58 // - 0 - do nothing
59 // - 1 - all to qGMT=3
60 // - 2 - |eta|<1.5 || |eta|>1.8 to qGMT=3
61 // - 3 - 1.2<|eta|<1.5 || |eta|>1.8 to qGMT=3
62 // - >3 - do nothing
63 // bits 4-7: qCSC=1 code
64 // - 0 - |eta|>1.2 to qGMT=3
65 // - 1 - |eta|>1.3 to qGMT=3
66 // - >1 - nothing done
67 // bits 8-11: qRPC<3 code
68 // - 0 - qRPC=0 1.04<|eta|<1.24 || |eta|>1.48 to qGMT=2
69 // qRPC=1 0.83<|eta|<1.04 || 1.14<|eta|<1.24 || |eta|>1.36 to qGMT=2
70 // qRPC=2 0.83<|eta|<0.93 to qGMT=2
71 // - 1 - do nothing
72 // - 2 - remove qRPC=0 in endcap from single muon
73 // - 3 - remove qRPC=0 from single muon
74 // - 4 - remove qRPC=0 in endcap from all
75 // - 5 - remove qRPC=0 from all
76 // - >0 - do nothing
77 //
78 // m_version=1: TDR
79 // m_version=2: 2010 data
80 // m_version>2: 2011
81 //
82 //------------------------------------------------------------------------------------
83 
84 unsigned L1MuGMTLFSortRankEtaQLUT::TheLookupFunction (int idx, unsigned eta, unsigned q) const {
85  // idx is DT, BRPC, CSC, FRPC
86  // INPUTS: eta(6) q(3)
87  // OUTPUTS: vlq(2) rank_etaq(2)
88 
89  const L1MuTriggerScales* theTriggerScales = L1MuGMTConfig::getTriggerScales();
90 
91  int isRPC = idx % 2;
92  // int isFWD = idx / 2;
93 
94  float etaValue = fabs ( theTriggerScales->getRegionalEtaScale(idx)->getCenter( eta ) );
95 
96  //
97  // very-low-quality flags
98  //
99  // 0 .. no VLQ set
100  // 1 .. output muon will be quality 2 (disable in single and di-muon trigger)
101  // 2 .. output muon will be quality 3 (disable in single-muon trigger only)
102  // 3 .. output muon will be quality 4 (disable in di-muon trigger only)
103 
104  unsigned vlq = 0;
105 
106  int vCSC2 = (m_version) & 0xf;
107  int vCSC1 = (m_version>>4) & 0xf;
108  int vRPC = (m_version>>8) & 0xf;
109 
110  // RPC selection
111  if (isRPC) {
112  if(vRPC == 0) {
113  if ( ( q == 0 && ( ( etaValue > 1.04 && etaValue < 1.24 ) || // Q0, high rate, high noise
114  ( etaValue > 1.48 ) ) ) || // Q0, high rate, high noise
115  ( q == 1 && ( ( etaValue > 0.83 && etaValue < 1.04 ) || // Q1, high rate
116  ( etaValue > 1.14 && etaValue < 1.24 ) || // Q1, high noise
117  ( etaValue > 1.36 ) ) ) || // Q1, high rate
118  ( q == 2 && ( etaValue > 0.83 && etaValue < 0.93 ) ) ) // Q2, high rate
119  vlq = 1;
120  }
121 // reserve vRPC == 1 for doing nothing for bwd compatibility
122  if(vRPC == 2) {
123  if(q == 0 && etaValue > 1.04) vlq = 2;
124  }
125  if(vRPC == 3) {
126  if(q == 0) vlq = 2;
127  }
128  if(vRPC == 4) {
129  if(q == 0 && etaValue > 1.04) vlq = 1;
130  }
131  if(vRPC == 5) {
132  if(q == 0) vlq = 1;
133  }
134  }
135 
136  // CSC selection
137  if ( idx == 2 ) { // CSC
138  if (q == 2) {
139  if(vCSC2 == 1) vlq = 2;
140  if(vCSC2 == 2) {
141  if(etaValue < 1.5 || etaValue > 1.8) vlq = 2; // disable in single-muon trigger only
142  }
143  if(vCSC2 == 3) {
144  if( (etaValue > 1.2 && etaValue < 1.5) || etaValue > 1.8) vlq = 2; // disable in single-muon trigger only
145  }
146  }
147 
148  if (q == 1) {
149  if(vCSC1 == 0) {
150  if(etaValue > 1.2) vlq = 2; // disable in single-muon trigger only
151  }
152  if(vCSC1 == 1) {
153  if(etaValue > 1.3) vlq = 2; // disable in single-muon trigger only
154  }
155  }
156  }
157 
159  if ( idx == 0 ) { // DT
160  if ( etaValue > 0.91 ) vlq = 1;
161  }
162  if ( idx == 2 ) { // CSC
163  if ( etaValue < 1.06 ) vlq = 1;
164  }
165  }
166 
167  //
168  // Rank contribution from eta and quality
169  //
170 
171  // by default return maximum
172  // LUT can later be used to reduce the sort rank of certain regions
173  unsigned rank_etaq = 3;
174 
175  return (vlq << 2) | rank_etaq;
176 }
177 
178 
179 
180 
181 
182 
183 
184 
185 
186 
187 
188 
189 
190 
191 
192 
193 
194 
195 
unsigned TheLookupFunction(int idx, unsigned eta, unsigned q) const
The lookup function - here the functionality of the LUT is implemented.
virtual float getCenter(unsigned packed) const =0
get the center of bin represented by packed
unsigned m_version
Private data members (LUT parameters);.
static unsigned getVersionSortRankEtaQLUT()
static bool getDoOvlRpcAnd()
require DT/CSC candidates to be confirmed by the RPC in the overlap region
void InitParameters()
Initialize scales, configuration parameters, alignment constants, ...
bool isRPC(GeomDetEnumerators::SubDetector m)
static const L1MuTriggerScales * getTriggerScales()
const L1MuScale * getRegionalEtaScale(int isys) const
get the regioanl muon trigger eta scale, isys = 0(DT), 1(bRPC), 2(CSC), 3(fwdRPC) ...