File indexing completed on 2024-04-06 12:26:49
0001 #ifndef RecoMTD_DetLayers_MTDDetLayerGeometry_h
0002 #define RecoMTD_DetLayers_MTDDetLayerGeometry_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #include "DataFormats/DetId/interface/DetId.h"
0013 #include "TrackingTools/DetLayers/interface/DetLayerGeometry.h"
0014 #include "Geometry/MTDGeometryBuilder/interface/MTDGeometry.h"
0015 #include "Geometry/MTDNumberingBuilder/interface/MTDTopology.h"
0016
0017 #include <vector>
0018 #include <map>
0019
0020 class DetLayer;
0021
0022 class MTDDetLayerGeometry : public DetLayerGeometry {
0023 public:
0024
0025 MTDDetLayerGeometry();
0026
0027 friend class MTDDetLayerGeometryESProducer;
0028
0029
0030 ~MTDDetLayerGeometry() override;
0031
0032
0033 const std::vector<const DetLayer*>& allBarrelLayers() const;
0034
0035
0036 const std::vector<const DetLayer*>& allEndcapLayers() const;
0037
0038
0039 const std::vector<const DetLayer*>& allForwardLayers() const;
0040
0041
0042 const std::vector<const DetLayer*>& allBackwardLayers() const;
0043
0044
0045 const std::vector<const DetLayer*>& allBTLLayers() const;
0046
0047
0048 const std::vector<const DetLayer*>& allETLLayers() const;
0049
0050
0051 const std::vector<const DetLayer*>& allLayers() const;
0052
0053
0054 const DetLayer* idToLayer(const DetId& detId) const override;
0055
0056
0057 void buildLayers(const MTDGeometry* geo, const MTDTopology* mtopo);
0058
0059 void sortLayers();
0060
0061 private:
0062
0063
0064
0065 void addETLLayers(const std::pair<std::vector<DetLayer*>, std::vector<DetLayer*> >& etllayers);
0066
0067
0068 void addBTLLayers(const std::vector<DetLayer*>& btllayers);
0069
0070 DetId makeDetLayerId(const DetLayer* detLayer) const;
0071
0072 std::vector<const DetLayer*> etlLayers_fw;
0073 std::vector<const DetLayer*> etlLayers_bk;
0074 std::vector<const DetLayer*> etlLayers_all;
0075
0076
0077 std::vector<const DetLayer*> btlLayers;
0078 std::vector<const DetLayer*> allForward;
0079 std::vector<const DetLayer*> allBackward;
0080 std::vector<const DetLayer*> allEndcap;
0081 std::vector<const DetLayer*> allBarrel;
0082 std::vector<const DetLayer*> allDetLayers;
0083
0084 std::map<DetId, const DetLayer*> detLayersMap;
0085 };
0086 #endif