File indexing completed on 2024-04-06 12:26:52
0001 #ifndef DetLayers_MuonDetLayerGeometry_h
0002 #define DetLayers_MuonDetLayerGeometry_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014 #include "DataFormats/DetId/interface/DetId.h"
0015 #include "TrackingTools/DetLayers/interface/DetLayerGeometry.h"
0016 #include <vector>
0017 #include <map>
0018
0019 class DetLayer;
0020
0021 class MuonDetLayerGeometry : public DetLayerGeometry {
0022 public:
0023
0024 MuonDetLayerGeometry();
0025
0026 friend class MuonDetLayerGeometryESProducer;
0027
0028
0029 ~MuonDetLayerGeometry() override;
0030
0031
0032 const std::vector<const DetLayer*>& allDTLayers() const;
0033
0034
0035 const std::vector<const DetLayer*>& allCSCLayers() const;
0036
0037
0038 const std::vector<const DetLayer*>& forwardCSCLayers() const;
0039
0040
0041 const std::vector<const DetLayer*>& backwardCSCLayers() const;
0042
0043
0044
0045
0046 const std::vector<const DetLayer*>& allGEMLayers() const;
0047
0048
0049 const std::vector<const DetLayer*>& forwardGEMLayers() const;
0050
0051
0052 const std::vector<const DetLayer*>& backwardGEMLayers() const;
0053
0054
0055
0056
0057
0058
0059 const std::vector<const DetLayer*>& allME0Layers() const;
0060
0061
0062 const std::vector<const DetLayer*>& forwardME0Layers() const;
0063
0064
0065 const std::vector<const DetLayer*>& backwardME0Layers() const;
0066
0067
0068
0069
0070 const std::vector<const DetLayer*>& allRPCLayers() const;
0071
0072
0073 const std::vector<const DetLayer*>& barrelRPCLayers() const;
0074
0075
0076 const std::vector<const DetLayer*>& endcapRPCLayers() const;
0077
0078
0079 const std::vector<const DetLayer*>& forwardRPCLayers() const;
0080
0081
0082 const std::vector<const DetLayer*>& backwardRPCLayers() const;
0083
0084
0085 const std::vector<const DetLayer*>& allLayers() const;
0086
0087
0088 const std::vector<const DetLayer*>& allBarrelLayers() const;
0089
0090
0091 const std::vector<const DetLayer*>& allEndcapLayers() const;
0092
0093
0094 const std::vector<const DetLayer*>& allForwardLayers() const;
0095
0096
0097 const std::vector<const DetLayer*>& allBackwardLayers() const;
0098
0099
0100
0101
0102 const std::vector<const DetLayer*>& allEndcapCscGemLayers() const;
0103
0104
0105 const std::vector<const DetLayer*>& allCscGemForwardLayers() const;
0106
0107
0108 const std::vector<const DetLayer*>& allCscGemBackwardLayers() const;
0109
0110
0111
0112
0113
0114
0115 const std::vector<const DetLayer*>& allEndcapCscME0Layers() const;
0116
0117
0118 const std::vector<const DetLayer*>& allCscME0ForwardLayers() const;
0119
0120
0121 const std::vector<const DetLayer*>& allCscME0BackwardLayers() const;
0122
0123
0124
0125
0126 const DetLayer* idToLayer(const DetId& detId) const override;
0127
0128 private:
0129
0130
0131
0132 void addCSCLayers(const std::pair<std::vector<DetLayer*>, std::vector<DetLayer*> >& csclayers);
0133
0134
0135 void addDTLayers(const std::vector<DetLayer*>& dtlayers);
0136
0137
0138
0139
0140 void addRPCLayers(const std::vector<DetLayer*>& barrelRPCLayers,
0141 const std::pair<std::vector<DetLayer*>, std::vector<DetLayer*> >& endcapRPCLayers);
0142
0143
0144
0145
0146
0147
0148 void addGEMLayers(const std::pair<std::vector<DetLayer*>, std::vector<DetLayer*> >& gemlayers);
0149
0150
0151
0152
0153
0154
0155
0156 void addME0Layers(const std::pair<std::vector<DetLayer*>, std::vector<DetLayer*> >& gemlayers);
0157
0158
0159
0160 DetId makeDetLayerId(const DetLayer* detLayer) const;
0161
0162 void sortLayers();
0163
0164 std::vector<const DetLayer*> cscLayers_fw;
0165 std::vector<const DetLayer*> cscLayers_bk;
0166 std::vector<const DetLayer*> cscLayers_all;
0167
0168
0169
0170 std::vector<const DetLayer*> gemLayers_fw;
0171 std::vector<const DetLayer*> gemLayers_bk;
0172 std::vector<const DetLayer*> gemLayers_all;
0173
0174
0175
0176 std::vector<const DetLayer*> me0Layers_fw;
0177 std::vector<const DetLayer*> me0Layers_bk;
0178 std::vector<const DetLayer*> me0Layers_all;
0179
0180
0181
0182 std::vector<const DetLayer*> rpcLayers_all;
0183 std::vector<const DetLayer*> rpcLayers_endcap;
0184 std::vector<const DetLayer*> rpcLayers_fw;
0185 std::vector<const DetLayer*> rpcLayers_bk;
0186 std::vector<const DetLayer*> rpcLayers_barrel;
0187 std::vector<const DetLayer*> dtLayers;
0188 std::vector<const DetLayer*> allForward;
0189 std::vector<const DetLayer*> allBackward;
0190 std::vector<const DetLayer*> allEndcap;
0191 std::vector<const DetLayer*> allBarrel;
0192 std::vector<const DetLayer*> allDetLayers;
0193
0194
0195
0196 std::vector<const DetLayer*> allEndcapCscGem;
0197 std::vector<const DetLayer*> allCscGemForward;
0198 std::vector<const DetLayer*> allCscGemBackward;
0199
0200
0201
0202
0203
0204 std::vector<const DetLayer*> allEndcapCscME0;
0205 std::vector<const DetLayer*> allCscME0Forward;
0206 std::vector<const DetLayer*> allCscME0Backward;
0207
0208
0209
0210 std::map<DetId, const DetLayer*> detLayersMap;
0211 };
0212 #endif