Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 //-------------------------------------------------
0002 //
0003 /**  \class L1MuDTEtaProcessor
0004  *
0005  *   Eta Processor:
0006  *
0007  *   An Eta Processor consists of :
0008  *    - one receiver unit,
0009  *    - one Eta Track Finder (ETF) and 
0010  *    - one Eta Matching Unit (EMU)
0011  *
0012  *
0013  *
0014  *   N. Neumeister            CERN EP
0015  *   J. Troconiz              UAM Madrid
0016  */
0017 //
0018 //--------------------------------------------------
0019 #ifndef L1MUDT_ETA_PROCESSOR_H
0020 #define L1MUDT_ETA_PROCESSOR_H
0021 
0022 //---------------
0023 // C++ Headers --
0024 //---------------
0025 
0026 #include <vector>
0027 
0028 //----------------------
0029 // Base Class Headers --
0030 //----------------------
0031 
0032 //------------------------------------
0033 // Collaborating Class Declarations --
0034 //------------------------------------
0035 
0036 #include "DataFormats/Common/interface/Handle.h"
0037 #include "FWCore/Framework/interface/ConsumesCollector.h"
0038 #include "FWCore/Framework/interface/Event.h"
0039 #include "FWCore/Framework/interface/ESHandle.h"
0040 #include "FWCore/Framework/interface/EventSetup.h"
0041 #include "FWCore/Utilities/interface/ESGetToken.h"
0042 #include "FWCore/Utilities/interface/EDGetToken.h"
0043 #include "L1Trigger/DTTrackFinder/interface/L1MuDTAddressArray.h"
0044 class L1MuDTChambThContainer;
0045 class L1MuDTTrackSegEta;
0046 class L1MuDTTrackFinder;
0047 class L1MuDTTrack;
0048 class L1MuDTEtaPatternLut;
0049 class L1MuDTQualPatternLut;
0050 class L1MuDTTFMasks;
0051 class L1MuDTTFMasksRcd;
0052 class L1MuDTEtaPatternLutRcd;
0053 class L1MuDTQualPatternLutRcd;
0054 //              ---------------------
0055 //              -- Class Interface --
0056 //              ---------------------
0057 
0058 class L1MuDTEtaProcessor {
0059 public:
0060   /// constructor
0061   L1MuDTEtaProcessor(const L1MuDTTrackFinder&, int id, edm::ConsumesCollector iC);
0062 
0063   /// destructor
0064   virtual ~L1MuDTEtaProcessor();
0065 
0066   /// return Eta Processor identifier (0-11)
0067   inline int id() const { return m_epid; }
0068 
0069   /// run the Eta Processor
0070   virtual void run(int bx, const edm::Event& e, const edm::EventSetup& c);
0071 
0072   /// reset the Eta Processor
0073   virtual void reset();
0074 
0075   /// print muon candidates found by the Eta Processor
0076   void print() const;
0077 
0078   /// return reference to barrel MTTF
0079   inline const L1MuDTTrackFinder& tf() const { return m_tf; }
0080 
0081   /// return eta values, index [0,11]
0082   inline int eta(int id) const { return m_eta[id]; }
0083 
0084   /// return fine bit, index [0,11]
0085   inline bool fineBit(int id) const { return m_fine[id]; }
0086 
0087 private:
0088   /// receive data (eta trigger primitives)
0089   void receiveData(int bx, const edm::Event& e, const edm::EventSetup& c);
0090 
0091   /// receive addresses (from 6 Sector Processors)
0092   void receiveAddresses();
0093 
0094   /// run Eta Track Finder (ETF)
0095   void runEtaTrackFinder(const edm::EventSetup& c);
0096 
0097   /// run Eta Matching Unit (EMU)
0098   void runEtaMatchingUnit(const edm::EventSetup& c);
0099 
0100   /// assign eta and etaFineBit
0101   void assign();
0102 
0103   /// get quality code; id [0,26], stat [1,3]
0104   static int quality(int id, int stat);
0105 
0106 private:
0107   const L1MuDTTrackFinder& m_tf;
0108   int m_epid;
0109 
0110   int m_mask;
0111 
0112   int m_eta[12];
0113   bool m_fine[12];
0114 
0115   std::vector<int> m_foundPattern;
0116   int m_pattern[12];
0117 
0118   int m_address[12];
0119   L1MuDTTrack* m_TrackCand[12];
0120   L1MuDTTrack* m_TracKCand[12];
0121   std::vector<const L1MuDTTrackSegEta*> m_tseta;
0122   edm::EDGetTokenT<L1MuDTChambThContainer> m_DTDigiToken;
0123 
0124   edm::ESGetToken<L1MuDTEtaPatternLut, L1MuDTEtaPatternLutRcd> theEtaToken;
0125   edm::ESGetToken<L1MuDTQualPatternLut, L1MuDTQualPatternLutRcd> theQualToken;
0126   edm::ESGetToken<L1MuDTTFMasks, L1MuDTTFMasksRcd> theMsksToken;
0127   edm::ESHandle<L1MuDTEtaPatternLut> theEtaPatternLUT;    // ETF look-up table
0128   edm::ESHandle<L1MuDTQualPatternLut> theQualPatternLUT;  // EMU look-up tables
0129   edm::ESHandle<L1MuDTTFMasks> msks;
0130 };
0131 
0132 #endif