ATLAS Offline Software
Public Types | Public Member Functions | Private Attributes | Static Private Attributes | List of all members
InDetDD::TRT_BarrelCode Class Reference

#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.

30  {
31  MODULE_A = 0,
32  MODULE_B = 1,
33  MODULE_C = 2
34  } Module;

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 }

◆ 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  }

◆ 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  }

◆ 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  }

◆ 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  }

◆ 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  }

◆ 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:
InDetDD::TRT_BarrelCode::STRAWLAYER_SHIFT
static const int STRAWLAYER_SHIFT
Definition: TRT_BarrelCode.h:77
InDetDD::TRT_BarrelCode::PHI_SHIFT
static const int PHI_SHIFT
Definition: TRT_BarrelCode.h:76
InDetDD::TRT_BarrelCode::Module
Module
Definition: TRT_BarrelCode.h:30
InDetDD::TRT_BarrelCode::m_key
unsigned short int m_key
Definition: TRT_BarrelCode.h:66
RunGeantinoStepRecordingITk.outputStream
outputStream
Definition: RunGeantinoStepRecordingITk.py:126
InDetDD::TRT_BarrelCode::MODULE_A
@ MODULE_A
Definition: TRT_BarrelCode.h:31
InDetDD::TRT_BarrelCode::MODULE_SHIFT
static const int MODULE_SHIFT
Definition: TRT_BarrelCode.h:75
InDetDD::TRT_BarrelCode::PHI_MASK
static const int PHI_MASK
Definition: TRT_BarrelCode.h:70
InDetDD::TRT_BarrelCode::MODULE_C
@ MODULE_C
Definition: TRT_BarrelCode.h:33
InDetDD::TRT_BarrelCode::STRAWLAYER_MASK
static const int STRAWLAYER_MASK
Definition: TRT_BarrelCode.h:71
InDetDD::TRT_BarrelCode::MODULE_B
@ MODULE_B
Definition: TRT_BarrelCode.h:32
InDetDD::TRT_BarrelCode::Z_SHIFT
static const int Z_SHIFT
Definition: TRT_BarrelCode.h:74
InDetDD::TRT_BarrelCode::Z_MASK
static const int Z_MASK
Definition: TRT_BarrelCode.h:68
InDetDD::TRT_BarrelCode::MODULE_MASK
static const int MODULE_MASK
Definition: TRT_BarrelCode.h:69
InDetDD::TRT_BarrelCode::getKey
unsigned int getKey() const
Definition: TRT_BarrelCode.h:103