Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-09-16 03:23:57

0001 //-------------------------------------------------
0002 //
0003 /**  \class L1MuBMEtaProcessor
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 L1MUBM_ETA_PROCESSOR_H
0020 #define L1MUBM_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/Event.h"
0038 #include "FWCore/Framework/interface/ESHandle.h"
0039 #include "FWCore/Framework/interface/EventSetup.h"
0040 #include "FWCore/Utilities/interface/EDGetToken.h"
0041 #include "DataFormats/L1TMuon/interface/BMTF/L1MuBMAddressArray.h"
0042 #include "DataFormats/L1DTTrackFinder/interface/L1MuDTChambThDigi.h"
0043 #include "DataFormats/L1DTTrackFinder/interface/L1MuDTChambThContainer.h"
0044 #include "FWCore/Framework/interface/ConsumesCollector.h"
0045 #include "CondFormats/L1TObjects/interface/L1TMuonBarrelParams.h"
0046 #include "CondFormats/DataRecord/interface/L1TMuonBarrelParamsRcd.h"
0047 
0048 #include "L1Trigger/L1TMuonBarrel/interface/L1MuBMTQualPatternLut.h"
0049 #include "L1Trigger/L1TMuonBarrel/interface/L1MuBMTEtaPatternLut.h"
0050 
0051 class L1MuBMTrackSegEta;
0052 class L1MuBMTrackFinder;
0053 class L1MuBMTrack;
0054 class L1MuBMTEtaPatternLut;
0055 class L1MuBMTQualPatternLut;
0056 class L1MuDTTFMasks;
0057 class L1TMuonBarrelParamsRcd;
0058 
0059 //              ---------------------
0060 //              -- Class Interface --
0061 //              ---------------------
0062 
0063 class L1MuBMEtaProcessor {
0064 public:
0065   /// constructor
0066   L1MuBMEtaProcessor(const L1MuBMTrackFinder&, int id, edm::ConsumesCollector&& iC);
0067 
0068   /// destructor
0069   virtual ~L1MuBMEtaProcessor();
0070 
0071   /// return Eta Processor identifier (0-11)
0072   inline int id() const { return m_epid; }
0073 
0074   /// run the Eta Processor
0075   virtual void run(int bx, const edm::Event& e, const edm::EventSetup& c);
0076 
0077   /// reset the Eta Processor
0078   virtual void reset();
0079 
0080   /// print muon candidates found by the Eta Processor
0081   void print() const;
0082 
0083   /// return reference to barrel MTTF
0084   inline const L1MuBMTrackFinder& tf() const { return m_tf; }
0085 
0086   /// return eta values, index [0,11]
0087   inline int eta(int id) const { return m_eta[id]; }
0088 
0089   /// return fine bit, index [0,11]
0090   inline bool fineBit(int id) const { return m_fine[id]; }
0091 
0092 private:
0093   /// receive data (eta trigger primitives)
0094   void receiveData(int bx, const edm::Event& e, const L1TMuonBarrelParams& params);
0095 
0096   /// receive addresses (from 6 Sector Processors)
0097   void receiveAddresses();
0098 
0099   /// run Eta Track Finder (ETF)
0100   void runEtaTrackFinder(const L1TMuonBarrelParams& params);
0101 
0102   /// run Eta Matching Unit (EMU)
0103   void runEtaMatchingUnit(const L1TMuonBarrelParams& params);
0104 
0105   /// assign eta and etaFineBit
0106   void assign();
0107 
0108   /// get quality code; id [0,26], stat [1,3]
0109   static int quality(int id, int stat);
0110 
0111 private:
0112   const L1MuBMTrackFinder& m_tf;
0113   int m_epid;
0114 
0115   int m_mask;
0116 
0117   int m_eta[12];
0118   bool m_fine[12];
0119 
0120   std::vector<int> m_foundPattern;
0121   int m_pattern[12];
0122 
0123   int m_address[12];
0124   L1MuBMTrack* m_TrackCand[12];
0125   L1MuBMTrack* m_TracKCand[12];
0126   std::vector<const L1MuBMTrackSegEta*> m_tseta;
0127 
0128   edm::ESGetToken<L1TMuonBarrelParams, L1TMuonBarrelParamsRcd> m_bmtfParamsToken;
0129   L1MuDTTFMasks msks;
0130   L1MuBMTEtaPatternLut theEtaPatternLUT;    // ETF look-up table
0131   L1MuBMTQualPatternLut theQualPatternLUT;  // EMU look-up tables
0132 
0133   edm::EDGetTokenT<L1MuDTChambThContainer> m_DTDigiToken;
0134 };
0135 
0136 #endif