Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:19:43

0001 //-------------------------------------------------
0002 //
0003 /**  \class L1MuDTWedgeSorter
0004  *
0005  *   Wedge Sorter:
0006  *
0007  *   A Wedge Sorter receives 2 muon candidates
0008  *   from each of the 6 Sector Processors of a 
0009  *   wedge and forwards the 2 highest rank 
0010  *   candidates per wedge to the DT Muon Sorter
0011  *
0012  *
0013  *
0014  *   N. Neumeister            CERN EP
0015  */
0016 //
0017 //--------------------------------------------------
0018 #ifndef L1MUDT_WEDGE_SORTER_H
0019 #define L1MUDT_WEDGE_SORTER_H
0020 
0021 //---------------
0022 // C++ Headers --
0023 //---------------
0024 
0025 #include <vector>
0026 
0027 //----------------------
0028 // Base Class Headers --
0029 //----------------------
0030 
0031 //------------------------------------
0032 // Collaborating Class Declarations --
0033 //------------------------------------
0034 
0035 class L1MuDTTrackFinder;
0036 class L1MuDTTrack;
0037 class L1MuDTSecProcId;
0038 
0039 //              ---------------------
0040 //              -- Class Interface --
0041 //              ---------------------
0042 
0043 class L1MuDTWedgeSorter {
0044 public:
0045   /// constructor
0046   L1MuDTWedgeSorter(const L1MuDTTrackFinder&, int id);
0047 
0048   /// destructor
0049   ~L1MuDTWedgeSorter();
0050 
0051   /// return Wedge Sorter identifier (0-11)
0052   inline int id() const { return m_wsid; }
0053 
0054   /// run Wedge Sorter
0055   void run();
0056 
0057   /// reset Wedge Sorter
0058   void reset();
0059 
0060   /// print results after sorting
0061   void print() const;
0062 
0063   /// return vector of muon candidates
0064   inline const std::vector<const L1MuDTTrack*>& tracks() const { return m_TrackCands; }
0065 
0066 private:
0067   /// run the Cancel Out Logic of the wedge sorter
0068   void runCOL(std::vector<L1MuDTTrack*>&) const;
0069 
0070   /// are there any non-empty muon candidates in the Wedge Sorter?
0071   bool anyTrack() const;
0072 
0073   /// find out if two Sector Processors are neighbours in the same wedge
0074   static bool neighbour(const L1MuDTSecProcId& spid1, const L1MuDTSecProcId& spid2);
0075 
0076 private:
0077   const L1MuDTTrackFinder& m_tf;
0078   int m_wsid;
0079 
0080   std::vector<const L1MuDTTrack*> m_TrackCands;
0081 };
0082 
0083 #endif