Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 //-------------------------------------------------
0002 //
0003 /**  \class L1MuBMMuonSorter
0004  *
0005  *   BM Muon Sorter:
0006  *
0007  *   The BM Muon Sorter receives 2 muon
0008  *   candidates from each of the
0009  *   12 Wedge Sorters and sorts out the
0010  *   4 best (highest pt, highest quality) muons
0011  *
0012  *
0013  *
0014  *   N. Neumeister            CERN EP
0015  */
0016 //
0017 //--------------------------------------------------
0018 #ifndef L1MUBM_MUON_SORTER_H
0019 #define L1MUBM_MUON_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 L1MuBMTrackFinder;
0036 class L1MuBMTrack;
0037 class L1MuBMSecProcId;
0038 
0039 //              ---------------------
0040 //              -- Class Interface --
0041 //              ---------------------
0042 
0043 class L1MuBMMuonSorter {
0044 public:
0045   /// constructor
0046   L1MuBMMuonSorter(const L1MuBMTrackFinder&);
0047 
0048   /// destructor
0049   ~L1MuBMMuonSorter();
0050 
0051   /// run Muon Sorter
0052   void run();
0053 
0054   /// reset Muon Sorter
0055   void reset();
0056 
0057   /// print results after sorting
0058   void print() const;
0059 
0060   /// return number of found muon candidates after sorter
0061   inline int numberOfTracks() const { return m_TrackCands.size(); }
0062 
0063   /// return pointer to a muon candidate
0064   inline const L1MuBMTrack* track(int id) const { return m_TrackCands[id]; }
0065 
0066   /// return vector of muon candidates
0067   inline const std::vector<const L1MuBMTrack*>& tracks() const { return m_TrackCands; }
0068 
0069 private:
0070   /// run the Cancel Out Logic of the muon sorter
0071   void runCOL(std::vector<L1MuBMTrack*>&) const;
0072 
0073   /// find out if two Sector Processors are neighbours
0074   static int neighbour(const L1MuBMSecProcId& spid1, const L1MuBMSecProcId& spid2);
0075 
0076 private:
0077   const L1MuBMTrackFinder& m_tf;
0078   std::vector<const L1MuBMTrack*> m_TrackCands;
0079 };
0080 
0081 #endif