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

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

#include <TRT_BarrelCode.h>

Collaboration diagram for InDetDD::TRT_BarrelCode:

Public Types

enum  Module { MODULE_A = 0 , MODULE_B = 1 , MODULE_C = 2 }

Public Member Functions

 TRT_BarrelCode ()
 TRT_BarrelCode (unsigned int isPositive, unsigned int moduleIndex, unsigned phiIndex, unsigned int strawLayerIndex)
 TRT_BarrelCode (const TRT_BarrelCode &right)=default
TRT_BarrelCodeoperator= (const TRT_BarrelCode &right)=default
 TRT_BarrelCode (TRT_BarrelCode &&right)=default
TRT_BarrelCodeoperator= (TRT_BarrelCode &&right)=default
 ~TRT_BarrelCode ()=default
bool operator< (const TRT_BarrelCode &right) const
bool operator> (const TRT_BarrelCode &right) const
bool operator== (const TRT_BarrelCode &right) const
bool operator!= (const TRT_BarrelCode &right) const
unsigned int isPosZ () const
unsigned int getModuleIndex () const
unsigned int getPhiIndex () const
unsigned int getStrawLayerIndex () 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 MODULE_MASK = 0x00000003
static const int PHI_MASK = 0x0000001F
static const int STRAWLAYER_MASK = 0x0000001F
static const int Z_SHIFT = 0
static const int MODULE_SHIFT = 1
static const int PHI_SHIFT = 3
static const int STRAWLAYER_SHIFT = 8

Detailed Description

bit definitions to decode TRT straws in barrel

Definition at line 26 of file TRT_BarrelCode.h.

Member Enumeration Documentation

◆ Module

Enumerator
MODULE_A 
MODULE_B 
MODULE_C 

Definition at line 29 of file TRT_BarrelCode.h.

Constructor & Destructor Documentation

◆ TRT_BarrelCode() [1/4]

InDetDD::TRT_BarrelCode::TRT_BarrelCode ( )

Definition at line 27 of file TRT_BarrelCode.cxx.

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

◆ TRT_BarrelCode() [2/4]

InDetDD::TRT_BarrelCode::TRT_BarrelCode ( unsigned int isPositive,
unsigned int moduleIndex,
unsigned phiIndex,
unsigned int strawLayerIndex )

◆ TRT_BarrelCode() [3/4]

InDetDD::TRT_BarrelCode::TRT_BarrelCode ( const TRT_BarrelCode & right)
default

◆ TRT_BarrelCode() [4/4]

InDetDD::TRT_BarrelCode::TRT_BarrelCode ( TRT_BarrelCode && right)
default

◆ ~TRT_BarrelCode()

InDetDD::TRT_BarrelCode::~TRT_BarrelCode ( )
default

Member Function Documentation

◆ getKey()

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

Definition at line 103 of file TRT_BarrelCode.h.

103 {
104 return m_key;
105 }

◆ getModuleIndex()

unsigned int InDetDD::TRT_BarrelCode::getModuleIndex ( ) const
inline

Definition at line 88 of file TRT_BarrelCode.h.

88 {
89 unsigned int ret = m_key;
90 return (ret >> MODULE_SHIFT) & MODULE_MASK;
91 }
static const int MODULE_SHIFT
static const int MODULE_MASK

◆ getName()

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

Definition at line 41 of file TRT_BarrelCode.cxx.

41 {
42 std::ostringstream outputStream;
43 outputStream << this;
44 return outputStream.str();
45}

◆ getPhiIndex()

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

Definition at line 93 of file TRT_BarrelCode.h.

93 {
94 unsigned int ret = m_key;
95 return (ret >> PHI_SHIFT) & PHI_MASK;
96 }
static const int PHI_MASK
static const int PHI_SHIFT

◆ getStrawLayerIndex()

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

Definition at line 98 of file TRT_BarrelCode.h.

98 {
99 unsigned int ret = m_key;
100 return (ret >> STRAWLAYER_SHIFT) & STRAWLAYER_MASK;
101 }
static const int STRAWLAYER_SHIFT
static const int STRAWLAYER_MASK

◆ isPosZ()

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

Definition at line 83 of file TRT_BarrelCode.h.

83 {
84 unsigned int ret = m_key;
85 return (ret >> Z_SHIFT) & Z_MASK;
86 }
static const int Z_MASK
static const int Z_SHIFT

◆ operator!=()

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

Definition at line 113 of file TRT_BarrelCode.h.

114 {
115 return (getKey() != right.getKey());
116 }
unsigned int getKey() const

◆ operator<()

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

Definition at line 118 of file TRT_BarrelCode.h.

119 {
120 return (getKey() < right.getKey());
121 }

◆ operator=() [1/2]

TRT_BarrelCode & InDetDD::TRT_BarrelCode::operator= ( const TRT_BarrelCode & right)
default

◆ operator=() [2/2]

TRT_BarrelCode & InDetDD::TRT_BarrelCode::operator= ( TRT_BarrelCode && right)
default

◆ operator==()

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

Definition at line 108 of file TRT_BarrelCode.h.

109 {
110 return (getKey() == right.getKey());
111 }

◆ operator>()

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

Definition at line 123 of file TRT_BarrelCode.h.

124 {
125 return (getKey() > right.getKey());
126 }

Member Data Documentation

◆ m_key

unsigned short int InDetDD::TRT_BarrelCode::m_key
private

Definition at line 66 of file TRT_BarrelCode.h.

◆ MODULE_MASK

const int InDetDD::TRT_BarrelCode::MODULE_MASK = 0x00000003
staticprivate

Definition at line 69 of file TRT_BarrelCode.h.

◆ MODULE_SHIFT

const int InDetDD::TRT_BarrelCode::MODULE_SHIFT = 1
staticprivate

Definition at line 75 of file TRT_BarrelCode.h.

◆ PHI_MASK

const int InDetDD::TRT_BarrelCode::PHI_MASK = 0x0000001F
staticprivate

Definition at line 70 of file TRT_BarrelCode.h.

◆ PHI_SHIFT

const int InDetDD::TRT_BarrelCode::PHI_SHIFT = 3
staticprivate

Definition at line 76 of file TRT_BarrelCode.h.

◆ STRAWLAYER_MASK

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

Definition at line 71 of file TRT_BarrelCode.h.

◆ STRAWLAYER_SHIFT

const int InDetDD::TRT_BarrelCode::STRAWLAYER_SHIFT = 8
staticprivate

Definition at line 77 of file TRT_BarrelCode.h.

◆ Z_MASK

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

Definition at line 68 of file TRT_BarrelCode.h.

◆ Z_SHIFT

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

Definition at line 74 of file TRT_BarrelCode.h.


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