CMS 3D CMS Logo

L1MuDTTFParameters.cc
Go to the documentation of this file.
1 //-------------------------------------------------
2 //
3 // Class: L1MuDTTFParameters
4 //
5 // Description: DTTF Parameters from OMDS
6 //
7 //
8 // $Date: 2009/05/04 09:20:57 $
9 // $Revision: 1.3 $
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 L1MuDTTFParameters
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_qual_st1[i][j] = 0;
52  inrec_qual_st2[i][j] = 0;
53  inrec_qual_st3[i][j] = 0;
54  inrec_qual_st4[i][j] = 0;
55  soc_stdis_n[i][j] = 0;
56  soc_stdis_wl[i][j] = 0;
57  soc_stdis_wr[i][j] = 0;
58  soc_stdis_zl[i][j] = 0;
59  soc_stdis_zr[i][j] = 0;
60  soc_qcut_st1[i][j] = 0;
61  soc_qcut_st2[i][j] = 0;
62  soc_qcut_st4[i][j] = 0;
63  soc_qual_csc[i][j] = 0;
64  soc_run_21[i][j] = false;
65  soc_nbx_del[i][j] = false;
66  soc_csc_etacanc[i][j] = false;
67  soc_openlut_extr[i][j] = false;
68  }
69  }
70 }
71 
72 void L1MuDTTFParameters::set_inrec_qual_st1(int wh, int sc, const unsigned short int val) {
73  if (check(wh, sc) == -99)
74  return;
75  inrec_qual_st1[check(wh, sc)][sc] = val & 0x7;
76 }
77 
78 unsigned short int L1MuDTTFParameters::get_inrec_qual_st1(int wh, int sc) const {
79  if (check(wh, sc) == -99)
80  return 0;
81  return (inrec_qual_st1[check(wh, sc)][sc]) & 0x7;
82 }
83 
84 void L1MuDTTFParameters::set_inrec_qual_st2(int wh, int sc, const unsigned short int val) {
85  if (check(wh, sc) == -99)
86  return;
87  inrec_qual_st2[check(wh, sc)][sc] = val & 0x7;
88 }
89 
90 unsigned short int L1MuDTTFParameters::get_inrec_qual_st2(int wh, int sc) const {
91  if (check(wh, sc) == -99)
92  return 0;
93  return (inrec_qual_st2[check(wh, sc)][sc]) & 0x7;
94 }
95 
96 void L1MuDTTFParameters::set_inrec_qual_st3(int wh, int sc, const unsigned short int val) {
97  if (check(wh, sc) == -99)
98  return;
99  inrec_qual_st3[check(wh, sc)][sc] = val & 0x7;
100 }
101 
102 unsigned short int L1MuDTTFParameters::get_inrec_qual_st3(int wh, int sc) const {
103  if (check(wh, sc) == -99)
104  return 0;
105  return (inrec_qual_st3[check(wh, sc)][sc]) & 0x7;
106 }
107 
108 void L1MuDTTFParameters::set_inrec_qual_st4(int wh, int sc, const unsigned short int val) {
109  if (check(wh, sc) == -99)
110  return;
111  inrec_qual_st4[check(wh, sc)][sc] = val & 0x7;
112 }
113 
114 unsigned short int L1MuDTTFParameters::get_inrec_qual_st4(int wh, int sc) const {
115  if (check(wh, sc) == -99)
116  return 0;
117  return (inrec_qual_st4[check(wh, sc)][sc]) & 0x7;
118 }
119 
120 void L1MuDTTFParameters::set_soc_stdis_n(int wh, int sc, const unsigned short int val) {
121  if (check(wh, sc) == -99)
122  return;
123  soc_stdis_n[check(wh, sc)][sc] = val & 0x7;
124 }
125 
126 unsigned short int L1MuDTTFParameters::get_soc_stdis_n(int wh, int sc) const {
127  if (check(wh, sc) == -99)
128  return 0;
129  return (soc_stdis_n[check(wh, sc)][sc]) & 0x7;
130 }
131 
132 void L1MuDTTFParameters::set_soc_stdis_wl(int wh, int sc, const unsigned short int val) {
133  if (check(wh, sc) == -99)
134  return;
135  soc_stdis_wl[check(wh, sc)][sc] = val & 0x7;
136 }
137 
138 unsigned short int L1MuDTTFParameters::get_soc_stdis_wl(int wh, int sc) const {
139  if (check(wh, sc) == -99)
140  return 0;
141  return (soc_stdis_wl[check(wh, sc)][sc]) & 0x7;
142 }
143 
144 void L1MuDTTFParameters::set_soc_stdis_wr(int wh, int sc, const unsigned short int val) {
145  if (check(wh, sc) == -99)
146  return;
147  soc_stdis_wr[check(wh, sc)][sc] = val & 0x7;
148 }
149 
150 unsigned short int L1MuDTTFParameters::get_soc_stdis_wr(int wh, int sc) const {
151  if (check(wh, sc) == -99)
152  return 0;
153  return (soc_stdis_wr[check(wh, sc)][sc]) & 0x7;
154 }
155 
156 void L1MuDTTFParameters::set_soc_stdis_zl(int wh, int sc, const unsigned short int val) {
157  if (check(wh, sc) == -99)
158  return;
159  soc_stdis_zl[check(wh, sc)][sc] = val & 0x7;
160 }
161 
162 unsigned short int L1MuDTTFParameters::get_soc_stdis_zl(int wh, int sc) const {
163  if (check(wh, sc) == -99)
164  return 0;
165  return (soc_stdis_zl[check(wh, sc)][sc]) & 0x7;
166 }
167 
168 void L1MuDTTFParameters::set_soc_stdis_zr(int wh, int sc, const unsigned short int val) {
169  if (check(wh, sc) == -99)
170  return;
171  soc_stdis_zr[check(wh, sc)][sc] = val & 0x7;
172 }
173 
174 unsigned short int L1MuDTTFParameters::get_soc_stdis_zr(int wh, int sc) const {
175  if (check(wh, sc) == -99)
176  return 0;
177  return (soc_stdis_zr[check(wh, sc)][sc]) & 0x7;
178 }
179 
180 void L1MuDTTFParameters::set_soc_qcut_st1(int wh, int sc, const unsigned short int val) {
181  if (check(wh, sc) == -99)
182  return;
183  soc_qcut_st1[check(wh, sc)][sc] = val & 0x7;
184 }
185 
186 unsigned short int L1MuDTTFParameters::get_soc_qcut_st1(int wh, int sc) const {
187  if (check(wh, sc) == -99)
188  return 0;
189  return (soc_qcut_st1[check(wh, sc)][sc]) & 0x7;
190 }
191 
192 void L1MuDTTFParameters::set_soc_qcut_st2(int wh, int sc, const unsigned short int val) {
193  if (check(wh, sc) == -99)
194  return;
195  soc_qcut_st2[check(wh, sc)][sc] = val & 0x7;
196 }
197 
198 unsigned short int L1MuDTTFParameters::get_soc_qcut_st2(int wh, int sc) const {
199  if (check(wh, sc) == -99)
200  return 0;
201  return (soc_qcut_st2[check(wh, sc)][sc]) & 0x7;
202 }
203 
204 void L1MuDTTFParameters::set_soc_qcut_st4(int wh, int sc, const unsigned short int val) {
205  if (check(wh, sc) == -99)
206  return;
207  soc_qcut_st4[check(wh, sc)][sc] = val & 0x7;
208 }
209 
210 unsigned short int L1MuDTTFParameters::get_soc_qcut_st4(int wh, int sc) const {
211  if (check(wh, sc) == -99)
212  return 0;
213  return (soc_qcut_st4[check(wh, sc)][sc]) & 0x7;
214 }
215 
216 void L1MuDTTFParameters::set_soc_qual_csc(int wh, int sc, const unsigned short int val) {
217  if (check(wh, sc) == -99)
218  return;
219  soc_qual_csc[check(wh, sc)][sc] = val & 0x7;
220 }
221 
222 unsigned short int L1MuDTTFParameters::get_soc_qual_csc(int wh, int sc) const {
223  if (check(wh, sc) == -99)
224  return 0;
225  return (soc_qual_csc[check(wh, sc)][sc]) & 0x7;
226 }
227 
228 void L1MuDTTFParameters::set_soc_run_21(int wh, int sc, const bool val) {
229  if (check(wh, sc) == -99)
230  return;
231  soc_run_21[check(wh, sc)][sc] = val;
232 }
233 
234 bool L1MuDTTFParameters::get_soc_run_21(int wh, int sc) const {
235  if (check(wh, sc) == -99)
236  return false;
237  return soc_run_21[check(wh, sc)][sc];
238 }
239 
240 void L1MuDTTFParameters::set_soc_nbx_del(int wh, int sc, const bool val) {
241  if (check(wh, sc) == -99)
242  return;
243  soc_nbx_del[check(wh, sc)][sc] = val;
244 }
245 
246 bool L1MuDTTFParameters::get_soc_nbx_del(int wh, int sc) const {
247  if (check(wh, sc) == -99)
248  return false;
249  return soc_nbx_del[check(wh, sc)][sc];
250 }
251 
252 void L1MuDTTFParameters::set_soc_csc_etacanc(int wh, int sc, const bool val) {
253  if (check(wh, sc) == -99)
254  return;
255  soc_csc_etacanc[check(wh, sc)][sc] = val;
256 }
257 
258 bool L1MuDTTFParameters::get_soc_csc_etacanc(int wh, int sc) const {
259  if (check(wh, sc) == -99)
260  return false;
261  return soc_csc_etacanc[check(wh, sc)][sc];
262 }
263 
264 void L1MuDTTFParameters::set_soc_openlut_extr(int wh, int sc, const bool val) {
265  if (check(wh, sc) == -99)
266  return;
267  soc_openlut_extr[check(wh, sc)][sc] = val;
268 }
269 
270 bool L1MuDTTFParameters::get_soc_openlut_extr(int wh, int sc) const {
271  if (check(wh, sc) == -99)
272  return false;
273  return soc_openlut_extr[check(wh, sc)][sc];
274 }
275 
276 int L1MuDTTFParameters::check(int wh, int sc) const {
277  if (sc < 0 || sc > 11 || wh == 0 || wh > 3 || wh < -3)
278  return -99;
279 
280  if (wh < 0)
281  return wh + 3;
282  else
283  return wh + 2;
284 }
285 
287  cout << endl;
288  cout << "L1 barrel Track Finder Parameters :" << endl;
289  cout << "===================================" << endl;
290  cout << endl;
291 
292  cout << endl;
293  cout << "Quality Cut St.1 :" << endl;
294  cout << "==================" << endl;
295  cout << endl;
296  for (int i = -3; i < 4; i++) {
297  if (i == 0)
298  continue;
299  for (int j = 0; j < 12; j++) {
300  cout << " " << setw(1) << get_inrec_qual_st1(i, j);
301  }
302  cout << endl;
303  }
304 
305  cout << endl;
306  cout << "Quality Cut St.2 :" << endl;
307  cout << "==================" << endl;
308  cout << endl;
309  for (int i = -3; i < 4; i++) {
310  if (i == 0)
311  continue;
312  for (int j = 0; j < 12; j++) {
313  cout << " " << setw(1) << get_inrec_qual_st2(i, j);
314  }
315  cout << endl;
316  }
317 
318  cout << endl;
319  cout << "Quality Cut St.3 :" << endl;
320  cout << "==================" << endl;
321  cout << endl;
322  for (int i = -3; i < 4; i++) {
323  if (i == 0)
324  continue;
325  for (int j = 0; j < 12; j++) {
326  cout << " " << setw(1) << get_inrec_qual_st3(i, j);
327  }
328  cout << endl;
329  }
330 
331  cout << endl;
332  cout << "Quality Cut St.4 :" << endl;
333  cout << "==================" << endl;
334  cout << endl;
335  for (int i = -3; i < 4; i++) {
336  if (i == 0)
337  continue;
338  for (int j = 0; j < 12; j++) {
339  cout << " " << setw(1) << get_inrec_qual_st4(i, j);
340  }
341  cout << endl;
342  }
343 
344  cout << endl;
345  cout << "Quality Cut Next Wheel :" << endl;
346  cout << "========================" << endl;
347  cout << endl;
348  for (int i = -3; i < 4; i++) {
349  if (i == 0)
350  continue;
351  for (int j = 0; j < 12; j++) {
352  cout << " " << setw(1) << get_soc_stdis_n(i, j);
353  }
354  cout << endl;
355  }
356 
357  cout << endl;
358  cout << "Quality Cut WL :" << endl;
359  cout << "================" << endl;
360  cout << endl;
361  for (int i = -3; i < 4; i++) {
362  if (i == 0)
363  continue;
364  for (int j = 0; j < 12; j++) {
365  cout << " " << setw(1) << get_soc_stdis_wl(i, j);
366  }
367  cout << endl;
368  }
369 
370  cout << endl;
371  cout << "Quality Cut WR :" << endl;
372  cout << "================" << endl;
373  cout << endl;
374  for (int i = -3; i < 4; i++) {
375  if (i == 0)
376  continue;
377  for (int j = 0; j < 12; j++) {
378  cout << " " << setw(1) << get_soc_stdis_wr(i, j);
379  }
380  cout << endl;
381  }
382 
383  cout << endl;
384  cout << "Quality Cut ZL :" << endl;
385  cout << "================" << endl;
386  cout << endl;
387  for (int i = -3; i < 4; i++) {
388  if (i == 0)
389  continue;
390  for (int j = 0; j < 12; j++) {
391  cout << " " << setw(1) << get_soc_stdis_zl(i, j);
392  }
393  cout << endl;
394  }
395 
396  cout << endl;
397  cout << " Quality Cut ZR :" << endl;
398  cout << "=================" << endl;
399  cout << endl;
400  for (int i = -3; i < 4; i++) {
401  if (i == 0)
402  continue;
403  for (int j = 0; j < 12; j++) {
404  cout << " " << setw(1) << get_soc_stdis_zr(i, j);
405  }
406  cout << endl;
407  }
408 
409  cout << endl;
410  cout << "Quality Cut SOC St.1 :" << endl;
411  cout << "======================" << endl;
412  cout << endl;
413  for (int i = -3; i < 4; i++) {
414  if (i == 0)
415  continue;
416  for (int j = 0; j < 12; j++) {
417  cout << " " << setw(1) << get_soc_qcut_st1(i, j);
418  }
419  cout << endl;
420  }
421 
422  cout << endl;
423  cout << "Quality Cut SOC St.2 :" << endl;
424  cout << "======================" << endl;
425  cout << endl;
426  for (int i = -3; i < 4; i++) {
427  if (i == 0)
428  continue;
429  for (int j = 0; j < 12; j++) {
430  cout << " " << setw(1) << get_soc_qcut_st2(i, j);
431  }
432  cout << endl;
433  }
434 
435  cout << endl;
436  cout << "Quality Cut SOC St.4 :" << endl;
437  cout << "======================" << endl;
438  cout << endl;
439  for (int i = -3; i < 4; i++) {
440  if (i == 0)
441  continue;
442  for (int j = 0; j < 12; j++) {
443  cout << " " << setw(1) << get_soc_qcut_st4(i, j);
444  }
445  cout << endl;
446  }
447 
448  cout << endl;
449  cout << "CSC Quality Cut :" << endl;
450  cout << "=================" << endl;
451  cout << endl;
452  for (int i = -3; i < 4; i++) {
453  if (i == 0)
454  continue;
455  for (int j = 0; j < 12; j++) {
456  cout << " " << setw(1) << get_soc_qual_csc(i, j);
457  }
458  cout << endl;
459  }
460 
461  cout << endl;
462  cout << "Extrapolation 21 :" << endl;
463  cout << "==================" << endl;
464  cout << endl;
465  for (int i = -3; i < 4; i++) {
466  if (i == 0)
467  continue;
468  for (int j = 0; j < 12; j++) {
469  cout << " " << setw(1) << get_soc_run_21(i, j);
470  }
471  cout << endl;
472  }
473 
474  cout << endl;
475  cout << "Herbert Scheme :" << endl;
476  cout << "================" << endl;
477  cout << endl;
478  for (int i = -3; i < 4; i++) {
479  if (i == 0)
480  continue;
481  for (int j = 0; j < 12; j++) {
482  cout << " " << setw(1) << get_soc_nbx_del(i, j);
483  }
484  cout << endl;
485  }
486 
487  cout << endl;
488  cout << "CSC Eta Cancellation :" << endl;
489  cout << "======================" << endl;
490  cout << endl;
491  for (int i = -3; i < 4; i++) {
492  if (i == 0)
493  continue;
494  for (int j = 0; j < 12; j++) {
495  cout << " " << setw(1) << get_soc_csc_etacanc(i, j);
496  }
497  cout << endl;
498  }
499 
500  cout << endl;
501  cout << "Open LUTs :" << endl;
502  cout << "===========" << endl;
503  cout << endl;
504  for (int i = -3; i < 4; i++) {
505  if (i == 0)
506  continue;
507  for (int j = 0; j < 12; j++) {
508  cout << " " << setw(1) << get_soc_openlut_extr(i, j);
509  }
510  cout << endl;
511  }
512 }
void set_inrec_qual_st2(int wh, int sc, const unsigned short int val)
void set_soc_run_21(int wh, int sc, const bool val)
void set_inrec_qual_st1(int wh, int sc, const unsigned short int val)
void set_soc_qcut_st2(int wh, int sc, const unsigned short int val)
unsigned short int get_inrec_qual_st2(int wh, int sc) const
void set_soc_qcut_st1(int wh, int sc, const unsigned short int val)
void set_soc_openlut_extr(int wh, int sc, const bool val)
unsigned short int get_soc_stdis_zl(int wh, int sc) const
unsigned short int get_soc_qcut_st2(int wh, int sc) const
unsigned short int get_soc_qcut_st1(int wh, int sc) const
unsigned short int get_soc_qcut_st4(int wh, int sc) const
void set_inrec_qual_st4(int wh, int sc, const unsigned short int val)
void set_soc_stdis_zl(int wh, int sc, const unsigned short int val)
unsigned short int get_soc_stdis_wl(int wh, int sc) const
void set_soc_csc_etacanc(int wh, int sc, const bool val)
void set_soc_nbx_del(int wh, int sc, const bool val)
unsigned short int get_soc_stdis_wr(int wh, int sc) const
unsigned short int get_soc_stdis_n(int wh, int sc) const
bool get_soc_csc_etacanc(int wh, int sc) const
bool get_soc_nbx_del(int wh, int sc) const
unsigned short int get_soc_stdis_zr(int wh, int sc) const
void set_soc_stdis_wr(int wh, int sc, const unsigned short int val)
void reset()
reset parameters to zero
void set_inrec_qual_st3(int wh, int sc, const unsigned short int val)
bool get_soc_run_21(int wh, int sc) const
unsigned short int get_inrec_qual_st3(int wh, int sc) const
int check(int wh, int sc) const
void set_soc_stdis_n(int wh, int sc, const unsigned short int val)
void set_soc_qcut_st4(int wh, int sc, const unsigned short int val)
unsigned short int get_inrec_qual_st1(int wh, int sc) const
unsigned short int get_inrec_qual_st4(int wh, int sc) const
unsigned short int get_soc_qual_csc(int wh, int sc) const
bool get_soc_openlut_extr(int wh, int sc) const
void set_soc_stdis_wl(int wh, int sc, const unsigned short int val)
void set_soc_qual_csc(int wh, int sc, const unsigned short int val)
void set_soc_stdis_zr(int wh, int sc, const unsigned short int val)