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 // C++ Headers --
24 //---------------
25 
26 //-------------------
27 // Initializations --
28 //-------------------
29 
30 //----------------
31 // Constructors --
32 //----------------
34  bx = -100;
35  wheel = 0;
36  sector = 0;
37  station = 0;
38 
39  for (int i = 0; i < 7; i++) {
40  m_outPos[i] = 0;
41  m_outQual[i] = 0;
42  }
43 }
44 
45 L1MuDTChambThDigi::L1MuDTChambThDigi(int ubx, int uwh, int usc, int ust, int* upos, int* uqual) {
46  bx = ubx;
47  wheel = uwh;
48  sector = usc;
49  station = ust;
50 
51  for (int i = 0; i < 7; i++) {
52  m_outPos[i] = upos[i];
53  m_outQual[i] = uqual[i];
54  }
55 }
56 
57 L1MuDTChambThDigi::L1MuDTChambThDigi(int ubx, int uwh, int usc, int ust, int* upos) {
58  bx = ubx;
59  wheel = uwh;
60  sector = usc;
61  station = ust;
62 
63  for (int i = 0; i < 7; i++) {
64  m_outPos[i] = upos[i];
65  m_outQual[i] = 0;
66  }
67 }
68 
69 //--------------
70 // Destructor --
71 //--------------
73 
74 //--------------
75 // Operations --
76 //--------------
77 int L1MuDTChambThDigi::bxNum() const { return bx; }
78 
79 int L1MuDTChambThDigi::whNum() const { return wheel; }
80 int L1MuDTChambThDigi::scNum() const { return sector; }
81 int L1MuDTChambThDigi::stNum() const { return station; }
82 
83 int L1MuDTChambThDigi::code(const int i) const {
84  if (i < 0 || i >= 7)
85  return 0;
86 
87  return (int)(m_outPos[i] + m_outQual[i]);
88 }
89 
90 int L1MuDTChambThDigi::position(const int i) const {
91  if (i < 0 || i >= 7)
92  return 0;
93 
94  return (int)m_outPos[i];
95 }
96 
97 int L1MuDTChambThDigi::quality(const int i) const {
98  if (i < 0 || i >= 7)
99  return 0;
100 
101  return (int)m_outQual[i];
102 }
int position(const int i) const
int code(const int i) const
int quality(const int i) const