Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #include "L1Trigger/GlobalMuonTrigger/src/L1MuGMTMIAUEtaProLUT.h"
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031 #include "L1Trigger/GlobalMuonTrigger/src/L1MuGMTConfig.h"
00032 #include "CondFormats/L1TObjects/interface/L1MuGMTScales.h"
00033 #include "CondFormats/L1TObjects/interface/L1MuTriggerScales.h"
00034 #include "CondFormats/L1TObjects/interface/L1MuTriggerPtScale.h"
00035 #include "CondFormats/L1TObjects/interface/L1MuPacking.h"
00036 #include "L1Trigger/GlobalMuonTrigger/src/L1MuGMTEtaLUT.h"
00037 #include "CondFormats/L1TObjects/interface/L1CaloGeometry.h"
00038
00039 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00040
00041
00042
00043
00044
00045 void L1MuGMTMIAUEtaProLUT::InitParameters() {
00046 m_IsolationCellSizeEta = L1MuGMTConfig::getIsolationCellSizeEta();
00047 }
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069 unsigned L1MuGMTMIAUEtaProLUT::TheLookupFunction (int idx, unsigned eta, unsigned pt, unsigned charge) const {
00070
00071
00072
00073
00074
00075 const L1MuTriggerScales* theTriggerScales = L1MuGMTConfig::getTriggerScales();
00076 const L1MuTriggerPtScale* theTriggerPtScale = L1MuGMTConfig::getTriggerPtScale();
00077 const L1CaloGeometry* theCaloGeom = L1MuGMTConfig::getCaloGeom() ;
00078
00079 int isRPC = idx % 2;
00080 int isFWD = idx / 4;
00081
00082 int isISO = (idx / 2) % 2;
00083
00084 int idx_drcr = isFWD * 2 + isRPC;
00085
00086 if (pt==0) return 0;
00087
00088 int ch_idx = (charge == 0) ? 1 : 0;
00089
00090 float oldeta = theTriggerScales->getRegionalEtaScale(idx_drcr)->getCenter(eta);
00091
00092 if (idx_drcr==2) oldeta = theTriggerScales->getRegionalEtaScale(idx_drcr)->getLowEdge(eta);
00093
00094 if ( (isRPC && isFWD && fabs(oldeta) < 1.04 ) ||
00095 (isRPC && !isFWD && fabs(oldeta) > 1.04 ) ) {
00096 if(!m_saveFlag) edm::LogWarning("LUTRangeViolation")
00097 << "L1MuGMTMIAUEtaProLUT::TheLookupFunction: RPC " << (isFWD?"fwd":"brl")
00098 << " eta value out of range: " << oldeta;
00099 }
00100
00101
00102 int isys = isFWD + 2 * isRPC;
00103 float neweta = L1MuGMTEtaLUT::eta (isys, isISO, ch_idx, oldeta,
00104 theTriggerPtScale->getPtScale()->getLowEdge(pt) );
00105
00106
00107
00108
00109
00110 unsigned icenter = theCaloGeom->globalEtaIndex( neweta ) - theCaloGeom->numberGctForwardEtaBinsPerHalf() ;
00111
00112 unsigned eta_select_word_14 = 1 << icenter;
00113
00114
00115 if (isISO) {
00116 int imin = icenter - ( m_IsolationCellSizeEta-1 ) / 2;
00117 int imax = icenter + ( m_IsolationCellSizeEta-1 ) / 2;
00118
00119
00120 if (m_IsolationCellSizeEta%2 == 0) {
00121
00122
00123 float bincenter = theCaloGeom->globalEtaBinCenter( icenter + theCaloGeom->numberGctForwardEtaBinsPerHalf() );
00124 if ( neweta > bincenter ) imax++;
00125 else imin--;
00126 }
00127 if (imin<0) imin=0;
00128 if (imax>13) imax=13;
00129
00130 for (int i=imin; i<=imax; i++ )
00131 eta_select_word_14 |= 1 << i ;
00132 }
00133
00134
00135
00136 unsigned eta_select_word;
00137 if (isFWD) {
00138 unsigned mask5 = (1<<5)-1;
00139 eta_select_word = eta_select_word_14 & mask5;
00140 eta_select_word |= ( eta_select_word_14 & (mask5 << 9) ) >> 4;
00141 }
00142 else {
00143 unsigned mask10 = (1<<10)-1;
00144 eta_select_word = ( eta_select_word_14 & (mask10 << 2) ) >> 2;
00145 }
00146
00147 return eta_select_word;
00148 }
00149
00150
00151
00152
00153
00154
00155
00156
00157
00158
00159
00160
00161
00162
00163
00164
00165
00166