CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
L1MuGMTLFMergeRankEtaQLUT.cc
Go to the documentation of this file.
1 //-------------------------------------------------
2 //
3 // Class: L1MuGMTLFMergeRankEtaQLUT
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 //#include <iostream>
25 
26 //-------------------------------
27 // Collaborating Class Headers --
28 //-------------------------------
31 
32 //-------------------
33 // InitParameters --
34 //-------------------
35 
37 
38 //------------------------
39 // The Lookup Function --
40 //------------------------
41 
42 unsigned L1MuGMTLFMergeRankEtaQLUT::TheLookupFunction(int idx, unsigned eta, unsigned q) const {
43  // idx is DT, BRPC, CSC, FRPC
44  // INPUTS: eta(6) q(3)
45  // OUTPUTS: flag(1) rank_etaq(7)
46 
47  const L1MuTriggerScales* theTriggerScales = L1MuGMTConfig::getTriggerScales();
48 
49  // int isRPC = idx % 2;
50  // int isFWD = idx / 2;
51 
52  float etaValue = theTriggerScales->getRegionalEtaScale(idx)->getCenter(eta);
53 
54  unsigned flag = 0;
55  switch (idx) {
56  case 0: // DT
57  // if ( (q==1 || q==4 || q==6 || q==7) ||
58  // ( (q==2 || q==3) && (fabs(etaValue) < 0.9) ) ) flag=1;
59  flag = 1;
60  break;
61  case 1: // bRPC
62  if (q == 0 and fabs(etaValue) > 0.7)
63  flag = 1;
64  // flag =1;
65  break;
66  case 2: // CSC
67  // if ( (q==2 || fabs(etaValue) < 1.2) || q==3) flag =1;
68  if (q == 3)
69  flag = 1;
70  break;
71  case 3: // fRPC
72  // if (q==3) flag =1;
73  flag = 1;
74  }
75 
76  // use local quality as rank
77  unsigned rank_etaq = q;
78  // add 1 to RPC in order to promote it in case of equality (should go with the fix in L1MuGMTMerger.cc)
79  if (idx == 1 || idx == 3)
80  rank_etaq++;
81  if (m_GeneralLUTVersion == 0) {
82  // in the overlap region promote RPC (valid for 2011 data)
83  if ((idx == 1 || idx == 3) && (fabs(etaValue) > 1. && fabs(etaValue) < 1.23))
84  rank_etaq = 7;
85  }
86 
87  return flag << 7 | rank_etaq;
88 }
virtual float getCenter(unsigned packed) const =0
get the center of bin represented by packed
unsigned TheLookupFunction(int idx, unsigned eta, unsigned q) const
The lookup function - here the functionality of the LUT is implemented.
void InitParameters()
Initialize scales, configuration parameters, alignment constants, ...
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) ...
unsigned m_GeneralLUTVersion
Definition: L1MuGMTLUT.h:222