File indexing completed on 2024-04-06 12:19:40
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef DT_SECT_COLL_PH_CAND_H
0013 #define DT_SECT_COLL_PH_CAND_H
0014
0015
0016
0017
0018 #include "L1TriggerConfig/DTTPGConfig/interface/DTConfigSectColl.h"
0019 #include "L1Trigger/DTSectorCollector/interface/DTSC.h"
0020 #include "L1Trigger/DTTriggerServerPhi/interface/DTChambPhSegm.h"
0021 #include "L1Trigger/DTTraco/interface/DTTracoTrigData.h"
0022 #include "L1TriggerConfig/DTTPGConfig/interface/BitArray.h"
0023
0024
0025
0026 #include <string>
0027
0028
0029
0030
0031
0032 class DTSectCollPhCand {
0033 public:
0034
0035 DTSectCollPhCand(DTSC*, const DTChambPhSegm*, int);
0036
0037
0038 DTSectCollPhCand();
0039
0040
0041 DTSectCollPhCand(const DTSectCollPhCand& tsccand);
0042
0043
0044 DTSectCollPhCand& operator=(const DTSectCollPhCand& tsccand);
0045
0046
0047 ~DTSectCollPhCand();
0048
0049
0050
0051
0052 void setBitsSectColl();
0053
0054
0055 void clearBits() { _dataword.assign(5, 3, 0x7); }
0056
0057
0058 void clearBitsSectColl() { _dataword.assign(0, 13, 0x1fff); }
0059
0060
0061 void setSecondTrack() {
0062 _dataword.set(14);
0063 _isCarry = 1;
0064 }
0065
0066
0067 void resetCarry() { _isCarry = 0; }
0068
0069
0070
0071
0072 inline void clear();
0073
0074
0075
0076
0077 inline const DTConfigSectColl* config() const { return _tsc->config(); }
0078
0079
0080 inline DTSC* tsc() const { return _tsc; }
0081
0082
0083 inline int isFirst() const { return _dataword.element(14) == 0; }
0084
0085
0086 inline const DTChambPhSegm* tsTr() const { return _tsmsegm; }
0087
0088
0089 inline unsigned dataword() const { return _dataword.dataWord(0) & 0x1ff; }
0090
0091
0092 bool operator<(const DTSectCollPhCand& c) const { return _dataword < c._dataword; }
0093
0094
0095 bool operator<=(const DTSectCollPhCand& c) const { return _dataword <= c._dataword; }
0096
0097
0098 void print() const;
0099
0100
0101 int CoarseSync() const;
0102
0103 private:
0104 DTSC* _tsc;
0105 const DTChambPhSegm* _tsmsegm;
0106
0107
0108 BitArray<15> _dataword;
0109
0110 int _isCarry;
0111 };
0112 #endif