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: 2007/04/02 15:45:38 $
7 // $Revision: 1.3 $
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  break;
64  case 1: // bRPC
65  if (q==0) flag=1;
66  break;
67  case 2: // CSC
68  if ( (q==2 || fabs(etaValue) < 1.2) ||
69  q==3) flag =1;
70  break;
71  case 3: // fRPC
72  if (q==3) flag =1;
73  }
74 
75  // use local quality as rank
76  unsigned rank_etaq = q;
77  // in the overlap region promote RPC
78  if( (idx==1 || idx==3) && (fabs(etaValue)>1. && fabs(etaValue)<1.23) ) rank_etaq=7;
79 
80  return flag << 7 | rank_etaq;
81 }
82 
83 
84 
85 
86 
87 
88 
89 
90 
91 
92 
93 
94 
95 
96 
97 
98 
99 
100 
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) ...