CMS 3D CMS Logo

L1MuDTTFMasks.cc
Go to the documentation of this file.
1 //-------------------------------------------------
2 //
3 // Class: L1MuDTTFMasks
4 //
5 // Description: DTTF Masks from OMDS
6 //
7 //
8 // $Date: 2009/05/12 10:38:35 $
9 // $Revision: 1.2 $
10 //
11 // Author :
12 // J. Troconiz UAM Madrid
13 //
14 //--------------------------------------------------
15 
16 //-----------------------
17 // This Class's Header --
18 //-----------------------
19 
21 
22 //---------------
23 // C++ Headers --
24 //---------------
25 
26 #include <iostream>
27 #include <ostream>
28 #include <iomanip>
29 #include <string>
30 
31 //-------------------------------
32 // Collaborating Class Headers --
33 //-------------------------------
34 
35 using namespace std;
36 
37 // --------------------------------
38 // class L1MuDTTFMasks
39 //---------------------------------
40 
41 //--------------
42 // Operations --
43 //--------------
44 
45 //
46 // reset parameters
47 //
49  for (int i = 0; i < 6; i++) {
50  for (int j = 0; j < 12; j++) {
51  inrec_chdis_st1[i][j] = false;
52  inrec_chdis_st2[i][j] = false;
53  inrec_chdis_st3[i][j] = false;
54  inrec_chdis_st4[i][j] = false;
55  inrec_chdis_csc[i][j] = false;
56  etsoc_chdis_st1[i][j] = false;
57  etsoc_chdis_st2[i][j] = false;
58  etsoc_chdis_st3[i][j] = false;
59  }
60  }
61 }
62 
63 void L1MuDTTFMasks::set_inrec_chdis_st1(int wh, int sc, const bool val) {
64  if (check(wh, sc) == -99)
65  return;
66  inrec_chdis_st1[check(wh, sc)][sc] = val;
67 }
68 
69 bool L1MuDTTFMasks::get_inrec_chdis_st1(int wh, int sc) const {
70  if (check(wh, sc) == -99)
71  return false;
72  return inrec_chdis_st1[check(wh, sc)][sc];
73 }
74 
75 void L1MuDTTFMasks::set_inrec_chdis_st2(int wh, int sc, const bool val) {
76  if (check(wh, sc) == -99)
77  return;
78  inrec_chdis_st2[check(wh, sc)][sc] = val;
79 }
80 
81 bool L1MuDTTFMasks::get_inrec_chdis_st2(int wh, int sc) const {
82  if (check(wh, sc) == -99)
83  return false;
84  return inrec_chdis_st2[check(wh, sc)][sc];
85 }
86 
87 void L1MuDTTFMasks::set_inrec_chdis_st3(int wh, int sc, const bool val) {
88  if (check(wh, sc) == -99)
89  return;
90  inrec_chdis_st3[check(wh, sc)][sc] = val;
91 }
92 
93 bool L1MuDTTFMasks::get_inrec_chdis_st3(int wh, int sc) const {
94  if (check(wh, sc) == -99)
95  return false;
96  return inrec_chdis_st3[check(wh, sc)][sc];
97 }
98 
99 void L1MuDTTFMasks::set_inrec_chdis_st4(int wh, int sc, const bool val) {
100  if (check(wh, sc) == -99)
101  return;
102  inrec_chdis_st4[check(wh, sc)][sc] = val;
103 }
104 
105 bool L1MuDTTFMasks::get_inrec_chdis_st4(int wh, int sc) const {
106  if (check(wh, sc) == -99)
107  return false;
108  return inrec_chdis_st4[check(wh, sc)][sc];
109 }
110 
111 void L1MuDTTFMasks::set_inrec_chdis_csc(int wh, int sc, const bool val) {
112  if (check(wh, sc) == -99)
113  return;
114  inrec_chdis_csc[check(wh, sc)][sc] = val;
115 }
116 
117 bool L1MuDTTFMasks::get_inrec_chdis_csc(int wh, int sc) const {
118  if (check(wh, sc) == -99)
119  return false;
120  return inrec_chdis_csc[check(wh, sc)][sc];
121 }
122 
123 void L1MuDTTFMasks::set_etsoc_chdis_st1(int wh, int sc, const bool val) {
124  if (check(wh, sc) == -99)
125  return;
126  etsoc_chdis_st1[check(wh, sc)][sc] = val;
127 }
128 
129 bool L1MuDTTFMasks::get_etsoc_chdis_st1(int wh, int sc) const {
130  if (check(wh, sc) == -99)
131  return false;
132  return etsoc_chdis_st1[check(wh, sc)][sc];
133 }
134 
135 void L1MuDTTFMasks::set_etsoc_chdis_st2(int wh, int sc, const bool val) {
136  if (check(wh, sc) == -99)
137  return;
138  etsoc_chdis_st2[check(wh, sc)][sc] = val;
139 }
140 
141 bool L1MuDTTFMasks::get_etsoc_chdis_st2(int wh, int sc) const {
142  if (check(wh, sc) == -99)
143  return false;
144  return etsoc_chdis_st2[check(wh, sc)][sc];
145 }
146 
147 void L1MuDTTFMasks::set_etsoc_chdis_st3(int wh, int sc, const bool val) {
148  if (check(wh, sc) == -99)
149  return;
150  etsoc_chdis_st3[check(wh, sc)][sc] = val;
151 }
152 
153 bool L1MuDTTFMasks::get_etsoc_chdis_st3(int wh, int sc) const {
154  if (check(wh, sc) == -99)
155  return false;
156  return etsoc_chdis_st3[check(wh, sc)][sc];
157 }
158 
159 int L1MuDTTFMasks::check(int wh, int sc) const {
160  if (sc < 0 || sc > 11 || wh == 0 || wh > 3 || wh < -3)
161  return -99;
162 
163  if (wh < 0)
164  return wh + 3;
165  else
166  return wh + 2;
167 }
168 
169 void L1MuDTTFMasks::print() const {
170  cout << endl;
171  cout << "L1 barrel Track Finder Masks :" << endl;
172  cout << "==============================" << endl;
173  cout << endl;
174 
175  cout << endl;
176  cout << "Disable PHTF St.1 :" << endl;
177  cout << "===================" << endl;
178  cout << endl;
179  for (int i = -3; i < 4; i++) {
180  if (i == 0)
181  continue;
182  for (int j = 0; j < 12; j++) {
183  cout << " " << setw(1) << get_inrec_chdis_st1(i, j);
184  }
185  cout << endl;
186  }
187 
188  cout << endl;
189  cout << "Disable PHTF St.2 :" << endl;
190  cout << "===================" << endl;
191  cout << endl;
192  for (int i = -3; i < 4; i++) {
193  if (i == 0)
194  continue;
195  for (int j = 0; j < 12; j++) {
196  cout << " " << setw(1) << get_inrec_chdis_st2(i, j);
197  }
198  cout << endl;
199  }
200 
201  cout << endl;
202  cout << "Disable PHTF St.3 :" << endl;
203  cout << "===================" << endl;
204  cout << endl;
205  for (int i = -3; i < 4; i++) {
206  if (i == 0)
207  continue;
208  for (int j = 0; j < 12; j++) {
209  cout << " " << setw(1) << get_inrec_chdis_st3(i, j);
210  }
211  cout << endl;
212  }
213 
214  cout << endl;
215  cout << "Disable PHTF St.4 :" << endl;
216  cout << "===================" << endl;
217  cout << endl;
218  for (int i = -3; i < 4; i++) {
219  if (i == 0)
220  continue;
221  for (int j = 0; j < 12; j++) {
222  cout << " " << setw(1) << get_inrec_chdis_st4(i, j);
223  }
224  cout << endl;
225  }
226 
227  cout << endl;
228  cout << "Disable CSC :" << endl;
229  cout << "=============" << endl;
230  cout << endl;
231  for (int i = -3; i < 4; i++) {
232  if (i == 0)
233  continue;
234  for (int j = 0; j < 12; j++) {
235  cout << " " << setw(1) << get_inrec_chdis_csc(i, j);
236  }
237  cout << endl;
238  }
239 
240  cout << endl;
241  cout << "Disable ETTF St.1 :" << endl;
242  cout << "===================" << endl;
243  cout << endl;
244  for (int i = -3; i < 4; i++) {
245  if (i == 0)
246  continue;
247  for (int j = 0; j < 12; j++) {
248  cout << " " << setw(1) << get_etsoc_chdis_st1(i, j);
249  }
250  cout << endl;
251  }
252 
253  cout << endl;
254  cout << "Disable ETTF St.2 :" << endl;
255  cout << "===================" << endl;
256  cout << endl;
257  for (int i = -3; i < 4; i++) {
258  if (i == 0)
259  continue;
260  for (int j = 0; j < 12; j++) {
261  cout << " " << setw(1) << get_etsoc_chdis_st2(i, j);
262  }
263  cout << endl;
264  }
265 
266  cout << endl;
267  cout << "Disable ETTF St.3 :" << endl;
268  cout << "===================" << endl;
269  cout << endl;
270  for (int i = -3; i < 4; i++) {
271  if (i == 0)
272  continue;
273  for (int j = 0; j < 12; j++) {
274  cout << " " << setw(1) << get_etsoc_chdis_st3(i, j);
275  }
276  cout << endl;
277  }
278 }
mps_fire.i
i
Definition: mps_fire.py:355
L1MuDTTFMasks::reset
void reset()
reset parameters to zero
Definition: L1MuDTTFMasks.cc:48
L1MuDTTFMasks::check
int check(int wh, int sc) const
Definition: L1MuDTTFMasks.cc:159
L1MuDTTFMasks::get_etsoc_chdis_st3
bool get_etsoc_chdis_st3(int wh, int sc) const
Definition: L1MuDTTFMasks.cc:153
L1MuDTTFMasks::get_inrec_chdis_st1
bool get_inrec_chdis_st1(int wh, int sc) const
Definition: L1MuDTTFMasks.cc:69
gather_cfg.cout
cout
Definition: gather_cfg.py:144
L1MuDTTFMasks::set_inrec_chdis_st2
void set_inrec_chdis_st2(int wh, int sc, const bool val)
Definition: L1MuDTTFMasks.cc:75
L1MuDTTFMasks::set_inrec_chdis_st4
void set_inrec_chdis_st4(int wh, int sc, const bool val)
Definition: L1MuDTTFMasks.cc:99
L1MuDTTFMasks::set_inrec_chdis_st3
void set_inrec_chdis_st3(int wh, int sc, const bool val)
Definition: L1MuDTTFMasks.cc:87
L1MuDTTFMasks::set_inrec_chdis_csc
void set_inrec_chdis_csc(int wh, int sc, const bool val)
Definition: L1MuDTTFMasks.cc:111
L1MuDTTFMasks::set_inrec_chdis_st1
void set_inrec_chdis_st1(int wh, int sc, const bool val)
Definition: L1MuDTTFMasks.cc:63
RPCNoise_example.check
check
Definition: RPCNoise_example.py:71
L1MuDTTFMasks::set_etsoc_chdis_st1
void set_etsoc_chdis_st1(int wh, int sc, const bool val)
Definition: L1MuDTTFMasks.cc:123
L1MuDTTFMasks::get_inrec_chdis_st2
bool get_inrec_chdis_st2(int wh, int sc) const
Definition: L1MuDTTFMasks.cc:81
L1MuDTTFMasks::get_inrec_chdis_st3
bool get_inrec_chdis_st3(int wh, int sc) const
Definition: L1MuDTTFMasks.cc:93
L1MuDTTFMasks::set_etsoc_chdis_st3
void set_etsoc_chdis_st3(int wh, int sc, const bool val)
Definition: L1MuDTTFMasks.cc:147
L1MuDTTFMasks.h
L1MuDTTFMasks::get_etsoc_chdis_st2
bool get_etsoc_chdis_st2(int wh, int sc) const
Definition: L1MuDTTFMasks.cc:141
L1MuDTTFMasks::set_etsoc_chdis_st2
void set_etsoc_chdis_st2(int wh, int sc, const bool val)
Definition: L1MuDTTFMasks.cc:135
L1MuDTTFMasks::get_inrec_chdis_st4
bool get_inrec_chdis_st4(int wh, int sc) const
Definition: L1MuDTTFMasks.cc:105
heppy_batch.val
val
Definition: heppy_batch.py:351
std
Definition: JetResolutionObject.h:76
L1MuDTTFMasks::get_etsoc_chdis_st1
bool get_etsoc_chdis_st1(int wh, int sc) const
Definition: L1MuDTTFMasks.cc:129
L1MuDTTFMasks::get_inrec_chdis_csc
bool get_inrec_chdis_csc(int wh, int sc) const
Definition: L1MuDTTFMasks.cc:117
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
L1MuDTTFMasks::print
void print() const
Definition: L1MuDTTFMasks.cc:169