CMS 3D CMS Logo

L1MuBMTrackAssembler.h
Go to the documentation of this file.
1 //-------------------------------------------------
2 //
20 //
21 //--------------------------------------------------
22 #ifndef L1MUBM_TRACK_ASSEBMLER_H
23 #define L1MUBM_TRACK_ASSEBMLER_H
24 
25 //---------------
26 // C++ Headers --
27 //---------------
28 
29 #include <bitset>
30 
31 //----------------------
32 // Base Class Headers --
33 //----------------------
34 
35 //------------------------------------
36 // Collaborating Class Declarations --
37 //------------------------------------
38 
42 
43 // ---------------------
44 // -- Class Interface --
45 // ---------------------
46 
48 public:
51 
54 
56  void run();
57 
59  void reset();
60 
62  void print() const;
63 
65  inline TrackClass trackClass(int id) const { return m_theTCs[id]; }
66 
68  inline const std::bitset<4>& trackBitMap(int id) const { return m_theBitMaps[id]; }
69 
71  inline bool isEmpty(int id) const { return (m_theTCs[id] == UNDEF); }
72 
74  inline int address(int id, int stat) const { return m_theAddresses[id].station(stat); }
75 
77  inline L1MuBMAddressArray address(int id) const { return m_theAddresses[id]; }
78 
79 private:
81  void runEncoderSubUnit1(unsigned& global, unsigned& group, unsigned& priority);
82 
84  void runEncoderSubUnit2(unsigned& global, unsigned& group, unsigned& priority);
85 
87  void runAddressAssignment1(int global, int group);
88 
90  void runAddressAssignment2(int global, int group);
91 
93  static unsigned int priorityEncoder12(const std::bitset<12>& input);
94 
96  static unsigned int priorityEncoder4(const std::bitset<4>& input);
97 
99  static unsigned int priorityEncoder22(const std::bitset<22>& input);
100 
102  static unsigned int priorityEncoder21(const std::bitset<21>& input);
103 
105  static unsigned int addressEncoder12(const std::bitset<12>& input);
106 
108  static unsigned int addressEncoder12s(const std::bitset<12>& input);
109 
111  static unsigned long subBitset68(const std::bitset<68>& input, int pos, int length);
112 
114  static unsigned long subBitset56(const std::bitset<56>& input, int pos, int length);
115 
117  static std::bitset<56> getCancelationTable(unsigned int);
118 
119 private:
121 
122  std::bitset<68> m_thePriorityTable1;
123  std::bitset<56> m_thePriorityTable2;
124  unsigned int m_theLastAddress[68];
125  unsigned int m_theLastAddressI[12];
126 
127  TrackClass m_theTCs[2]; // Track Classes of the 2 candidates
128  std::bitset<4> m_theBitMaps[2]; // bitmaps of Track Class
129  L1MuBMAddressArray m_theAddresses[2]; // relative addresses of the 2 candidates
130 };
131 
132 #endif
std::bitset< 4 > m_theBitMaps[2]
static unsigned int priorityEncoder22(const std::bitset< 22 > &input)
22 bit priority encoder
unsigned int m_theLastAddress[68]
int address(int id, int stat) const
get address of a single station of selected track candidate
std::bitset< 68 > m_thePriorityTable1
void run()
run Track Assembler
void runAddressAssignment2(int global, int group)
run the second Address Assignment Sub-Unit
std::bitset< 56 > m_thePriorityTable2
static std::string const input
Definition: EdmProvDump.cc:47
L1MuBMAddressArray m_theAddresses[2]
void runAddressAssignment1(int global, int group)
run the first Address Assignment Sub-Unit
static std::bitset< 56 > getCancelationTable(unsigned int)
cancel Out Table
const std::bitset< 4 > & trackBitMap(int id) const
return bitmap of found track
unsigned short station(int stat) const
get address of a given station [1-4]
unsigned int m_theLastAddressI[12]
void reset()
reset Track Assembler
void print() const
print result of Track Assembler
void runEncoderSubUnit2(unsigned &global, unsigned &group, unsigned &priority)
run the second Priority Encoder Sub-Unit
static unsigned int priorityEncoder21(const std::bitset< 21 > &input)
21 bit priority encoder
static unsigned long subBitset56(const std::bitset< 56 > &input, int pos, int length)
get sub-bitmap of a 56-bit word
static unsigned int priorityEncoder4(const std::bitset< 4 > &input)
4 bit priority encoder
const L1MuBMSectorProcessor & m_sp
static unsigned int addressEncoder12(const std::bitset< 12 > &input)
12 bit address encoder
~L1MuBMTrackAssembler()
destructor
static unsigned long subBitset68(const std::bitset< 68 > &input, int pos, int length)
get sub-bitmap of a 68-bit word
L1MuBMTrackAssembler(const L1MuBMSectorProcessor &)
constructor
static unsigned int priorityEncoder12(const std::bitset< 12 > &input)
12 bit priority encoder
bool isEmpty(int id) const
is it a valid Track Class?
L1MuBMAddressArray address(int id) const
get address-array of selected track candidate
TrackClass trackClass(int id) const
return Track Class of found track
static unsigned int addressEncoder12s(const std::bitset< 12 > &input)
special 12 bit address encoder
void runEncoderSubUnit1(unsigned &global, unsigned &group, unsigned &priority)
run the first Priority Encoder Sub-Unit