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