CMS 3D CMS Logo

L1MuDTChambThDigi.cc
Go to the documentation of this file.
1 //-------------------------------------------------
2 //
3 // Class L1MuDTChambThDigi
4 //
5 // Description: input data for PHTF trigger
6 //
7 //
8 // Author List: Jorge Troconiz UAM Madrid
9 //
10 //
11 //--------------------------------------------------
12 
13 //-----------------------
14 // This Class's Header --
15 //-----------------------
17 
18 //-------------------------------
19 // Collaborating Class Headers --
20 //-------------------------------
21 
22 
23 //---------------
24 // C++ Headers --
25 //---------------
26 
27 //-------------------
28 // Initializations --
29 //-------------------
30 
31 
32 //----------------
33 // Constructors --
34 //----------------
36 
37  bx = -100;
38  wheel = 0;
39  sector = 0;
40  station = 0;
41 
42  for(int i=0;i<7;i++) {
43  m_outPos[i] = 0;
44  m_outQual[i] = 0;
45  }
46 }
47 
48 L1MuDTChambThDigi::L1MuDTChambThDigi( int ubx, int uwh, int usc, int ust,
49  int* upos, int* uqual ) {
50 
51  bx = ubx;
52  wheel = uwh;
53  sector = usc;
54  station = ust;
55 
56  for(int i=0;i<7;i++) {
57  m_outPos[i] = upos[i];
58  m_outQual[i] = uqual[i];
59  }
60 }
61 
62 L1MuDTChambThDigi::L1MuDTChambThDigi( int ubx, int uwh, int usc, int ust,
63  int* upos ) {
64 
65  bx = ubx;
66  wheel = uwh;
67  sector = usc;
68  station = ust;
69 
70  for(int i=0;i<7;i++) {
71  m_outPos[i] = upos[i];
72  m_outQual[i] = 0;
73  }
74 }
75 
76 //--------------
77 // Destructor --
78 //--------------
80 }
81 
82 //--------------
83 // Operations --
84 //--------------
86  return bx;
87 }
88 
90  return wheel;
91 }
93  return sector;
94 }
96  return station;
97 }
98 
99 int L1MuDTChambThDigi::code(const int i) const {
100  if (i<0||i>=7) return 0;
101 
102  return (int)(m_outPos[i]+m_outQual[i]);
103 }
104 
105 int L1MuDTChambThDigi::position(const int i) const {
106  if (i<0||i>=7) return 0;
107 
108  return (int)m_outPos[i];
109 }
110 
111 int L1MuDTChambThDigi::quality(const int i) const {
112  if (i<0||i>=7) return 0;
113 
114  return (int)m_outQual[i];
115 }
int quality(const int i) const
int position(const int i) const
int code(const int i) const