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 // $Date: 2012/03/14 13:52:09 $
7 // $Revision: 1.8 $
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 //#include <iostream>
27 
28 //-------------------------------
29 // Collaborating Class Headers --
30 //-------------------------------
33 
34 //-------------------
35 // InitParameters --
36 //-------------------
37 
39 }
40 
41 //------------------------
42 // The Lookup Function --
43 //------------------------
44 
45 unsigned L1MuGMTLFMergeRankEtaQLUT::TheLookupFunction (int idx, unsigned eta, unsigned q) const {
46  // idx is DT, BRPC, CSC, FRPC
47  // INPUTS: eta(6) q(3)
48  // OUTPUTS: flag(1) rank_etaq(7)
49 
50  const L1MuTriggerScales* theTriggerScales = L1MuGMTConfig::getTriggerScales();
51 
52  // int isRPC = idx % 2;
53  // int isFWD = idx / 2;
54 
55  float etaValue = theTriggerScales->getRegionalEtaScale(idx)->getCenter( eta );
56 
57 
58  unsigned flag = 0;
59  switch (idx) {
60  case 0: // DT
61 // if ( (q==1 || q==4 || q==6 || q==7) ||
62 // ( (q==2 || q==3) && (fabs(etaValue) < 0.9) ) ) flag=1;
63  flag =1;
64  break;
65  case 1: // bRPC
66  if (q==0 and fabs(etaValue)>0.7) flag=1;
67 // flag =1;
68  break;
69  case 2: // CSC
70 // if ( (q==2 || fabs(etaValue) < 1.2) || q==3) flag =1;
71  if (q==3) flag =1;
72  break;
73  case 3: // fRPC
74 // if (q==3) flag =1;
75  flag =1;
76  }
77 
78  // use local quality as rank
79  unsigned rank_etaq = q;
80  // add 1 to RPC in order to promote it in case of equality (should go with the fix in L1MuGMTMerger.cc)
81  if( idx==1 || idx==3 ) rank_etaq++;
82  if(m_GeneralLUTVersion == 0) {
83  // in the overlap region promote RPC (valid for 2011 data)
84  if( (idx==1 || idx==3) && (fabs(etaValue)>1. && fabs(etaValue)<1.23) ) rank_etaq=7;
85  }
86 
87  return flag << 7 | rank_etaq;
88 }
89 
90 
91 
92 
93 
94 
95 
96 
97 
98 
99 
100 
101 
102 
103 
104 
105 
106 
107 
long int flag
Definition: mlp_lapack.h:47
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, ...
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:211