Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-11-15 23:40:41

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 
0043 #include "L1Trigger/L1TMuonBarrel/src/L1MuBMSectorReceiver.h"
0044 #include "L1Trigger/L1TMuonBarrel/src/L1MuBMDataBuffer.h"
0045 #include "L1Trigger/L1TMuonBarrel/src/L1MuBMExtrapolationUnit.h"
0046 #include "L1Trigger/L1TMuonBarrel/src/L1MuBMTrackAssembler.h"
0047 #include "L1Trigger/L1TMuonBarrel/src/L1MuBMAssignmentUnit.h"
0048 #include "L1Trigger/L1TMuonBarrel/interface/L1MuBMTrackFinder.h"
0049 
0050 class L1MuBMTrack;
0051 class L1TMuonBarrelParams;
0052 class L1TMuonBarrelParamsRcd;
0053 
0054 //              ---------------------
0055 //              -- Class Interface --
0056 //              ---------------------
0057 
0058 class L1MuBMSectorProcessor {
0059 public:
0060   /// constructor
0061   L1MuBMSectorProcessor() = delete;
0062   L1MuBMSectorProcessor(const L1MuBMTrackFinder&, const L1MuBMSecProcId&, edm::ConsumesCollector&&);
0063 
0064   /// run the Sector Processor
0065   void run(int bx, const edm::Event& e, const edm::EventSetup& c);
0066 
0067   /// reset the Sector Processor
0068   void reset();
0069 
0070   /// access configuration
0071   const L1MuBMTFConfig& config() const;
0072 
0073   /// print muon candidates found by the Sector Processor
0074   void print() const;
0075 
0076   /// return pointer to the next wheel neighbour
0077   const L1MuBMSectorProcessor* neighbour() const;
0078 
0079   /// return Sector Processor identifier
0080   inline const L1MuBMSecProcId& id() const { return m_spid; }
0081 
0082   /// return reference to barrel MTTF
0083   inline const L1MuBMTrackFinder& tf() const { return m_tf; }
0084 
0085   /// is it a barrel-only Sector Processor?
0086   inline bool brl() const { return !m_spid.ovl(); }
0087 
0088   /// is it an overlap region Sector Processor?
0089   inline bool ovl() const { return m_spid.ovl(); }
0090 
0091   /// return Data Buffer
0092   inline const L1MuBMDataBuffer& data() const { return m_DataBuffer; }
0093   inline L1MuBMDataBuffer& data() { return m_DataBuffer; }
0094 
0095   /// return Extrapolation Unit
0096   inline const L1MuBMExtrapolationUnit& EU() const { return m_EU; }
0097 
0098   /// return Track Assembler
0099   inline const L1MuBMTrackAssembler& TA() const { return m_TA; }
0100 
0101   /// return Assignment Unit, index [0,1]
0102   inline const L1MuBMAssignmentUnit& AU(int id) const { return m_AUs[id]; }
0103 
0104   /// return muon candidate, index [0,1]
0105   inline L1MuBMTrack const& track(int id) const { return m_TrackCands[id]; }
0106   inline L1MuBMTrack& track(int id) { return m_TrackCands[id]; }
0107 
0108   /// return muon candidate, index [0,1]
0109   inline L1MuBMTrack const& tracK(int id) const { return m_TracKCands[id]; }
0110   inline L1MuBMTrack& tracK(int id) { return m_TracKCands[id]; }
0111 
0112 private:
0113   /// are there any non-empty muon candidates?
0114   bool anyTrack() const;
0115 
0116 private:
0117   const L1MuBMTrackFinder& m_tf;
0118   L1MuBMSecProcId m_spid;
0119 
0120   L1MuBMSectorReceiver m_SectorReceiver;
0121   L1MuBMDataBuffer m_DataBuffer;
0122   L1MuBMExtrapolationUnit m_EU;
0123   L1MuBMTrackAssembler m_TA;
0124   const edm::ESGetToken<L1TMuonBarrelParams, L1TMuonBarrelParamsRcd> m_bmtfParamsToken;
0125   std::vector<L1MuBMAssignmentUnit> m_AUs;
0126 
0127   std::vector<L1MuBMTrack> m_TrackCands;
0128   std::vector<L1MuBMTrack> m_TracKCands;
0129 };
0130 
0131 #endif