CMS 3D CMS Logo

GEMRing.h
Go to the documentation of this file.
1 #ifndef Geometry_GEMGeometry_GEMRing_h
2 #define Geometry_GEMGeometry_GEMRing_h
3 
15 
16 class GEMSuperChamber;
17 
18 class GEMRing {
19 public:
21  GEMRing(int region, int station, int ring);
22 
24  ~GEMRing();
25 
27  std::vector<GEMDetId> ids() const;
28 
30  bool operator==(const GEMRing& sch) const;
31 
33  void add(GEMSuperChamber* ch);
34 
36  std::vector<const GeomDet*> components() const;
37 
39  const GeomDet* component(DetId id) const;
40 
42  const GEMSuperChamber* superChamber(GEMDetId id) const;
43 
44  // Return a super chamber
45  const GEMSuperChamber* superChamber(int sch) const;
46 
48  const std::vector<const GEMSuperChamber*>& superChambers() const;
49 
51  int nSuperChambers() const;
52 
54  int region() const;
55 
57  int station() const;
58 
60  int ring() const;
61 
62 private:
63  int region_;
64  int station_;
65  int ring_;
66 
67  std::vector<GEMDetId> detIds_;
68 
69  // vector of chambers for a super chamber
70  std::vector<const GEMSuperChamber*> superChambers_;
71 };
72 #endif
int region() const
Return the region number.
Definition: GEMRing.cc:46
int station() const
Return the station number.
Definition: GEMRing.cc:48
int nSuperChambers() const
Return numbers of chambers.
Definition: GEMRing.cc:44
GEMRing(int region, int station, int ring)
constructor
Definition: GEMRing.cc:4
std::vector< const GeomDet * > components() const
Return the super chambers in the ring.
Definition: GEMRing.cc:16
void add(GEMSuperChamber *ch)
Add super chamber to the ring which takes ownership.
Definition: GEMRing.cc:14
~GEMRing()
destructor
Definition: GEMRing.cc:6
int ring() const
Return the ring number.
Definition: GEMRing.cc:50
std::vector< const GEMSuperChamber * > superChambers_
Definition: GEMRing.h:70
std::vector< GEMDetId > detIds_
Definition: GEMRing.h:67
std::vector< GEMDetId > ids() const
Return the vector of GEMDetIds in this ring.
Definition: GEMRing.cc:8
const GeomDet * component(DetId id) const
Return the sub-component (super chamber) with a given id in this ring.
Definition: GEMRing.cc:25
const GEMSuperChamber * superChamber(GEMDetId id) const
Return the chamber corresponding to the given id.
Definition: GEMRing.cc:27
bool operator==(const GEMRing &sch) const
equal if the id is the same
Definition: GEMRing.cc:10
int ring_
Definition: GEMRing.h:65
Definition: DetId.h:17
int region_
Definition: GEMRing.h:63
int station_
Definition: GEMRing.h:64
const std::vector< const GEMSuperChamber * > & superChambers() const
Return the chambers in the ring.
Definition: GEMRing.cc:42