![]() |
![]() |
00001 #ifndef GlobalTrackingGeometry_h 00002 #define GlobalTrackingGeometry_h 00003 00018 # include <Geometry/CommonDetUnit/interface/TrackingGeometry.h> 00019 # include <vector> 00020 00021 class GlobalTrackingGeometry : public TrackingGeometry 00022 { 00023 public: 00025 GlobalTrackingGeometry(std::vector<const TrackingGeometry*>& geos); 00026 00028 virtual ~GlobalTrackingGeometry(); 00029 00030 // Return a vector of all det types. 00031 virtual const DetTypeContainer& detTypes() const; 00032 00033 // Returm a vector of all GeomDetUnit 00034 virtual const DetUnitContainer& detUnits() const; 00035 00036 // Returm a vector of all GeomDet (including all GeomDetUnits) 00037 virtual const DetContainer& dets() const; 00038 00039 // Returm a vector of all GeomDetUnit DetIds 00040 virtual const DetIdContainer& detUnitIds() const; 00041 00042 // Returm a vector of all GeomDet DetIds (including those of GeomDetUnits) 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 // (valid also for GeomDetUnits) 00050 virtual const GeomDet* idToDet(DetId) const; 00051 00053 const TrackingGeometry* slaveGeometry(DetId id) const; 00054 00055 private: 00056 00057 std::vector<const TrackingGeometry*> theGeometries; 00058 00059 // The const methods claim to simply return these vectors, 00060 // but actually, they'll fill them up the first time they 00061 // are called, which is rare (or never). 00062 mutable DetTypeContainer theDetTypes; 00063 mutable DetUnitContainer theDetUnits; 00064 mutable DetContainer theDets; 00065 mutable DetIdContainer theDetUnitIds; 00066 mutable DetIdContainer theDetIds; 00067 }; 00068 #endif 00069