ATLAS Offline Software
Loading...
Searching...
No Matches
InDetDD::TRT_EndcapCode Class Reference

bit definitions to decode TRT straws in endcap More...

#include <TRT_EndcapCode.h>

Collaboration diagram for InDetDD::TRT_EndcapCode:

Public Member Functions

 TRT_EndcapCode ()
 TRT_EndcapCode (unsigned int isPositive, unsigned int wheelIndex, unsigned int strawLayerIndex, unsigned int phiIndex)
 TRT_EndcapCode (const TRT_EndcapCode &right)
 ~TRT_EndcapCode ()=default
TRT_EndcapCodeoperator= (const TRT_EndcapCode &right)
bool operator< (const TRT_EndcapCode &right) const
bool operator> (const TRT_EndcapCode &right) const
bool operator== (const TRT_EndcapCode &right) const
bool operator!= (const TRT_EndcapCode &right) const
unsigned int isPosZ () const
unsigned int getWheelIndex () const
unsigned int getStrawLayerIndex () const
unsigned int getPhiIndex () const
unsigned int getKey () const
std::string getName () const

Private Attributes

unsigned short int m_key

Static Private Attributes

static const int Z_MASK = 0x00000001
static const int WHEEL_MASK = 0x0000001F
static const int STRAWLAYER_MASK = 0x0000001F
static const int PHIPOS_MASK = 0x0000001F
static const int Z_SHIFT = 0
static const int WHEEL_SHIFT = 1
static const int STRAWLAYER_SHIFT = 6
static const int PHIPOS_SHIFT = 11

Detailed Description

bit definitions to decode TRT straws in endcap

Definition at line 26 of file TRT_EndcapCode.h.

Constructor & Destructor Documentation

◆ TRT_EndcapCode() [1/3]

InDetDD::TRT_EndcapCode::TRT_EndcapCode ( )

Definition at line 27 of file TRT_EndcapCode.cxx.

28{
29 m_key = 0;
30}
unsigned short int m_key

◆ TRT_EndcapCode() [2/3]

InDetDD::TRT_EndcapCode::TRT_EndcapCode ( unsigned int isPositive,
unsigned int wheelIndex,
unsigned int strawLayerIndex,
unsigned int phiIndex )

◆ TRT_EndcapCode() [3/3]

InDetDD::TRT_EndcapCode::TRT_EndcapCode ( const TRT_EndcapCode & right)

Definition at line 41 of file TRT_EndcapCode.cxx.

42{
43 m_key = right.getKey();
44}

◆ ~TRT_EndcapCode()

InDetDD::TRT_EndcapCode::~TRT_EndcapCode ( )
default

Member Function Documentation

◆ getKey()

unsigned int InDetDD::TRT_EndcapCode::getKey ( ) const
inline

Definition at line 100 of file TRT_EndcapCode.h.

100 {
101 return m_key;
102 }

◆ getName()

std::string InDetDD::TRT_EndcapCode::getName ( ) const

Definition at line 62 of file TRT_EndcapCode.cxx.

62 {
63 std::ostringstream outputStream;
64 outputStream << this;
65 return outputStream.str();
66}

◆ getPhiIndex()

unsigned int InDetDD::TRT_EndcapCode::getPhiIndex ( ) const
inline

Definition at line 95 of file TRT_EndcapCode.h.

95 {
96 unsigned int ret = m_key;
97 return (ret >> PHIPOS_SHIFT) & PHIPOS_MASK;
98 }
static const int PHIPOS_SHIFT
static const int PHIPOS_MASK

◆ getStrawLayerIndex()

unsigned int InDetDD::TRT_EndcapCode::getStrawLayerIndex ( ) const
inline

Definition at line 90 of file TRT_EndcapCode.h.

90 {
91 unsigned int ret = m_key;
92 return (ret >> STRAWLAYER_SHIFT) & STRAWLAYER_MASK;
93 }
static const int STRAWLAYER_MASK
static const int STRAWLAYER_SHIFT

◆ getWheelIndex()

unsigned int InDetDD::TRT_EndcapCode::getWheelIndex ( ) const
inline

Definition at line 84 of file TRT_EndcapCode.h.

84 {
85 unsigned int ret = m_key;
86 return (ret >> WHEEL_SHIFT) & WHEEL_MASK;
87 }
static const int WHEEL_MASK
static const int WHEEL_SHIFT

◆ isPosZ()

unsigned int InDetDD::TRT_EndcapCode::isPosZ ( ) const
inline

Definition at line 79 of file TRT_EndcapCode.h.

79 {
80 unsigned int ret = m_key;
81 return (ret >> Z_SHIFT) & Z_MASK;
82 }
static const int Z_MASK
static const int Z_SHIFT

◆ operator!=()

bool InDetDD::TRT_EndcapCode::operator!= ( const TRT_EndcapCode & right) const
inline

Definition at line 110 of file TRT_EndcapCode.h.

111 {
112 return (getKey() != right.getKey());
113 }
unsigned int getKey() const

◆ operator<()

bool InDetDD::TRT_EndcapCode::operator< ( const TRT_EndcapCode & right) const
inline

Definition at line 115 of file TRT_EndcapCode.h.

116 {
117 return (getKey() < right.getKey());
118 }

◆ operator=()

TRT_EndcapCode & InDetDD::TRT_EndcapCode::operator= ( const TRT_EndcapCode & right)

Definition at line 52 of file TRT_EndcapCode.cxx.

53{
54 if (this != &right){
55 m_key = right.getKey();
56 }
57 return *this;
58}

◆ operator==()

bool InDetDD::TRT_EndcapCode::operator== ( const TRT_EndcapCode & right) const
inline

Definition at line 105 of file TRT_EndcapCode.h.

106 {
107 return (getKey() == right.getKey());
108 }

◆ operator>()

bool InDetDD::TRT_EndcapCode::operator> ( const TRT_EndcapCode & right) const
inline

Definition at line 120 of file TRT_EndcapCode.h.

121 {
122 return (getKey() > right.getKey());
123 }

Member Data Documentation

◆ m_key

unsigned short int InDetDD::TRT_EndcapCode::m_key
private

Definition at line 63 of file TRT_EndcapCode.h.

◆ PHIPOS_MASK

const int InDetDD::TRT_EndcapCode::PHIPOS_MASK = 0x0000001F
staticprivate

Definition at line 68 of file TRT_EndcapCode.h.

◆ PHIPOS_SHIFT

const int InDetDD::TRT_EndcapCode::PHIPOS_SHIFT = 11
staticprivate

Definition at line 73 of file TRT_EndcapCode.h.

◆ STRAWLAYER_MASK

const int InDetDD::TRT_EndcapCode::STRAWLAYER_MASK = 0x0000001F
staticprivate

Definition at line 67 of file TRT_EndcapCode.h.

◆ STRAWLAYER_SHIFT

const int InDetDD::TRT_EndcapCode::STRAWLAYER_SHIFT = 6
staticprivate

Definition at line 72 of file TRT_EndcapCode.h.

◆ WHEEL_MASK

const int InDetDD::TRT_EndcapCode::WHEEL_MASK = 0x0000001F
staticprivate

Definition at line 66 of file TRT_EndcapCode.h.

◆ WHEEL_SHIFT

const int InDetDD::TRT_EndcapCode::WHEEL_SHIFT = 1
staticprivate

Definition at line 71 of file TRT_EndcapCode.h.

◆ Z_MASK

const int InDetDD::TRT_EndcapCode::Z_MASK = 0x00000001
staticprivate

Definition at line 65 of file TRT_EndcapCode.h.

◆ Z_SHIFT

const int InDetDD::TRT_EndcapCode::Z_SHIFT = 0
staticprivate

Definition at line 70 of file TRT_EndcapCode.h.


The documentation for this class was generated from the following files: