Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:02:20

0001 //-------------------------------------------------
0002 //
0003 /**  \class L1MuDTEtaPattern
0004  *
0005  *   Pattern for Eta Track Finder:
0006  *
0007  *   An eta pattern consists of:
0008  *     - Pattern ID, 
0009  *     - quality code : [1,26],
0010  *     - eta code : [-32, +32],
0011  *     - position and wheel of hits in stations 1, 2, 3<BR>
0012  *       (wheel: -2, -1, 0, +1, +2, position : [1,7])
0013  * 
0014  *
0015  *   $Date: 2008/04/09 15:22:31 $
0016  *   $Revision: 1.2 $
0017  *
0018  *   N. Neumeister            CERN EP
0019  */
0020 //
0021 //--------------------------------------------------
0022 #ifndef L1MUDT_ETA_PATTERN_H
0023 #define L1MUDT_ETA_PATTERN_H
0024 
0025 //---------------
0026 // C++ Headers --
0027 //---------------
0028 
0029 #include "CondFormats/Serialization/interface/Serializable.h"
0030 
0031 #include <iosfwd>
0032 #include <string>
0033 
0034 //----------------------
0035 // Base Class Headers --
0036 //----------------------
0037 
0038 //------------------------------------
0039 // Collaborating Class Declarations --
0040 //------------------------------------
0041 
0042 //              ---------------------
0043 //              -- Class Interface --
0044 //              ---------------------
0045 
0046 class L1MuDTEtaPattern {
0047 public:
0048   /// default constructor
0049   L1MuDTEtaPattern();
0050 
0051   /// constructor
0052   L1MuDTEtaPattern(int id, int w1, int w2, int w3, int p1, int p2, int p3, int eta, int qual);
0053 
0054   L1MuDTEtaPattern(int id, const std::string& pat, int eta, int qual);
0055 
0056   /// copy constructor
0057   L1MuDTEtaPattern(const L1MuDTEtaPattern&);
0058 
0059   /// destructor
0060   virtual ~L1MuDTEtaPattern();
0061 
0062   /// return id
0063   inline int id() const { return m_id; }
0064 
0065   /// return eta
0066   inline int eta() const { return m_eta; }
0067 
0068   /// return quality
0069   inline int quality() const { return m_qual; }
0070 
0071   /// return wheel number in station [1,3]
0072   inline int wheel(int station) const { return m_wheel[station - 1]; }
0073 
0074   /// return position in station [1,3]
0075   inline int position(int station) const { return m_position[station - 1]; }
0076 
0077   /// assignment operator
0078   L1MuDTEtaPattern& operator=(const L1MuDTEtaPattern&);
0079 
0080   /// equal operator
0081   bool operator==(const L1MuDTEtaPattern&) const;
0082 
0083   /// unequal operator
0084   bool operator!=(const L1MuDTEtaPattern&) const;
0085 
0086   /// output stream operator
0087   friend std::ostream& operator<<(std::ostream&, const L1MuDTEtaPattern&);
0088 
0089   /// input stream operator
0090   friend std::istream& operator>>(std::istream&, L1MuDTEtaPattern&);
0091 
0092 private:
0093   short m_id;
0094   short m_wheel[3];     // -2, -1, 0, +1, +2
0095   short m_position[3];  // position in wheel [1,7], 0 = empty
0096   short m_eta;          // eta code: [-32, +32]
0097   short m_qual;         // quality code: [0,26]
0098 
0099   COND_SERIALIZABLE;
0100 };
0101 
0102 #endif