CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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 
32 
33 //------------------------------------
34 // Collaborating Class Declarations --
35 //------------------------------------
36 
38 class L1MuDTTrackSegPhi;
40 class L1MuDTSEU;
41 class L1MuDTExtLut;
42 class L1MuDTTFParameters;
43 
44 // ---------------------
45 // -- Class Interface --
46 // ---------------------
47 
49 
50  public:
51 
53  L1MuDTEUX(const L1MuDTSectorProcessor& sp, const L1MuDTSEU& seu, int id );
54 
56  virtual ~L1MuDTEUX();
57 
59  bool operator==(const L1MuDTEUX&) const;
60 
62  virtual void run(const edm::EventSetup& c);
63 
65  virtual void reset();
66 
68  void load(const L1MuDTTrackSegPhi* start_ts, const L1MuDTTrackSegPhi* target_ts);
69 
71  std::pair<const L1MuDTTrackSegPhi*, const L1MuDTTrackSegPhi*> ts() const;
72 
74  class EUX_Comp : std::binary_function< L1MuDTEUX*, L1MuDTEUX*, bool> {
75  public :
76  EUX_Comp( const L1MuDTEUX* k = 0 ) : _not(k) {}
77  bool operator()( const L1MuDTEUX* first, const L1MuDTEUX* second ) const {
78  if ( !second->result() ) return false;
79  if ( _not != 0 && *first == *_not ) return true;
80  if ( _not != 0 && *second == *_not ) return false;
81  return ( first->quality() < second->quality() );
82  }
83  private:
84  const L1MuDTEUX* _not;
85  };
86 
88  inline int id() const { return m_id; }
89 
91  inline bool result() const { return m_result; }
92 
94  inline unsigned int quality() const { return m_quality; }
95 
97  inline unsigned short int address() const { return m_address; }
98 
99  private:
100 
102  int sec_mod(int) const;
103 
104  private:
105 
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  edm::ESHandle< L1MuDTExtLut > theExtLUTs; // extrapolation look-up tables
118  int const theExtFilter = 1; // extrapolation quality filter
119  unsigned short const nbit_phi = 12; // number of bits used for phi
120  unsigned short const nbit_phib = 10; // number of bits used for phib
121 
123 
124 };
125 
126 #endif
bool m_result
Definition: L1MuDTEUX.h:110
edm::ESHandle< L1MuDTExtLut > theExtLUTs
Definition: L1MuDTEUX.h:117
const L1MuDTEUX * _not
Definition: L1MuDTEUX.h:84
virtual void reset()
reset Extrapolator
Definition: L1MuDTEUX.cc:210
bool operator()(const L1MuDTEUX *first, const L1MuDTEUX *second) const
Definition: L1MuDTEUX.h:77
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:191
int sec_mod(int) const
output sector numbers in the range -6 to +5
Definition: L1MuDTEUX.cc:236
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:120
virtual void run()
run processor logic
unsigned short const nbit_phi
Definition: L1MuDTEUX.h:119
bool first
Definition: L1TdeRCT.cc:75
virtual ~L1MuDTEUX()
destructor
Definition: L1MuDTEUX.cc:65
edm::ESHandle< L1MuDTTFParameters > pars
Definition: L1MuDTEUX.h:122
unsigned short int address() const
return extrapolation address (0-11) (address = 15 indicates negative ext. result) ...
Definition: L1MuDTEUX.h:97
int k[5][pyjets_maxn]
int const theExtFilter
Definition: L1MuDTEUX.h:118
helper class for finding the best and second best extrapolation
Definition: L1MuDTEUX.h:74
EUX_Comp(const L1MuDTEUX *k=0)
Definition: L1MuDTEUX.h:76
L1MuDTEUX(const L1MuDTSectorProcessor &sp, const L1MuDTSEU &seu, int id)
constructor
Definition: L1MuDTEUX.cc:50
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
std::pair< const L1MuDTTrackSegPhi *, const L1MuDTTrackSegPhi * > ts() const
return pointer to start and target track segment
Definition: L1MuDTEUX.cc:225
int id() const
return Extrapolation identifier
Definition: L1MuDTEUX.h:88
unsigned int quality() const
return extrapolation quality
Definition: L1MuDTEUX.h:94
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:91