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 
33 
34 //------------------------------------
35 // Collaborating Class Declarations --
36 //------------------------------------
37 
41 
42 class L1MuBMTrackSegPhi;
44 class L1MuBMSEU;
45 class L1MuDTExtLut;
46 class L1MuDTTFParameters;
47 
48 // ---------------------
49 // -- Class Interface --
50 // ---------------------
51 
53 
54  public:
55 
57  L1MuBMEUX(const L1MuBMSectorProcessor& sp, const L1MuBMSEU& seu, int id );
58 
60  ~L1MuBMEUX() override;
61 
63  bool operator==(const L1MuBMEUX&) const;
64 
66  void run(const edm::EventSetup& c) override;
67 
69  void reset() override;
70 
72  void load(const L1MuBMTrackSegPhi* start_ts, const L1MuBMTrackSegPhi* target_ts);
73 
75  std::pair<const L1MuBMTrackSegPhi*, const L1MuBMTrackSegPhi*> ts() const;
76 
78  class EUX_Comp {
79  public :
80  EUX_Comp( const L1MuBMEUX* k = nullptr ) : _not(k) {}
81  bool operator()( const L1MuBMEUX* first, const L1MuBMEUX* second ) const {
82  if ( !second->result() ) return false;
83  if ( _not != nullptr && *first == *_not ) return true;
84  if ( _not != nullptr && *second == *_not ) return false;
85  return ( first->quality() < second->quality() );
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:
104 
106  int sec_mod(int) const;
107 
108  private:
109 
111  const L1MuBMSEU& m_seu; // reference to Single Extrapolation Unit
112  int m_id; // index of start TS
113 
114  bool m_result; //@@ 1 bit
115  unsigned short int m_quality; //@@ 1 bit
116  unsigned short int m_address; //@@ 4 bits
117 
118  const L1MuBMTrackSegPhi* m_start; // start track segment
119  const L1MuBMTrackSegPhi* m_target; // target track segment
120 
122 
123  //edm::ESHandle< L1MuDTExtLut > theExtLUTs; // extrapolation look-up tables
125  int const theExtFilter = 1; // extrapolation quality filter
126  unsigned short const nbit_phi = 12; // number of bits used for phi
127  unsigned short const nbit_phib = 10; // number of bits used for phib
128 
129  //edm::ESHandle< L1MuDTTFParameters > pars;
131 
132 };
133 
134 #endif
const L1MuBMSEU & m_seu
Definition: L1MuBMEUX.h:111
L1MuBMLUTHandler * theExtLUTs
Definition: L1MuBMEUX.h:124
int m_id
Definition: L1MuBMEUX.h:112
std::pair< const L1MuBMTrackSegPhi *, const L1MuBMTrackSegPhi * > ts() const
return pointer to start and target track segment
Definition: L1MuBMEUX.cc:241
unsigned short int m_address
Definition: L1MuBMEUX.h:116
const L1MuBMTrackSegPhi * m_target
Definition: L1MuBMEUX.h:119
L1MuDTTFParameters pars
Definition: L1MuBMEUX.h:130
bool operator()(const L1MuBMEUX *first, const L1MuBMEUX *second) const
Definition: L1MuBMEUX.h:81
int sec_mod(int) const
output sector numbers in the range -6 to +5
Definition: L1MuBMEUX.cc:252
const L1MuBMTrackSegPhi * m_start
Definition: L1MuBMEUX.h:118
U second(std::pair< T, U > const &p)
int id() const
return Extrapolation identifier
Definition: L1MuBMEUX.h:92
bool operator==(const L1MuBMEUX &) const
equal operator
Definition: L1MuBMEUX.cc:75
edm::ESHandle< L1TMuonBarrelParams > bmtfParamsHandle
Definition: L1MuBMEUX.h:121
virtual void run()
run processor logic
const L1MuBMSectorProcessor & m_sp
Definition: L1MuBMEUX.h:110
const L1MuBMEUX * _not
Definition: L1MuBMEUX.h:88
int const theExtFilter
Definition: L1MuBMEUX.h:125
~L1MuBMEUX() override
destructor
Definition: L1MuBMEUX.cc:65
int k[5][pyjets_maxn]
bool result() const
return extrapolation result
Definition: L1MuBMEUX.h:95
bool m_result
Definition: L1MuBMEUX.h:114
unsigned short const nbit_phi
Definition: L1MuBMEUX.h:126
void load(const L1MuBMTrackSegPhi *start_ts, const L1MuBMTrackSegPhi *target_ts)
load data into EUX
Definition: L1MuBMEUX.cc:207
helper class for finding the best and second best extrapolation
Definition: L1MuBMEUX.h:78
EUX_Comp(const L1MuBMEUX *k=0)
Definition: L1MuBMEUX.h:80
unsigned short const nbit_phib
Definition: L1MuBMEUX.h:127
unsigned int quality() const
return extrapolation quality
Definition: L1MuBMEUX.h:98
unsigned short int address() const
return extrapolation address (0-11) (address = 15 indicates negative ext. result) ...
Definition: L1MuBMEUX.h:101
unsigned short int m_quality
Definition: L1MuBMEUX.h:115
L1MuBMEUX(const L1MuBMSectorProcessor &sp, const L1MuBMSEU &seu, int id)
constructor
Definition: L1MuBMEUX.cc:50
void reset() override
reset Extrapolator
Definition: L1MuBMEUX.cc:226