Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:20:51

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 L1TMuonBarrelParams;
0040 class L1MuBMTrackSegPhi;
0041 class L1MuBMEUX;
0042 class L1MuBMERS;
0043 
0044 //              ---------------------
0045 //              -- Class Interface --
0046 //              ---------------------
0047 
0048 class L1MuBMSEU {
0049 public:
0050   /// constructor
0051   L1MuBMSEU(const L1MuBMSectorProcessor& sp, Extrapolation ext, unsigned int tsId);
0052 
0053   /// destructor
0054   ~L1MuBMSEU();
0055 
0056   /// run SEU
0057   void run(const L1TMuonBarrelParams& params);
0058 
0059   /// reset SEU
0060   void reset();
0061 
0062   /// reset single extrapolation
0063   void reset(unsigned int relAdr);
0064 
0065   /// load data into the SEU
0066   inline void load(const L1MuBMTrackSegPhi* startTS) { m_startTS = startTS; }
0067 
0068   /// return Extrapolator table
0069   const std::bitset<12>& exTable() const { return m_EXtable; }
0070 
0071   /// return Quality Sorter table
0072   const std::bitset<12>& qsTable() const { return m_QStable; }
0073 
0074   /// return number of successful extrapolations
0075   int numberOfExt() const;
0076 
0077   /// return extrapolation type
0078   inline Extrapolation ext() const { return m_ext; }
0079 
0080   /// return start track segment identifier (relative address)
0081   inline unsigned int tsId() const { return m_startTS_Id; }
0082 
0083   /// is it a own wheel Single Extrapolation Unit
0084   inline bool isOwnWheelSEU() const { return (m_startTS_Id == 0 || m_startTS_Id == 1); }
0085 
0086   /// is it a next wheel Single Extrapolation Unit
0087   inline bool isNextWheelSEU() const { return (m_startTS_Id == 2 || m_startTS_Id == 3); }
0088 
0089   /// return pointer to an Extrapolator
0090   inline const std::vector<L1MuBMEUX*>& eux() const { return m_EUXs; }
0091 
0092   /// return pointer to Extrapolation Result Selector
0093   inline const L1MuBMERS* ers() const { return m_ERS; }
0094 
0095 private:
0096   const L1MuBMSectorProcessor& m_sp;
0097   Extrapolation m_ext;        // Extrapolation type
0098   unsigned int m_startTS_Id;  // rel. address of start TS
0099 
0100   const L1MuBMTrackSegPhi* m_startTS;  // start track segment
0101   std::vector<L1MuBMEUX*> m_EUXs;      // vector of Extrapolators
0102   L1MuBMERS* m_ERS;                    // Extrapolation Result Selector
0103 
0104   std::bitset<12> m_EXtable;  // Extrapolator table
0105   std::bitset<12> m_QStable;  // Quality Selector table
0106 };
0107 
0108 #endif