Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 //-------------------------------------------------
0002 //
0003 /**  \class L1MuBMSectorProcessor
0004  *
0005  *   Sector Processor:
0006  *
0007  *   A Sector Processor consists of:
0008  *    - one Data Buffer,
0009  *    - one Extrapolation Unit (EU),
0010  *    - one Track Assembler (TA) and
0011  *    - two Assignment Units (AU)
0012  *
0013  *
0014  *
0015  *   N. Neumeister            CERN EP
0016  *   J. Troconiz              UAM Madrid
0017  */
0018 //
0019 //--------------------------------------------------
0020 #ifndef L1MUBM_SECTOR_PROCESSOR_H
0021 #define L1MUBM_SECTOR_PROCESSOR_H
0022 
0023 //---------------
0024 // C++ Headers --
0025 //---------------
0026 
0027 #include <vector>
0028 
0029 //----------------------
0030 // Base Class Headers --
0031 //----------------------
0032 
0033 #include "DataFormats/L1TMuon/interface/BMTF/L1MuBMSecProcId.h"
0034 #include "DataFormats/L1TMuon/interface/L1MuBMTrack.h"
0035 
0036 //------------------------------------
0037 // Collaborating Class Declarations --
0038 //------------------------------------
0039 
0040 #include "FWCore/Framework/interface/ConsumesCollector.h"
0041 #include "FWCore/Framework/interface/Event.h"
0042 class L1MuBMSectorReceiver;
0043 class L1MuBMDataBuffer;
0044 class L1MuBMExtrapolationUnit;
0045 class L1MuBMTrackAssembler;
0046 class L1MuBMAssignmentUnit;
0047 class L1MuBMTrackFinder;
0048 class L1MuBMTrack;
0049 class L1TMuonBarrelParams;
0050 class L1TMuonBarrelParamsRcd;
0051 
0052 //              ---------------------
0053 //              -- Class Interface --
0054 //              ---------------------
0055 
0056 class L1MuBMSectorProcessor {
0057 public:
0058   /// constructor
0059   L1MuBMSectorProcessor(const L1MuBMTrackFinder&, const L1MuBMSecProcId&, edm::ConsumesCollector&&);
0060 
0061   /// destructor
0062   virtual ~L1MuBMSectorProcessor();
0063 
0064   /// run the Sector Processor
0065   virtual void run(int bx, const edm::Event& e, const edm::EventSetup& c);
0066 
0067   /// reset the Sector Processor
0068   virtual void reset();
0069 
0070   /// print muon candidates found by the Sector Processor
0071   void print() const;
0072 
0073   /// return pointer to the next wheel neighbour
0074   const L1MuBMSectorProcessor* neighbour() const;
0075 
0076   /// return Sector Processor identifier
0077   inline const L1MuBMSecProcId& id() const { return m_spid; }
0078 
0079   /// return reference to barrel MTTF
0080   inline const L1MuBMTrackFinder& tf() const { return m_tf; }
0081 
0082   /// is it a barrel-only Sector Processor?
0083   inline bool brl() const { return !m_spid.ovl(); }
0084 
0085   /// is it an overlap region Sector Processor?
0086   inline bool ovl() const { return m_spid.ovl(); }
0087 
0088   /// return pointer to Data Buffer
0089   inline const L1MuBMDataBuffer* data() const { return m_DataBuffer; }
0090   inline L1MuBMDataBuffer* data() { return m_DataBuffer; }
0091 
0092   /// return pointer to Extrapolation Unit
0093   inline const L1MuBMExtrapolationUnit* EU() const { return m_EU; }
0094 
0095   /// return pointer to Track Assembler
0096   inline const L1MuBMTrackAssembler* TA() const { return m_TA; }
0097 
0098   /// return pointer to Assignment Unit, index [0,1]
0099   inline const L1MuBMAssignmentUnit* AU(int id) const { return m_AUs[id]; }
0100 
0101   /// return pointer to muon candidate, index [0,1]
0102   inline L1MuBMTrack* track(int id) const { return m_TrackCands[id]; }
0103 
0104   /// return pointer to muon candidate, index [0,1]
0105   inline L1MuBMTrack* tracK(int id) const { return m_TracKCands[id]; }
0106 
0107 private:
0108   /// are there any non-empty muon candidates?
0109   bool anyTrack() const;
0110 
0111 private:
0112   const L1MuBMTrackFinder& m_tf;
0113   L1MuBMSecProcId m_spid;
0114 
0115   L1MuBMSectorReceiver* m_SectorReceiver;
0116   L1MuBMDataBuffer* m_DataBuffer;
0117   L1MuBMExtrapolationUnit* m_EU;
0118   L1MuBMTrackAssembler* m_TA;
0119   const edm::ESGetToken<L1TMuonBarrelParams, L1TMuonBarrelParamsRcd> m_bmtfParamsToken;
0120   std::vector<L1MuBMAssignmentUnit*> m_AUs;
0121 
0122   std::vector<L1MuBMTrack*> m_TrackCands;
0123   std::vector<L1MuBMTrack*> m_TracKCands;
0124 };
0125 
0126 #endif