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, "
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)
101 if (
gangedME1a && (tcscid < 4) && (lclPhi == 3)) {
116 <<
"+++ Value of cscid, " << tcscid <<
", is out of bounds, [1, 9] -- or --"
122 data.global_eta = eta_temp;
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) &&
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))
200 else if ((
station == 1) && (lclPhi >= maxPhiL))
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)
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";