CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ME0Geometry.h
Go to the documentation of this file.
1 #ifndef Geometry_GEMGeometry_ME0Geometry_h
2 #define Geometry_GEMGeometry_ME0Geometry_h
3 
14 #include <vector>
15 #include <map>
16 
17 class GeomDetType;
18 
19 class ME0Geometry : public TrackingGeometry {
20 
21  public:
23  ME0Geometry();
24 
26  virtual ~ME0Geometry();
27 
28  // Return a vector of all det types
29  virtual const DetTypeContainer& detTypes() const;
30 
31  // Return a vector of all GeomDetUnit
32  virtual const DetUnitContainer& detUnits() const;
33 
34  // Return a vector of all GeomDet
35  virtual const DetContainer& dets() const;
36 
37  // Return a vector of all GeomDetUnit DetIds
38  virtual const DetIdContainer& detUnitIds() const;
39 
40  // Return a vector of all GeomDet DetIds
41  virtual const DetIdContainer& detIds() const;
42 
43  // Return the pointer to the GeomDetUnit corresponding to a given DetId
44  virtual const GeomDetUnit* idToDetUnit(DetId) const;
45 
46  // Return the pointer to the GeomDet corresponding to a given DetId
47  virtual const GeomDet* idToDet(DetId) const;
48 
49 
50  //---- Extension of the interface
51 
53  const std::vector<ME0EtaPartition const*>& etaPartitions() const;
54 
56  const ME0EtaPartition* etaPartition(ME0DetId id) const;
57 
59  void add(ME0EtaPartition* etaPartition);
60 
61  private:
67 
68  // Map for efficient lookup by DetId
70 
71  std::vector<ME0EtaPartition const*> allEtaPartitions; // Are not owned by this class; are owned by their chamber.
72 
73 };
74 
75 #endif
std::vector< GeomDetType const * > DetTypeContainer
DetTypeContainer theEtaPartitionTypes
Definition: ME0Geometry.h:64
virtual const GeomDet * idToDet(DetId) const
Definition: ME0Geometry.cc:44
virtual const DetUnitContainer & detUnits() const
Returm a vector of all GeomDetUnit.
Definition: ME0Geometry.cc:20
mapIdToDet theMap
Definition: ME0Geometry.h:69
DetIdContainer theDetIds
Definition: ME0Geometry.h:66
DetContainer theDets
Definition: ME0Geometry.h:63
std::vector< ME0EtaPartition const * > allEtaPartitions
Definition: ME0Geometry.h:71
const ME0EtaPartition * etaPartition(ME0DetId id) const
Return a etaPartition given its id.
Definition: ME0Geometry.cc:61
virtual const DetContainer & dets() const
Returm a vector of all GeomDet (including all GeomDetUnits)
Definition: ME0Geometry.cc:25
virtual const DetTypeContainer & detTypes() const
Return a vector of all det types.
Definition: ME0Geometry.cc:15
virtual ~ME0Geometry()
Destructor.
Definition: ME0Geometry.cc:12
std::unordered_map< unsigned int, GeomDet const * > mapIdToDet
DetUnitContainer theEtaPartitions
Definition: ME0Geometry.h:62
const std::vector< ME0EtaPartition const * > & etaPartitions() const
Return a vector of all ME0 eta partitions.
Definition: ME0Geometry.cc:57
Definition: DetId.h:18
DetIdContainer theEtaPartitionIds
Definition: ME0Geometry.h:65
virtual const GeomDetUnit * idToDetUnit(DetId) const
Return the pointer to the GeomDetUnit corresponding to a given DetId.
Definition: ME0Geometry.cc:40
void add(ME0EtaPartition *etaPartition)
Add a ME0 etaPartition to the Geometry.
Definition: ME0Geometry.cc:67
virtual const DetIdContainer & detUnitIds() const
Returm a vector of all GeomDetUnit DetIds.
Definition: ME0Geometry.cc:30
std::vector< GeomDet const * > DetContainer
std::vector< GeomDetUnit const * > DetUnitContainer
virtual const DetIdContainer & detIds() const
Returm a vector of all GeomDet DetIds (including those of GeomDetUnits)
Definition: ME0Geometry.cc:35
ME0Geometry()
Default constructor.
Definition: ME0Geometry.cc:9
std::vector< DetId > DetIdContainer