File indexing completed on 2024-04-06 12:19:57
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018 #include "L1Trigger/GlobalMuonTrigger/src/L1MuGMTMIAUEtaConvLUT.h"
0019
0020
0021
0022
0023
0024
0025
0026
0027 #include "L1Trigger/GlobalMuonTrigger/src/L1MuGMTConfig.h"
0028 #include "CondFormats/L1TObjects/interface/L1MuGMTScales.h"
0029 #include "CondFormats/L1TObjects/interface/L1MuTriggerScales.h"
0030 #include "CondFormats/L1TObjects/interface/L1MuPacking.h"
0031
0032
0033
0034
0035
0036 void L1MuGMTMIAUEtaConvLUT::InitParameters() {}
0037
0038
0039
0040
0041
0042
0043
0044
0045
0046
0047
0048
0049
0050
0051
0052
0053 unsigned L1MuGMTMIAUEtaConvLUT::TheLookupFunction(int idx, unsigned eta_in) const {
0054
0055
0056
0057
0058 const L1MuGMTScales* theGMTScales = L1MuGMTConfig::getGMTScales();
0059 const L1MuTriggerScales* theTriggerScales = L1MuGMTConfig::getTriggerScales();
0060
0061 int isRPC = idx % 2;
0062 int isFWD = idx / 4;
0063
0064 int idx_drcr = isFWD * 2 + isRPC;
0065
0066 float etaValue = theTriggerScales->getRegionalEtaScale(idx_drcr)->getCenter(eta_in);
0067
0068 unsigned eta4bit = 0;
0069 if ((isRPC && isFWD && fabs(etaValue) < theGMTScales->getReducedEtaScale(3)->getScaleMin()) ||
0070 (isRPC && !isFWD && fabs(etaValue) > theGMTScales->getReducedEtaScale(1)->getScaleMax())) {
0071 if (!m_saveFlag)
0072 edm::LogWarning("LUTRangeViolation") << "L1MuGMTMIAUEtaConvLUT::TheLookupFunction: RPC "
0073 << (isFWD ? "fwd" : "brl") << " eta value out of range: " << etaValue;
0074 } else
0075 eta4bit = theGMTScales->getReducedEtaScale(idx_drcr)->getPacked(etaValue);
0076
0077 return eta4bit;
0078 }