CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_4_5_patch3/src/L1Trigger/DTTrackFinder/src/L1MuDTTrackSegPhi.h

Go to the documentation of this file.
00001 //-------------------------------------------------
00002 //
00013 //
00014 //--------------------------------------------------
00015 #ifndef L1MUDT_TRACK_SEG_PHI_H
00016 #define L1MUDT_TRACK_SEG_PHI_H
00017 
00018 //---------------
00019 // C++ Headers --
00020 //---------------
00021 
00022 #include <iosfwd>
00023 
00024 //----------------------
00025 // Base Class Headers --
00026 //----------------------
00027 
00028 //------------------------------------
00029 // Collaborating Class Declarations --
00030 //------------------------------------
00031 
00032 #include "L1Trigger/DTTrackFinder/src/L1MuDTTrackSegLoc.h"
00033 
00034 //              ---------------------
00035 //              -- Class Interface --
00036 //              ---------------------
00037 
00038 class L1MuDTTrackSegPhi {
00039 
00040   public:
00041 
00043     enum TSQuality { Li, Lo, Hi, Ho, LL, HL, HH, Null };
00044     
00046     L1MuDTTrackSegPhi();
00047 
00049     L1MuDTTrackSegPhi(int wheel_id, int sector_id, int station_id, 
00050                       int phi = 0, int phib = 0,
00051                       TSQuality quality = Null, bool tag = false, int bx = 17,
00052                       bool etaFlag = false);
00053 
00055     L1MuDTTrackSegPhi(const L1MuDTTrackSegLoc&, 
00056                       int phi = 0, int phib = 0,
00057                       TSQuality quality = Null, bool tag = false, int bx = 17,
00058                       bool etaFlag = false); 
00059   
00061     L1MuDTTrackSegPhi(const L1MuDTTrackSegPhi&);
00062 
00064     virtual ~L1MuDTTrackSegPhi();
00065 
00067     void reset();
00068     
00070     double phiValue() const;
00071     
00073     double phibValue() const;
00074 
00076     inline int wheel() const { return m_location.wheel(); }
00077     
00079     inline int sector() const { return m_location.sector(); }
00080     
00082     inline int station() const { return m_location.station(); }
00083     
00085     inline const L1MuDTTrackSegLoc& where() const{ return m_location; }
00086     
00088     inline int phi() const { return m_phi; }
00089     
00091     inline int phib() const { return m_phib; }
00092     
00094     inline int quality() const { return m_quality; }
00095 
00097     inline int tag() const { return m_tag; }
00098     
00100     inline int bx() const { return m_bx; }
00101     
00103     inline bool etaFlag() const { return m_etaFlag; }   
00104     
00106     inline bool empty() const { return m_quality == Null; }
00107     
00109     inline void setEtaFlag(bool flag) { m_etaFlag = flag; } 
00110 
00112     L1MuDTTrackSegPhi& operator=(const L1MuDTTrackSegPhi&);
00113 
00115     bool operator==(const L1MuDTTrackSegPhi&) const;
00116     
00118     bool operator!=(const L1MuDTTrackSegPhi&) const;
00119 
00121     friend std::ostream& operator<<(std::ostream&, const TSQuality&);
00122   
00124     friend std::ostream& operator<<(std::ostream&, const L1MuDTTrackSegPhi&);
00125 
00126   private:
00127  
00128     L1MuDTTrackSegLoc m_location;   // logical location of TS
00129     int               m_phi;        // 12 bits
00130     int               m_phib;       // 10 bits
00131     TSQuality         m_quality;    // 3 bits
00132     bool              m_tag;        // tag for second TS (of chamber) 
00133     int               m_bx;         // bunch crossing identifier
00134     bool              m_etaFlag;    // eta flag (for overlap region)
00135 
00136 };
00137   
00138 #endif