CMS 3D CMS Logo

L1MuGMTLFOvlEtaConvLUT.cc
Go to the documentation of this file.
1 //-------------------------------------------------
2 //
3 // Class: L1MuGMTLFOvlEtaConvLUT
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 //#include <iostream>
25 
26 //-------------------------------
27 // Collaborating Class Headers --
28 //-------------------------------
33 
34 //-------------------
35 // InitParameters --
36 //-------------------
37 
39 
40 //--------------------------------------------------------------------------------
41 // Overlap eta conversion LUT
42 //
43 // convert global eta to a 4-bit pseudo-signed eta in the overlap region to be used in
44 // the COU matching units
45 //
46 // instances:
47 // ----------
48 // barrel chip: DT, bRPC
49 // barrel chip : ovlCSC
50 //
51 // forward chip: CSC bRPC
52 // forward chip: ovlDT
53 //
54 //--------------------------------------------------------------------------------
55 
56 unsigned L1MuGMTLFOvlEtaConvLUT::TheLookupFunction(int idx, unsigned eta6) const {
57  // idx is DT, CSC, bRPC, fRPC, ovlCSC, ovlDT
58  // INPUTS: eta6(6)
59  // OUTPUTS: eta_ovl(4)
60 
61  const L1MuGMTScales* theGMTScales = L1MuGMTConfig::getGMTScales();
62  const L1MuTriggerScales* theTriggerScales = L1MuGMTConfig::getTriggerScales();
63 
64  int idx_drcr = 0;
65 
66  switch (idx) {
67  case DT:
68  idx_drcr = 0;
69  break;
70  case CSC:
71  idx_drcr = 2;
72  break;
73  case bRPC:
74  idx_drcr = 1;
75  break;
76  case fRPC:
77  idx_drcr = 3;
78  break;
79  case ovlCSC:
80  idx_drcr = 2;
81  break;
82  case ovlDT:
83  idx_drcr = 0;
84  break;
85  }
86 
87  float etaValue = theTriggerScales->getRegionalEtaScale(idx_drcr)->getCenter(eta6);
88 
89  unsigned eta4bit = 0;
90  if (fabs(etaValue) < theGMTScales->getOvlEtaScale(idx_drcr)->getScaleMin() ||
91  fabs(etaValue) > theGMTScales->getOvlEtaScale(idx_drcr)->getScaleMax()) {
92  eta4bit = 7; // out of range code is max pos value
93  }
94 
95  else {
96  eta4bit = theGMTScales->getOvlEtaScale(idx_drcr)->getPacked(etaValue);
97  // cout << "etaValue = " << etaValue << " eta OVERLAP= " << eta4bit << endl;
98  }
99 
100  return eta4bit;
101 }
L1MuPacking.h
L1MuGMTLFOvlEtaConvLUT::fRPC
Definition: L1MuGMTLFOvlEtaConvLUT.h:40
L1MuGMTScales
Definition: L1MuGMTScales.h:34
L1MuGMTLFOvlEtaConvLUT::ovlCSC
Definition: L1MuGMTLFOvlEtaConvLUT.h:40
heavyIonCSV_trainingSettings.idx
idx
Definition: heavyIonCSV_trainingSettings.py:5
L1MuGMTConfig::getGMTScales
static const L1MuGMTScales * getGMTScales()
Definition: L1MuGMTConfig.h:172
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
L1MuGMTLFOvlEtaConvLUT::bRPC
Definition: L1MuGMTLFOvlEtaConvLUT.h:40
L1MuGMTLFOvlEtaConvLUT::InitParameters
void InitParameters()
Initialize scales, configuration parameters, alignment constants, ...
Definition: L1MuGMTLFOvlEtaConvLUT.cc:38
L1MuGMTScales::getOvlEtaScale
const L1MuScale * getOvlEtaScale(int isys) const
get the overlap eta scale (4 bits); isys = 0(DT), 1(bRPC), 2(CSC), 3(fwdRPC)
Definition: L1MuGMTScales.h:204
L1MuScale::getScaleMin
virtual float getScaleMin() const =0
get the lower edge of the first bin
L1MuGMTConfig.h
L1MuTriggerScales.h
L1MuGMTLFOvlEtaConvLUT.h
L1MuTriggerScales
Definition: L1MuTriggerScales.h:33
L1MuGMTScales.h
L1MuGMTLFOvlEtaConvLUT::TheLookupFunction
unsigned TheLookupFunction(int idx, unsigned eta6) const
The lookup function - here the functionality of the LUT is implemented.
Definition: L1MuGMTLFOvlEtaConvLUT.cc:56
L1MuGMTLFOvlEtaConvLUT::ovlDT
Definition: L1MuGMTLFOvlEtaConvLUT.h:40
L1MuGMTLFOvlEtaConvLUT::CSC
Definition: L1MuGMTLFOvlEtaConvLUT.h:40
L1MuScale::getPacked
virtual unsigned getPacked(float value) const =0
pack a value
HLT_FULL_cff.eta6
eta6
Definition: HLT_FULL_cff.py:9539
L1MuGMTLFOvlEtaConvLUT::DT
Definition: L1MuGMTLFOvlEtaConvLUT.h:40
L1MuScale::getScaleMax
virtual float getScaleMax() const =0
get the upper edge of the last bin
L1MuScale::getCenter
virtual float getCenter(unsigned packed) const =0
get the center of bin represented by packed