CMS 3D CMS Logo

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