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 const*> DetTypeContainer;
34  typedef std::vector<GeomDet const*> DetContainer;
35  typedef std::vector<GeomDetUnit const*> DetUnitContainer;
36  typedef std::vector<DetId> DetIdContainer;
37  // typedef std::map<DetId,GeomDetUnit const*> mapIdToDetUnit;
38  // typedef std::map<DetId,GeomDet const*> mapIdToDet;
39  typedef __gnu_cxx::hash_map< unsigned int, GeomDetUnit const*> mapIdToDetUnit;
40  typedef __gnu_cxx::hash_map< unsigned int, GeomDet const*> 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< GeomDetType const * > DetTypeContainer
__gnu_cxx::hash_map< unsigned int, GeomDet const * > mapIdToDet
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.
__gnu_cxx::hash_map< unsigned int, GeomDetUnit const * > mapIdToDetUnit
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.
std::vector< GeomDet const * > DetContainer
std::vector< GeomDetUnit const * > DetUnitContainer
virtual const DetIdContainer & detIds() const =0
Returm a vector of all GeomDet DetIds (including those of GeomDetUnits)
std::vector< DetId > DetIdContainer