CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
EMTFGEMDetId Class Reference

#include <EMTFGEMDetId.h>

Public Member Functions

int chamber () const
 
 EMTFGEMDetId (const GEMDetId &id)
 
 EMTFGEMDetId (const ME0DetId &id)
 
GEMDetId getGEMDetId () const
 
ME0DetId getME0DetId () const
 
bool isME0 () const
 
int layer () const
 
bool operator< (const EMTFGEMDetId &r) const
 Sort Operator based on the raw detector id. More...
 
int region () const
 The identifiers. More...
 
int ring () const
 
int roll () const
 
int station () const
 

Private Attributes

GEMDetId gemDetId_
 
bool isME0_
 
ME0DetId me0DetId_
 

Detailed Description

Definition at line 14 of file EMTFGEMDetId.h.

Constructor & Destructor Documentation

EMTFGEMDetId::EMTFGEMDetId ( const GEMDetId id)
explicit

Definition at line 4 of file EMTFGEMDetId.cc.

4  :
5  gemDetId_(id),
6  me0DetId_(),
7  isME0_(false)
8 {
9 
10 }
ME0DetId me0DetId_
Definition: EMTFGEMDetId.h:38
GEMDetId gemDetId_
Definition: EMTFGEMDetId.h:37
EMTFGEMDetId::EMTFGEMDetId ( const ME0DetId id)
explicit

Definition at line 12 of file EMTFGEMDetId.cc.

12  :
13  gemDetId_(),
14  me0DetId_(id),
15  isME0_(true)
16 {
17 
18 }
ME0DetId me0DetId_
Definition: EMTFGEMDetId.h:38
GEMDetId gemDetId_
Definition: EMTFGEMDetId.h:37

Member Function Documentation

int EMTFGEMDetId::chamber ( ) const

Definition at line 62 of file EMTFGEMDetId.cc.

References ME0DetId::chamber(), GEMDetId::chamber(), getGEMDetId(), getME0DetId(), and isME0().

Referenced by PrimitiveConversion::convert_gem(), geometryXMLparser.CSCAlignable::index(), and PrimitiveSelection::select_gem().

62  {
63  if (!isME0())
64  return getGEMDetId().chamber();
65  else
66  return getME0DetId().chamber();
67 }
int chamber() const
Chamber id: it identifies a chamber in a ring it goes from 1 to 36.
Definition: GEMDetId.h:74
int chamber() const
Chamber id: it identifies a chamber in a ring it goes from 1 to 36.
Definition: ME0DetId.h:51
bool isME0() const
Definition: EMTFGEMDetId.h:30
ME0DetId getME0DetId() const
Definition: EMTFGEMDetId.h:34
GEMDetId getGEMDetId() const
Definition: EMTFGEMDetId.h:32
GEMDetId EMTFGEMDetId::getGEMDetId ( ) const
inline

Definition at line 32 of file EMTFGEMDetId.h.

References gemDetId_.

Referenced by chamber(), layer(), operator<(), region(), ring(), roll(), and station().

32 { return gemDetId_; }
GEMDetId gemDetId_
Definition: EMTFGEMDetId.h:37
ME0DetId EMTFGEMDetId::getME0DetId ( ) const
inline

Definition at line 34 of file EMTFGEMDetId.h.

References me0DetId_.

Referenced by chamber(), layer(), operator<(), region(), and roll().

34 { return me0DetId_; }
ME0DetId me0DetId_
Definition: EMTFGEMDetId.h:38
bool EMTFGEMDetId::isME0 ( ) const
inline

Definition at line 30 of file EMTFGEMDetId.h.

References isME0_.

Referenced by chamber(), layer(), operator<(), operator<<(), region(), ring(), roll(), and station().

30 { return isME0_; }
int EMTFGEMDetId::layer ( ) const

Definition at line 55 of file EMTFGEMDetId.cc.

References getGEMDetId(), getME0DetId(), isME0(), ME0DetId::layer(), and GEMDetId::layer().

Referenced by geometryXMLparser.DTAlignable::index(), geometryXMLparser.CSCAlignable::index(), and PrimitiveSelection::select_gem().

55  {
56  if (!isME0())
57  return getGEMDetId().layer();
58  else
59  return getME0DetId().layer();
60 }
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
bool isME0() const
Definition: EMTFGEMDetId.h:30
ME0DetId getME0DetId() const
Definition: EMTFGEMDetId.h:34
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
bool EMTFGEMDetId::operator< ( const EMTFGEMDetId r) const

Sort Operator based on the raw detector id.

Definition at line 21 of file EMTFGEMDetId.cc.

References getGEMDetId(), getME0DetId(), and isME0().

21  {
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 }
bool isME0() const
Definition: EMTFGEMDetId.h:30
ME0DetId getME0DetId() const
Definition: EMTFGEMDetId.h:34
GEMDetId getGEMDetId() const
Definition: EMTFGEMDetId.h:32
int EMTFGEMDetId::region ( ) const

The identifiers.

Definition at line 32 of file EMTFGEMDetId.cc.

References getGEMDetId(), getME0DetId(), isME0(), ME0DetId::region(), and GEMDetId::region().

Referenced by PrimitiveConversion::convert_gem(), and PrimitiveSelection::select_gem().

32  {
33  if (!isME0())
34  return getGEMDetId().region();
35  else
36  return getME0DetId().region();
37 }
int region() const
Region id: 0 for Barrel Not in use, +/-1 For +/- Endcap.
Definition: GEMDetId.h:53
bool isME0() const
Definition: EMTFGEMDetId.h:30
ME0DetId getME0DetId() const
Definition: EMTFGEMDetId.h:34
int region() const
Region id: 0 for Barrel Not in use, +/-1 For +/- Endcap.
Definition: ME0DetId.h:46
GEMDetId getGEMDetId() const
Definition: EMTFGEMDetId.h:32
int EMTFGEMDetId::ring ( ) const

Definition at line 39 of file EMTFGEMDetId.cc.

References getGEMDetId(), isME0(), and GEMDetId::ring().

Referenced by PrimitiveConversion::convert_gem(), geometryXMLparser.CSCAlignable::index(), and PrimitiveSelection::select_gem().

39  {
40  if (!isME0())
41  return getGEMDetId().ring();
42  else
43  //return getME0DetId().ring();
44  return 4; // NOTE: use ME0 --> ring 4 convention
45 }
int ring() const
Definition: GEMDetId.h:59
bool isME0() const
Definition: EMTFGEMDetId.h:30
GEMDetId getGEMDetId() const
Definition: EMTFGEMDetId.h:32
int EMTFGEMDetId::roll ( ) const

Definition at line 69 of file EMTFGEMDetId.cc.

References getGEMDetId(), getME0DetId(), isME0(), ME0DetId::roll(), and GEMDetId::roll().

Referenced by PrimitiveConversion::convert_gem(), and PrimitiveSelection::select_gem().

69  {
70  if (!isME0())
71  return getGEMDetId().roll();
72  else
73  return getME0DetId().roll();
74 }
int roll() const
Definition: GEMDetId.h:80
bool isME0() const
Definition: EMTFGEMDetId.h:30
ME0DetId getME0DetId() const
Definition: EMTFGEMDetId.h:34
int roll() const
Definition: ME0DetId.h:62
GEMDetId getGEMDetId() const
Definition: EMTFGEMDetId.h:32
int EMTFGEMDetId::station ( ) const

Definition at line 47 of file EMTFGEMDetId.cc.

References getGEMDetId(), isME0(), and GEMDetId::station().

Referenced by PrimitiveConversion::convert_gem(), geometryXMLparser.DTAlignable::index(), geometryXMLparser.CSCAlignable::index(), and PrimitiveSelection::select_gem().

47  {
48  if (!isME0())
49  return getGEMDetId().station();
50  else
51  //return getME0DetId().station();
52  return 1; // use ME0 --> station 1 convention
53 }
int station() const
Station id : the station is the pair of chambers at same disk.
Definition: GEMDetId.h:64
bool isME0() const
Definition: EMTFGEMDetId.h:30
GEMDetId getGEMDetId() const
Definition: EMTFGEMDetId.h:32

Member Data Documentation

GEMDetId EMTFGEMDetId::gemDetId_
private

Definition at line 37 of file EMTFGEMDetId.h.

Referenced by getGEMDetId().

bool EMTFGEMDetId::isME0_
private

Definition at line 39 of file EMTFGEMDetId.h.

Referenced by isME0().

ME0DetId EMTFGEMDetId::me0DetId_
private

Definition at line 38 of file EMTFGEMDetId.h.

Referenced by getME0DetId().