CMS 3D CMS Logo

GEMChamber.cc
Go to the documentation of this file.
1 
9 #include <iostream>
10 
12  GeomDet(plane), detId_(id)
13 {
14  setDetId(id);
15 }
16 
18 
20  return detId_;
21 }
22 
23 bool GEMChamber::operator==(const GEMChamber& ch) const {
24  return this->id()==ch.id();
25 }
26 
28  etaPartitions_.emplace_back(rl);
29 }
30 
31 std::vector<const GeomDet*> GEMChamber::components() const {
32  return std::vector<const GeomDet*>(etaPartitions_.begin(), etaPartitions_.end());
33 }
34 
36  return etaPartition(GEMDetId(id.rawId()));
37 }
38 
39 const std::vector<const GEMEtaPartition*>& GEMChamber::etaPartitions() const {
40  return etaPartitions_;
41 }
42 
44  return etaPartitions_.size();
45 }
46 
48  if (id.chamberId()!=detId_) return nullptr; // not in this eta partition!
49  return etaPartition(id.roll());
50 }
51 
53  for (auto roll : etaPartitions_){
54  if (roll->id().roll()==isl)
55  return roll;
56  }
57  return nullptr;
58 }
bool operator==(const GEMChamber &ch) const
equal if the id is the same
Definition: GEMChamber.cc:23
GEMDetId detId_
Definition: GEMChamber.h:58
void setDetId(DetId id)
Definition: GeomDet.h:120
std::vector< const GEMEtaPartition * > etaPartitions_
Definition: GEMChamber.h:61
GEMDetId id() const
Return the GEMDetId of this chamber.
Definition: GEMChamber.cc:19
std::vector< const GeomDet * > components() const override
Return the rolls in the chamber.
Definition: GEMChamber.cc:31
GEMChamber(GEMDetId id, const ReferenceCountingPointer< BoundPlane > &plane)
Constructor.
Definition: GEMChamber.cc:11
const GeomDet * component(DetId id) const override
Return the sub-component (roll) with a given id in this chamber.
Definition: GEMChamber.cc:35
void add(GEMEtaPartition *roll)
Add EtaPartition to the chamber which takes ownership.
Definition: GEMChamber.cc:27
const std::vector< const GEMEtaPartition * > & etaPartitions() const
Return the eta partitions.
Definition: GEMChamber.cc:39
~GEMChamber() override
Destructor.
Definition: GEMChamber.cc:17
Definition: DetId.h:18
const GEMEtaPartition * etaPartition(GEMDetId id) const
Return the eta partition corresponding to the given id.
Definition: GEMChamber.cc:47
int nEtaPartitions() const
Retunr numbers of eta partitions.
Definition: GEMChamber.cc:43