Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:04:34

0001 //-------------------------------------------------
0002 //
0003 /**  \class L1MuBMTrackSegEta
0004  *
0005  *   ETA Track Segment
0006  *
0007  *
0008  *
0009  *   N. Neumeister            CERN EP
0010  */
0011 //
0012 //--------------------------------------------------
0013 #ifndef L1MUBM_TRACK_SEG_ETA_H
0014 #define L1MUBM_TRACK_SEG_ETA_H
0015 
0016 //---------------
0017 // C++ Headers --
0018 //---------------
0019 
0020 #include <iosfwd>
0021 #include <vector>
0022 
0023 //----------------------
0024 // Base Class Headers --
0025 //----------------------
0026 
0027 //------------------------------------
0028 // Collaborating Class Declarations --
0029 //------------------------------------
0030 
0031 #include "DataFormats/L1TMuon/interface/BMTF/L1MuBMTrackSegLoc.h"
0032 
0033 //              ---------------------
0034 //              -- Class Interface --
0035 //              ---------------------
0036 
0037 class L1MuBMTrackSegEta;
0038 
0039 typedef std::vector<L1MuBMTrackSegEta> L1MuBMTrackSegEtaCollection;
0040 
0041 class L1MuBMTrackSegEta {
0042 public:
0043   /// default constructor
0044   L1MuBMTrackSegEta();
0045 
0046   /// constructor
0047   L1MuBMTrackSegEta(int wheel_id, int sector_id, int station_id, int position = 0, int quality = 0, int bx = 17);
0048 
0049   /// constructor
0050   L1MuBMTrackSegEta(const L1MuBMTrackSegLoc&, int position = 0, int quality = 0, int bx = 17);
0051 
0052   /// copy constructor
0053   L1MuBMTrackSegEta(const L1MuBMTrackSegEta&);
0054 
0055   /// destructor
0056   virtual ~L1MuBMTrackSegEta();
0057 
0058   /// reset eta track segment
0059   void reset();
0060 
0061   /// return wheel
0062   inline int wheel() const { return m_location.wheel(); }
0063 
0064   /// return sector
0065   inline int sector() const { return m_location.sector(); }
0066 
0067   /// return station
0068   inline int station() const { return m_location.station(); }
0069 
0070   /// return location of eta track segment
0071   inline const L1MuBMTrackSegLoc& where() const { return m_location; }
0072 
0073   /// return position
0074   inline unsigned int position() const { return m_position; }
0075 
0076   /// return quality code
0077   inline unsigned int quality() const { return m_quality; }
0078 
0079   /// return bunch crossing
0080   inline int bx() const { return m_bx; }
0081 
0082   /// is it an empty eta track segment?
0083   inline bool empty() const { return m_position == 0; }
0084 
0085   /// assignment operator
0086   L1MuBMTrackSegEta& operator=(const L1MuBMTrackSegEta&);
0087 
0088   /// equal operator
0089   bool operator==(const L1MuBMTrackSegEta&) const;
0090 
0091   /// unequal operator
0092   bool operator!=(const L1MuBMTrackSegEta&) const;
0093 
0094   /// output stream operator
0095   friend std::ostream& operator<<(std::ostream&, const L1MuBMTrackSegEta&);
0096 
0097 private:
0098   L1MuBMTrackSegLoc m_location;  // logical location of a TS
0099   unsigned int m_position;       // 7 bits
0100   unsigned int m_quality;        // 7 bits
0101   int m_bx;                      // bunch crossing identifier
0102 };
0103 
0104 #endif