CMS 3D CMS Logo

EMTFGEMDetId.cc
Go to the documentation of this file.
2 
3 EMTFGEMDetId::EMTFGEMDetId(const GEMDetId& id) : gemDetId_(id), me0DetId_(), isME0_(false) {}
4 
6 
9  if (!isME0() && !r.isME0()) {
10  return getGEMDetId() < r.getGEMDetId(); // compare GEM with GEM
11  } else if (r.isME0() && r.isME0()) {
12  return getME0DetId() < r.getME0DetId(); // compare ME0 with ME0
13  } else {
14  return !r.isME0(); // compare GEM with ME0
15  }
16 }
17 
19 int EMTFGEMDetId::region() const {
20  if (!isME0())
21  return getGEMDetId().region();
22  else
23  return getME0DetId().region();
24 }
25 
26 int EMTFGEMDetId::ring() const {
27  if (!isME0())
28  return getGEMDetId().ring();
29  else
30  //return getME0DetId().ring();
31  return 4; // NOTE: use ME0 --> ring 4 convention
32 }
33 
34 int EMTFGEMDetId::station() const {
35  if (!isME0())
36  return getGEMDetId().station();
37  else
38  //return getME0DetId().station();
39  return 1; // use ME0 --> station 1 convention
40 }
41 
42 int EMTFGEMDetId::layer() const {
43  if (!isME0())
44  return getGEMDetId().layer();
45  else
46  return getME0DetId().layer();
47 }
48 
49 int EMTFGEMDetId::chamber() const {
50  if (!isME0())
51  return getGEMDetId().chamber();
52  else
53  return getME0DetId().chamber();
54 }
55 
56 int EMTFGEMDetId::roll() const {
57  if (!isME0())
58  return getGEMDetId().roll();
59  else
60  return getME0DetId().roll();
61 }
62 
63 std::ostream& operator<<(std::ostream& os, const EMTFGEMDetId& id) {
64  if (!id.isME0())
65  os << id.getGEMDetId();
66  else
67  os << id.getME0DetId();
68  return os;
69 }
int roll() const
Definition: GEMDetId.h:188
int ring() const
Definition: GEMDetId.h:170
int chamber() const
Definition: GEMDetId.h:177
ME0DetId me0DetId_
Definition: EMTFGEMDetId.h:37
int layer() const
Definition: EMTFGEMDetId.cc:42
int chamber() const
Chamber id: it identifies a chamber in a ring it goes from 1 to 36.
Definition: ME0DetId.h:41
int roll() const
Definition: EMTFGEMDetId.cc:56
int region() const
The identifiers.
Definition: EMTFGEMDetId.cc:19
int layer() const
Definition: GEMDetId.h:184
int station() const
Definition: GEMDetId.h:173
int chamber() const
Definition: EMTFGEMDetId.cc:49
bool operator<(const EMTFGEMDetId &r) const
Sort Operator based on the raw detector id.
Definition: EMTFGEMDetId.cc:8
int region() const
Definition: GEMDetId.h:165
std::ostream & operator<<(std::ostream &os, const EMTFGEMDetId &id)
Definition: EMTFGEMDetId.cc:63
bool isME0() const
Definition: EMTFGEMDetId.h:29
int station() const
Definition: EMTFGEMDetId.cc:34
ME0DetId getME0DetId() const
Definition: EMTFGEMDetId.h:33
EMTFGEMDetId(const GEMDetId &id)
Definition: EMTFGEMDetId.cc:3
int region() const
Region id: 0 for Barrel Not in use, +/-1 For +/- Endcap.
Definition: ME0DetId.h:38
int roll() const
Definition: ME0DetId.h:48
int layer() const
Layer id: each chamber has six layers of chambers: layer 1 is the inner layer and layer 6 is the oute...
Definition: ME0DetId.h:44
GEMDetId getGEMDetId() const
Definition: EMTFGEMDetId.h:31
GEMDetId gemDetId_
Definition: EMTFGEMDetId.h:36
int ring() const
Definition: EMTFGEMDetId.cc:26