CMS 3D CMS Logo

L1MuDTTrackSegPhi.h
Go to the documentation of this file.
1 //-------------------------------------------------
2 //
11 //
12 //--------------------------------------------------
13 #ifndef L1MUDT_TRACK_SEG_PHI_H
14 #define L1MUDT_TRACK_SEG_PHI_H
15 
16 //---------------
17 // C++ Headers --
18 //---------------
19 
20 #include <iosfwd>
21 
22 //----------------------
23 // Base Class Headers --
24 //----------------------
25 
26 //------------------------------------
27 // Collaborating Class Declarations --
28 //------------------------------------
29 
31 
32 // ---------------------
33 // -- Class Interface --
34 // ---------------------
35 
37 public:
39  enum TSQuality { Li, Lo, Hi, Ho, LL, HL, HH, Null };
40 
43 
45  L1MuDTTrackSegPhi(int wheel_id,
46  int sector_id,
47  int station_id,
48  int phi = 0,
49  int phib = 0,
51  bool tag = false,
52  int bx = 17,
53  bool etaFlag = false);
54 
57  int phi = 0,
58  int phib = 0,
60  bool tag = false,
61  int bx = 17,
62  bool etaFlag = false);
63 
66 
68  virtual ~L1MuDTTrackSegPhi();
69 
71  void reset();
72 
74  double phiValue() const;
75 
77  double phibValue() const;
78 
80  inline int wheel() const { return m_location.wheel(); }
81 
83  inline int sector() const { return m_location.sector(); }
84 
86  inline int station() const { return m_location.station(); }
87 
89  inline const L1MuDTTrackSegLoc& where() const { return m_location; }
90 
92  inline int phi() const { return m_phi; }
93 
95  inline int phib() const { return m_phib; }
96 
98  inline int quality() const { return m_quality; }
99 
101  inline int tag() const { return m_tag; }
102 
104  inline int bx() const { return m_bx; }
105 
107  inline bool etaFlag() const { return m_etaFlag; }
108 
110  inline bool empty() const { return m_quality == Null; }
111 
113  inline void setEtaFlag(bool flag) { m_etaFlag = flag; }
114 
117 
119  bool operator==(const L1MuDTTrackSegPhi&) const;
120 
122  bool operator!=(const L1MuDTTrackSegPhi&) const;
123 
125  friend std::ostream& operator<<(std::ostream&, const TSQuality&);
126 
128  friend std::ostream& operator<<(std::ostream&, const L1MuDTTrackSegPhi&);
129 
130 private:
131  L1MuDTTrackSegLoc 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 #endif
L1MuDTTrackSegLoc
Definition: L1MuDTTrackSegLoc.h:41
L1MuDTTrackSegPhi::m_location
L1MuDTTrackSegLoc m_location
Definition: L1MuDTTrackSegPhi.h:131
L1MuDTTrackSegPhi::~L1MuDTTrackSegPhi
virtual ~L1MuDTTrackSegPhi()
destructor
Definition: L1MuDTTrackSegPhi.cc:91
L1MuDTTrackSegPhi::m_tag
bool m_tag
Definition: L1MuDTTrackSegPhi.h:135
L1MuDTTrackSegPhi::Null
Definition: L1MuDTTrackSegPhi.h:39
L1MuDTTrackSegPhi::m_phib
int m_phib
Definition: L1MuDTTrackSegPhi.h:133
L1MuDTTrackSegPhi::where
const L1MuDTTrackSegLoc & where() const
return location of phi track segment
Definition: L1MuDTTrackSegPhi.h:89
L1MuDTTrackSegPhi::phib
int phib() const
return phib
Definition: L1MuDTTrackSegPhi.h:95
L1MuDTTrackSegPhi::Lo
Definition: L1MuDTTrackSegPhi.h:39
L1MuDTTrackSegLoc::wheel
int wheel() const
return wheel
Definition: L1MuDTTrackSegLoc.h:56
L1MuDTTrackSegPhi::reset
void reset()
reset phi track segment
Definition: L1MuDTTrackSegPhi.cc:100
L1MuDTTrackSegPhi::m_etaFlag
bool m_etaFlag
Definition: L1MuDTTrackSegPhi.h:137
L1MuDTTrackSegLoc.h
L1MuDTTrackSegPhi::bx
int bx() const
return bunch crossing
Definition: L1MuDTTrackSegPhi.h:104
L1MuDTTrackSegLoc::station
int station() const
return station
Definition: L1MuDTTrackSegLoc.h:62
L1MuDTTrackSegPhi::operator==
bool operator==(const L1MuDTTrackSegPhi &) const
equal operator
Definition: L1MuDTTrackSegPhi.cc:142
L1MuDTTrackSegPhi::m_quality
TSQuality m_quality
Definition: L1MuDTTrackSegPhi.h:134
L1MuDTTrackSegPhi::LL
Definition: L1MuDTTrackSegPhi.h:39
L1MuDTTrackSegPhi::phi
int phi() const
return phi
Definition: L1MuDTTrackSegPhi.h:92
L1MuDTTrackSegPhi::sector
int sector() const
return sector
Definition: L1MuDTTrackSegPhi.h:83
L1MuDTTrackSegPhi::operator<<
friend std::ostream & operator<<(std::ostream &, const TSQuality &)
overload output stream operator for phi track segment quality
L1MuDTTrackSegPhi::TSQuality
TSQuality
quality code of DTBX phi track segments
Definition: L1MuDTTrackSegPhi.h:39
L1MuDTTrackSegPhi::HL
Definition: L1MuDTTrackSegPhi.h:39
L1MuDTTrackSegPhi::empty
bool empty() const
is it an empty phi track segment?
Definition: L1MuDTTrackSegPhi.h:110
L1MuDTTrackSegPhi::phibValue
double phibValue() const
return phib-value in global coordinates [0,2pi]
Definition: L1MuDTTrackSegPhi.cc:121
L1MuDTTrackSegPhi::L1MuDTTrackSegPhi
L1MuDTTrackSegPhi()
default constructor
Definition: L1MuDTTrackSegPhi.cc:44
L1MuDTTrackSegPhi::m_phi
int m_phi
Definition: L1MuDTTrackSegPhi.h:132
L1MuDTTrackSegPhi::Ho
Definition: L1MuDTTrackSegPhi.h:39
L1MuDTTrackSegPhi::tag
int tag() const
return tag (second TS tag)
Definition: L1MuDTTrackSegPhi.h:101
L1MuDTTrackSegPhi::setEtaFlag
void setEtaFlag(bool flag)
set eta flag
Definition: L1MuDTTrackSegPhi.h:113
L1MuDTTrackSegLoc::sector
int sector() const
return sector (30 deg)
Definition: L1MuDTTrackSegLoc.h:59
L1MuDTTrackSegPhi::operator!=
bool operator!=(const L1MuDTTrackSegPhi &) const
unequal operator
Definition: L1MuDTTrackSegPhi.cc:159
L1MuDTTrackSegPhi::Li
Definition: L1MuDTTrackSegPhi.h:39
L1MuDTTrackSegPhi::Hi
Definition: L1MuDTTrackSegPhi.h:39
L1MuDTTrackSegPhi::HH
Definition: L1MuDTTrackSegPhi.h:39
L1MuDTTrackSegPhi
Definition: L1MuDTTrackSegPhi.h:36
L1MuDTTrackSegPhi::quality
int quality() const
return quality code
Definition: L1MuDTTrackSegPhi.h:98
L1MuDTTrackSegPhi::phiValue
double phiValue() const
return phi-value in global coordinates [0,2pi]
Definition: L1MuDTTrackSegPhi.cc:112
L1MuDTTrackSegPhi::wheel
int wheel() const
return wheel
Definition: L1MuDTTrackSegPhi.h:80
L1MuDTTrackSegPhi::station
int station() const
return station
Definition: L1MuDTTrackSegPhi.h:86
L1MuDTTrackSegPhi::etaFlag
bool etaFlag() const
return eta flag
Definition: L1MuDTTrackSegPhi.h:107
L1MuDTTrackSegPhi::m_bx
int m_bx
Definition: L1MuDTTrackSegPhi.h:136
L1MuDTTrackSegPhi::operator=
L1MuDTTrackSegPhi & operator=(const L1MuDTTrackSegPhi &)
assignment operator
Definition: L1MuDTTrackSegPhi.cc:126
RemoveAddSevLevel.flag
flag
Definition: RemoveAddSevLevel.py:116