CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TrackingGeometry.h
Go to the documentation of this file.
1 #ifndef TrackingGeometry_h
2 #define TrackingGeometry_h
3 
24 #include <vector>
25 // #include <map>
26 #include <ext/hash_map>
27 
28 class GeomDetType;
29 class GeomDetUnit;
30 class GeomDet;
31 
33 {
34 public:
35  typedef std::vector<GeomDetType*> DetTypeContainer;
36  typedef std::vector<GeomDet*> DetContainer;
37  typedef std::vector<GeomDetUnit*> DetUnitContainer;
38  typedef std::vector<DetId> DetIdContainer;
39  // typedef std::map<DetId,GeomDetUnit*> mapIdToDetUnit;
40  // typedef std::map<DetId,GeomDet*> mapIdToDet;
41  typedef __gnu_cxx::hash_map< unsigned int, GeomDetUnit*> mapIdToDetUnit;
42  typedef __gnu_cxx::hash_map< unsigned int, GeomDet*> mapIdToDet;
43 
44  // Default constructor
45  // virtual TrackingGeometry() {}
46 
48  virtual ~TrackingGeometry() {}
49 
51  virtual const DetTypeContainer& detTypes() const = 0;
52 
54  virtual const DetUnitContainer& detUnits() const = 0;
55 
57  virtual const DetContainer& dets() const = 0;
58 
60  virtual const DetIdContainer& detUnitIds() const = 0;
61 
63  virtual const DetIdContainer& detIds() const = 0;
64 
66  virtual const GeomDetUnit* idToDetUnit(DetId) const = 0;
67 
70  virtual const GeomDet* idToDet(DetId) const = 0;
71 
72 };
73 
74 #endif
std::vector< GeomDet * > DetContainer
virtual const DetIdContainer & detUnitIds() const =0
Returm a vector of all GeomDetUnit DetIds.
virtual ~TrackingGeometry()
Destructor.
virtual const DetTypeContainer & detTypes() const =0
Return a vector of all det types.
virtual const GeomDetUnit * idToDetUnit(DetId) const =0
Return the pointer to the GeomDetUnit corresponding to a given DetId.
std::vector< GeomDetUnit * > DetUnitContainer
std::vector< GeomDetType * > DetTypeContainer
virtual const DetContainer & dets() const =0
Returm a vector of all GeomDet (including all GeomDetUnits)
Definition: DetId.h:20
virtual const GeomDet * idToDet(DetId) const =0
virtual const DetUnitContainer & detUnits() const =0
Returm a vector of all GeomDetUnit.
__gnu_cxx::hash_map< unsigned int, GeomDetUnit * > mapIdToDetUnit
__gnu_cxx::hash_map< unsigned int, GeomDet * > mapIdToDet
virtual const DetIdContainer & detIds() const =0
Returm a vector of all GeomDet DetIds (including those of GeomDetUnits)
std::vector< DetId > DetIdContainer