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 public:
44  enum TSQuality { Li, Lo, Hi, Ho, LL, HL, HH, Null };
45 
48 
50  L1MuBMTrackSegPhi(int wheel_id,
51  int sector_id,
52  int station_id,
53  int phi = 0,
54  int phib = 0,
56  bool tag = false,
57  int bx = 17,
58  bool etaFlag = false);
59 
62  int phi = 0,
63  int phib = 0,
65  bool tag = false,
66  int bx = 17,
67  bool etaFlag = false);
68 
70  L1MuBMTrackSegPhi(const L1MuBMTrackSegPhi&) = default;
71 
74 
76  virtual ~L1MuBMTrackSegPhi();
77 
79  void reset();
80 
82  double phiValue() const;
83 
85  double phibValue() const;
86 
88  inline int wheel() const { return m_location.wheel(); }
89 
91  inline int sector() const { return m_location.sector(); }
92 
94  inline int station() const { return m_location.station(); }
95 
97  inline const L1MuBMTrackSegLoc& where() const { return m_location; }
98 
100  inline int phi() const { return m_phi; }
101 
103  inline int phib() const { return m_phib; }
104 
106  inline int quality() const { return m_quality; }
107 
109  inline int tag() const { return m_tag; }
110 
112  inline int bx() const { return m_bx; }
113 
115  inline bool etaFlag() const { return m_etaFlag; }
116 
118  inline bool empty() const { return m_quality == Null; }
119 
121  inline void setEtaFlag(bool flag) { m_etaFlag = flag; }
122 
124  L1MuBMTrackSegPhi& operator=(const L1MuBMTrackSegPhi&) = default;
125 
128 
130  bool operator==(const L1MuBMTrackSegPhi&) const;
131 
133  bool operator!=(const L1MuBMTrackSegPhi&) const;
134 
136  friend std::ostream& operator<<(std::ostream&, const TSQuality&);
137 
139  friend std::ostream& operator<<(std::ostream&, const L1MuBMTrackSegPhi&);
140 
141 private:
142  L1MuBMTrackSegLoc m_location; // logical location of TS
143  int m_phi; // 12 bits
144  int m_phib; // 10 bits
145  TSQuality m_quality; // 3 bits
146  bool m_tag; // tag for second TS (of chamber)
147  int m_bx; // bunch crossing identifier
148  bool m_etaFlag; // eta flag (for overlap region)
149 };
150 
151 #endif
L1MuBMTrackSegLoc m_location
bool operator!=(const L1MuBMTrackSegPhi &) const
unequal operator
double phiValue() const
return phi-value in global coordinates [0,2pi]
int wheel() const
return wheel
friend std::ostream & operator<<(std::ostream &, const TSQuality &)
overload output stream operator for phi track segment quality
int bx() const
return bunch crossing
int wheel() const
return wheel
int quality() const
return quality code
L1MuBMTrackSegPhi()
default constructor
L1MuBMTrackSegPhi & operator=(const L1MuBMTrackSegPhi &)=default
assignment operator
int phib() const
return phib
std::vector< L1MuBMTrackSegPhi > L1MuBMTrackSegPhiCollection
void reset()
reset phi track segment
int sector() const
return sector (30 deg)
void setEtaFlag(bool flag)
set eta flag
bool operator==(const L1MuBMTrackSegPhi &) const
equal operator
TSQuality
quality code of BBMX phi track segments
const L1MuBMTrackSegLoc & where() const
return location of phi track segment
bool etaFlag() const
return eta flag
bool empty() const
is it an empty phi track segment?
int sector() const
return sector
int phi() const
return phi
double phibValue() const
return phib-value in global coordinates [0,2pi]
int station() const
return station
int tag() const
return tag (second TS tag)
virtual ~L1MuBMTrackSegPhi()
destructor
int station() const
return station