File indexing completed on 2021-02-14 12:54:08
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 virtual ~DTTracoId() {}
0051
0052
0053 inline int wheel() const { return _statId.wheel(); }
0054
0055 inline int station() const { return _statId.station(); }
0056
0057 inline int sector() const { return _statId.sector(); }
0058
0059 inline int traco() const { return _traco; }
0060
0061 inline DTChamberId ChamberId() const { return _statId; }
0062
0063 bool operator==(const DTTracoId& id) const {
0064 if (wheel() != id.wheel())
0065 return false;
0066 if (sector() != id.sector())
0067 return false;
0068 if (station() != id.station())
0069 return false;
0070 if (_traco != id.traco())
0071 return false;
0072 return true;
0073 }
0074
0075 bool operator<(const DTTracoId& id) const {
0076 if (wheel() < id.wheel())
0077 return true;
0078 if (wheel() > id.wheel())
0079 return false;
0080
0081 if (station() < id.station())
0082 return true;
0083 if (station() > id.station())
0084 return false;
0085
0086 if (sector() < id.sector())
0087 return true;
0088 if (sector() > id.sector())
0089 return false;
0090
0091 if (traco() < id.traco())
0092 return true;
0093 if (traco() > id.traco())
0094 return false;
0095
0096 return false;
0097 }
0098
0099 private:
0100 DTChamberId _statId;
0101 int _traco;
0102 };
0103
0104 #endif