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