CMS 3D CMS Logo

EMTFGEMDetId.cc
Go to the documentation of this file.
2 
3 
5  gemDetId_(id),
6  me0DetId_(),
7  isME0_(false)
8 {
9 
10 }
11 
13  gemDetId_(),
14  me0DetId_(id),
15  isME0_(true)
16 {
17 
18 }
19 
22  if (!isME0() && !r.isME0()) {
23  return getGEMDetId() < r.getGEMDetId(); // compare GEM with GEM
24  } else if (r.isME0() && r.isME0()) {
25  return getME0DetId() < r.getME0DetId(); // compare ME0 with ME0
26  } else {
27  return !r.isME0(); // compare GEM with ME0
28  }
29 }
30 
32 int EMTFGEMDetId::region() const {
33  if (!isME0())
34  return getGEMDetId().region();
35  else
36  return getME0DetId().region();
37 }
38 
39 int EMTFGEMDetId::ring() const {
40  if (!isME0())
41  return getGEMDetId().ring();
42  else
43  //return getME0DetId().ring();
44  return 4; // NOTE: use ME0 --> ring 4 convention
45 }
46 
47 int EMTFGEMDetId::station() const {
48  if (!isME0())
49  return getGEMDetId().station();
50  else
51  //return getME0DetId().station();
52  return 1; // use ME0 --> station 1 convention
53 }
54 
55 int EMTFGEMDetId::layer() const {
56  if (!isME0())
57  return getGEMDetId().layer();
58  else
59  return getME0DetId().layer();
60 }
61 
62 int EMTFGEMDetId::chamber() const {
63  if (!isME0())
64  return getGEMDetId().chamber();
65  else
66  return getME0DetId().chamber();
67 }
68 
69 int EMTFGEMDetId::roll() const {
70  if (!isME0())
71  return getGEMDetId().roll();
72  else
73  return getME0DetId().roll();
74 }
75 
76 std::ostream& operator<<( std::ostream& os, const EMTFGEMDetId& id ) {
77  if (!id.isME0())
78  os << id.getGEMDetId();
79  else
80  os << id.getME0DetId();
81  return os;
82 }
int roll() const
Definition: GEMDetId.h:80
int ring() const
Definition: GEMDetId.h:59
int chamber() const
Chamber id: it identifies a chamber in a ring it goes from 1 to 36.
Definition: GEMDetId.h:74
ME0DetId me0DetId_
Definition: EMTFGEMDetId.h:38
int layer() const
Definition: EMTFGEMDetId.cc:55
int chamber() const
Chamber id: it identifies a chamber in a ring it goes from 1 to 36.
Definition: ME0DetId.h:51
int roll() const
Definition: EMTFGEMDetId.cc:69
int region() const
The identifiers.
Definition: EMTFGEMDetId.cc:32
int layer() const
Layer id: each station have two layers of chambers: layer 1 is the inner chamber and layer 2 is the o...
Definition: GEMDetId.h:69
int station() const
Station id : the station is the pair of chambers at same disk.
Definition: GEMDetId.h:64
int chamber() const
Definition: EMTFGEMDetId.cc:62
bool operator<(const EMTFGEMDetId &r) const
Sort Operator based on the raw detector id.
Definition: EMTFGEMDetId.cc:21
int region() const
Region id: 0 for Barrel Not in use, +/-1 For +/- Endcap.
Definition: GEMDetId.h:53
std::ostream & operator<<(std::ostream &os, const EMTFGEMDetId &id)
Definition: EMTFGEMDetId.cc:76
bool isME0() const
Definition: EMTFGEMDetId.h:30
int station() const
Definition: EMTFGEMDetId.cc:47
ME0DetId getME0DetId() const
Definition: EMTFGEMDetId.h:34
EMTFGEMDetId(const GEMDetId &id)
Definition: EMTFGEMDetId.cc:4
int region() const
Region id: 0 for Barrel Not in use, +/-1 For +/- Endcap.
Definition: ME0DetId.h:46
int roll() const
Definition: ME0DetId.h:62
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:56
GEMDetId getGEMDetId() const
Definition: EMTFGEMDetId.h:32
GEMDetId gemDetId_
Definition: EMTFGEMDetId.h:37
int ring() const
Definition: EMTFGEMDetId.cc:39