Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 //-------------------------------------------------
0002 //
0003 /**  \class L1MuBMSEU
0004  *
0005  *   Single Extrapolation Unit:
0006  *
0007  *   performs for a given start track segment and a
0008  *   given extrapolation type extrapolations
0009  *   to all possible target track segments (12 or 6)
0010  *
0011  *
0012  *
0013  *   N. Neumeister            CERN EP
0014  */
0015 //
0016 //--------------------------------------------------
0017 #ifndef L1MUBM_SEU_H
0018 #define L1MUBM_SEU_H
0019 
0020 //---------------
0021 // C++ Headers --
0022 //---------------
0023 
0024 #include <utility>
0025 #include <vector>
0026 #include <bitset>
0027 
0028 //----------------------
0029 // Base Class Headers --
0030 //----------------------
0031 
0032 //------------------------------------
0033 // Collaborating Class Declarations --
0034 //------------------------------------
0035 
0036 #include "FWCore/Framework/interface/EventSetup.h"
0037 #include "CondFormats/L1TObjects/interface/L1MuDTExtParam.h"
0038 class L1MuBMSectorProcessor;
0039 class L1MuBMTFConfig;
0040 class L1TMuonBarrelParams;
0041 class L1MuBMTrackSegPhi;
0042 class L1MuBMEUX;
0043 class L1MuBMERS;
0044 
0045 //              ---------------------
0046 //              -- Class Interface --
0047 //              ---------------------
0048 
0049 class L1MuBMSEU {
0050 public:
0051   /// constructor
0052   L1MuBMSEU(const L1MuBMSectorProcessor& sp, Extrapolation ext, unsigned int tsId);
0053 
0054   /// destructor
0055   ~L1MuBMSEU();
0056 
0057   /// run SEU
0058   void run(const L1TMuonBarrelParams& params);
0059 
0060   /// reset SEU
0061   void reset();
0062 
0063   /// reset single extrapolation
0064   void reset(unsigned int relAdr);
0065 
0066   /// load data into the SEU
0067   inline void load(const L1MuBMTrackSegPhi* startTS) { m_startTS = startTS; }
0068 
0069   /// return Extrapolator table
0070   const std::bitset<12>& exTable() const { return m_EXtable; }
0071 
0072   /// return Quality Sorter table
0073   const std::bitset<12>& qsTable() const { return m_QStable; }
0074 
0075   /// return number of successful extrapolations
0076   int numberOfExt() const;
0077 
0078   /// return extrapolation type
0079   inline Extrapolation ext() const { return m_ext; }
0080 
0081   /// return start track segment identifier (relative address)
0082   inline unsigned int tsId() const { return m_startTS_Id; }
0083 
0084   /// is it a own wheel Single Extrapolation Unit
0085   inline bool isOwnWheelSEU() const { return (m_startTS_Id == 0 || m_startTS_Id == 1); }
0086 
0087   /// is it a next wheel Single Extrapolation Unit
0088   inline bool isNextWheelSEU() const { return (m_startTS_Id == 2 || m_startTS_Id == 3); }
0089 
0090   /// return pointer to an Extrapolator
0091   inline const std::vector<L1MuBMEUX*>& eux() const { return m_EUXs; }
0092 
0093   /// return pointer to Extrapolation Result Selector
0094   inline const L1MuBMERS* ers() const { return m_ERS; }
0095 
0096   const L1MuBMTFConfig& config() const;
0097 
0098 private:
0099   const L1MuBMSectorProcessor& m_sp;
0100   Extrapolation m_ext;        // Extrapolation type
0101   unsigned int m_startTS_Id;  // rel. address of start TS
0102 
0103   const L1MuBMTrackSegPhi* m_startTS;  // start track segment
0104   std::vector<L1MuBMEUX*> m_EUXs;      // vector of Extrapolators
0105   L1MuBMERS* m_ERS;                    // Extrapolation Result Selector
0106 
0107   std::bitset<12> m_EXtable;  // Extrapolator table
0108   std::bitset<12> m_QStable;  // Quality Selector table
0109 };
0110 
0111 #endif