File indexing completed on 2024-04-06 12:19:41
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014 #ifndef L1MUDT_TRACK_H
0015 #define L1MUDT_TRACK_H
0016
0017
0018
0019
0020
0021 #include <iosfwd>
0022 #include <string>
0023 #include <vector>
0024
0025
0026
0027
0028
0029 #include "DataFormats/L1GlobalMuonTrigger/interface/L1MuRegionalCand.h"
0030
0031
0032
0033
0034
0035 #include "L1Trigger/DTTrackFinder/interface/L1MuDTTrackAssParam.h"
0036 #include "L1Trigger/DTTrackFinder/interface/L1MuDTAddressArray.h"
0037 #include "L1Trigger/DTTrackFinder/interface/L1MuDTTrackSegPhi.h"
0038 #include "L1Trigger/DTTrackFinder/interface/L1MuDTTrackSegEta.h"
0039 #include "L1Trigger/DTTrackFinder/interface/L1MuDTSecProcId.h"
0040
0041
0042
0043
0044
0045 class L1MuDTTrack : public L1MuRegionalCand {
0046 public:
0047
0048 L1MuDTTrack();
0049
0050
0051 L1MuDTTrack(const L1MuDTSecProcId&);
0052
0053
0054 L1MuDTTrack(const L1MuDTTrack&);
0055
0056
0057 ~L1MuDTTrack() override;
0058
0059
0060 void reset() override;
0061
0062
0063 inline std::string name() const { return m_name; }
0064
0065
0066 inline unsigned int pt() const { return pt_packed(); }
0067
0068
0069 inline unsigned int phi() const { return phi_packed(); }
0070
0071
0072 inline unsigned int eta() const { return eta_packed(); }
0073
0074
0075 inline bool fineEtaBit() const { return isFineHalo(); }
0076
0077
0078 inline int charge() const { return chargeValue(); }
0079
0080
0081 inline TrackClass tc() const { return m_tc; }
0082
0083
0084 inline bool empty() const override { return m_empty; }
0085
0086
0087 inline const L1MuDTSecProcId& spid() const { return m_spid; }
0088
0089
0090 inline L1MuDTAddressArray address() const { return m_addArray; }
0091
0092
0093 inline int address(int stat) const { return m_addArray.station(stat); }
0094
0095
0096 inline int numberOfTSphi() const { return m_tsphiList.size(); }
0097
0098
0099 inline int numberOfTSeta() const { return m_tsetaList.size(); }
0100
0101
0102 const std::vector<L1MuDTTrackSegPhi>& getTSphi() const { return m_tsphiList; }
0103
0104
0105 const L1MuDTTrackSegPhi& getStartTSphi() const;
0106
0107
0108 const L1MuDTTrackSegPhi& getEndTSphi() const;
0109
0110
0111 const std::vector<L1MuDTTrackSegEta>& getTSeta() const { return m_tsetaList; }
0112
0113
0114 const L1MuDTTrackSegEta& getStartTSeta() const;
0115
0116
0117 const L1MuDTTrackSegEta& getEndTSeta() const;
0118
0119
0120 inline void enable() {
0121 m_empty = false;
0122 setType(0);
0123 }
0124
0125
0126 inline void disable() { m_empty = true; }
0127
0128
0129 inline void setName(std::string name) { m_name = name; }
0130
0131
0132 inline void setTC(TrackClass tc) { m_tc = tc; }
0133
0134
0135 inline void setPhi(int phi) { setPhiPacked(phi); }
0136
0137
0138 void setEta(int eta);
0139
0140
0141 inline void setFineEtaBit() { setFineHalo(true); }
0142
0143
0144 inline void setPt(int pt) { setPtPacked(pt); }
0145
0146
0147 inline void setCharge(int charge) {
0148 setChargeValue(charge);
0149 setChargeValid(true);
0150 }
0151
0152
0153 inline void setQuality(unsigned int quality) { setQualityPacked(quality); }
0154
0155
0156 inline void setAddresses(const L1MuDTAddressArray& addr) { m_addArray = addr; }
0157
0158
0159 void setTSphi(const std::vector<const L1MuDTTrackSegPhi*>& tsList);
0160
0161
0162 void setTSeta(const std::vector<const L1MuDTTrackSegEta*>& tsList);
0163
0164
0165 L1MuDTTrack& operator=(const L1MuDTTrack&);
0166
0167
0168 bool operator==(const L1MuDTTrack&) const;
0169
0170
0171 bool operator!=(const L1MuDTTrack&) const;
0172
0173
0174 void print() const override;
0175
0176
0177 friend std::ostream& operator<<(std::ostream&, const L1MuDTTrack&);
0178
0179
0180 static bool rank(const L1MuDTTrack* first, const L1MuDTTrack* second) {
0181 unsigned short int rank_f = 0;
0182 unsigned short int rank_s = 0;
0183 if (first)
0184 rank_f = 10 * first->pt() + first->quality();
0185 if (second)
0186 rank_s = 10 * second->pt() + second->quality();
0187 return rank_f > rank_s;
0188 }
0189
0190 private:
0191 L1MuDTSecProcId m_spid;
0192 std::string m_name;
0193 bool m_empty;
0194 TrackClass m_tc;
0195
0196 L1MuDTAddressArray m_addArray;
0197 std::vector<L1MuDTTrackSegPhi> m_tsphiList;
0198 std::vector<L1MuDTTrackSegEta> m_tsetaList;
0199 };
0200
0201 #endif