Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 //-------------------------------------------------
0002 //
0003 /**  \class L1MuDTSectorProcessor
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 L1MUDT_SECTOR_PROCESSOR_H
0021 #define L1MUDT_SECTOR_PROCESSOR_H
0022 
0023 //---------------
0024 // C++ Headers --
0025 //---------------
0026 
0027 #include <vector>
0028 #include <memory>
0029 
0030 //----------------------
0031 // Base Class Headers --
0032 //----------------------
0033 
0034 #include "L1Trigger/DTTrackFinder/interface/L1MuDTSecProcId.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/DTTrackFinder/src/L1MuDTSectorReceiver.h"
0044 #include "L1Trigger/DTTrackFinder/src/L1MuDTDataBuffer.h"
0045 #include "L1Trigger/DTTrackFinder/src/L1MuDTExtrapolationUnit.h"
0046 #include "L1Trigger/DTTrackFinder/src/L1MuDTTrackAssembler.h"
0047 
0048 #include "L1Trigger/DTTrackFinder/src/L1MuDTAssignmentUnit.h"
0049 #include "L1Trigger/DTTrackFinder/interface/L1MuDTTrack.h"
0050 class L1MuDTTrackFinder;
0051 
0052 //              ---------------------
0053 //              -- Class Interface --
0054 //              ---------------------
0055 
0056 class L1MuDTSectorProcessor {
0057 public:
0058   /// constructor
0059   L1MuDTSectorProcessor(const L1MuDTTrackFinder&, const L1MuDTSecProcId&, edm::ConsumesCollector);
0060 
0061   /// destructor
0062   virtual ~L1MuDTSectorProcessor();
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 L1MuDTSectorProcessor* neighbour() const;
0075 
0076   /// return Sector Processor identifier
0077   inline const L1MuDTSecProcId& id() const { return m_spid; }
0078 
0079   /// return reference to barrel MTTF
0080   inline const L1MuDTTrackFinder& 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 L1MuDTDataBuffer* data() const { return &m_DataBuffer; }
0090   inline L1MuDTDataBuffer* data() { return &m_DataBuffer; }
0091 
0092   /// return pointer to Extrapolation Unit
0093   inline const L1MuDTExtrapolationUnit* EU() const { return &m_EU; }
0094 
0095   /// return pointer to Track Assembler
0096   inline const L1MuDTTrackAssembler* TA() const { return &m_TA; }
0097 
0098   /// return pointer to Assignment Unit, index [0,1]
0099   inline const L1MuDTAssignmentUnit* AU(int id) const { return &m_AUs[id]; }
0100 
0101   /// return pointer to muon candidate, index [0,1]
0102   inline const L1MuDTTrack* track(int id) const { return &m_TrackCands[id]; }
0103   inline L1MuDTTrack* track(int id) { return &m_TrackCands[id]; }
0104 
0105   /// return pointer to muon candidate, index [0,1]
0106   inline const L1MuDTTrack* tracK(int id) const { return &m_TracKCands[id]; }
0107   inline L1MuDTTrack* tracK(int id) { return &m_TracKCands[id]; }
0108 
0109 private:
0110   /// are there any non-empty muon candidates?
0111   bool anyTrack() const;
0112 
0113 private:
0114   const L1MuDTTrackFinder& m_tf;
0115   L1MuDTSecProcId m_spid;
0116 
0117   L1MuDTSectorReceiver m_SectorReceiver;
0118   L1MuDTDataBuffer m_DataBuffer;
0119   L1MuDTExtrapolationUnit m_EU;
0120   L1MuDTTrackAssembler m_TA;
0121   std::array<L1MuDTAssignmentUnit, 2> m_AUs;
0122 
0123   std::array<L1MuDTTrack, 2> m_TrackCands;
0124   std::array<L1MuDTTrack, 2> m_TracKCands;
0125 };
0126 
0127 #endif