Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-02-16 06:15:48

0001 //-------------------------------------------------
0002 //
0003 /**  \class L1MuDTTrackFinder
0004  *
0005  *   L1 barrel Muon Trigger Track Finder (MTTF)
0006  *
0007  *   The barrel MTTF consists of:
0008  *      - 72 Sector Processors (SP), 
0009  *      - 12 Eta Processors,
0010  *      - 12 Wedge Sorters (WS) and
0011  *      -  1 DT Muon Sorter (MS)
0012  *
0013  *
0014  *
0015  *   N. Neumeister            CERN EP
0016  *   J. Troconiz              UAM Madrid
0017  */
0018 //
0019 //--------------------------------------------------
0020 #ifndef L1MUDT_TRACK_FINDER_H
0021 #define L1MUDT_TRACK_FINDER_H
0022 
0023 //---------------
0024 // C++ Headers --
0025 //---------------
0026 
0027 #include <vector>
0028 #include <memory>
0029 
0030 //----------------------
0031 // Base Class Headers --
0032 //----------------------
0033 
0034 //------------------------------------
0035 // Collaborating Class Declarations --
0036 //------------------------------------
0037 
0038 #include "FWCore/Framework/interface/Event.h"
0039 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0040 #include "FWCore/Framework/interface/ConsumesCollector.h"
0041 #include "FWCore/Utilities/interface/EDGetToken.h"
0042 class L1MuDTChambPhContainer;
0043 class L1MuDTTFConfig;
0044 class L1MuDTSecProcMap;
0045 class L1MuDTSecProcId;
0046 class L1MuDTSectorProcessor;
0047 class L1MuDTEtaProcessor;
0048 class L1MuDTWedgeSorter;
0049 class L1MuDTMuonSorter;
0050 class L1MuDTTrackCand;
0051 class L1MuRegionalCand;
0052 
0053 //              ---------------------
0054 //              -- Class Interface --
0055 //              ---------------------
0056 
0057 class L1MuDTTrackFinder {
0058 public:
0059   /// container for muon candidates
0060   typedef std::vector<L1MuRegionalCand>::const_iterator TFtracks_const_iter;
0061   typedef std::vector<L1MuRegionalCand>::iterator TFtracks_iter;
0062 
0063   /// constructor
0064   L1MuDTTrackFinder(const edm::ParameterSet& ps, edm::ConsumesCollector&& iC);
0065 
0066   /// destructor
0067   virtual ~L1MuDTTrackFinder();
0068 
0069   /// build the structure of the barrel MTTF
0070   void setup(edm::ConsumesCollector&& iC);
0071 
0072   /// run the barrel MTTF
0073   void run(const edm::Event& e, const edm::EventSetup& c);
0074 
0075   /// reset the barrel MTTF
0076   void reset();
0077 
0078   /// get a pointer to a Sector Processor
0079   const L1MuDTSectorProcessor* sp(const L1MuDTSecProcId&) const;
0080 
0081   /// get a pointer to an Eta Processor, index [0-11]
0082   inline const L1MuDTEtaProcessor* ep(int id) const { return m_epvec[id]; }
0083 
0084   /// get a pointer to a Wedge Sorter, index [0-11]
0085   inline const L1MuDTWedgeSorter* ws(int id) const { return m_wsvec[id]; }
0086 
0087   /// get a pointer to the DT Muon Sorter
0088   inline const L1MuDTMuonSorter* ms() const { return m_ms; }
0089 
0090   /// get number of muon candidates found by the barrel MTTF
0091   int numberOfTracks();
0092 
0093   TFtracks_const_iter begin();
0094 
0095   TFtracks_const_iter end();
0096 
0097   void clear();
0098 
0099   /// get number of muon candidates found by the barrel MTTF at a given bx
0100   int numberOfTracks(int bx);
0101 
0102   /// return configuration
0103   static L1MuDTTFConfig* config() { return m_config.get(); }
0104 
0105   std::vector<L1MuDTTrackCand>& getcache0() { return _cache0; }
0106 
0107   std::vector<L1MuRegionalCand>& getcache() { return _cache; }
0108 
0109 private:
0110   /// run Track Finder and store candidates in cache
0111   virtual void reconstruct(const edm::Event& e, const edm::EventSetup& c) {
0112     reset();
0113     run(e, c);
0114   }
0115 
0116 private:
0117   std::vector<L1MuDTTrackCand> _cache0;
0118   std::vector<L1MuRegionalCand> _cache;
0119   L1MuDTSecProcMap* m_spmap;                 ///< Sector Processors
0120   std::vector<L1MuDTEtaProcessor*> m_epvec;  ///< Eta Processors
0121   std::vector<L1MuDTWedgeSorter*> m_wsvec;   ///< Wedge Sorters
0122   L1MuDTMuonSorter* m_ms;                    ///< DT Muon Sorter
0123   edm::EDGetTokenT<L1MuDTChambPhContainer> m_DTDigiToken;
0124 
0125   static std::shared_ptr<L1MuDTTFConfig> m_config;  ///< Track Finder configuration
0126 };
0127 
0128 #endif