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;
32 
33  // Return a vector of all GeomDetUnit
34  virtual const DetUnitContainer& detUnits() const;
35 
36  // Return a vector of all GeomDet
37  virtual const DetContainer& dets() const;
38 
39  // Return a vector of all GeomDetUnit DetIds
40  virtual const DetIdContainer& detUnitIds() const;
41 
42  // Return a vector of all GeomDet DetIds
43  virtual const DetIdContainer& detIds() const;
44 
45  // Return the pointer to the GeomDetUnit corresponding to a given DetId
46  virtual const GeomDetUnit* idToDetUnit(DetId) const;
47 
48  // Return the pointer to the GeomDet corresponding to a given DetId
49  virtual const GeomDet* idToDet(DetId) const;
50 
51 
52  //---- Extension of the interface
53 
55  // const std::vector<GEMChamber*>& chambers() const;
56 
58  const std::vector<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<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
DetIdContainer theEtaPartitionIds
Definition: GEMGeometry.h:76
std::vector< GeomDet * > DetContainer
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
virtual const DetIdContainer & detIds() const
Returm a vector of all GeomDet DetIds (including those of GeomDetUnits)
Definition: GEMGeometry.cc:35
mapIdToDet theMap
Definition: GEMGeometry.h:80
virtual const DetContainer & dets() const
Returm a vector of all GeomDet (including all GeomDetUnits)
Definition: GEMGeometry.cc:25
std::vector< GeomDetUnit * > DetUnitContainer
virtual const DetIdContainer & detUnitIds() const
Returm a vector of all GeomDetUnit DetIds.
Definition: GEMGeometry.cc:30
std::vector< GeomDetType * > DetTypeContainer
virtual const DetTypeContainer & detTypes() const
Return a vector of all det types.
Definition: GEMGeometry.cc:15
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
std::vector< GEMEtaPartition * > allEtaPartitions
Definition: GEMGeometry.h:82
virtual const GeomDetUnit * idToDetUnit(DetId) const
Return the pointer to the GeomDetUnit corresponding to a given DetId.
Definition: GEMGeometry.cc:40
virtual const DetUnitContainer & detUnits() const
Returm a vector of all GeomDetUnit.
Definition: GEMGeometry.cc:20
DetTypeContainer theEtaPartitionTypes
Definition: GEMGeometry.h:75
virtual const GeomDet * idToDet(DetId) const
Definition: GEMGeometry.cc:44
__gnu_cxx::hash_map< unsigned int, GeomDet * > mapIdToDet
const std::vector< GEMEtaPartition * > & etaPartitions() const
Return a vector of all GEM chambers.
Definition: GEMGeometry.cc:57
std::vector< DetId > DetIdContainer