File indexing completed on 2024-04-06 12:02:23
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020 #include "CondFormats/L1TObjects/interface/L1MuDTTFParameters.h"
0021
0022
0023
0024
0025
0026 #include <iostream>
0027 #include <ostream>
0028 #include <iomanip>
0029 #include <string>
0030
0031
0032
0033
0034
0035 using namespace std;
0036
0037
0038
0039
0040
0041
0042
0043
0044
0045
0046
0047
0048 void L1MuDTTFParameters::reset() {
0049 for (int i = 0; i < 6; i++) {
0050 for (int j = 0; j < 12; j++) {
0051 inrec_qual_st1[i][j] = 0;
0052 inrec_qual_st2[i][j] = 0;
0053 inrec_qual_st3[i][j] = 0;
0054 inrec_qual_st4[i][j] = 0;
0055 soc_stdis_n[i][j] = 0;
0056 soc_stdis_wl[i][j] = 0;
0057 soc_stdis_wr[i][j] = 0;
0058 soc_stdis_zl[i][j] = 0;
0059 soc_stdis_zr[i][j] = 0;
0060 soc_qcut_st1[i][j] = 0;
0061 soc_qcut_st2[i][j] = 0;
0062 soc_qcut_st4[i][j] = 0;
0063 soc_qual_csc[i][j] = 0;
0064 soc_run_21[i][j] = false;
0065 soc_nbx_del[i][j] = false;
0066 soc_csc_etacanc[i][j] = false;
0067 soc_openlut_extr[i][j] = false;
0068 }
0069 }
0070 }
0071
0072 void L1MuDTTFParameters::set_inrec_qual_st1(int wh, int sc, const unsigned short int val) {
0073 if (check(wh, sc) == -99)
0074 return;
0075 inrec_qual_st1[check(wh, sc)][sc] = val & 0x7;
0076 }
0077
0078 unsigned short int L1MuDTTFParameters::get_inrec_qual_st1(int wh, int sc) const {
0079 if (check(wh, sc) == -99)
0080 return 0;
0081 return (inrec_qual_st1[check(wh, sc)][sc]) & 0x7;
0082 }
0083
0084 void L1MuDTTFParameters::set_inrec_qual_st2(int wh, int sc, const unsigned short int val) {
0085 if (check(wh, sc) == -99)
0086 return;
0087 inrec_qual_st2[check(wh, sc)][sc] = val & 0x7;
0088 }
0089
0090 unsigned short int L1MuDTTFParameters::get_inrec_qual_st2(int wh, int sc) const {
0091 if (check(wh, sc) == -99)
0092 return 0;
0093 return (inrec_qual_st2[check(wh, sc)][sc]) & 0x7;
0094 }
0095
0096 void L1MuDTTFParameters::set_inrec_qual_st3(int wh, int sc, const unsigned short int val) {
0097 if (check(wh, sc) == -99)
0098 return;
0099 inrec_qual_st3[check(wh, sc)][sc] = val & 0x7;
0100 }
0101
0102 unsigned short int L1MuDTTFParameters::get_inrec_qual_st3(int wh, int sc) const {
0103 if (check(wh, sc) == -99)
0104 return 0;
0105 return (inrec_qual_st3[check(wh, sc)][sc]) & 0x7;
0106 }
0107
0108 void L1MuDTTFParameters::set_inrec_qual_st4(int wh, int sc, const unsigned short int val) {
0109 if (check(wh, sc) == -99)
0110 return;
0111 inrec_qual_st4[check(wh, sc)][sc] = val & 0x7;
0112 }
0113
0114 unsigned short int L1MuDTTFParameters::get_inrec_qual_st4(int wh, int sc) const {
0115 if (check(wh, sc) == -99)
0116 return 0;
0117 return (inrec_qual_st4[check(wh, sc)][sc]) & 0x7;
0118 }
0119
0120 void L1MuDTTFParameters::set_soc_stdis_n(int wh, int sc, const unsigned short int val) {
0121 if (check(wh, sc) == -99)
0122 return;
0123 soc_stdis_n[check(wh, sc)][sc] = val & 0x7;
0124 }
0125
0126 unsigned short int L1MuDTTFParameters::get_soc_stdis_n(int wh, int sc) const {
0127 if (check(wh, sc) == -99)
0128 return 0;
0129 return (soc_stdis_n[check(wh, sc)][sc]) & 0x7;
0130 }
0131
0132 void L1MuDTTFParameters::set_soc_stdis_wl(int wh, int sc, const unsigned short int val) {
0133 if (check(wh, sc) == -99)
0134 return;
0135 soc_stdis_wl[check(wh, sc)][sc] = val & 0x7;
0136 }
0137
0138 unsigned short int L1MuDTTFParameters::get_soc_stdis_wl(int wh, int sc) const {
0139 if (check(wh, sc) == -99)
0140 return 0;
0141 return (soc_stdis_wl[check(wh, sc)][sc]) & 0x7;
0142 }
0143
0144 void L1MuDTTFParameters::set_soc_stdis_wr(int wh, int sc, const unsigned short int val) {
0145 if (check(wh, sc) == -99)
0146 return;
0147 soc_stdis_wr[check(wh, sc)][sc] = val & 0x7;
0148 }
0149
0150 unsigned short int L1MuDTTFParameters::get_soc_stdis_wr(int wh, int sc) const {
0151 if (check(wh, sc) == -99)
0152 return 0;
0153 return (soc_stdis_wr[check(wh, sc)][sc]) & 0x7;
0154 }
0155
0156 void L1MuDTTFParameters::set_soc_stdis_zl(int wh, int sc, const unsigned short int val) {
0157 if (check(wh, sc) == -99)
0158 return;
0159 soc_stdis_zl[check(wh, sc)][sc] = val & 0x7;
0160 }
0161
0162 unsigned short int L1MuDTTFParameters::get_soc_stdis_zl(int wh, int sc) const {
0163 if (check(wh, sc) == -99)
0164 return 0;
0165 return (soc_stdis_zl[check(wh, sc)][sc]) & 0x7;
0166 }
0167
0168 void L1MuDTTFParameters::set_soc_stdis_zr(int wh, int sc, const unsigned short int val) {
0169 if (check(wh, sc) == -99)
0170 return;
0171 soc_stdis_zr[check(wh, sc)][sc] = val & 0x7;
0172 }
0173
0174 unsigned short int L1MuDTTFParameters::get_soc_stdis_zr(int wh, int sc) const {
0175 if (check(wh, sc) == -99)
0176 return 0;
0177 return (soc_stdis_zr[check(wh, sc)][sc]) & 0x7;
0178 }
0179
0180 void L1MuDTTFParameters::set_soc_qcut_st1(int wh, int sc, const unsigned short int val) {
0181 if (check(wh, sc) == -99)
0182 return;
0183 soc_qcut_st1[check(wh, sc)][sc] = val & 0x7;
0184 }
0185
0186 unsigned short int L1MuDTTFParameters::get_soc_qcut_st1(int wh, int sc) const {
0187 if (check(wh, sc) == -99)
0188 return 0;
0189 return (soc_qcut_st1[check(wh, sc)][sc]) & 0x7;
0190 }
0191
0192 void L1MuDTTFParameters::set_soc_qcut_st2(int wh, int sc, const unsigned short int val) {
0193 if (check(wh, sc) == -99)
0194 return;
0195 soc_qcut_st2[check(wh, sc)][sc] = val & 0x7;
0196 }
0197
0198 unsigned short int L1MuDTTFParameters::get_soc_qcut_st2(int wh, int sc) const {
0199 if (check(wh, sc) == -99)
0200 return 0;
0201 return (soc_qcut_st2[check(wh, sc)][sc]) & 0x7;
0202 }
0203
0204 void L1MuDTTFParameters::set_soc_qcut_st4(int wh, int sc, const unsigned short int val) {
0205 if (check(wh, sc) == -99)
0206 return;
0207 soc_qcut_st4[check(wh, sc)][sc] = val & 0x7;
0208 }
0209
0210 unsigned short int L1MuDTTFParameters::get_soc_qcut_st4(int wh, int sc) const {
0211 if (check(wh, sc) == -99)
0212 return 0;
0213 return (soc_qcut_st4[check(wh, sc)][sc]) & 0x7;
0214 }
0215
0216 void L1MuDTTFParameters::set_soc_qual_csc(int wh, int sc, const unsigned short int val) {
0217 if (check(wh, sc) == -99)
0218 return;
0219 soc_qual_csc[check(wh, sc)][sc] = val & 0x7;
0220 }
0221
0222 unsigned short int L1MuDTTFParameters::get_soc_qual_csc(int wh, int sc) const {
0223 if (check(wh, sc) == -99)
0224 return 0;
0225 return (soc_qual_csc[check(wh, sc)][sc]) & 0x7;
0226 }
0227
0228 void L1MuDTTFParameters::set_soc_run_21(int wh, int sc, const bool val) {
0229 if (check(wh, sc) == -99)
0230 return;
0231 soc_run_21[check(wh, sc)][sc] = val;
0232 }
0233
0234 bool L1MuDTTFParameters::get_soc_run_21(int wh, int sc) const {
0235 if (check(wh, sc) == -99)
0236 return false;
0237 return soc_run_21[check(wh, sc)][sc];
0238 }
0239
0240 void L1MuDTTFParameters::set_soc_nbx_del(int wh, int sc, const bool val) {
0241 if (check(wh, sc) == -99)
0242 return;
0243 soc_nbx_del[check(wh, sc)][sc] = val;
0244 }
0245
0246 bool L1MuDTTFParameters::get_soc_nbx_del(int wh, int sc) const {
0247 if (check(wh, sc) == -99)
0248 return false;
0249 return soc_nbx_del[check(wh, sc)][sc];
0250 }
0251
0252 void L1MuDTTFParameters::set_soc_csc_etacanc(int wh, int sc, const bool val) {
0253 if (check(wh, sc) == -99)
0254 return;
0255 soc_csc_etacanc[check(wh, sc)][sc] = val;
0256 }
0257
0258 bool L1MuDTTFParameters::get_soc_csc_etacanc(int wh, int sc) const {
0259 if (check(wh, sc) == -99)
0260 return false;
0261 return soc_csc_etacanc[check(wh, sc)][sc];
0262 }
0263
0264 void L1MuDTTFParameters::set_soc_openlut_extr(int wh, int sc, const bool val) {
0265 if (check(wh, sc) == -99)
0266 return;
0267 soc_openlut_extr[check(wh, sc)][sc] = val;
0268 }
0269
0270 bool L1MuDTTFParameters::get_soc_openlut_extr(int wh, int sc) const {
0271 if (check(wh, sc) == -99)
0272 return false;
0273 return soc_openlut_extr[check(wh, sc)][sc];
0274 }
0275
0276 int L1MuDTTFParameters::check(int wh, int sc) const {
0277 if (sc < 0 || sc > 11 || wh == 0 || wh > 3 || wh < -3)
0278 return -99;
0279
0280 if (wh < 0)
0281 return wh + 3;
0282 else
0283 return wh + 2;
0284 }
0285
0286 void L1MuDTTFParameters::print() const {
0287 cout << endl;
0288 cout << "L1 barrel Track Finder Parameters :" << endl;
0289 cout << "===================================" << endl;
0290 cout << endl;
0291
0292 cout << endl;
0293 cout << "Quality Cut St.1 :" << endl;
0294 cout << "==================" << endl;
0295 cout << endl;
0296 for (int i = -3; i < 4; i++) {
0297 if (i == 0)
0298 continue;
0299 for (int j = 0; j < 12; j++) {
0300 cout << " " << setw(1) << get_inrec_qual_st1(i, j);
0301 }
0302 cout << endl;
0303 }
0304
0305 cout << endl;
0306 cout << "Quality Cut St.2 :" << endl;
0307 cout << "==================" << endl;
0308 cout << endl;
0309 for (int i = -3; i < 4; i++) {
0310 if (i == 0)
0311 continue;
0312 for (int j = 0; j < 12; j++) {
0313 cout << " " << setw(1) << get_inrec_qual_st2(i, j);
0314 }
0315 cout << endl;
0316 }
0317
0318 cout << endl;
0319 cout << "Quality Cut St.3 :" << endl;
0320 cout << "==================" << endl;
0321 cout << endl;
0322 for (int i = -3; i < 4; i++) {
0323 if (i == 0)
0324 continue;
0325 for (int j = 0; j < 12; j++) {
0326 cout << " " << setw(1) << get_inrec_qual_st3(i, j);
0327 }
0328 cout << endl;
0329 }
0330
0331 cout << endl;
0332 cout << "Quality Cut St.4 :" << endl;
0333 cout << "==================" << endl;
0334 cout << endl;
0335 for (int i = -3; i < 4; i++) {
0336 if (i == 0)
0337 continue;
0338 for (int j = 0; j < 12; j++) {
0339 cout << " " << setw(1) << get_inrec_qual_st4(i, j);
0340 }
0341 cout << endl;
0342 }
0343
0344 cout << endl;
0345 cout << "Quality Cut Next Wheel :" << endl;
0346 cout << "========================" << endl;
0347 cout << endl;
0348 for (int i = -3; i < 4; i++) {
0349 if (i == 0)
0350 continue;
0351 for (int j = 0; j < 12; j++) {
0352 cout << " " << setw(1) << get_soc_stdis_n(i, j);
0353 }
0354 cout << endl;
0355 }
0356
0357 cout << endl;
0358 cout << "Quality Cut WL :" << endl;
0359 cout << "================" << endl;
0360 cout << endl;
0361 for (int i = -3; i < 4; i++) {
0362 if (i == 0)
0363 continue;
0364 for (int j = 0; j < 12; j++) {
0365 cout << " " << setw(1) << get_soc_stdis_wl(i, j);
0366 }
0367 cout << endl;
0368 }
0369
0370 cout << endl;
0371 cout << "Quality Cut WR :" << endl;
0372 cout << "================" << endl;
0373 cout << endl;
0374 for (int i = -3; i < 4; i++) {
0375 if (i == 0)
0376 continue;
0377 for (int j = 0; j < 12; j++) {
0378 cout << " " << setw(1) << get_soc_stdis_wr(i, j);
0379 }
0380 cout << endl;
0381 }
0382
0383 cout << endl;
0384 cout << "Quality Cut ZL :" << endl;
0385 cout << "================" << endl;
0386 cout << endl;
0387 for (int i = -3; i < 4; i++) {
0388 if (i == 0)
0389 continue;
0390 for (int j = 0; j < 12; j++) {
0391 cout << " " << setw(1) << get_soc_stdis_zl(i, j);
0392 }
0393 cout << endl;
0394 }
0395
0396 cout << endl;
0397 cout << " Quality Cut ZR :" << endl;
0398 cout << "=================" << endl;
0399 cout << endl;
0400 for (int i = -3; i < 4; i++) {
0401 if (i == 0)
0402 continue;
0403 for (int j = 0; j < 12; j++) {
0404 cout << " " << setw(1) << get_soc_stdis_zr(i, j);
0405 }
0406 cout << endl;
0407 }
0408
0409 cout << endl;
0410 cout << "Quality Cut SOC St.1 :" << endl;
0411 cout << "======================" << endl;
0412 cout << endl;
0413 for (int i = -3; i < 4; i++) {
0414 if (i == 0)
0415 continue;
0416 for (int j = 0; j < 12; j++) {
0417 cout << " " << setw(1) << get_soc_qcut_st1(i, j);
0418 }
0419 cout << endl;
0420 }
0421
0422 cout << endl;
0423 cout << "Quality Cut SOC St.2 :" << endl;
0424 cout << "======================" << endl;
0425 cout << endl;
0426 for (int i = -3; i < 4; i++) {
0427 if (i == 0)
0428 continue;
0429 for (int j = 0; j < 12; j++) {
0430 cout << " " << setw(1) << get_soc_qcut_st2(i, j);
0431 }
0432 cout << endl;
0433 }
0434
0435 cout << endl;
0436 cout << "Quality Cut SOC St.4 :" << endl;
0437 cout << "======================" << endl;
0438 cout << endl;
0439 for (int i = -3; i < 4; i++) {
0440 if (i == 0)
0441 continue;
0442 for (int j = 0; j < 12; j++) {
0443 cout << " " << setw(1) << get_soc_qcut_st4(i, j);
0444 }
0445 cout << endl;
0446 }
0447
0448 cout << endl;
0449 cout << "CSC Quality Cut :" << endl;
0450 cout << "=================" << endl;
0451 cout << endl;
0452 for (int i = -3; i < 4; i++) {
0453 if (i == 0)
0454 continue;
0455 for (int j = 0; j < 12; j++) {
0456 cout << " " << setw(1) << get_soc_qual_csc(i, j);
0457 }
0458 cout << endl;
0459 }
0460
0461 cout << endl;
0462 cout << "Extrapolation 21 :" << endl;
0463 cout << "==================" << endl;
0464 cout << endl;
0465 for (int i = -3; i < 4; i++) {
0466 if (i == 0)
0467 continue;
0468 for (int j = 0; j < 12; j++) {
0469 cout << " " << setw(1) << get_soc_run_21(i, j);
0470 }
0471 cout << endl;
0472 }
0473
0474 cout << endl;
0475 cout << "Herbert Scheme :" << endl;
0476 cout << "================" << endl;
0477 cout << endl;
0478 for (int i = -3; i < 4; i++) {
0479 if (i == 0)
0480 continue;
0481 for (int j = 0; j < 12; j++) {
0482 cout << " " << setw(1) << get_soc_nbx_del(i, j);
0483 }
0484 cout << endl;
0485 }
0486
0487 cout << endl;
0488 cout << "CSC Eta Cancellation :" << endl;
0489 cout << "======================" << endl;
0490 cout << endl;
0491 for (int i = -3; i < 4; i++) {
0492 if (i == 0)
0493 continue;
0494 for (int j = 0; j < 12; j++) {
0495 cout << " " << setw(1) << get_soc_csc_etacanc(i, j);
0496 }
0497 cout << endl;
0498 }
0499
0500 cout << endl;
0501 cout << "Open LUTs :" << endl;
0502 cout << "===========" << endl;
0503 cout << endl;
0504 for (int i = -3; i < 4; i++) {
0505 if (i == 0)
0506 continue;
0507 for (int j = 0; j < 12; j++) {
0508 cout << " " << setw(1) << get_soc_openlut_extr(i, j);
0509 }
0510 cout << endl;
0511 }
0512 }