File indexing completed on 2024-04-06 12:19:42
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef L1MUDT_EUX_H
0018 #define L1MUDT_EUX_H
0019
0020
0021
0022
0023
0024 #include <utility>
0025 #include <map>
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035 #include "FWCore/Framework/interface/Frameworkfwd.h"
0036 #include "FWCore/Framework/interface/ESHandle.h"
0037 class L1MuDTTrackSegPhi;
0038 class L1MuDTSectorProcessor;
0039 class L1MuDTSEU;
0040 class L1MuDTExtLut;
0041 class L1MuDTTFParameters;
0042 class L1MuDTExtLut;
0043
0044
0045
0046
0047
0048 class L1MuDTEUX {
0049 public:
0050
0051 L1MuDTEUX(const L1MuDTSectorProcessor& sp, const L1MuDTSEU& seu, int id);
0052
0053
0054 ~L1MuDTEUX();
0055
0056
0057 bool operator==(const L1MuDTEUX&) const;
0058
0059
0060 void run(const L1MuDTExtLut& extLUTs, const L1MuDTTFParameters& pars);
0061
0062
0063 void reset();
0064
0065
0066 void load(const L1MuDTTrackSegPhi* start_ts, const L1MuDTTrackSegPhi* target_ts);
0067
0068
0069 std::pair<const L1MuDTTrackSegPhi*, const L1MuDTTrackSegPhi*> ts() const;
0070
0071
0072 class EUX_Comp {
0073 public:
0074 EUX_Comp(const L1MuDTEUX* k = nullptr) : _not(k) {}
0075 bool operator()(const L1MuDTEUX* first, const L1MuDTEUX* second) const {
0076 if (!second->result())
0077 return false;
0078 if (_not != nullptr && *first == *_not)
0079 return true;
0080 if (_not != nullptr && *second == *_not)
0081 return false;
0082 return (first->quality() < second->quality());
0083 }
0084
0085 private:
0086 const L1MuDTEUX* _not;
0087 };
0088
0089
0090 inline int id() const { return m_id; }
0091
0092
0093 inline bool result() const { return m_result; }
0094
0095
0096 inline unsigned int quality() const { return m_quality; }
0097
0098
0099 inline unsigned short int address() const { return m_address; }
0100
0101 private:
0102
0103 int sec_mod(int) const;
0104
0105 private:
0106 const L1MuDTSectorProcessor& m_sp;
0107 const L1MuDTSEU& m_seu;
0108 int m_id;
0109
0110 bool m_result;
0111 unsigned short int m_quality;
0112 unsigned short int m_address;
0113
0114 const L1MuDTTrackSegPhi* m_start;
0115 const L1MuDTTrackSegPhi* m_target;
0116
0117 int const theExtFilter = 1;
0118 unsigned short const nbit_phi = 12;
0119 unsigned short const nbit_phib = 10;
0120 };
0121 #endif