CMS 3D CMS Logo

ME0Geometry.h
Go to the documentation of this file.
1 #ifndef Geometry_GEMGeometry_ME0Geometry_h
2 #define Geometry_GEMGeometry_ME0Geometry_h
3 
9 #include <vector>
10 #include <map>
11 
12 class ME0Geometry : public TrackingGeometry {
13 public:
15  ME0Geometry();
16 
18  ~ME0Geometry() override;
19 
20  // Return a vector of all det types
21  const DetTypeContainer& detTypes() const override;
22 
23  // Return a vector of all GeomDetUnit
24  const DetContainer& detUnits() const override;
25 
26  // Return a vector of all GeomDet
27  const DetContainer& dets() const override;
28 
29  // Return a vector of all GeomDetUnit DetIds
30  const DetIdContainer& detUnitIds() const override;
31 
32  // Return a vector of all GeomDet DetIds
33  const DetIdContainer& detIds() const override;
34 
35  // Return the pointer to the GeomDetUnit corresponding to a given DetId
36  const GeomDet* idToDetUnit(DetId) const override;
37 
38  // Return the pointer to the GeomDet corresponding to a given DetId
39  const GeomDet* idToDet(DetId) const override;
40 
41  //---- Extension of the interface
42 
44  const ME0EtaPartition* etaPartition(ME0DetId id) const;
45 
47  const ME0Layer* layer(ME0DetId id) const;
48 
50  const ME0Chamber* chamber(ME0DetId id) const;
51 
53  const std::vector<ME0EtaPartition const*>& etaPartitions() const;
54 
56  const std::vector<const ME0Layer*>& layers() const;
57 
59  const std::vector<const ME0Chamber*>& chambers() const;
60 
63 
65  void add(ME0Layer* layer);
66 
68  void add(ME0Chamber* chamber);
69 
70 private:
76 
77  // Map for efficient lookup by DetId
79 
80  std::vector<ME0EtaPartition const*> allEtaPartitions; // Are not owned by this class; are owned by their layer.
81  std::vector<ME0Layer const*> allLayers; // Are not owned by this class; are owned by their chamber.
82  std::vector<ME0Chamber const*> allChambers; // Are owned by this class.
83 };
84 
85 #endif
ME0Geometry::etaPartitions
const std::vector< ME0EtaPartition const * > & etaPartitions() const
Return a vector of all ME0 eta partitions.
Definition: ME0Geometry.cc:33
ME0Geometry::~ME0Geometry
~ME0Geometry() override
Destructor.
Definition: ME0Geometry.cc:10
TrackingGeometry
Definition: TrackingGeometry.h:26
ME0Geometry::theEtaPartitions
DetContainer theEtaPartitions
Definition: ME0Geometry.h:71
GeomDet
Definition: GeomDet.h:27
ME0Geometry::theDetIds
DetIdContainer theDetIds
Definition: ME0Geometry.h:74
ME0Geometry::theDets
DetContainer theDets
Definition: ME0Geometry.h:75
ME0Geometry::ME0Geometry
ME0Geometry()
Default constructor.
Definition: ME0Geometry.cc:9
ME0Geometry
Definition: ME0Geometry.h:12
ME0Geometry::theEtaPartitionTypes
DetTypeContainer theEtaPartitionTypes
Definition: ME0Geometry.h:72
ME0Geometry::idToDet
const GeomDet * idToDet(DetId) const override
Definition: ME0Geometry.cc:24
ME0Geometry::detUnitIds
const DetIdContainer & detUnitIds() const override
Returm a vector of all GeomDetUnit DetIds.
Definition: ME0Geometry.cc:18
TrackingGeometry.h
ME0Geometry::idToDetUnit
const GeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
Definition: ME0Geometry.cc:22
ME0Geometry::detIds
const DetIdContainer & detIds() const override
Returm a vector of all GeomDet DetIds (including those of GeomDetUnits)
Definition: ME0Geometry.cc:20
ME0Geometry::chambers
const std::vector< const ME0Chamber * > & chambers() const
Return a vector of all ME0 chambers.
Definition: ME0Geometry.cc:29
ME0Geometry::allEtaPartitions
std::vector< ME0EtaPartition const * > allEtaPartitions
Definition: ME0Geometry.h:80
ME0Geometry::chamber
const ME0Chamber * chamber(ME0DetId id) const
Return a chamber given its id.
Definition: ME0Geometry.cc:43
DetId
Definition: DetId.h:17
ME0Geometry::theMap
mapIdToDet theMap
Definition: ME0Geometry.h:78
TrackingGeometry::DetTypeContainer
std::vector< const GeomDetType * > DetTypeContainer
Definition: TrackingGeometry.h:28
ME0Geometry::theEtaPartitionIds
DetIdContainer theEtaPartitionIds
Definition: ME0Geometry.h:73
TrackingGeometry::DetIdContainer
std::vector< DetId > DetIdContainer
Definition: TrackingGeometry.h:30
ME0Layer
Definition: ME0Layer.h:9
TrackingGeometry::DetContainer
std::vector< const GeomDet * > DetContainer
Definition: TrackingGeometry.h:29
ME0Chamber
Definition: ME0Chamber.h:10
ME0Geometry::allChambers
std::vector< ME0Chamber const * > allChambers
Definition: ME0Geometry.h:82
ME0DetId
Definition: ME0DetId.h:16
TrackingGeometry::mapIdToDet
std::unordered_map< unsigned int, const GeomDet * > mapIdToDet
Definition: TrackingGeometry.h:32
ME0Geometry::detTypes
const DetTypeContainer & detTypes() const override
Return a vector of all det types.
Definition: ME0Geometry.cc:12
ME0Geometry::add
void add(ME0EtaPartition *etaPartition)
Add a ME0 etaPartition to the Geometry.
Definition: ME0Geometry.cc:47
ME0Geometry::dets
const DetContainer & dets() const override
Returm a vector of all GeomDet (including all GeomDetUnits)
Definition: ME0Geometry.cc:16
ME0Geometry::detUnits
const DetContainer & detUnits() const override
Returm a vector of all GeomDet.
Definition: ME0Geometry.cc:14
DetId.h
ME0EtaPartition.h
ME0Geometry::etaPartition
const ME0EtaPartition * etaPartition(ME0DetId id) const
Return a etaPartition given its id.
Definition: ME0Geometry.cc:35
ME0Chamber.h
ME0Geometry::allLayers
std::vector< ME0Layer const * > allLayers
Definition: ME0Geometry.h:81
ME0EtaPartition
Definition: ME0EtaPartition.h:12
ME0Geometry::layers
const std::vector< const ME0Layer * > & layers() const
Return a vector of all ME0 layers.
Definition: ME0Geometry.cc:31
ME0Geometry::layer
const ME0Layer * layer(ME0DetId id) const
Return a layer given its id.
Definition: ME0Geometry.cc:39
ME0Layer.h