File indexing completed on 2024-04-06 12:04:02
0001 #ifndef DataFormats_DTRangeMapAccessor_H
0002 #define DataFormats_DTRangeMapAccessor_H
0003
0004 #include "DataFormats/MuonDetId/interface/DTLayerId.h"
0005
0006 #include <utility>
0007
0008
0009
0010
0011
0012
0013
0014 class DTSuperLayerIdComparator {
0015 public:
0016
0017
0018 bool operator()(DTSuperLayerId sl1, DTSuperLayerId sl2) const {
0019 if (sl1 == sl2)
0020 return false;
0021 return (sl1 < sl2);
0022 }
0023
0024 private:
0025 };
0026
0027
0028
0029
0030
0031
0032
0033 class DTChamberIdComparator {
0034 public:
0035
0036
0037 bool operator()(DTChamberId ch1, DTChamberId ch2) const {
0038 if (ch1 == ch2)
0039 return false;
0040 return (ch1 < ch2);
0041 }
0042
0043 private:
0044 };
0045
0046
0047
0048
0049
0050
0051
0052 class DTChamberIdDetLayerComparator {
0053 public:
0054 bool operator()(DTChamberId ch1, DTChamberId ch2) const {
0055 if (ch1.station() == ch2.station())
0056 return false;
0057
0058 return (ch1.station() < ch2.station());
0059 }
0060 };
0061
0062
0063
0064
0065
0066
0067
0068 class DTRangeMapAccessor {
0069 public:
0070
0071 DTRangeMapAccessor();
0072
0073
0074 virtual ~DTRangeMapAccessor();
0075
0076
0077
0078
0079 static std::pair<DTLayerId, DTSuperLayerIdComparator> layersBySuperLayer(DTSuperLayerId slId);
0080
0081
0082 static std::pair<DTLayerId, DTChamberIdComparator> layersByChamber(DTChamberId chamberId);
0083
0084
0085 static std::pair<DTSuperLayerId, DTChamberIdComparator> superLayersByChamber(DTChamberId chamberId);
0086
0087
0088 static std::pair<DTChamberId, DTChamberIdDetLayerComparator> chambersByDetLayer(DTChamberId id);
0089
0090 private:
0091 };
0092
0093 #endif