Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-09-02 03:45:47

0001 //-------------------------------------------------
0002 //
0003 /**  \class L1MuDTTrackSegPhi
0004  *
0005  *   PHI Track Segment
0006  *
0007  *
0008  *
0009  *   N. Neumeister            CERN EP 
0010  */
0011 //
0012 //--------------------------------------------------
0013 #ifndef L1MUDT_TRACK_SEG_PHI_H
0014 #define L1MUDT_TRACK_SEG_PHI_H
0015 
0016 //---------------
0017 // C++ Headers --
0018 //---------------
0019 
0020 #include <iosfwd>
0021 
0022 //----------------------
0023 // Base Class Headers --
0024 //----------------------
0025 
0026 //------------------------------------
0027 // Collaborating Class Declarations --
0028 //------------------------------------
0029 
0030 #include "L1Trigger/DTTrackFinder/interface/L1MuDTTrackSegLoc.h"
0031 
0032 //              ---------------------
0033 //              -- Class Interface --
0034 //              ---------------------
0035 
0036 class L1MuDTTrackSegPhi {
0037 public:
0038   /// quality code of DTBX phi track segments
0039   enum TSQuality { Li, Lo, Hi, Ho, LL, HL, HH, Null };
0040 
0041   /// default constructor
0042   L1MuDTTrackSegPhi();
0043 
0044   /// constructor
0045   L1MuDTTrackSegPhi(int wheel_id,
0046                     int sector_id,
0047                     int station_id,
0048                     int phi = 0,
0049                     int phib = 0,
0050                     TSQuality quality = Null,
0051                     bool tag = false,
0052                     int bx = 17,
0053                     bool etaFlag = false);
0054 
0055   /// constructor
0056   L1MuDTTrackSegPhi(const L1MuDTTrackSegLoc&,
0057                     int phi = 0,
0058                     int phib = 0,
0059                     TSQuality quality = Null,
0060                     bool tag = false,
0061                     int bx = 17,
0062                     bool etaFlag = false);
0063 
0064   /// copy constructor
0065   L1MuDTTrackSegPhi(const L1MuDTTrackSegPhi&);
0066 
0067   /// destructor
0068   virtual ~L1MuDTTrackSegPhi();
0069 
0070   /// reset phi track segment
0071   void reset();
0072 
0073   /// return phi-value in global coordinates [0,2pi]
0074   double phiValue() const;
0075 
0076   /// return phib-value in global coordinates [0,2pi]
0077   double phibValue() const;
0078 
0079   /// return wheel
0080   inline int wheel() const { return m_location.wheel(); }
0081 
0082   /// return sector
0083   inline int sector() const { return m_location.sector(); }
0084 
0085   /// return station
0086   inline int station() const { return m_location.station(); }
0087 
0088   /// return location of phi track segment
0089   inline const L1MuDTTrackSegLoc& where() const { return m_location; }
0090 
0091   /// return phi
0092   inline int phi() const { return m_phi; }
0093 
0094   /// return phib
0095   inline int phib() const { return m_phib; }
0096 
0097   /// return quality code
0098   inline int quality() const { return m_quality; }
0099 
0100   /// return tag (second TS tag)
0101   inline int tag() const { return m_tag; }
0102 
0103   /// return bunch crossing
0104   inline int bx() const { return m_bx; }
0105 
0106   /// return eta flag
0107   inline bool etaFlag() const { return m_etaFlag; }
0108 
0109   /// is it an empty phi track segment?
0110   inline bool empty() const { return m_quality == Null; }
0111 
0112   /// set eta flag
0113   inline void setEtaFlag(bool flag) { m_etaFlag = flag; }
0114 
0115   /// assignment operator
0116   L1MuDTTrackSegPhi& operator=(const L1MuDTTrackSegPhi&);
0117 
0118   /// equal operator
0119   bool operator==(const L1MuDTTrackSegPhi&) const;
0120 
0121   /// unequal operator
0122   bool operator!=(const L1MuDTTrackSegPhi&) const;
0123 
0124   /// overload output stream operator for phi track segment quality
0125   friend std::ostream& operator<<(std::ostream&, const TSQuality&);
0126 
0127   /// overload output stream operator for phi track segments
0128   friend std::ostream& operator<<(std::ostream&, const L1MuDTTrackSegPhi&);
0129 
0130 private:
0131   L1MuDTTrackSegLoc m_location;  // logical location of TS
0132   int m_phi;                     // 12 bits
0133   int m_phib;                    // 10 bits
0134   TSQuality m_quality;           // 3 bits
0135   bool m_tag;                    // tag for second TS (of chamber)
0136   int m_bx;                      // bunch crossing identifier
0137   bool m_etaFlag;                // eta flag (for overlap region)
0138 };
0139 
0140 #endif