test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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_.push_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 0; // 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 0;
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
GEMChamber(GEMDetId id, const ReferenceCountingPointer< BoundPlane > &plane)
Constructor.
Definition: GEMChamber.cc:11
virtual ~GEMChamber()
Destructor.
Definition: GEMChamber.cc:17
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
virtual const GeomDet * component(DetId id) const
Return the sub-component (roll) with a given id in this chamber.
Definition: GEMChamber.cc:35
Definition: DetId.h:18
virtual std::vector< const GeomDet * > components() const
Return the rolls in the chamber.
Definition: GEMChamber.cc:31
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