CMS 3D CMS Logo

L1MuBMTrackSegPhi.h
Go to the documentation of this file.
1 //-------------------------------------------------
2 //
11 //
12 //--------------------------------------------------
13 #ifndef L1MUBM_TRACK_SEG_PHI_H
14 #define L1MUBM_TRACK_SEG_PHI_H
15 
16 //---------------
17 // C++ Headers --
18 //---------------
19 
20 #include <iosfwd>
21 #include <vector>
22 
23 //----------------------
24 // Base Class Headers --
25 //----------------------
26 
27 //------------------------------------
28 // Collaborating Class Declarations --
29 //------------------------------------
30 
32 
33 // ---------------------
34 // -- Class Interface --
35 // ---------------------
36 
38 
39 typedef std::vector<L1MuBMTrackSegPhi> L1MuBMTrackSegPhiCollection;
40 
42 
43  public:
44 
46  enum TSQuality { Li, Lo, Hi, Ho, LL, HL, HH, Null };
47 
50 
52  L1MuBMTrackSegPhi(int wheel_id, int sector_id, int station_id,
53  int phi = 0, int phib = 0,
54  TSQuality quality = Null, bool tag = false, int bx = 17,
55  bool etaFlag = false);
56 
59  int phi = 0, int phib = 0,
60  TSQuality quality = Null, bool tag = false, int bx = 17,
61  bool etaFlag = false);
62 
65 
67  virtual ~L1MuBMTrackSegPhi();
68 
70  void reset();
71 
73  double phiValue() const;
74 
76  double phibValue() const;
77 
79  inline int wheel() const { return m_location.wheel(); }
80 
82  inline int sector() const { return m_location.sector(); }
83 
85  inline int station() const { return m_location.station(); }
86 
88  inline const L1MuBMTrackSegLoc& where() const{ return m_location; }
89 
91  inline int phi() const { return m_phi; }
92 
94  inline int phib() const { return m_phib; }
95 
97  inline int quality() const { return m_quality; }
98 
100  inline int tag() const { return m_tag; }
101 
103  inline int bx() const { return m_bx; }
104 
106  inline bool etaFlag() const { return m_etaFlag; }
107 
109  inline bool empty() const { return m_quality == Null; }
110 
112  inline void setEtaFlag(bool flag) { m_etaFlag = flag; }
113 
116 
118  bool operator==(const L1MuBMTrackSegPhi&) const;
119 
121  bool operator!=(const L1MuBMTrackSegPhi&) const;
122 
124  friend std::ostream& operator<<(std::ostream&, const TSQuality&);
125 
127  friend std::ostream& operator<<(std::ostream&, const L1MuBMTrackSegPhi&);
128 
129  private:
130 
131  L1MuBMTrackSegLoc m_location; // logical location of TS
132  int m_phi; // 12 bits
133  int m_phib; // 10 bits
134  TSQuality m_quality; // 3 bits
135  bool m_tag; // tag for second TS (of chamber)
136  int m_bx; // bunch crossing identifier
137  bool m_etaFlag; // eta flag (for overlap region)
138 
139 };
140 
141 #endif
L1MuBMTrackSegLoc m_location
bool operator!=(const L1MuBMTrackSegPhi &) const
unequal operator
int tag() const
return tag (second TS tag)
bool operator==(const L1MuBMTrackSegPhi &) const
equal operator
int wheel() const
return wheel
int wheel() const
return wheel
friend std::ostream & operator<<(std::ostream &, const TSQuality &)
overload output stream operator for phi track segment quality
double phiValue() const
return phi-value in global coordinates [0,2pi]
int phib() const
return phib
const L1MuBMTrackSegLoc & where() const
return location of phi track segment
int sector() const
return sector (30 deg)
L1MuBMTrackSegPhi()
default constructor
int bx() const
return bunch crossing
std::vector< L1MuBMTrackSegPhi > L1MuBMTrackSegPhiCollection
void reset()
reset phi track segment
void setEtaFlag(bool flag)
set eta flag
L1MuBMTrackSegPhi & operator=(const L1MuBMTrackSegPhi &)
assignment operator
int phi() const
return phi
TSQuality
quality code of BBMX phi track segments
bool etaFlag() const
return eta flag
int station() const
return station
double phibValue() const
return phib-value in global coordinates [0,2pi]
int sector() const
return sector
virtual ~L1MuBMTrackSegPhi()
destructor
int quality() const
return quality code
int station() const
return station
bool empty() const
is it an empty phi track segment?