CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_10/src/RecoMuon/DetLayers/interface/MuonDetLayerGeometry.h

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