00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #include "CondFormats/L1TObjects/interface/L1MuDTTFMasks.h"
00021
00022
00023
00024
00025
00026 #include <iostream>
00027 #include <ostream>
00028 #include <iomanip>
00029 #include <string>
00030
00031
00032
00033
00034
00035 using namespace std;
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048 void L1MuDTTFMasks::reset() {
00049
00050 for( int i=0; i<6; i++ ) {
00051 for( int j=0; j<12; j++ ) {
00052
00053 inrec_chdis_st1[i][j] = false;
00054 inrec_chdis_st2[i][j] = false;
00055 inrec_chdis_st3[i][j] = false;
00056 inrec_chdis_st4[i][j] = false;
00057 inrec_chdis_csc[i][j] = false;
00058 etsoc_chdis_st1[i][j] = false;
00059 etsoc_chdis_st2[i][j] = false;
00060 etsoc_chdis_st3[i][j] = false;
00061 }
00062 }
00063 }
00064
00065 void L1MuDTTFMasks::set_inrec_chdis_st1(int wh, int sc, const bool val) {
00066
00067 if ( check(wh,sc) == -99 ) return;
00068 inrec_chdis_st1[check(wh,sc)][sc] = val;
00069 }
00070
00071 bool L1MuDTTFMasks::get_inrec_chdis_st1(int wh, int sc) const{
00072
00073 if ( check(wh,sc) == -99 ) return false;
00074 return inrec_chdis_st1[check(wh,sc)][sc];
00075 }
00076
00077 void L1MuDTTFMasks::set_inrec_chdis_st2(int wh, int sc, const bool val) {
00078
00079 if ( check(wh,sc) == -99 ) return;
00080 inrec_chdis_st2[check(wh,sc)][sc] = val;
00081 }
00082
00083 bool L1MuDTTFMasks::get_inrec_chdis_st2(int wh, int sc) const{
00084
00085 if ( check(wh,sc) == -99 ) return false;
00086 return inrec_chdis_st2[check(wh,sc)][sc];
00087 }
00088
00089 void L1MuDTTFMasks::set_inrec_chdis_st3(int wh, int sc, const bool val) {
00090
00091 if ( check(wh,sc) == -99 ) return;
00092 inrec_chdis_st3[check(wh,sc)][sc] = val;
00093 }
00094
00095 bool L1MuDTTFMasks::get_inrec_chdis_st3(int wh, int sc) const{
00096
00097 if ( check(wh,sc) == -99 ) return false;
00098 return inrec_chdis_st3[check(wh,sc)][sc];
00099 }
00100
00101 void L1MuDTTFMasks::set_inrec_chdis_st4(int wh, int sc, const bool val) {
00102
00103 if ( check(wh,sc) == -99 ) return;
00104 inrec_chdis_st4[check(wh,sc)][sc] = val;
00105 }
00106
00107 bool L1MuDTTFMasks::get_inrec_chdis_st4(int wh, int sc) const{
00108
00109 if ( check(wh,sc) == -99 ) return false;
00110 return inrec_chdis_st4[check(wh,sc)][sc];
00111 }
00112
00113 void L1MuDTTFMasks::set_inrec_chdis_csc(int wh, int sc, const bool val) {
00114
00115 if ( check(wh,sc) == -99 ) return;
00116 inrec_chdis_csc[check(wh,sc)][sc] = val;
00117 }
00118
00119 bool L1MuDTTFMasks::get_inrec_chdis_csc(int wh, int sc) const{
00120
00121 if ( check(wh,sc) == -99 ) return false;
00122 return inrec_chdis_csc[check(wh,sc)][sc];
00123 }
00124
00125 void L1MuDTTFMasks::set_etsoc_chdis_st1(int wh, int sc, const bool val) {
00126
00127 if ( check(wh,sc) == -99 ) return;
00128 etsoc_chdis_st1[check(wh,sc)][sc] = val;
00129 }
00130
00131 bool L1MuDTTFMasks::get_etsoc_chdis_st1(int wh, int sc) const{
00132
00133 if ( check(wh,sc) == -99 ) return false;
00134 return etsoc_chdis_st1[check(wh,sc)][sc];
00135 }
00136
00137 void L1MuDTTFMasks::set_etsoc_chdis_st2(int wh, int sc, const bool val) {
00138
00139 if ( check(wh,sc) == -99 ) return;
00140 etsoc_chdis_st2[check(wh,sc)][sc] = val;
00141 }
00142
00143 bool L1MuDTTFMasks::get_etsoc_chdis_st2(int wh, int sc) const{
00144
00145 if ( check(wh,sc) == -99 ) return false;
00146 return etsoc_chdis_st2[check(wh,sc)][sc];
00147 }
00148
00149 void L1MuDTTFMasks::set_etsoc_chdis_st3(int wh, int sc, const bool val) {
00150
00151 if ( check(wh,sc) == -99 ) return;
00152 etsoc_chdis_st3[check(wh,sc)][sc] = val;
00153 }
00154
00155 bool L1MuDTTFMasks::get_etsoc_chdis_st3(int wh, int sc) const{
00156
00157 if ( check(wh,sc) == -99 ) return false;
00158 return etsoc_chdis_st3[check(wh,sc)][sc];
00159 }
00160
00161 int L1MuDTTFMasks::check(int wh, int sc) const {
00162
00163 if ( sc<0 || sc>11 || wh==0 || wh>3 || wh<-3 ) return -99;
00164
00165 if ( wh < 0 ) return wh+3;
00166 else return wh+2;
00167 }
00168
00169 void L1MuDTTFMasks::print() const {
00170
00171 cout << endl;
00172 cout << "L1 barrel Track Finder Masks :" << endl;
00173 cout << "==============================" << endl;
00174 cout << endl;
00175
00176 cout << endl;
00177 cout << "Disable PHTF St.1 :" << endl;
00178 cout << "===================" << endl;
00179 cout << endl;
00180 for( int i=-3; i<4; i++ ) {
00181 if ( i == 0 ) continue;
00182 for( int j=0; j<12; j++ ) { cout << " " << setw(1) << get_inrec_chdis_st1(i,j); }
00183 cout << endl; }
00184
00185 cout << endl;
00186 cout << "Disable PHTF St.2 :" << endl;
00187 cout << "===================" << endl;
00188 cout << endl;
00189 for( int i=-3; i<4; i++ ) {
00190 if ( i == 0 ) continue;
00191 for( int j=0; j<12; j++ ) { cout << " " << setw(1) << get_inrec_chdis_st2(i,j); }
00192 cout << endl; }
00193
00194 cout << endl;
00195 cout << "Disable PHTF St.3 :" << endl;
00196 cout << "===================" << endl;
00197 cout << endl;
00198 for( int i=-3; i<4; i++ ) {
00199 if ( i == 0 ) continue;
00200 for( int j=0; j<12; j++ ) { cout << " " << setw(1) << get_inrec_chdis_st3(i,j); }
00201 cout << endl; }
00202
00203 cout << endl;
00204 cout << "Disable PHTF St.4 :" << endl;
00205 cout << "===================" << endl;
00206 cout << endl;
00207 for( int i=-3; i<4; i++ ) {
00208 if ( i == 0 ) continue;
00209 for( int j=0; j<12; j++ ) { cout << " " << setw(1) << get_inrec_chdis_st4(i,j); }
00210 cout << endl; }
00211
00212 cout << endl;
00213 cout << "Disable CSC :" << endl;
00214 cout << "=============" << endl;
00215 cout << endl;
00216 for( int i=-3; i<4; i++ ) {
00217 if ( i == 0 ) continue;
00218 for( int j=0; j<12; j++ ) { cout << " " << setw(1) << get_inrec_chdis_csc(i,j); }
00219 cout << endl; }
00220
00221 cout << endl;
00222 cout << "Disable ETTF St.1 :" << endl;
00223 cout << "===================" << endl;
00224 cout << endl;
00225 for( int i=-3; i<4; i++ ) {
00226 if ( i == 0 ) continue;
00227 for( int j=0; j<12; j++ ) { cout << " " << setw(1) << get_etsoc_chdis_st1(i,j); }
00228 cout << endl; }
00229
00230 cout << endl;
00231 cout << "Disable ETTF St.2 :" << endl;
00232 cout << "===================" << endl;
00233 cout << endl;
00234 for( int i=-3; i<4; i++ ) {
00235 if ( i == 0 ) continue;
00236 for( int j=0; j<12; j++ ) { cout << " " << setw(1) << get_etsoc_chdis_st2(i,j); }
00237 cout << endl; }
00238
00239 cout << endl;
00240 cout << "Disable ETTF St.3 :" << endl;
00241 cout << "===================" << endl;
00242 cout << endl;
00243 for( int i=-3; i<4; i++ ) {
00244 if ( i == 0 ) continue;
00245 for( int j=0; j<12; j++ ) { cout << " " << setw(1) << get_etsoc_chdis_st3(i,j); }
00246 cout << endl; }
00247
00248 }