File indexing completed on 2024-04-06 12:04:46
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef DT_TRACO_ID_H_
0011 #define DT_TRACO_ID_H_
0012
0013
0014
0015
0016
0017
0018
0019
0020 #include "DataFormats/MuonDetId/interface/DTChamberId.h"
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034 class DTTracoId {
0035 public:
0036
0037 DTTracoId() : _traco(0) {}
0038
0039
0040 DTTracoId(const DTChamberId& mu_stat_id, const int traco_id) : _statId(mu_stat_id), _traco(traco_id) {}
0041
0042
0043 DTTracoId(const int wheel_id, const int station_id, const int sector_id, const int traco_id)
0044 : _statId(wheel_id, station_id, sector_id), _traco(traco_id) {}
0045
0046
0047 DTTracoId(const DTTracoId& tracoId) : _statId(tracoId._statId), _traco(tracoId._traco) {}
0048
0049
0050 DTTracoId& operator=(const DTTracoId& tracoId) = default;
0051
0052
0053 virtual ~DTTracoId() {}
0054
0055
0056 inline int wheel() const { return _statId.wheel(); }
0057
0058 inline int station() const { return _statId.station(); }
0059
0060 inline int sector() const { return _statId.sector(); }
0061
0062 inline int traco() const { return _traco; }
0063
0064 inline DTChamberId ChamberId() const { return _statId; }
0065
0066 bool operator==(const DTTracoId& id) const {
0067 if (wheel() != id.wheel())
0068 return false;
0069 if (sector() != id.sector())
0070 return false;
0071 if (station() != id.station())
0072 return false;
0073 if (_traco != id.traco())
0074 return false;
0075 return true;
0076 }
0077
0078 bool operator<(const DTTracoId& id) const {
0079 if (wheel() < id.wheel())
0080 return true;
0081 if (wheel() > id.wheel())
0082 return false;
0083
0084 if (station() < id.station())
0085 return true;
0086 if (station() > id.station())
0087 return false;
0088
0089 if (sector() < id.sector())
0090 return true;
0091 if (sector() > id.sector())
0092 return false;
0093
0094 if (traco() < id.traco())
0095 return true;
0096 if (traco() > id.traco())
0097 return false;
0098
0099 return false;
0100 }
0101
0102 private:
0103 DTChamberId _statId;
0104 int _traco;
0105 };
0106
0107 #endif