CMS 3D CMS Logo

L1MuBMEUX.h
Go to the documentation of this file.
1 //-------------------------------------------------
2 //
15 //
16 //--------------------------------------------------
17 #ifndef L1MUBM_EUX_H
18 #define L1MUBM_EUX_H
19 
20 //---------------
21 // C++ Headers --
22 //---------------
23 
24 #include <utility>
25 #include <map>
26 
27 //----------------------
28 // Base Class Headers --
29 //----------------------
30 
32 
33 //------------------------------------
34 // Collaborating Class Declarations --
35 //------------------------------------
36 
39 
40 class L1MuBMTrackSegPhi;
42 class L1MuBMSEU;
43 class L1MuDTExtLut;
44 class L1MuDTTFParameters;
45 
46 // ---------------------
47 // -- Class Interface --
48 // ---------------------
49 
50 class L1MuBMEUX {
51 public:
53  L1MuBMEUX(const L1MuBMSectorProcessor& sp, const L1MuBMSEU& seu, int id);
54 
56  ~L1MuBMEUX();
57 
59  bool operator==(const L1MuBMEUX&) const;
60 
62  void run(const L1TMuonBarrelParams& c);
63 
65  void reset();
66 
68  void load(const L1MuBMTrackSegPhi* start_ts, const L1MuBMTrackSegPhi* target_ts);
69 
71  std::pair<const L1MuBMTrackSegPhi*, const L1MuBMTrackSegPhi*> ts() const;
72 
74  class EUX_Comp {
75  public:
76  EUX_Comp(const L1MuBMEUX* k = nullptr) : _not(k) {}
77  bool operator()(const L1MuBMEUX* first, const L1MuBMEUX* second) const {
78  if (!second->result())
79  return false;
80  if (_not != nullptr && *first == *_not)
81  return true;
82  if (_not != nullptr && *second == *_not)
83  return false;
84  return (first->quality() < second->quality());
85  }
86 
87  private:
88  const L1MuBMEUX* _not;
89  };
90 
92  inline int id() const { return m_id; }
93 
95  inline bool result() const { return m_result; }
96 
98  inline unsigned int quality() const { return m_quality; }
99 
101  inline unsigned short int address() const { return m_address; }
102 
103 private:
105  int sec_mod(int) const;
106 
107 private:
109  const L1MuBMSEU& m_seu; // reference to Single Extrapolation Unit
110  int m_id; // index of start TS
111 
112  bool m_result; //@@ 1 bit
113  unsigned short int m_quality; //@@ 1 bit
114  unsigned short int m_address; //@@ 4 bits
115 
116  const L1MuBMTrackSegPhi* m_start; // start track segment
117  const L1MuBMTrackSegPhi* m_target; // target track segment
118 
120  int const theExtFilter = 1; // extrapolation quality filter
121  unsigned short const nbit_phi = 12; // number of bits used for phi
122  unsigned short const nbit_phib = 10; // number of bits used for phib
123 
125 };
126 
127 #endif
const L1MuBMSEU & m_seu
Definition: L1MuBMEUX.h:109
L1MuBMLUTHandler * theExtLUTs
Definition: L1MuBMEUX.h:119
unsigned int quality() const
return extrapolation quality
Definition: L1MuBMEUX.h:98
void reset()
reset Extrapolator
Definition: L1MuBMEUX.cc:233
int m_id
Definition: L1MuBMEUX.h:110
unsigned short int m_address
Definition: L1MuBMEUX.h:114
const L1MuBMTrackSegPhi * m_target
Definition: L1MuBMEUX.h:117
L1MuDTTFParameters pars
Definition: L1MuBMEUX.h:124
const L1MuBMTrackSegPhi * m_start
Definition: L1MuBMEUX.h:116
U second(std::pair< T, U > const &p)
std::pair< const L1MuBMTrackSegPhi *, const L1MuBMTrackSegPhi * > ts() const
return pointer to start and target track segment
Definition: L1MuBMEUX.cc:245
const L1MuBMSectorProcessor & m_sp
Definition: L1MuBMEUX.h:108
const L1MuBMEUX * _not
Definition: L1MuBMEUX.h:88
bool operator==(const L1MuBMEUX &) const
equal operator
Definition: L1MuBMEUX.cc:78
int const theExtFilter
Definition: L1MuBMEUX.h:120
int sec_mod(int) const
output sector numbers in the range -6 to +5
Definition: L1MuBMEUX.cc:253
bool m_result
Definition: L1MuBMEUX.h:112
bool result() const
return extrapolation result
Definition: L1MuBMEUX.h:95
unsigned short const nbit_phi
Definition: L1MuBMEUX.h:121
void load(const L1MuBMTrackSegPhi *start_ts, const L1MuBMTrackSegPhi *target_ts)
load data into EUX
Definition: L1MuBMEUX.cc:218
helper class for finding the best and second best extrapolation
Definition: L1MuBMEUX.h:74
bool operator()(const L1MuBMEUX *first, const L1MuBMEUX *second) const
Definition: L1MuBMEUX.h:77
unsigned short const nbit_phib
Definition: L1MuBMEUX.h:122
~L1MuBMEUX()
destructor
Definition: L1MuBMEUX.cc:69
unsigned short int m_quality
Definition: L1MuBMEUX.h:113
unsigned short int address() const
return extrapolation address (0-11) (address = 15 indicates negative ext. result) ...
Definition: L1MuBMEUX.h:101
int id() const
return Extrapolation identifier
Definition: L1MuBMEUX.h:92
EUX_Comp(const L1MuBMEUX *k=nullptr)
Definition: L1MuBMEUX.h:76
void run(const L1TMuonBarrelParams &c)
run Extrapolator
Definition: L1MuBMEUX.cc:93
L1MuBMEUX(const L1MuBMSectorProcessor &sp, const L1MuBMSEU &seu, int id)
constructor
Definition: L1MuBMEUX.cc:52