CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
L1MuDTTrackAssembler.h
Go to the documentation of this file.
1 //-------------------------------------------------
2 //
22 //
23 //--------------------------------------------------
24 #ifndef L1MUDT_TRACK_ASSEMBLER_H
25 #define L1MUDT_TRACK_ASSEMBLER_H
26 
27 //---------------
28 // C++ Headers --
29 //---------------
30 
31 #include <bitset>
32 
33 //----------------------
34 // Base Class Headers --
35 //----------------------
36 
38 
39 //------------------------------------
40 // Collaborating Class Declarations --
41 //------------------------------------
42 
46 
47 // ---------------------
48 // -- Class Interface --
49 // ---------------------
50 
52 
53  public:
54 
57 
59  virtual ~L1MuDTTrackAssembler();
60 
62  virtual void run();
63 
65  virtual void reset();
66 
68  void print() const;
69 
71  inline TrackClass trackClass(int id) const { return m_theTCs[id]; }
72 
74  inline const std::bitset<4>& trackBitMap(int id) const { return m_theBitMaps[id]; }
75 
77  inline bool isEmpty(int id) const { return (m_theTCs[id] == UNDEF); }
78 
80  inline int address(int id, int stat) const { return m_theAddresses[id].station(stat); }
81 
83  inline L1MuDTAddressArray address(int id) const { return m_theAddresses[id]; }
84 
85  private:
86 
88  void runEncoderSubUnit1(unsigned& global, unsigned& group, unsigned& priority);
89 
91  void runEncoderSubUnit2(unsigned& global, unsigned& group, unsigned& priority);
92 
94  void runAddressAssignment1(int global, int group);
95 
97  void runAddressAssignment2(int global, int group);
98 
100  static unsigned int priorityEncoder12(const std::bitset<12>& input);
101 
103  static unsigned int priorityEncoder4(const std::bitset<4>& input);
104 
106  static unsigned int priorityEncoder22(const std::bitset<22>& input);
107 
109  static unsigned int priorityEncoder21(const std::bitset<21>& input);
110 
112  static unsigned int addressEncoder12(const std::bitset<12>& input);
113 
115  static unsigned int addressEncoder12s(const std::bitset<12>& input);
116 
118  static unsigned long subBitset68(const std::bitset<68>& input, int pos, int length);
119 
121  static unsigned long subBitset56(const std::bitset<56>& input, int pos, int length);
122 
124  static std::bitset<56> getCancelationTable(unsigned int);
125 
126  private:
127 
129 
130  std::bitset<68> m_thePriorityTable1;
131  std::bitset<56> m_thePriorityTable2;
132  unsigned int m_theLastAddress[68];
133  unsigned int m_theLastAddressI[12];
134 
135  TrackClass m_theTCs[2]; // Track Classes of the 2 candidates
136  std::bitset<4> m_theBitMaps[2]; // bitmaps of Track Class
137  L1MuDTAddressArray m_theAddresses[2]; // relative addresses of the 2 candidates
138 
139 };
140 
141 #endif
num priority
Definition: procUtils.cc:93
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 unsigned int priorityEncoder22(const std::bitset< 22 > &input)
22 bit priority encoder
L1MuDTTrackAssembler(const L1MuDTSectorProcessor &)
constructor
const L1MuDTSectorProcessor & m_sp
void runEncoderSubUnit2(unsigned &global, unsigned &group, unsigned &priority)
run the second Priority Encoder Sub-Unit
virtual void run()
run Track Assembler
const std::bitset< 4 > & trackBitMap(int id) const
return bitmap of found track
virtual void reset()
reset Track Assembler
virtual ~L1MuDTTrackAssembler()
destructor
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
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
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]