test
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 
16 #include <vector>
17 #include <map>
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  const std::vector<const ME0Chamber*>& chambers() const;
60 
62  void add(ME0EtaPartition* etaPartition);
63 
65  void add(ME0Chamber* chamber);
66 
67  private:
73 
74  // Map for efficient lookup by DetId
76 
77  std::vector<ME0EtaPartition const*> allEtaPartitions; // Are not owned by this class; are owned by their chamber.
78  std::vector<ME0Chamber const*> allChambers; // Are owned by this class.
79 
80 };
81 
82 #endif
std::vector< GeomDetType const * > DetTypeContainer
DetTypeContainer theEtaPartitionTypes
Definition: ME0Geometry.h:70
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:75
DetIdContainer theDetIds
Definition: ME0Geometry.h:72
DetContainer theDets
Definition: ME0Geometry.h:69
std::vector< ME0EtaPartition const * > allEtaPartitions
Definition: ME0Geometry.h:77
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
const std::vector< const ME0Chamber * > & chambers() const
Return a vector of all ME0 chambers.
Definition: ME0Geometry.cc:51
std::unordered_map< unsigned int, GeomDet const * > mapIdToDet
DetUnitContainer theEtaPartitions
Definition: ME0Geometry.h:68
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:71
virtual const GeomDetUnit * idToDetUnit(DetId) const
Return the pointer to the GeomDetUnit corresponding to a given DetId.
Definition: ME0Geometry.cc:40
std::vector< ME0Chamber const * > allChambers
Definition: ME0Geometry.h:78
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