File indexing completed on 2024-04-06 12:19:56
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018 #include "L1Trigger/GlobalMuonTrigger/src/L1MuGMTLFOvlEtaConvLUT.h"
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029 #include "L1Trigger/GlobalMuonTrigger/src/L1MuGMTConfig.h"
0030 #include "CondFormats/L1TObjects/interface/L1MuGMTScales.h"
0031 #include "CondFormats/L1TObjects/interface/L1MuTriggerScales.h"
0032 #include "CondFormats/L1TObjects/interface/L1MuPacking.h"
0033
0034
0035
0036
0037
0038 void L1MuGMTLFOvlEtaConvLUT::InitParameters() {}
0039
0040
0041
0042
0043
0044
0045
0046
0047
0048
0049
0050
0051
0052
0053
0054
0055
0056 unsigned L1MuGMTLFOvlEtaConvLUT::TheLookupFunction(int idx, unsigned eta6) const {
0057
0058
0059
0060
0061 const L1MuGMTScales* theGMTScales = L1MuGMTConfig::getGMTScales();
0062 const L1MuTriggerScales* theTriggerScales = L1MuGMTConfig::getTriggerScales();
0063
0064 int idx_drcr = 0;
0065
0066 switch (idx) {
0067 case DT:
0068 idx_drcr = 0;
0069 break;
0070 case CSC:
0071 idx_drcr = 2;
0072 break;
0073 case bRPC:
0074 idx_drcr = 1;
0075 break;
0076 case fRPC:
0077 idx_drcr = 3;
0078 break;
0079 case ovlCSC:
0080 idx_drcr = 2;
0081 break;
0082 case ovlDT:
0083 idx_drcr = 0;
0084 break;
0085 }
0086
0087 float etaValue = theTriggerScales->getRegionalEtaScale(idx_drcr)->getCenter(eta6);
0088
0089 unsigned eta4bit = 0;
0090 if (fabs(etaValue) < theGMTScales->getOvlEtaScale(idx_drcr)->getScaleMin() ||
0091 fabs(etaValue) > theGMTScales->getOvlEtaScale(idx_drcr)->getScaleMax()) {
0092 eta4bit = 7;
0093 }
0094
0095 else {
0096 eta4bit = theGMTScales->getOvlEtaScale(idx_drcr)->getPacked(etaValue);
0097
0098 }
0099
0100 return eta4bit;
0101 }