ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
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 More...
 
 MdtTubeInChamberHashTable (const MdtTubeInChamberHashTableType *type, const MdtChamberId &chamberId, unsigned int globalHashOffset)
 constructor More...
 
void clear ()
 Clear the hashtable. More...
 
void setGlobalHashOffset (unsigned int offset)
 Set global hash offset to offset. More...
 
MdtChamberId chamberId () const
 Return the chamber identifier. More...
 
unsigned int nMultilayers () const
 Return the number of multilayers in the chamber. More...
 
unsigned int nLayers () const
 Return the number of layers per multilayer. More...
 
unsigned int nTubes () const
 Return the number of tubes per layer. More...
 
unsigned int nTotalTubes () const
 Return the total number of tubes in the chamber. More...
 
MdtTubeHash localHash (const MdtTubeId &id) const
 Return the hash-within-chamber from 0 to numberOfTubes()-1. More...
 
MdtTubeHash globalHash (const MdtTubeId &id) const
 Return the global tube hash. More...
 
unsigned int localHashMax () const
 Returns the maximum local hash value plus 1. More...
 
unsigned int globalHashMin () const
 Return minimum global hash for this chamber. More...
 
unsigned int globalHashMax () const
 Return maximum global hash plus 1 for this chamber. More...
 
MdtTubeId tubeIdFromLocalHash (const MdtTubeHash &localHash) const
 Get (full) tube identifier from local hash. More...
 
MdtTubeId tubeIdFromGlobalHash (const MdtTubeHash &globalHash) const
 Get (full) tube identifier from global hash. More...
 

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.

◆ MdtTubeInChamberHashTable() [2/2]

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

constructor

Definition at line 76 of file MdtTubeInChamberHashTable.h.

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 }

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

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

◆ 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 74 of file MdtTubeInChamberHashTable.h.

◆ m_globalHashOffset

unsigned int MdtTubeInChamberHashTable::m_globalHashOffset
private

Definition at line 75 of file MdtTubeInChamberHashTable.h.

◆ m_localHashTable

const MdtTubeInChamberHashTableType* MdtTubeInChamberHashTable::m_localHashTable
private

Definition at line 73 of file MdtTubeInChamberHashTable.h.


The documentation for this class was generated from the following file:
IdentifierHashCalc::getHash
HashType getHash(const IdType &id) const
Get hash from 0 to size()-1.
MdtTubeInChamberHashTable::m_globalHashOffset
unsigned int m_globalHashOffset
Definition: MdtTubeInChamberHashTable.h:75
MdtTubeInChamberHashTable::tubeIdFromLocalHash
MdtTubeId tubeIdFromLocalHash(const MdtTubeHash &localHash) const
Get (full) tube identifier from local hash.
Definition: MdtTubeInChamberHashTable.h:123
MdtTubeInChamberHashTable::m_localHashTable
const MdtTubeInChamberHashTableType * m_localHashTable
Definition: MdtTubeInChamberHashTable.h:73
MdtTubeInChamberHashTableType::nTubes
unsigned int nTubes() const
Return the number of tubes per layer.
Definition: MdtTubeInChamberHashTableType.h:85
MdtTubeInChamberHashTableType::nTotalTubes
unsigned int nTotalTubes() const
Return the total number of tubes in the chamber.
Definition: MdtTubeInChamberHashTableType.h:89
MdtTubeInChamberHashTable::globalHashMin
unsigned int globalHashMin() const
Return minimum global hash for this chamber.
Definition: MdtTubeInChamberHashTable.h:93
MdtTubeInChamberHashTable::localHashMax
unsigned int localHashMax() const
Returns the maximum local hash value plus 1.
Definition: MdtTubeInChamberHashTable.h:85
MdtTubeInChamberHashTableType::nLayers
unsigned int nLayers() const
Return the number of layers per multilayer.
Definition: MdtTubeInChamberHashTableType.h:81
MdtTubeInChamberHashTable::localHash
MdtTubeHash localHash(const MdtTubeId &id) const
Return the hash-within-chamber from 0 to numberOfTubes()-1.
Definition: MdtTubeInChamberHashTable.h:89
MdtTubeInChamberHashTable::m_chamberId
MdtChamberId m_chamberId
Definition: MdtTubeInChamberHashTable.h:74
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
MdtTubeInChamberHashTableType::nMultilayers
unsigned int nMultilayers() const
Return the number of multilayers in the chamber.
Definition: MdtTubeInChamberHashTableType.h:68
convertTimingResiduals.offset
offset
Definition: convertTimingResiduals.py:71
IdentifierHashCalc::size
unsigned int size() const
Number of hashes in the table.
IdentifierHashCalc::getIdentifier
IdType getIdentifier(const HashType &idHash) const
Get identifier from hash.