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 //
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 //-------------------------------
25 // Collaborating Class Headers --
26 //-------------------------------
30 
31 
32 //-------------------
33 // InitParameters --
34 //-------------------
35 
37 }
38 
39 //----------------------------------------------------------------
40 // Main eta conversion LUT
41 //
42 // Converts 6 bit regional trigger eta to GMT output eta scale
43 //
44 //----------------------------------------------------------------
45 
46 unsigned L1MuGMTLFEtaConvLUT::TheLookupFunction (int idx, unsigned eta_regional) const {
47  // idx is DT, bRPC, CSC, fRPC
48  // INPUTS: eta_regional(6)
49  // OUTPUTS: eta_gmt(6)
50 
51  const L1MuTriggerScales* theTriggerScales = L1MuGMTConfig::getTriggerScales();
52 
53  int isRPC = idx % 2;
54  // int isFWD = idx / 2;
55 
56  float etaValue = theTriggerScales->getRegionalEtaScale(idx)->getCenter( eta_regional );
57 
58  if ( fabs(etaValue) > 2.4 ) etaValue = 2.39 * ((etaValue)>0?1.:-1.);
59 
60  // this is the only trick needed ...
61  if (isRPC) {
62  // etaValue() is center. make eta=0 and |eta|=1.3 non-ambiguous, when converting to GMT bins
63  etaValue += (etaValue>0.01? -1. : 1.) * 0.001;
64  }
65 
66  unsigned eta_gmt = theTriggerScales->getGMTEtaScale()->getPacked( etaValue );
67 
68  return eta_gmt;
69 }
70 
71 
72 
73 
74 
75 
76 
77 
78 
79 
80 
81 
82 
83 
84 
85 
86 
87 
88 
virtual float getCenter(unsigned packed) const =0
get the center of bin represented by packed
tuple idx
DEBUGGING if hasattr(process,"trackMonIterativeTracking2012"): print "trackMonIterativeTracking2012 D...
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