CMS 3D CMS Logo

GEMGeometry.h
Go to the documentation of this file.
1 #ifndef GEMGeometry_GEMGeometry_h
2 #define GEMGeometry_GEMGeometry_h
3 
19 #include <vector>
20 #include <map>
21 
22 class GeomDetType;
23 
24 class GEMGeometry : public TrackingGeometry {
25 public:
27  GEMGeometry();
28 
30  ~GEMGeometry() override;
31 
32  friend class GEMGeometryBuilder;
33  friend class GeometryAligner;
34 
35  // Return a vector of all det types
36  const DetTypeContainer& detTypes() const override;
37 
38  // Return a vector of all GeomDet
39  const DetContainer& detUnits() const override;
40 
41  // Return a vector of all GeomDet
42  const DetContainer& dets() const override;
43 
44  // Return a vector of all GeomDet DetIds
45  const DetIdContainer& detUnitIds() const override;
46 
47  // Return a vector of all GeomDet DetIds
48  const DetIdContainer& detIds() const override;
49 
50  // Return the pointer to the GeomDet corresponding to a given DetId
51  const GeomDet* idToDetUnit(DetId) const override;
52 
53  // Return the pointer to the GeomDet corresponding to a given DetId
54  const GeomDet* idToDet(DetId) const override;
55 
56  //---- Extension of the interface
57 
59  const std::vector<const GEMRegion*>& regions() const;
60 
62  const std::vector<const GEMStation*>& stations() const;
63 
65  const std::vector<const GEMRing*>& rings() const;
66 
68  const std::vector<const GEMSuperChamber*>& superChambers() const;
69 
71  const std::vector<const GEMChamber*>& chambers() const;
72 
74  const std::vector<const GEMEtaPartition*>& etaPartitions() const;
75 
76  // Return a GEMRegion
77  const GEMRegion* region(int region) const;
78 
79  // Return a GEMStation
80  const GEMStation* station(int region, int station) const;
81 
83  const GEMRing* ring(int region, int station, int ring) const;
84 
85  // Return a GEMSuperChamber given its id
86  const GEMSuperChamber* superChamber(GEMDetId id) const;
87 
88  // Return a GEMChamber given its id
89  const GEMChamber* chamber(GEMDetId id) const;
90 
92  const GEMEtaPartition* etaPartition(GEMDetId id) const;
93 
95  void add(const GEMRegion* region);
96 
98  void add(const GEMStation* station);
99 
101  void add(const GEMRing* ring);
102 
104  void add(const GEMSuperChamber* sch);
105 
107  void add(const GEMChamber* ch);
108 
110  void add(const GEMEtaPartition* etaPartition);
111 
112  bool hasME0() const;
113  bool hasGE11() const;
114  bool hasGE21() const;
115 
116 private:
122 
123  // Map for efficient lookup by DetId
125 
126  std::vector<const GEMEtaPartition*> allEtaPartitions; // Are not owned by this class; are owned by their chamber.
127  std::vector<const GEMChamber*> allChambers; // Are not owned by this class; are owned by their superchamber.
128  std::vector<const GEMSuperChamber*> allSuperChambers; // Are owned by this class.
129  std::vector<const GEMRing*> allRings; // Are owned by this class.
130  std::vector<const GEMStation*> allStations; // Are owned by this class.
131  std::vector<const GEMRegion*> allRegions; // Are owned by this class.
132 };
133 
134 #endif
GEMGeometry::theEtaPartitionTypes
DetTypeContainer theEtaPartitionTypes
Definition: GEMGeometry.h:119
GEMGeometry::allEtaPartitions
std::vector< const GEMEtaPartition * > allEtaPartitions
Definition: GEMGeometry.h:126
GEMGeometry::region
const GEMRegion * region(int region) const
Definition: GEMGeometry.cc:42
GEMGeometry::theEtaPartitionIds
DetIdContainer theEtaPartitionIds
Definition: GEMGeometry.h:120
GEMGeometry::add
void add(const GEMRegion *region)
Add a GEMRegion to the Geometry.
Definition: GEMGeometry.cc:81
GEMGeometry::~GEMGeometry
~GEMGeometry() override
Destructor.
Definition: GEMGeometry.cc:11
GEMGeometry::detUnits
const DetContainer & detUnits() const override
Returm a vector of all GeomDet.
Definition: GEMGeometry.cc:15
TrackingGeometry
Definition: TrackingGeometry.h:26
GeomDet
Definition: GeomDet.h:27
GEMGeometry::detTypes
const DetTypeContainer & detTypes() const override
Return a vector of all det types.
Definition: GEMGeometry.cc:13
GEMSuperChamber
Definition: GEMSuperChamber.h:19
GEMGeometry::idToDet
const GeomDet * idToDet(DetId) const override
Definition: GEMGeometry.cc:25
GEMGeometry::idToDetUnit
const GeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
Definition: GEMGeometry.cc:23
GEMGeometry::GEMGeometry
GEMGeometry()
Default constructor.
Definition: GEMGeometry.cc:9
GEMGeometry::ring
const GEMRing * ring(int region, int station, int ring) const
Return a GEMRing.
Definition: GEMGeometry.cc:60
GEMEtaPartition
Definition: GEMEtaPartition.h:12
GEMGeometry::allRings
std::vector< const GEMRing * > allRings
Definition: GEMGeometry.h:129
GEMGeometry::theEtaPartitions
DetContainer theEtaPartitions
Definition: GEMGeometry.h:117
GeomDetType
Definition: GeomDetType.h:9
TrackingGeometry.h
GEMGeometry::stations
const std::vector< const GEMStation * > & stations() const
Return a vector of all GEM stations.
Definition: GEMGeometry.cc:32
GEMGeometry::allSuperChambers
std::vector< const GEMSuperChamber * > allSuperChambers
Definition: GEMGeometry.h:128
GEMGeometry::hasME0
bool hasME0() const
Definition: GEMGeometry.cc:111
GEMGeometry::dets
const DetContainer & dets() const override
Returm a vector of all GeomDet (including all GeomDetUnits)
Definition: GEMGeometry.cc:17
GEMGeometry::theMap
mapIdToDet theMap
Definition: GEMGeometry.h:124
DetId
Definition: DetId.h:17
GEMRing.h
GEMGeometry::theDetIds
DetIdContainer theDetIds
Definition: GEMGeometry.h:121
GEMEtaPartition.h
GEMRegion.h
GEMStation.h
GEMStation
Definition: GEMStation.h:19
GEMGeometry::detUnitIds
const DetIdContainer & detUnitIds() const override
Returm a vector of all GeomDetUnit DetIds.
Definition: GEMGeometry.cc:19
GEMGeometry::station
const GEMStation * station(int region, int station) const
Definition: GEMGeometry.cc:51
GEMRing
Definition: GEMRing.h:18
GEMGeometryBuilder
Definition: GEMGeometryBuilder.h:32
TrackingGeometry::DetTypeContainer
std::vector< const GeomDetType * > DetTypeContainer
Definition: TrackingGeometry.h:28
TrackingGeometry::DetIdContainer
std::vector< DetId > DetIdContainer
Definition: TrackingGeometry.h:30
GEMGeometry::theDets
DetContainer theDets
Definition: GEMGeometry.h:118
GEMGeometry::chambers
const std::vector< const GEMChamber * > & chambers() const
Return a vector of all GEM chambers.
Definition: GEMGeometry.cc:38
GEMGeometry::allStations
std::vector< const GEMStation * > allStations
Definition: GEMGeometry.h:130
TrackingGeometry::DetContainer
std::vector< const GeomDet * > DetContainer
Definition: TrackingGeometry.h:29
GEMDetId
Definition: GEMDetId.h:18
GEMGeometry::hasGE21
bool hasGE21() const
Definition: GEMGeometry.cc:115
GEMGeometry::regions
const std::vector< const GEMRegion * > & regions() const
Return a vector of all GEM regions.
Definition: GEMGeometry.cc:30
GEMChamber.h
TrackingGeometry::mapIdToDet
std::unordered_map< unsigned int, const GeomDet * > mapIdToDet
Definition: TrackingGeometry.h:32
GEMGeometry::hasGE11
bool hasGE11() const
Definition: GEMGeometry.cc:113
GEMChamber
Definition: GEMChamber.h:19
GEMGeometry::allChambers
std::vector< const GEMChamber * > allChambers
Definition: GEMGeometry.h:127
DetId.h
GEMSuperChamber.h
GEMGeometry::etaPartitions
const std::vector< const GEMEtaPartition * > & etaPartitions() const
Return a vector of all GEM eta partitions.
Definition: GEMGeometry.cc:40
GEMGeometry
Definition: GEMGeometry.h:24
GEMGeometry::detIds
const DetIdContainer & detIds() const override
Returm a vector of all GeomDet DetIds (including those of GeomDetUnits)
Definition: GEMGeometry.cc:21
GEMGeometry::superChamber
const GEMSuperChamber * superChamber(GEMDetId id) const
Definition: GEMGeometry.cc:69
GEMGeometry::superChambers
const std::vector< const GEMSuperChamber * > & superChambers() const
Return a vector of all GEM super chambers.
Definition: GEMGeometry.cc:36
GEMRegion
Definition: GEMRegion.h:19
GEMGeometry::chamber
const GEMChamber * chamber(GEMDetId id) const
Definition: GEMGeometry.cc:73
GEMGeometry::allRegions
std::vector< const GEMRegion * > allRegions
Definition: GEMGeometry.h:131
GEMGeometry::rings
const std::vector< const GEMRing * > & rings() const
Return a vector of all GEM rings.
Definition: GEMGeometry.cc:34
GeometryAligner
Class to update a given geometry with a set of alignments.
Definition: GeometryAligner.h:33
GEMGeometry::etaPartition
const GEMEtaPartition * etaPartition(GEMDetId id) const
Return a GEMEtaPartition given its id.
Definition: GEMGeometry.cc:77