25 unsigned short int pattern = ((theadd >> 8) & 0xf);
26 unsigned short int strip = (theadd & 0xff);
36 edm::LogWarning(
"CSCSectorReceiverMiniLUT") <<
"+++ Value of strip, " << strip <<
", exceeds max allowed, " 39 if (data.phi_local >= maxPhiL)
41 <<
"+++ Value of phi_local, " << data.phi_local <<
", exceeds max allowed, " 46 data.phi_bend_local = pattern & 0x3F;
52 unsigned short sector,
54 unsigned short subsector,
57 if (endcap < 1 || endcap > 2)
59 <<
"+++ Value of endcap, " << endcap <<
", is out of bounds, [1, 2] +++\n";
60 if (sector < 1 || sector > 6)
62 <<
"+++ Value of sector, " << sector <<
", is out of bounds, [1, 6] +++\n";
63 if (station < 1 || station > 4)
65 <<
"+++ Value of station, " << station <<
", is out of bounds, [1, 4] +++\n";
69 unsigned short int tcscid = ((theadd >> 15) & 0xf);
70 unsigned short int lclPhi = ((theadd >> 6) & 0x3);
71 unsigned short int WG = ((theadd >> 8) & 0x7f);
72 unsigned short int bend = ((theadd)&0x3f);
77 unsigned short int cscid = (tcscid > 9) ? tcscid - 9 : tcscid;
79 unsigned short int lclPhip = 0;
80 if (lclPhi == 1 || lclPhi == 3)
85 (
gbl_eta_params[endcap - 1][sector - 1][station - 1][subsector - 1][lclPhi][cscid - 1][0] +
86 gbl_eta_params[endcap - 1][sector - 1][station - 1][subsector - 1][lclPhi][cscid - 1][1] *
87 log(
gbl_eta_params[endcap - 1][sector - 1][station - 1][subsector - 1][lclPhi][cscid - 1][2] + WG));
92 (
gbl_eta_params[endcap - 1][sector - 1][station - 1][subsector - 1][lclPhip][cscid - 1][0] +
93 gbl_eta_params[endcap - 1][sector - 1][station - 1][subsector - 1][lclPhip][cscid - 1][1] *
94 log(
gbl_eta_params[endcap - 1][sector - 1][station - 1][subsector - 1][lclPhip][cscid - 1][2] + WG));
101 if (gangedME1a && (tcscid < 4) && (lclPhi == 3)) {
108 eta_temp = (
gbl_eta_params[endcap - 1][sector - 1][station - 1][0][lclPhi][cscid - 1][0] +
109 gbl_eta_params[endcap - 1][sector - 1][station - 1][0][lclPhi][cscid - 1][1] *
110 log(
gbl_eta_params[endcap - 1][sector - 1][station - 1][0][lclPhi][cscid - 1][2] + WG));
116 <<
"+++ Value of cscid, " << tcscid <<
", is out of bounds, [1, 9] -- or --" 122 data.global_eta = eta_temp;
130 data.global_bend = bend & 0x1F;
136 unsigned short sector,
138 unsigned short subsector,
141 if (endcap < 1 || endcap > 2)
143 <<
"+++ Value of endcap, " << endcap <<
", is out of bounds, [1, 2] +++\n";
144 if (sector < 1 || sector > 6)
146 <<
"+++ Value of sector, " << sector <<
", is out of bounds, [1, 6] +++\n";
147 if (station < 1 || station > 4)
149 <<
"+++ Value of station, " << station <<
", is out of bounds, [1, 4] +++\n";
155 unsigned short int cscid = ((theadd >> 15) & 0xf);
156 unsigned short int lclPhi = (theadd & 0x3ff);
158 lclPhi = lclPhi / 0.625;
164 int strip =
static_cast<int>(lclPhi / binPhiL);
165 if (station == 1 && (cscid <= 3) &&
166 (strip >= 127 && strip < 224)) {
172 ? lclPhi = (strip - 127 + 31) * (4 * binPhiL / 3)
180 if (station == 1 && ((cscid <= 3) || (cscid >= 7))) {
190 if (station == 1 && (cscid >= 10)) {
191 lclPhi = strip * (4 * binPhiL / 3);
196 if ((cscid > 0) && (cscid <= 9)) {
197 if ((station == 1) && (lclPhi < maxPhiL))
198 data.global_phi = (
gbl_phi_me_params[endcap - 1][sector - 1][station - 1][subsector - 1][cscid - 1][0] +
199 gbl_phi_me_params[endcap - 1][sector - 1][station - 1][subsector - 1][cscid - 1][1] * lclPhi);
200 else if ((station == 1) && (lclPhi >= maxPhiL))
202 (
gbl_phi_me_params[endcap - 1][sector - 1][station - 1][subsector - 1][cscid - 1][0] +
203 gbl_phi_me_params[endcap - 1][sector - 1][station - 1][subsector - 1][cscid - 1][1] * (maxPhiL - 1));
205 data.global_phi = (
gbl_phi_me_params[endcap - 1][sector - 1][station - 1][0][cscid - 1][0] +
206 gbl_phi_me_params[endcap - 1][sector - 1][station - 1][0][cscid - 1][1] * lclPhi);
209 <<
"+++ Value of cscid, " << cscid <<
", is out of bounds, [1, 9] +++\n";
211 if (data.global_phi >= maxPhiG)
213 <<
"+++ Value of global_phi, " << data.global_phi <<
", exceeds max allowed, " << maxPhiG - 1 <<
" +++\n";
219 unsigned short endcap,
unsigned short sector,
unsigned short subsector,
unsigned theadd,
const bool gangedME1a) {
220 if (endcap < 1 || endcap > 2)
222 <<
"+++ Value of endcap, " << endcap <<
", is out of bounds, [1, 2] +++\n";
223 if (sector < 1 || sector > 6)
225 <<
"+++ Value of sector, " << sector <<
", is out of bounds, [1, 6] +++\n";
231 unsigned short int cscid = ((theadd >> 15) & 0xf);
232 unsigned short int lclPhi = (theadd & 0x3ff);
234 lclPhi = lclPhi / 0.625;
236 if ((cscid <= 3) || (cscid >= 7))
241 if ((cscid > 0) && (cscid <= 9)) {
242 if (lclPhi < maxPhiL)
243 data.global_phi = (
gbl_phi_mb_params[endcap - 1][sector - 1][subsector - 1][cscid - 1][0] +
244 gbl_phi_mb_params[endcap - 1][sector - 1][subsector - 1][cscid - 1][1] * lclPhi);
246 data.global_phi = (
gbl_phi_mb_params[endcap - 1][sector - 1][subsector - 1][cscid - 1][0] +
247 gbl_phi_mb_params[endcap - 1][sector - 1][subsector - 1][cscid - 1][1] * (maxPhiL - 1));
250 <<
"+++ Value of cscid, " << cscid <<
", is out of bounds, [1, 9] +++\n";
252 if (data.global_phi >= maxPhiG)
254 <<
"+++ Value of global_phi, " << data.global_phi <<
", exceeds max allowed, " << maxPhiG - 1 <<
" +++\n";
256 if (data.global_phi >= maxPhiG)
258 <<
"+++ Value of global_phi, " << data.global_phi <<
", exceeds max allowed, " << maxPhiG - 1 <<
" +++\n";
static global_phi_data calcGlobalPhiMEMini(unsigned short endcap, unsigned short sector, unsigned short station, unsigned short subsector, unsigned theadd, const bool gangedME1a)
static const unsigned short int gbl_eta_bounds[2][6][4][2][4][9][2]
static const float gbl_eta_params[2][6][4][2][4][9][3]
static const float lcl_phi_param1
static const float lcl_phi_param0[1<< 4]
static lclphidat calcLocalPhiMini(unsigned theadd, const bool gangedME1a)
static global_phi_data calcGlobalPhiMBMini(unsigned short endcap, unsigned short sector, unsigned short subsector, unsigned theadd, const bool gangedME1a)
class global_phi_data gblphidat
class local_phi_data lclphidat
Data Types.
static const float gbl_phi_mb_params[2][6][2][9][2]
char data[epos_bytes_allocation]
static const float gbl_phi_me_params[2][6][4][2][9][2]
class global_eta_data gbletadat
static global_eta_data calcGlobalEtaMEMini(unsigned short endcap, unsigned short sector, unsigned short station, unsigned short subsector, unsigned theadd, const bool gangedME1a)