CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
GEMGeometry.h
Go to the documentation of this file.
1 #ifndef GEMGeometry_GEMGeometry_h
2 #define GEMGeometry_GEMGeometry_h
3 
14 //#include "Geometry/GEMGeometry/interface/GEMChamber.h"
15 #include <vector>
16 #include <map>
17 
18 class GeomDetType;
19 class GeomDetUnit;
20 
21 class GEMGeometry : public TrackingGeometry {
22 
23  public:
25  GEMGeometry();
26 
28  virtual ~GEMGeometry();
29 
30  // Return a vector of all det types
31  virtual const DetTypeContainer& detTypes() const override;
32 
33  // Return a vector of all GeomDetUnit
34  virtual const DetUnitContainer& detUnits() const override;
35 
36  // Return a vector of all GeomDet
37  virtual const DetContainer& dets() const override;
38 
39  // Return a vector of all GeomDetUnit DetIds
40  virtual const DetIdContainer& detUnitIds() const override;
41 
42  // Return a vector of all GeomDet DetIds
43  virtual const DetIdContainer& detIds() const override;
44 
45  // Return the pointer to the GeomDetUnit corresponding to a given DetId
46  virtual const GeomDetUnit* idToDetUnit(DetId) const override;
47 
48  // Return the pointer to the GeomDet corresponding to a given DetId
49  virtual const GeomDet* idToDet(DetId) const override;
50 
51 
52  //---- Extension of the interface
53 
55  // const std::vector<GEMChamber*>& chambers() const;
56 
58  const std::vector<const GEMEtaPartition*>& etaPartitions() const;
59 
60  // Return a GEMChamber given its id
61  // const GEMChamber* chamber(GEMDetId id) const;
62 
64  const GEMEtaPartition* etaPartition(GEMDetId id) const;
65 
67  void add(GEMEtaPartition* etaPartition);
68 
70  // void add(GEMChamber* ch);
71 
72  private:
78 
79  // Map for efficient lookup by DetId
81 
82  std::vector<const GEMEtaPartition*> allEtaPartitions; // Are not owned by this class; are owned by their chamber.
83  // std::vector<GEMChamber*> allChambers; // Are owned by this class.
84 
85 };
86 
87 #endif
std::vector< GeomDetType const * > DetTypeContainer
std::vector< const GEMEtaPartition * > allEtaPartitions
Definition: GEMGeometry.h:82
virtual const GeomDetUnit * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
Definition: GEMGeometry.cc:40
DetIdContainer theEtaPartitionIds
Definition: GEMGeometry.h:76
virtual const GeomDet * idToDet(DetId) const override
Definition: GEMGeometry.cc:44
__gnu_cxx::hash_map< unsigned int, GeomDet const * > mapIdToDet
virtual const DetTypeContainer & detTypes() const override
Return a vector of all det types.
Definition: GEMGeometry.cc:15
virtual const DetContainer & dets() const override
Returm a vector of all GeomDet (including all GeomDetUnits)
Definition: GEMGeometry.cc:25
virtual const DetIdContainer & detUnitIds() const override
Returm a vector of all GeomDetUnit DetIds.
Definition: GEMGeometry.cc:30
GEMGeometry()
Default constructor.
Definition: GEMGeometry.cc:9
const GEMEtaPartition * etaPartition(GEMDetId id) const
Return a etaPartition given its id.
Definition: GEMGeometry.cc:65
DetIdContainer theDetIds
Definition: GEMGeometry.h:77
virtual ~GEMGeometry()
Destructor.
Definition: GEMGeometry.cc:12
mapIdToDet theMap
Definition: GEMGeometry.h:80
const std::vector< const GEMEtaPartition * > & etaPartitions() const
Return a vector of all GEM chambers.
Definition: GEMGeometry.cc:57
void add(GEMEtaPartition *etaPartition)
Add a GEM etaPartition to the Geometry.
Definition: GEMGeometry.cc:71
Definition: DetId.h:18
DetContainer theDets
Definition: GEMGeometry.h:74
DetUnitContainer theEtaPartitions
Add a GEM Chamber to the Geometry.
Definition: GEMGeometry.h:73
virtual const DetIdContainer & detIds() const override
Returm a vector of all GeomDet DetIds (including those of GeomDetUnits)
Definition: GEMGeometry.cc:35
virtual const DetUnitContainer & detUnits() const override
Returm a vector of all GeomDetUnit.
Definition: GEMGeometry.cc:20
DetTypeContainer theEtaPartitionTypes
Definition: GEMGeometry.h:75
std::vector< GeomDet const * > DetContainer
std::vector< GeomDetUnit const * > DetUnitContainer
std::vector< DetId > DetIdContainer