File indexing completed on 2023-03-17 11:11:25
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018 #include "L1Trigger/GlobalMuonTrigger/src/L1MuGMTLFPhiProEtaConvLUT.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 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0035
0036
0037
0038
0039
0040 void L1MuGMTLFPhiProEtaConvLUT::InitParameters() {}
0041
0042
0043
0044
0045
0046
0047
0048
0049
0050 unsigned L1MuGMTLFPhiProEtaConvLUT::TheLookupFunction(int idx, unsigned eta_in) const {
0051
0052
0053
0054
0055 const L1MuGMTScales* theGMTScales = L1MuGMTConfig::getGMTScales();
0056 const L1MuTriggerScales* theTriggerScales = L1MuGMTConfig::getTriggerScales();
0057
0058 int isRPC = idx % 2;
0059 int isFWD = idx / 2;
0060
0061 float etaValue = theTriggerScales->getRegionalEtaScale(idx)->getCenter(eta_in);
0062
0063 unsigned eta4bit = 0;
0064 if ((isRPC && isFWD && fabs(etaValue) < theGMTScales->getReducedEtaScale(3)->getScaleMin()) ||
0065 (isRPC && !isFWD && fabs(etaValue) > theGMTScales->getReducedEtaScale(1)->getScaleMax())) {
0066 if (!m_saveFlag)
0067 edm::LogWarning("LUTRangeViolation") << "L1MuGMTMIAUEtaConvLUT::TheLookupFunction: RPC "
0068 << (isFWD ? "fwd" : "brl") << " eta value out of range: " << etaValue;
0069 } else
0070 eta4bit = theGMTScales->getReducedEtaScale(idx)->getPacked(etaValue);
0071
0072 return eta4bit;
0073 }