ATLAS Offline Software
Loading...
Searching...
No Matches
MdtTubeInChamberHashTable Class Reference

class for making an MDT tube hash within one chamber. More...

#include <MdtTubeInChamberHashTable.h>

Collaboration diagram for MdtTubeInChamberHashTable:

Public Member Functions

 MdtTubeInChamberHashTable (const MdtTubeInChamberHashTableType *type, const MdtChamberId &chamberId)
 constructor
 MdtTubeInChamberHashTable (const MdtTubeInChamberHashTableType *type, const MdtChamberId &chamberId, unsigned int globalHashOffset)
 constructor
void clear ()
 Clear the hashtable.
void setGlobalHashOffset (unsigned int offset)
 Set global hash offset to offset.
MdtChamberId chamberId () const
 Return the chamber identifier.
unsigned int nMultilayers () const
 Return the number of multilayers in the chamber.
unsigned int nLayers () const
 Return the number of layers per multilayer.
unsigned int nTubes () const
 Return the number of tubes per layer.
unsigned int nTotalTubes () const
 Return the total number of tubes in the chamber.
MdtTubeHash localHash (const MdtTubeId &id) const
 Return the hash-within-chamber from 0 to numberOfTubes()-1.
MdtTubeHash globalHash (const MdtTubeId &id) const
 Return the global tube hash.
unsigned int localHashMax () const
 Returns the maximum local hash value plus 1.
unsigned int globalHashMin () const
 Return minimum global hash for this chamber.
unsigned int globalHashMax () const
 Return maximum global hash plus 1 for this chamber.
MdtTubeId tubeIdFromLocalHash (const MdtTubeHash &localHash) const
 Get (full) tube identifier from local hash.
MdtTubeId tubeIdFromGlobalHash (const MdtTubeHash &globalHash) const
 Get (full) tube identifier from global hash.

Private Attributes

const MdtTubeInChamberHashTableTypem_localHashTable
MdtChamberId m_chamberId
unsigned int m_globalHashOffset

Detailed Description

class for making an MDT tube hash within one chamber.

Definition at line 27 of file MdtTubeInChamberHashTable.h.

Constructor & Destructor Documentation

◆ MdtTubeInChamberHashTable() [1/2]

MdtTubeInChamberHashTable::MdtTubeInChamberHashTable ( const MdtTubeInChamberHashTableType * type,
const MdtChamberId & chamberId )
inline

constructor

Definition at line 71 of file MdtTubeInChamberHashTable.h.

74{}
const MdtTubeInChamberHashTableType * m_localHashTable

◆ MdtTubeInChamberHashTable() [2/2]

MdtTubeInChamberHashTable::MdtTubeInChamberHashTable ( const MdtTubeInChamberHashTableType * type,
const MdtChamberId & chamberId,
unsigned int globalHashOffset )
inline

constructor

Definition at line 76 of file MdtTubeInChamberHashTable.h.

79{}

Member Function Documentation

◆ chamberId()

MdtChamberId MdtTubeInChamberHashTable::chamberId ( ) const
inline

Return the chamber identifier.

Definition at line 81 of file MdtTubeInChamberHashTable.h.

81 {
82 return m_chamberId;
83}

◆ clear()

void MdtTubeInChamberHashTable::clear ( )

Clear the hashtable.

◆ globalHash()

MdtTubeHash MdtTubeInChamberHashTable::globalHash ( const MdtTubeId & id) const
inline

Return the global tube hash.

Meaning depends on context.

Definition at line 118 of file MdtTubeInChamberHashTable.h.

118 {
119 return MdtTubeHash( m_globalHashOffset + localHash( id ) );
120}
MdtTubeHash localHash(const MdtTubeId &id) const
Return the hash-within-chamber from 0 to numberOfTubes()-1.

◆ globalHashMax()

unsigned int MdtTubeInChamberHashTable::globalHashMax ( ) const
inline

Return maximum global hash plus 1 for this chamber.

It is equal to the global hash offset plus localHashMax()

Definition at line 97 of file MdtTubeInChamberHashTable.h.

97 {
99}
unsigned int localHashMax() const
Returns the maximum local hash value plus 1.

◆ globalHashMin()

unsigned int MdtTubeInChamberHashTable::globalHashMin ( ) const
inline

Return minimum global hash for this chamber.

It is equal to the global hash offset of this chamber.

Definition at line 93 of file MdtTubeInChamberHashTable.h.

93 {
94 return m_globalHashOffset;
95}

◆ localHash()

MdtTubeHash MdtTubeInChamberHashTable::localHash ( const MdtTubeId & id) const
inline

Return the hash-within-chamber from 0 to numberOfTubes()-1.

Definition at line 89 of file MdtTubeInChamberHashTable.h.

89 {
90 return m_localHashTable->getHash( id );
91}

◆ localHashMax()

unsigned int MdtTubeInChamberHashTable::localHashMax ( ) const
inline

Returns the maximum local hash value plus 1.

The minimum local hash value is zero.

Definition at line 85 of file MdtTubeInChamberHashTable.h.

85 {
86 return m_localHashTable->size();
87}

◆ nLayers()

unsigned int MdtTubeInChamberHashTable::nLayers ( ) const
inline

Return the number of layers per multilayer.

Definition at line 105 of file MdtTubeInChamberHashTable.h.

105 {
106 return m_localHashTable->nLayers();
107}

◆ nMultilayers()

unsigned int MdtTubeInChamberHashTable::nMultilayers ( ) const
inline

Return the number of multilayers in the chamber.

Definition at line 101 of file MdtTubeInChamberHashTable.h.

101 {
102 return m_localHashTable->nMultilayers();
103}

◆ nTotalTubes()

unsigned int MdtTubeInChamberHashTable::nTotalTubes ( ) const
inline

Return the total number of tubes in the chamber.

Definition at line 113 of file MdtTubeInChamberHashTable.h.

113 {
114 return m_localHashTable->nTotalTubes();
115}

◆ nTubes()

unsigned int MdtTubeInChamberHashTable::nTubes ( ) const
inline

Return the number of tubes per layer.

Definition at line 109 of file MdtTubeInChamberHashTable.h.

109 {
110 return m_localHashTable->nTubes();
111}

◆ setGlobalHashOffset()

void MdtTubeInChamberHashTable::setGlobalHashOffset ( unsigned int offset)

Set global hash offset to offset.

◆ tubeIdFromGlobalHash()

MdtTubeId MdtTubeInChamberHashTable::tubeIdFromGlobalHash ( const MdtTubeHash & globalHash) const
inline

Get (full) tube identifier from global hash.

Definition at line 128 of file MdtTubeInChamberHashTable.h.

128 {
129 return tubeIdFromLocalHash( MdtTubeHash( globHash - globalHashMin() ) );
130}
MdtTubeId tubeIdFromLocalHash(const MdtTubeHash &localHash) const
Get (full) tube identifier from local hash.
unsigned int globalHashMin() const
Return minimum global hash for this chamber.

◆ tubeIdFromLocalHash()

MdtTubeId MdtTubeInChamberHashTable::tubeIdFromLocalHash ( const MdtTubeHash & localHash) const
inline

Get (full) tube identifier from local hash.

Definition at line 123 of file MdtTubeInChamberHashTable.h.

123 {
124 return MdtTubeId( m_chamberId, m_localHashTable->getIdentifier( locHash ) );
125}

Member Data Documentation

◆ m_chamberId

MdtChamberId MdtTubeInChamberHashTable::m_chamberId
private

Definition at line 67 of file MdtTubeInChamberHashTable.h.

◆ m_globalHashOffset

unsigned int MdtTubeInChamberHashTable::m_globalHashOffset
private

Definition at line 68 of file MdtTubeInChamberHashTable.h.

◆ m_localHashTable

const MdtTubeInChamberHashTableType* MdtTubeInChamberHashTable::m_localHashTable
private

Definition at line 66 of file MdtTubeInChamberHashTable.h.


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