CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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 //------------------------
40 // The Lookup Function --
41 //------------------------
42 
43 unsigned L1MuGMTLFMergeRankEtaQLUT::TheLookupFunction (int idx, unsigned eta, unsigned q) const {
44  // idx is DT, BRPC, CSC, FRPC
45  // INPUTS: eta(6) q(3)
46  // OUTPUTS: flag(1) rank_etaq(7)
47 
48  const L1MuTriggerScales* theTriggerScales = L1MuGMTConfig::getTriggerScales();
49 
50  // int isRPC = idx % 2;
51  // int isFWD = idx / 2;
52 
53  float etaValue = theTriggerScales->getRegionalEtaScale(idx)->getCenter( eta );
54 
55 
56  unsigned flag = 0;
57  switch (idx) {
58  case 0: // DT
59 // if ( (q==1 || q==4 || q==6 || q==7) ||
60 // ( (q==2 || q==3) && (fabs(etaValue) < 0.9) ) ) flag=1;
61  flag =1;
62  break;
63  case 1: // bRPC
64  if (q==0 and fabs(etaValue)>0.7) flag=1;
65 // flag =1;
66  break;
67  case 2: // CSC
68 // if ( (q==2 || fabs(etaValue) < 1.2) || q==3) flag =1;
69  if (q==3) 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 ) rank_etaq++;
80  if(m_GeneralLUTVersion == 0) {
81  // in the overlap region promote RPC (valid for 2011 data)
82  if( (idx==1 || idx==3) && (fabs(etaValue)>1. && fabs(etaValue)<1.23) ) rank_etaq=7;
83  }
84 
85  return flag << 7 | rank_etaq;
86 }
87 
88 
89 
90 
91 
92 
93 
94 
95 
96 
97 
98 
99 
100 
101 
102 
103 
104 
105 
T eta() const
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, ...
tuple idx
DEBUGGING if hasattr(process,&quot;trackMonIterativeTracking2012&quot;): print &quot;trackMonIterativeTracking2012 D...
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:209