CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
L1MuDTEUX.h
Go to the documentation of this file.
1 //-------------------------------------------------
2 //
15 //
16 //--------------------------------------------------
17 #ifndef L1MUDT_EUX_H
18 #define L1MUDT_EUX_H
19 
20 //---------------
21 // C++ Headers --
22 //---------------
23 
24 #include <utility>
25 #include <map>
26 
27 //----------------------
28 // Base Class Headers --
29 //----------------------
30 
31 //------------------------------------
32 // Collaborating Class Declarations --
33 //------------------------------------
34 
37 class L1MuDTTrackSegPhi;
39 class L1MuDTSEU;
40 class L1MuDTExtLut;
41 class L1MuDTTFParameters;
42 class L1MuDTExtLut;
43 
44 // ---------------------
45 // -- Class Interface --
46 // ---------------------
47 
48 class L1MuDTEUX {
49 public:
51  L1MuDTEUX(const L1MuDTSectorProcessor& sp, const L1MuDTSEU& seu, int id);
52 
54  ~L1MuDTEUX();
55 
57  bool operator==(const L1MuDTEUX&) const;
58 
60  void run(const L1MuDTExtLut& extLUTs, const L1MuDTTFParameters& pars);
61 
63  void reset();
64 
66  void load(const L1MuDTTrackSegPhi* start_ts, const L1MuDTTrackSegPhi* target_ts);
67 
69  std::pair<const L1MuDTTrackSegPhi*, const L1MuDTTrackSegPhi*> ts() const;
70 
72  class EUX_Comp {
73  public:
74  EUX_Comp(const L1MuDTEUX* k = nullptr) : _not(k) {}
75  bool operator()(const L1MuDTEUX* first, const L1MuDTEUX* second) const {
76  if (!second->result())
77  return false;
78  if (_not != nullptr && *first == *_not)
79  return true;
80  if (_not != nullptr && *second == *_not)
81  return false;
82  return (first->quality() < second->quality());
83  }
84 
85  private:
86  const L1MuDTEUX* _not;
87  };
88 
90  inline int id() const { return m_id; }
91 
93  inline bool result() const { return m_result; }
94 
96  inline unsigned int quality() const { return m_quality; }
97 
99  inline unsigned short int address() const { return m_address; }
100 
101 private:
103  int sec_mod(int) const;
104 
105 private:
107  const L1MuDTSEU& m_seu; // reference to Single Extrapolation Unit
108  int m_id; // index of start TS
109 
110  bool m_result; //@@ 1 bit
111  unsigned short int m_quality; //@@ 1 bit
112  unsigned short int m_address; //@@ 4 bits
113 
114  const L1MuDTTrackSegPhi* m_start; // start track segment
115  const L1MuDTTrackSegPhi* m_target; // target track segment
116 
117  int const theExtFilter = 1; // extrapolation quality filter
118  unsigned short const nbit_phi = 12; // number of bits used for phi
119  unsigned short const nbit_phib = 10; // number of bits used for phib
120 };
121 
122 #endif
EUX_Comp(const L1MuDTEUX *k=nullptr)
Definition: L1MuDTEUX.h:74
bool m_result
Definition: L1MuDTEUX.h:110
const L1MuDTEUX * _not
Definition: L1MuDTEUX.h:86
void reset()
reset Extrapolator
Definition: L1MuDTEUX.cc:223
bool operator()(const L1MuDTEUX *first, const L1MuDTEUX *second) const
Definition: L1MuDTEUX.h:75
const L1MuDTSEU & m_seu
Definition: L1MuDTEUX.h:107
void load(const L1MuDTTrackSegPhi *start_ts, const L1MuDTTrackSegPhi *target_ts)
load data into EUX
Definition: L1MuDTEUX.cc:208
int sec_mod(int) const
output sector numbers in the range -6 to +5
Definition: L1MuDTEUX.cc:243
U second(std::pair< T, U > const &p)
bool operator==(const L1MuDTEUX &) const
equal operator
Definition: L1MuDTEUX.cc:75
unsigned short const nbit_phib
Definition: L1MuDTEUX.h:119
unsigned short const nbit_phi
Definition: L1MuDTEUX.h:118
~L1MuDTEUX()
destructor
Definition: L1MuDTEUX.cc:66
std::pair< const L1MuDTTrackSegPhi *, const L1MuDTTrackSegPhi * > ts() const
return pointer to start and target track segment
Definition: L1MuDTEUX.cc:235
unsigned short int address() const
return extrapolation address (0-11) (address = 15 indicates negative ext. result) ...
Definition: L1MuDTEUX.h:99
int const theExtFilter
Definition: L1MuDTEUX.h:117
helper class for finding the best and second best extrapolation
Definition: L1MuDTEUX.h:72
L1MuDTEUX(const L1MuDTSectorProcessor &sp, const L1MuDTSEU &seu, int id)
constructor
Definition: L1MuDTEUX.cc:49
const L1MuDTTrackSegPhi * m_target
Definition: L1MuDTEUX.h:115
unsigned short int m_quality
Definition: L1MuDTEUX.h:111
const L1MuDTSectorProcessor & m_sp
Definition: L1MuDTEUX.h:106
int id() const
return Extrapolation identifier
Definition: L1MuDTEUX.h:90
void run(const L1MuDTExtLut &extLUTs, const L1MuDTTFParameters &pars)
run Extrapolator
Definition: L1MuDTEUX.cc:90
unsigned int quality() const
return extrapolation quality
Definition: L1MuDTEUX.h:96
int m_id
Definition: L1MuDTEUX.h:108
const L1MuDTTrackSegPhi * m_start
Definition: L1MuDTEUX.h:114
unsigned short int m_address
Definition: L1MuDTEUX.h:112
bool result() const
return extrapolation result
Definition: L1MuDTEUX.h:93