CMS 3D CMS Logo

L1MuGMTLFDeltaEtaLUT.cc
Go to the documentation of this file.
1 //-------------------------------------------------
2 //
3 // Class: L1MuGMTLFDeltaEtaLUT
4 //
5 // this class was automatically generated by L1MuGMTLUT::MakeSubClass()
6 //
7 //
8 // Author :
9 // H. Sakulin HEPHY Vienna
10 //
11 // Migrated to CMSSW:
12 // I. Mikulec
13 //
14 //--------------------------------------------------
15 
16 //-----------------------
17 // This Class's Header --
18 //-----------------------
20 
21 //------------------------------------
22 // Collaborating Class Declarations --
23 //------------------------------------
28 
30 
31 unsigned L1MuGMTLFDeltaEtaLUT::TheLookupFunction(int idx, unsigned eta_dtcsc, unsigned eta_rpc) const {
32  const L1MuGMTScales* theGMTScales = L1MuGMTConfig::getGMTScales();
33  const L1MuTriggerScales* theTriggerScales = L1MuGMTConfig::getTriggerScales();
34 
35  // idx is DTRPC CSCRPC
36 
37  float etaValue_dtcsc = theTriggerScales->getRegionalEtaScale(idx * 2)->getCenter(eta_dtcsc);
38  float etaValue_rpc = theTriggerScales->getRegionalEtaScale(idx * 2 + 1)->getCenter(eta_rpc);
39 
40  float delta_eta = etaValue_dtcsc - etaValue_rpc;
41 
42  unsigned delta_eta_4bit = 0;
43 
44  // check out of range
45  if (delta_eta < theGMTScales->getDeltaEtaScale(idx)->getScaleMin() ||
46  delta_eta > theGMTScales->getDeltaEtaScale(idx)->getScaleMax()) {
48  delta_eta_4bit = pack.packedFromIdx(-8);
49  } else {
50  delta_eta_4bit = theGMTScales->getDeltaEtaScale(idx)->getPacked(delta_eta);
51  }
52 
53  // cout << "delta-eta LUT : idx= " << idx
54  // << ", etaValue_dtcsc = " << etaValue_dtcsc
55  // << ", etaValue_rpc = " << etaValue_rpc
56  // << ", delta_eta = " << delta_eta
57  // << ", packed = " << delta_eta_4bit
58  // << endl;
59 
60  return delta_eta_4bit;
61 }
L1MuGMTLFDeltaEtaLUT::InitParameters
void InitParameters()
Initialize scales, configuration parameters, alignment constants, ...
Definition: L1MuGMTLFDeltaEtaLUT.cc:29
L1MuPacking.h
L1MuGMTScales
Definition: L1MuGMTScales.h:34
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
L1MuGMTConfig.h
L1MuGMTScales::getDeltaEtaScale
const L1MuScale * getDeltaEtaScale(int idx) const
get the delta eta scale; idx = 0(DT=RPC), 1(CSC-RPC), 2(DT-CSC), 3(CSC-DT), 4(bRPC-CSC),...
Definition: L1MuGMTScales.h:194
L1MuGMTLFDeltaEtaLUT.h
L1MuTriggerScales.h
timeUnitHelper.pack
def pack(high, low)
Definition: timeUnitHelper.py:3
L1MuTriggerScales
Definition: L1MuTriggerScales.h:33
L1MuGMTScales.h
L1MuGMTLFDeltaEtaLUT::TheLookupFunction
unsigned TheLookupFunction(int idx, unsigned eta_dtcsc, unsigned eta_rpc) const
The lookup function - here the functionality of the LUT is implemented.
Definition: L1MuGMTLFDeltaEtaLUT.cc:31
L1MuSignedPacking
Definition: L1MuPacking.h:94
L1MuScale::getPacked
virtual unsigned getPacked(float value) const =0
pack a value
HLT_FULL_cff.delta_eta
delta_eta
Definition: HLT_FULL_cff.py:11671
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