00001 #ifndef DetLayers_MuonDetLayerGeometry_h 00002 #define DetLayers_MuonDetLayerGeometry_h 00003 00013 #include "DataFormats/DetId/interface/DetId.h" 00014 #include <vector> 00015 #include <map> 00016 00017 class DetLayer; 00018 00019 class MuonDetLayerGeometry { 00020 public: 00021 00023 MuonDetLayerGeometry(); 00024 00025 friend class MuonDetLayerGeometryESProducer; 00026 00028 virtual ~MuonDetLayerGeometry(); 00029 00031 MuonDetLayerGeometry *clone() const 00032 {return new MuonDetLayerGeometry(*this);} 00033 00035 const std::vector<DetLayer*>& allDTLayers() const; 00036 00038 const std::vector<DetLayer*>& allCSCLayers() const; 00039 00041 const std::vector<DetLayer*>& forwardCSCLayers() const; 00042 00044 const std::vector<DetLayer*>& backwardCSCLayers() const; 00045 00047 const std::vector<DetLayer*>& allRPCLayers() const; 00048 00050 const std::vector<DetLayer*>& barrelRPCLayers() const; 00051 00053 const std::vector<DetLayer*>& endcapRPCLayers() const; 00054 00056 const std::vector<DetLayer*>& forwardRPCLayers() const; 00057 00059 const std::vector<DetLayer*>& backwardRPCLayers() const; 00060 00062 const std::vector<DetLayer*>& allLayers() const; 00063 00065 const std::vector<DetLayer*>& allBarrelLayers() const; 00066 00068 const std::vector<DetLayer*>& allEndcapLayers() const; 00069 00071 const std::vector<DetLayer*>& allForwardLayers() const; 00072 00074 const std::vector<DetLayer*>& allBackwardLayers() const; 00075 00077 const DetLayer* idToLayer(DetId &detId) const; 00078 00079 private: 00083 void addCSCLayers(std::pair<std::vector<DetLayer*>, std::vector<DetLayer*> > csclayers); 00084 00085 //. Add DT layers; dtlayers is ASSUMED to be sorted inside-out 00086 void addDTLayers(std::vector<DetLayer*> dtlayers); 00087 00091 void addRPCLayers(std::vector<DetLayer*> barrelRPCLayers, std::pair<std::vector<DetLayer*>, std::vector<DetLayer*> > endcapRPCLayers); 00092 00093 00094 DetId makeDetLayerId(const DetLayer* detLayer) const; 00095 00096 void sortLayers(); 00097 00098 std::vector<DetLayer*> cscLayers_fw; 00099 std::vector<DetLayer*> cscLayers_bk; 00100 std::vector<DetLayer*> cscLayers_all; 00101 std::vector<DetLayer*> rpcLayers_all; 00102 std::vector<DetLayer*> rpcLayers_endcap; 00103 std::vector<DetLayer*> rpcLayers_fw; 00104 std::vector<DetLayer*> rpcLayers_bk; 00105 std::vector<DetLayer*> rpcLayers_barrel; 00106 std::vector<DetLayer*> dtLayers; 00107 std::vector<DetLayer*> allForward; 00108 std::vector<DetLayer*> allBackward; 00109 std::vector<DetLayer*> allEndcap; 00110 std::vector<DetLayer*> allBarrel; 00111 std::vector<DetLayer*> allDetLayers; 00112 00113 std::map<DetId,DetLayer*> detLayersMap; 00114 }; 00115 #endif 00116