test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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_.push_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 0; // 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 0;
51 }
const GEMChamber * chamber(GEMDetId id) const
Return the chamber corresponding to the given id.
void setDetId(DetId id)
Definition: GeomDet.h:120
void add(GEMChamber *ch)
Add chamber to the super chamber which takes ownership.
int chamber() const
Chamber id: it identifies a chamber in a ring it goes from 1 to 36.
Definition: GEMDetId.h:74
virtual const GeomDet * component(DetId id) const
Return the sub-component (chamber) with a given id in this super chamber.
bool operator==(const GEMSuperChamber &sch) const
equal if the id is the same
~GEMSuperChamber()
destructor
Definition: DetId.h:18
int nChambers() const
Return numbers of chambers.
GEMDetId id() const
Return the GEMDetId of this super chamber.
virtual std::vector< const GeomDet * > components() const
Return the chambers in the 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_