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 
22 #include <vector>
23 // #include <map>
24 #include <ext/hash_map>
25 
26 class GeomDetType;
27 class GeomDetUnit;
28 class GeomDet;
29 
31 {
32 public:
33  typedef std::vector<GeomDetType*> DetTypeContainer;
34  typedef std::vector<GeomDet*> DetContainer;
35  typedef std::vector<GeomDetUnit*> DetUnitContainer;
36  typedef std::vector<DetId> DetIdContainer;
37  // typedef std::map<DetId,GeomDetUnit*> mapIdToDetUnit;
38  // typedef std::map<DetId,GeomDet*> mapIdToDet;
39  typedef __gnu_cxx::hash_map< unsigned int, GeomDetUnit*> mapIdToDetUnit;
40  typedef __gnu_cxx::hash_map< unsigned int, GeomDet*> mapIdToDet;
41 
42  // Default constructor
43  // virtual TrackingGeometry() {}
44 
46  virtual ~TrackingGeometry() {}
47 
49  virtual const DetTypeContainer& detTypes() const = 0;
50 
52  virtual const DetUnitContainer& detUnits() const = 0;
53 
55  virtual const DetContainer& dets() const = 0;
56 
58  virtual const DetIdContainer& detUnitIds() const = 0;
59 
61  virtual const DetIdContainer& detIds() const = 0;
62 
64  virtual const GeomDetUnit* idToDetUnit(DetId) const = 0;
65 
68  virtual const GeomDet* idToDet(DetId) const = 0;
69 
70 };
71 
72 #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:18
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