CMS 3D CMS Logo

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 // InitParameters --
33 //-------------------
34 
36 
37 //----------------------------------------------------------------
38 // Main eta conversion LUT
39 //
40 // Converts 6 bit regional trigger eta to GMT output eta scale
41 //
42 //----------------------------------------------------------------
43 
44 unsigned L1MuGMTLFEtaConvLUT::TheLookupFunction(int idx, unsigned eta_regional) const {
45  // idx is DT, bRPC, CSC, fRPC
46  // INPUTS: eta_regional(6)
47  // OUTPUTS: eta_gmt(6)
48 
49  const L1MuTriggerScales* theTriggerScales = L1MuGMTConfig::getTriggerScales();
50 
51  int isRPC = idx % 2;
52  // int isFWD = idx / 2;
53 
54  float etaValue = theTriggerScales->getRegionalEtaScale(idx)->getCenter(eta_regional);
55 
56  if (fabs(etaValue) > 2.4)
57  etaValue = 2.39 * ((etaValue) > 0 ? 1. : -1.);
58 
59  // this is the only trick needed ...
60  if (isRPC) {
61  // etaValue() is center. make eta=0 and |eta|=1.3 non-ambiguous, when converting to GMT bins
62  etaValue += (etaValue > 0.01 ? -1. : 1.) * 0.001;
63  }
64 
65  unsigned eta_gmt = theTriggerScales->getGMTEtaScale()->getPacked(etaValue);
66 
67  return eta_gmt;
68 }
L1MuTriggerScales::getGMTEtaScale
const L1MuScale * getGMTEtaScale() const
get the GMT eta scale
Definition: L1MuTriggerScales.h:169
L1MuPacking.h
L1MuGMTLFEtaConvLUT.h
GeomDetEnumerators::isRPC
bool isRPC(GeomDetEnumerators::SubDetector m)
Definition: GeomDetEnumerators.cc:90
charmTagsComputerCvsB_cfi.idx
idx
Definition: charmTagsComputerCvsB_cfi.py:108
L1MuGMTConfig::getTriggerScales
static const L1MuTriggerScales * getTriggerScales()
Definition: L1MuGMTConfig.h:178
L1MuTriggerScales::getRegionalEtaScale
const L1MuScale * getRegionalEtaScale(int isys) const
get the regioanl muon trigger eta scale, isys = 0(DT), 1(bRPC), 2(CSC), 3(fwdRPC)
Definition: L1MuTriggerScales.h:158
L1MuGMTConfig.h
L1MuTriggerScales.h
L1MuGMTLFEtaConvLUT::TheLookupFunction
unsigned TheLookupFunction(int idx, unsigned eta_regional) const
The lookup function - here the functionality of the LUT is implemented.
Definition: L1MuGMTLFEtaConvLUT.cc:44
L1MuGMTLFEtaConvLUT::InitParameters
void InitParameters()
Initialize scales, configuration parameters, alignment constants, ...
Definition: L1MuGMTLFEtaConvLUT.cc:35
L1MuTriggerScales
Definition: L1MuTriggerScales.h:33
L1MuScale::getPacked
virtual unsigned getPacked(float value) const =0
pack a value
L1MuScale::getCenter
virtual float getCenter(unsigned packed) const =0
get the center of bin represented by packed