CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
L1MuGMTLFEtaConvLUT.cc
Go to the documentation of this file.
1 //-------------------------------------------------
2 //
3 // Class: L1MuGMTLFEtaConvLUT
4 //
5 //
6 // $Date: 2006/11/17 08:25:34 $
7 // $Revision: 1.2 $
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 //-------------------------------
27 // Collaborating Class Headers --
28 //-------------------------------
32 
33 
34 //-------------------
35 // InitParameters --
36 //-------------------
37 
39 }
40 
41 //----------------------------------------------------------------
42 // Main eta conversion LUT
43 //
44 // Converts 6 bit regional trigger eta to GMT output eta scale
45 //
46 //----------------------------------------------------------------
47 
48 unsigned L1MuGMTLFEtaConvLUT::TheLookupFunction (int idx, unsigned eta_regional) const {
49  // idx is DT, bRPC, CSC, fRPC
50  // INPUTS: eta_regional(6)
51  // OUTPUTS: eta_gmt(6)
52 
53  const L1MuTriggerScales* theTriggerScales = L1MuGMTConfig::getTriggerScales();
54 
55  int isRPC = idx % 2;
56  // int isFWD = idx / 2;
57 
58  float etaValue = theTriggerScales->getRegionalEtaScale(idx)->getCenter( eta_regional );
59 
60  if ( fabs(etaValue) > 2.4 ) etaValue = 2.39 * ((etaValue)>0?1.:-1.);
61 
62  // this is the only trick needed ...
63  if (isRPC) {
64  // etaValue() is center. make eta=0 and |eta|=1.3 non-ambiguous, when converting to GMT bins
65  etaValue += (etaValue>0.01? -1. : 1.) * 0.001;
66  }
67 
68  unsigned eta_gmt = theTriggerScales->getGMTEtaScale()->getPacked( etaValue );
69 
70  return eta_gmt;
71 }
72 
73 
74 
75 
76 
77 
78 
79 
80 
81 
82 
83 
84 
85 
86 
87 
88 
89 
90 
virtual float getCenter(unsigned packed) const =0
get the center of bin represented by packed
static const L1MuTriggerScales * getTriggerScales()
unsigned TheLookupFunction(int idx, unsigned eta_regional) const
The lookup function - here the functionality of the LUT is implemented.
const L1MuScale * getRegionalEtaScale(int isys) const
get the regioanl muon trigger eta scale, isys = 0(DT), 1(bRPC), 2(CSC), 3(fwdRPC) ...
void InitParameters()
Initialize scales, configuration parameters, alignment constants, ...
virtual unsigned getPacked(float value) const =0
pack a value
const L1MuScale * getGMTEtaScale() const
get the GMT eta scale