Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:51:21

0001 //-------------------------------------------------
0002 //
0003 //   Class: L1MuDTTFMasks
0004 //
0005 //   Description: DTTF Masks from OMDS
0006 //
0007 //
0008 //   $Date: 2009/05/12 10:38:35 $
0009 //   $Revision: 1.2 $
0010 //
0011 //   Author :
0012 //   J. Troconiz              UAM Madrid
0013 //
0014 //--------------------------------------------------
0015 
0016 //-----------------------
0017 // This Class's Header --
0018 //-----------------------
0019 
0020 #include "CondFormats/L1TObjects/interface/L1MuDTTFMasks.h"
0021 
0022 //---------------
0023 // C++ Headers --
0024 //---------------
0025 
0026 #include <iostream>
0027 #include <ostream>
0028 #include <iomanip>
0029 #include <string>
0030 
0031 //-------------------------------
0032 // Collaborating Class Headers --
0033 //-------------------------------
0034 
0035 using namespace std;
0036 
0037 // --------------------------------
0038 //       class L1MuDTTFMasks
0039 //---------------------------------
0040 
0041 //--------------
0042 // Operations --
0043 //--------------
0044 
0045 //
0046 // reset parameters
0047 //
0048 void L1MuDTTFMasks::reset() {
0049   for (int i = 0; i < 6; i++) {
0050     for (int j = 0; j < 12; j++) {
0051       inrec_chdis_st1[i][j] = false;
0052       inrec_chdis_st2[i][j] = false;
0053       inrec_chdis_st3[i][j] = false;
0054       inrec_chdis_st4[i][j] = false;
0055       inrec_chdis_csc[i][j] = false;
0056       etsoc_chdis_st1[i][j] = false;
0057       etsoc_chdis_st2[i][j] = false;
0058       etsoc_chdis_st3[i][j] = false;
0059     }
0060   }
0061 }
0062 
0063 void L1MuDTTFMasks::set_inrec_chdis_st1(int wh, int sc, const bool val) {
0064   if (check(wh, sc) == -99)
0065     return;
0066   inrec_chdis_st1[check(wh, sc)][sc] = val;
0067 }
0068 
0069 bool L1MuDTTFMasks::get_inrec_chdis_st1(int wh, int sc) const {
0070   if (check(wh, sc) == -99)
0071     return false;
0072   return inrec_chdis_st1[check(wh, sc)][sc];
0073 }
0074 
0075 void L1MuDTTFMasks::set_inrec_chdis_st2(int wh, int sc, const bool val) {
0076   if (check(wh, sc) == -99)
0077     return;
0078   inrec_chdis_st2[check(wh, sc)][sc] = val;
0079 }
0080 
0081 bool L1MuDTTFMasks::get_inrec_chdis_st2(int wh, int sc) const {
0082   if (check(wh, sc) == -99)
0083     return false;
0084   return inrec_chdis_st2[check(wh, sc)][sc];
0085 }
0086 
0087 void L1MuDTTFMasks::set_inrec_chdis_st3(int wh, int sc, const bool val) {
0088   if (check(wh, sc) == -99)
0089     return;
0090   inrec_chdis_st3[check(wh, sc)][sc] = val;
0091 }
0092 
0093 bool L1MuDTTFMasks::get_inrec_chdis_st3(int wh, int sc) const {
0094   if (check(wh, sc) == -99)
0095     return false;
0096   return inrec_chdis_st3[check(wh, sc)][sc];
0097 }
0098 
0099 void L1MuDTTFMasks::set_inrec_chdis_st4(int wh, int sc, const bool val) {
0100   if (check(wh, sc) == -99)
0101     return;
0102   inrec_chdis_st4[check(wh, sc)][sc] = val;
0103 }
0104 
0105 bool L1MuDTTFMasks::get_inrec_chdis_st4(int wh, int sc) const {
0106   if (check(wh, sc) == -99)
0107     return false;
0108   return inrec_chdis_st4[check(wh, sc)][sc];
0109 }
0110 
0111 void L1MuDTTFMasks::set_inrec_chdis_csc(int wh, int sc, const bool val) {
0112   if (check(wh, sc) == -99)
0113     return;
0114   inrec_chdis_csc[check(wh, sc)][sc] = val;
0115 }
0116 
0117 bool L1MuDTTFMasks::get_inrec_chdis_csc(int wh, int sc) const {
0118   if (check(wh, sc) == -99)
0119     return false;
0120   return inrec_chdis_csc[check(wh, sc)][sc];
0121 }
0122 
0123 void L1MuDTTFMasks::set_etsoc_chdis_st1(int wh, int sc, const bool val) {
0124   if (check(wh, sc) == -99)
0125     return;
0126   etsoc_chdis_st1[check(wh, sc)][sc] = val;
0127 }
0128 
0129 bool L1MuDTTFMasks::get_etsoc_chdis_st1(int wh, int sc) const {
0130   if (check(wh, sc) == -99)
0131     return false;
0132   return etsoc_chdis_st1[check(wh, sc)][sc];
0133 }
0134 
0135 void L1MuDTTFMasks::set_etsoc_chdis_st2(int wh, int sc, const bool val) {
0136   if (check(wh, sc) == -99)
0137     return;
0138   etsoc_chdis_st2[check(wh, sc)][sc] = val;
0139 }
0140 
0141 bool L1MuDTTFMasks::get_etsoc_chdis_st2(int wh, int sc) const {
0142   if (check(wh, sc) == -99)
0143     return false;
0144   return etsoc_chdis_st2[check(wh, sc)][sc];
0145 }
0146 
0147 void L1MuDTTFMasks::set_etsoc_chdis_st3(int wh, int sc, const bool val) {
0148   if (check(wh, sc) == -99)
0149     return;
0150   etsoc_chdis_st3[check(wh, sc)][sc] = val;
0151 }
0152 
0153 bool L1MuDTTFMasks::get_etsoc_chdis_st3(int wh, int sc) const {
0154   if (check(wh, sc) == -99)
0155     return false;
0156   return etsoc_chdis_st3[check(wh, sc)][sc];
0157 }
0158 
0159 int L1MuDTTFMasks::check(int wh, int sc) const {
0160   if (sc < 0 || sc > 11 || wh == 0 || wh > 3 || wh < -3)
0161     return -99;
0162 
0163   if (wh < 0)
0164     return wh + 3;
0165   else
0166     return wh + 2;
0167 }
0168 
0169 void L1MuDTTFMasks::print() const {
0170   cout << endl;
0171   cout << "L1 barrel Track Finder Masks :" << endl;
0172   cout << "==============================" << endl;
0173   cout << endl;
0174 
0175   cout << endl;
0176   cout << "Disable PHTF St.1 :" << endl;
0177   cout << "===================" << endl;
0178   cout << endl;
0179   for (int i = -3; i < 4; i++) {
0180     if (i == 0)
0181       continue;
0182     for (int j = 0; j < 12; j++) {
0183       cout << " " << setw(1) << get_inrec_chdis_st1(i, j);
0184     }
0185     cout << endl;
0186   }
0187 
0188   cout << endl;
0189   cout << "Disable PHTF St.2 :" << endl;
0190   cout << "===================" << endl;
0191   cout << endl;
0192   for (int i = -3; i < 4; i++) {
0193     if (i == 0)
0194       continue;
0195     for (int j = 0; j < 12; j++) {
0196       cout << " " << setw(1) << get_inrec_chdis_st2(i, j);
0197     }
0198     cout << endl;
0199   }
0200 
0201   cout << endl;
0202   cout << "Disable PHTF St.3 :" << endl;
0203   cout << "===================" << endl;
0204   cout << endl;
0205   for (int i = -3; i < 4; i++) {
0206     if (i == 0)
0207       continue;
0208     for (int j = 0; j < 12; j++) {
0209       cout << " " << setw(1) << get_inrec_chdis_st3(i, j);
0210     }
0211     cout << endl;
0212   }
0213 
0214   cout << endl;
0215   cout << "Disable PHTF St.4 :" << endl;
0216   cout << "===================" << endl;
0217   cout << endl;
0218   for (int i = -3; i < 4; i++) {
0219     if (i == 0)
0220       continue;
0221     for (int j = 0; j < 12; j++) {
0222       cout << " " << setw(1) << get_inrec_chdis_st4(i, j);
0223     }
0224     cout << endl;
0225   }
0226 
0227   cout << endl;
0228   cout << "Disable CSC :" << endl;
0229   cout << "=============" << endl;
0230   cout << endl;
0231   for (int i = -3; i < 4; i++) {
0232     if (i == 0)
0233       continue;
0234     for (int j = 0; j < 12; j++) {
0235       cout << " " << setw(1) << get_inrec_chdis_csc(i, j);
0236     }
0237     cout << endl;
0238   }
0239 
0240   cout << endl;
0241   cout << "Disable ETTF St.1 :" << endl;
0242   cout << "===================" << endl;
0243   cout << endl;
0244   for (int i = -3; i < 4; i++) {
0245     if (i == 0)
0246       continue;
0247     for (int j = 0; j < 12; j++) {
0248       cout << " " << setw(1) << get_etsoc_chdis_st1(i, j);
0249     }
0250     cout << endl;
0251   }
0252 
0253   cout << endl;
0254   cout << "Disable ETTF St.2 :" << endl;
0255   cout << "===================" << endl;
0256   cout << endl;
0257   for (int i = -3; i < 4; i++) {
0258     if (i == 0)
0259       continue;
0260     for (int j = 0; j < 12; j++) {
0261       cout << " " << setw(1) << get_etsoc_chdis_st2(i, j);
0262     }
0263     cout << endl;
0264   }
0265 
0266   cout << endl;
0267   cout << "Disable ETTF St.3 :" << endl;
0268   cout << "===================" << endl;
0269   cout << endl;
0270   for (int i = -3; i < 4; i++) {
0271     if (i == 0)
0272       continue;
0273     for (int j = 0; j < 12; j++) {
0274       cout << " " << setw(1) << get_etsoc_chdis_st3(i, j);
0275     }
0276     cout << endl;
0277   }
0278 }