CMS 3D CMS Logo

GEMSuperChamber.cc
Go to the documentation of this file.
3 
5  GeomDet(plane), detId_(id)
6 {
7  setDetId(id);
8 }
9 
11 
13  return detId_;
14 }
15 
17  return this->id()==sch.id();
18 }
19 
21  chambers_.emplace_back(ch);
22 }
23 
24 std::vector<const GeomDet*> GEMSuperChamber::components() const {
25  return std::vector<const GeomDet*>(chambers_.begin(), chambers_.end());
26 }
27 
29  return chamber(GEMDetId(id.rawId()));
30 }
31 
32 const std::vector<const GEMChamber*>& GEMSuperChamber::chambers() const {
33  return chambers_;
34 }
35 
37  return chambers_.size();
38 }
39 
41  if (id.chamber()!=detId_.chamber()) return nullptr; // not in this super chamber!
42  return chamber(id.layer());
43 }
44 
45 const GEMChamber* GEMSuperChamber::chamber(int isl) const {
46  for (auto ch : chambers_){
47  if (ch->id().layer()==isl)
48  return ch;
49  }
50  return nullptr;
51 }
std::vector< const GeomDet * > components() const override
Return the chambers in the super chamber.
const GEMChamber * chamber(GEMDetId id) const
Return the chamber corresponding to the given id.
void setDetId(DetId id)
Definition: GeomDet.h:120
int chamber() const
Chamber id: it identifies a chamber in a ring it goes from 1 to 36.
Definition: GEMDetId.h:74
bool operator==(const GEMSuperChamber &sch) const
equal if the id is the same
const GeomDet * component(DetId id) const override
Return the sub-component (chamber) with a given id in this super chamber.
~GEMSuperChamber() override
destructor
void add(const GEMChamber *ch)
Add chamber to the super chamber which takes ownership.
Definition: DetId.h:18
int nChambers() const
Return numbers of chambers.
GEMDetId id() const
Return the GEMDetId of this super chamber.
const std::vector< const GEMChamber * > & chambers() const
Return the chambers in the super chamber.
GEMSuperChamber(GEMDetId id, const ReferenceCountingPointer< BoundPlane > &plane)
constructor
std::vector< const GEMChamber * > chambers_