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 public:
53 
55  ~L1MuDTTrackAssembler() override;
56 
58  void run() override;
59 
61  void reset() override;
62 
64  void print() const;
65 
67  inline TrackClass trackClass(int id) const { return m_theTCs[id]; }
68 
70  inline const std::bitset<4>& trackBitMap(int id) const { return m_theBitMaps[id]; }
71 
73  inline bool isEmpty(int id) const { return (m_theTCs[id] == UNDEF); }
74 
76  inline int address(int id, int stat) const { return m_theAddresses[id].station(stat); }
77 
79  inline L1MuDTAddressArray address(int id) const { return m_theAddresses[id]; }
80 
81 private:
83  void runEncoderSubUnit1(unsigned& global, unsigned& group, unsigned& priority);
84 
86  void runEncoderSubUnit2(unsigned& global, unsigned& group, unsigned& priority);
87 
89  void runAddressAssignment1(int global, int group);
90 
92  void runAddressAssignment2(int global, int group);
93 
95  static unsigned int priorityEncoder12(const std::bitset<12>& input);
96 
98  static unsigned int priorityEncoder4(const std::bitset<4>& input);
99 
101  static unsigned int priorityEncoder22(const std::bitset<22>& input);
102 
104  static unsigned int priorityEncoder21(const std::bitset<21>& input);
105 
107  static unsigned int addressEncoder12(const std::bitset<12>& input);
108 
110  static unsigned int addressEncoder12s(const std::bitset<12>& input);
111 
113  static unsigned long subBitset68(const std::bitset<68>& input, int pos, int length);
114 
116  static unsigned long subBitset56(const std::bitset<56>& input, int pos, int length);
117 
119  static std::bitset<56> getCancelationTable(unsigned int);
120 
121 private:
123 
124  std::bitset<68> m_thePriorityTable1;
125  std::bitset<56> m_thePriorityTable2;
126  unsigned int m_theLastAddress[68];
127  unsigned int m_theLastAddressI[12];
128 
129  TrackClass m_theTCs[2]; // Track Classes of the 2 candidates
130  std::bitset<4> m_theBitMaps[2]; // bitmaps of Track Class
131  L1MuDTAddressArray m_theAddresses[2]; // relative addresses of the 2 candidates
132 };
133 
134 #endif
L1MuDTTrackAssembler::trackClass
TrackClass trackClass(int id) const
return Track Class of found track
Definition: L1MuDTTrackAssembler.h:67
L1MuDTTrackAssembler::m_theTCs
TrackClass m_theTCs[2]
Definition: L1MuDTTrackAssembler.h:129
input
static const std::string input
Definition: EdmProvDump.cc:48
L1MuDTTrackAssembler::reset
void reset() override
reset Track Assembler
Definition: L1MuDTTrackAssembler.cc:461
L1MuDTAddressArray
Definition: L1MuDTAddressArray.h:50
L1MuDTTrackAssembler::m_theLastAddressI
unsigned int m_theLastAddressI[12]
Definition: L1MuDTTrackAssembler.h:127
L1MuDTAddressArray::station
unsigned short station(int stat) const
get address of a given station [1-4]
Definition: L1MuDTAddressArray.h:80
pos
Definition: PixelAliasList.h:18
L1MuDTAddressArray.h
L1MuDTTrackAssembler::m_theBitMaps
std::bitset< 4 > m_theBitMaps[2]
Definition: L1MuDTTrackAssembler.h:130
L1MuDTTrackAssembler::print
void print() const
print result of Track Assembler
Definition: L1MuDTTrackAssembler.cc:479
L1MuDTTrackAssembler::address
int address(int id, int stat) const
get address of a single station of selected track candidate
Definition: L1MuDTTrackAssembler.h:76
L1MuDTTrackAssembler::getCancelationTable
static std::bitset< 56 > getCancelationTable(unsigned int)
cancel Out Table
Definition: L1MuDTTrackAssembler.cc:1426
L1MuDTTrackAssembler::address
L1MuDTAddressArray address(int id) const
get address-array of selected track candidate
Definition: L1MuDTTrackAssembler.h:79
L1MuDTTrackAssembler::priorityEncoder21
static unsigned int priorityEncoder21(const std::bitset< 21 > &input)
21 bit priority encoder
Definition: L1MuDTTrackAssembler.cc:1345
L1MuDTTrackAssembler::runAddressAssignment2
void runAddressAssignment2(int global, int group)
run the second Address Assignment Sub-Unit
Definition: L1MuDTTrackAssembler.cc:1043
hgcalPlots.stat
stat
Definition: hgcalPlots.py:1111
L1MuDTTrackAssembler::subBitset56
static unsigned long subBitset56(const std::bitset< 56 > &input, int pos, int length)
get sub-bitmap of a 56-bit word
Definition: L1MuDTTrackAssembler.cc:1412
L1MuDTTrackAssembler::m_thePriorityTable1
std::bitset< 68 > m_thePriorityTable1
Definition: L1MuDTTrackAssembler.h:124
L1MuDTTrackAssembler
Definition: L1MuDTTrackAssembler.h:49
L1MuDTTrackAssembler::m_thePriorityTable2
std::bitset< 56 > m_thePriorityTable2
Definition: L1MuDTTrackAssembler.h:125
L1AbstractProcessor
Definition: L1AbstractProcessor.h:34
L1MuDTTrackAssembler::L1MuDTTrackAssembler
L1MuDTTrackAssembler(const L1MuDTSectorProcessor &)
constructor
Definition: L1MuDTTrackAssembler.cc:45
L1MuDTTrackAssembler::runEncoderSubUnit1
void runEncoderSubUnit1(unsigned &global, unsigned &group, unsigned &priority)
run the first Priority Encoder Sub-Unit
Definition: L1MuDTTrackAssembler.cc:493
L1MuDTTrackAssembler::priorityEncoder12
static unsigned int priorityEncoder12(const std::bitset< 12 > &input)
12 bit priority encoder
Definition: L1MuDTTrackAssembler.cc:1303
TrackClass
TrackClass
Definition: L1MuBMTrackAssParam.h:21
L1MuDTTrackAssembler::isEmpty
bool isEmpty(int id) const
is it a valid Track Class?
Definition: L1MuDTTrackAssembler.h:73
L1MuDTTrackAssembler::trackBitMap
const std::bitset< 4 > & trackBitMap(int id) const
return bitmap of found track
Definition: L1MuDTTrackAssembler.h:70
L1MuDTTrackAssembler::priorityEncoder4
static unsigned int priorityEncoder4(const std::bitset< 4 > &input)
4 bit priority encoder
Definition: L1MuDTTrackAssembler.cc:1317
L1MuDTTrackAssParam.h
L1MuDTTrackAssembler::m_theLastAddress
unsigned int m_theLastAddress[68]
Definition: L1MuDTTrackAssembler.h:126
L1MuDTTrackAssembler::runAddressAssignment1
void runAddressAssignment1(int global, int group)
run the first Address Assignment Sub-Unit
Definition: L1MuDTTrackAssembler.cc:741
L1MuDTTrackAssembler::subBitset68
static unsigned long subBitset68(const std::bitset< 68 > &input, int pos, int length)
get sub-bitmap of a 68-bit word
Definition: L1MuDTTrackAssembler.cc:1398
L1MuDTTrackAssembler::~L1MuDTTrackAssembler
~L1MuDTTrackAssembler() override
destructor
Definition: L1MuDTTrackAssembler.cc:51
L1AbstractProcessor.h
L1MuDTTrackAssembler::runEncoderSubUnit2
void runEncoderSubUnit2(unsigned &global, unsigned &group, unsigned &priority)
run the second Priority Encoder Sub-Unit
Definition: L1MuDTTrackAssembler.cc:622
L1MuDTSectorProcessor
Definition: L1MuDTSectorProcessor.h:53
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31
L1MuDTTrackAssembler::m_sp
const L1MuDTSectorProcessor & m_sp
Definition: L1MuDTTrackAssembler.h:122
L1MuDTTrackAssembler::addressEncoder12
static unsigned int addressEncoder12(const std::bitset< 12 > &input)
12 bit address encoder
Definition: L1MuDTTrackAssembler.cc:1359
L1MuDTTrackAssembler::addressEncoder12s
static unsigned int addressEncoder12s(const std::bitset< 12 > &input)
special 12 bit address encoder
Definition: L1MuDTTrackAssembler.cc:1377
L1MuDTTrackAssembler::run
void run() override
run Track Assembler
Definition: L1MuDTTrackAssembler.cc:60
UNDEF
Definition: L1MuBMTrackAssParam.h:21
L1MuDTTrackAssembler::priorityEncoder22
static unsigned int priorityEncoder22(const std::bitset< 22 > &input)
22 bit priority encoder
Definition: L1MuDTTrackAssembler.cc:1331
L1MuDTTrackAssembler::m_theAddresses
L1MuDTAddressArray m_theAddresses[2]
Definition: L1MuDTTrackAssembler.h:131
watchdog.group
group
Definition: watchdog.py:82