CMS 3D CMS Logo

L1MuDTTrackAssembler.h
Go to the documentation of this file.
1 //-------------------------------------------------
2 //
20 //
21 //--------------------------------------------------
22 #ifndef L1MUDT_TRACK_ASSEMBLER_H
23 #define L1MUDT_TRACK_ASSEMBLER_H
24 
25 //---------------
26 // C++ Headers --
27 //---------------
28 
29 #include <bitset>
30 
31 //----------------------
32 // Base Class Headers --
33 //----------------------
34 
36 
37 //------------------------------------
38 // Collaborating Class Declarations --
39 //------------------------------------
40 
44 
45 // ---------------------
46 // -- Class Interface --
47 // ---------------------
48 
50 
51  public:
52 
55 
57  ~L1MuDTTrackAssembler() override;
58 
60  void run() override;
61 
63  void reset() override;
64 
66  void print() const;
67 
69  inline TrackClass trackClass(int id) const { return m_theTCs[id]; }
70 
72  inline const std::bitset<4>& trackBitMap(int id) const { return m_theBitMaps[id]; }
73 
75  inline bool isEmpty(int id) const { return (m_theTCs[id] == UNDEF); }
76 
78  inline int address(int id, int stat) const { return m_theAddresses[id].station(stat); }
79 
81  inline L1MuDTAddressArray address(int id) const { return m_theAddresses[id]; }
82 
83  private:
84 
86  void runEncoderSubUnit1(unsigned& global, unsigned& group, unsigned& priority);
87 
89  void runEncoderSubUnit2(unsigned& global, unsigned& group, unsigned& priority);
90 
92  void runAddressAssignment1(int global, int group);
93 
95  void runAddressAssignment2(int global, int group);
96 
98  static unsigned int priorityEncoder12(const std::bitset<12>& input);
99 
101  static unsigned int priorityEncoder4(const std::bitset<4>& input);
102 
104  static unsigned int priorityEncoder22(const std::bitset<22>& input);
105 
107  static unsigned int priorityEncoder21(const std::bitset<21>& input);
108 
110  static unsigned int addressEncoder12(const std::bitset<12>& input);
111 
113  static unsigned int addressEncoder12s(const std::bitset<12>& input);
114 
116  static unsigned long subBitset68(const std::bitset<68>& input, int pos, int length);
117 
119  static unsigned long subBitset56(const std::bitset<56>& input, int pos, int length);
120 
122  static std::bitset<56> getCancelationTable(unsigned int);
123 
124  private:
125 
127 
128  std::bitset<68> m_thePriorityTable1;
129  std::bitset<56> m_thePriorityTable2;
130  unsigned int m_theLastAddress[68];
131  unsigned int m_theLastAddressI[12];
132 
133  TrackClass m_theTCs[2]; // Track Classes of the 2 candidates
134  std::bitset<4> m_theBitMaps[2]; // bitmaps of Track Class
135  L1MuDTAddressArray m_theAddresses[2]; // relative addresses of the 2 candidates
136 
137 };
138 
139 #endif
static unsigned int addressEncoder12(const std::bitset< 12 > &input)
12 bit address encoder
static unsigned int addressEncoder12s(const std::bitset< 12 > &input)
special 12 bit address encoder
void runAddressAssignment1(int global, int group)
run the first Address Assignment Sub-Unit
void print() const
print result of Track Assembler
L1MuDTAddressArray m_theAddresses[2]
static unsigned int priorityEncoder12(const std::bitset< 12 > &input)
12 bit priority encoder
L1MuDTAddressArray address(int id) const
get address-array of selected track candidate
unsigned int m_theLastAddress[68]
static std::string const input
Definition: EdmProvDump.cc:44
static unsigned int priorityEncoder22(const std::bitset< 22 > &input)
22 bit priority encoder
L1MuDTTrackAssembler(const L1MuDTSectorProcessor &)
constructor
~L1MuDTTrackAssembler() override
destructor
const L1MuDTSectorProcessor & m_sp
void runEncoderSubUnit2(unsigned &global, unsigned &group, unsigned &priority)
run the second Priority Encoder Sub-Unit
const std::bitset< 4 > & trackBitMap(int id) const
return bitmap of found track
std::bitset< 4 > m_theBitMaps[2]
static std::bitset< 56 > getCancelationTable(unsigned int)
cancel Out Table
static unsigned int priorityEncoder21(const std::bitset< 21 > &input)
21 bit priority encoder
std::bitset< 68 > m_thePriorityTable1
void run() override
run Track Assembler
unsigned int m_theLastAddressI[12]
static unsigned int priorityEncoder4(const std::bitset< 4 > &input)
4 bit priority encoder
void runAddressAssignment2(int global, int group)
run the second Address Assignment Sub-Unit
static unsigned long subBitset56(const std::bitset< 56 > &input, int pos, int length)
get sub-bitmap of a 56-bit word
void runEncoderSubUnit1(unsigned &global, unsigned &group, unsigned &priority)
run the first Priority Encoder Sub-Unit
bool isEmpty(int id) const
is it a valid Track Class?
std::bitset< 56 > m_thePriorityTable2
TrackClass trackClass(int id) const
return Track Class of found track
static unsigned long subBitset68(const std::bitset< 68 > &input, int pos, int length)
get sub-bitmap of a 68-bit word
void reset() override
reset Track Assembler
int address(int id, int stat) const
get address of a single station of selected track candidate
unsigned short station(int stat) const
get address of a given station [1-4]