00001 #ifndef GEMGeometry_GEMGeometry_h 00002 #define GEMGeometry_GEMGeometry_h 00003 00011 #include "DataFormats/DetId/interface/DetId.h" 00012 #include "Geometry/CommonDetUnit/interface/TrackingGeometry.h" 00013 #include "Geometry/GEMGeometry/interface/GEMEtaPartition.h" 00014 //#include "Geometry/GEMGeometry/interface/GEMChamber.h" 00015 #include <vector> 00016 #include <map> 00017 00018 class GeomDetType; 00019 class GeomDetUnit; 00020 00021 class GEMGeometry : public TrackingGeometry { 00022 00023 public: 00025 GEMGeometry(); 00026 00028 virtual ~GEMGeometry(); 00029 00030 // Return a vector of all det types 00031 virtual const DetTypeContainer& detTypes() const; 00032 00033 // Return a vector of all GeomDetUnit 00034 virtual const DetUnitContainer& detUnits() const; 00035 00036 // Return a vector of all GeomDet 00037 virtual const DetContainer& dets() const; 00038 00039 // Return a vector of all GeomDetUnit DetIds 00040 virtual const DetIdContainer& detUnitIds() const; 00041 00042 // Return a vector of all GeomDet DetIds 00043 virtual const DetIdContainer& detIds() const; 00044 00045 // Return the pointer to the GeomDetUnit corresponding to a given DetId 00046 virtual const GeomDetUnit* idToDetUnit(DetId) const; 00047 00048 // Return the pointer to the GeomDet corresponding to a given DetId 00049 virtual const GeomDet* idToDet(DetId) const; 00050 00051 00052 //---- Extension of the interface 00053 00055 // const std::vector<GEMChamber*>& chambers() const; 00056 00058 const std::vector<GEMEtaPartition*>& etaPartitions() const; 00059 00060 // Return a GEMChamber given its id 00061 // const GEMChamber* chamber(GEMDetId id) const; 00062 00064 const GEMEtaPartition* etaPartition(GEMDetId id) const; 00065 00067 void add(GEMEtaPartition* etaPartition); 00068 00070 // void add(GEMChamber* ch); 00071 00072 private: 00073 DetUnitContainer theEtaPartitions; 00074 DetContainer theDets; 00075 DetTypeContainer theEtaPartitionTypes; 00076 DetIdContainer theEtaPartitionIds; 00077 DetIdContainer theDetIds; 00078 00079 // Map for efficient lookup by DetId 00080 mapIdToDet theMap; 00081 00082 std::vector<GEMEtaPartition*> allEtaPartitions; // Are not owned by this class; are owned by their chamber. 00083 // std::vector<GEMChamber*> allChambers; // Are owned by this class. 00084 00085 }; 00086 00087 #endif