test
CMS 3D CMS Logo

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