CbmRoot
Loading...
Searching...
No Matches
CbmMuchAddress Class Reference

Interface class to unique address for the MUCH. More...

#include <CbmMuchAddress.h>

Inheritance diagram for CbmMuchAddress:
[legend]
Collaboration diagram for CbmMuchAddress:
[legend]

Static Public Member Functions

static uint32_t GetAddress (int32_t station=0, int32_t layer=0, int32_t side=0, int32_t module=0, int32_t sector=0, int32_t channel=0)
 
static uint32_t GetAddress (int32_t *elementIds)
 
static int32_t GetNofLevels ()
 
static int32_t GetNofBits (int32_t level)
 
static int32_t GetElementId (uint32_t address, int32_t level)
 
static int32_t GetSystemIndex (int32_t address)
 
static int32_t GetStationIndex (int32_t address)
 
static int32_t GetLayerIndex (int32_t address)
 
static int32_t GetLayerSideIndex (int32_t address)
 
static int32_t GetModuleIndex (int32_t address)
 
static int32_t GetSectorIndex (int32_t address)
 
static int32_t GetChannelIndex (int32_t address)
 
static int32_t GetElementAddress (int32_t address, int32_t level)
 
static void Print ()
 
static uint32_t SetElementId (uint32_t address, int32_t level, int32_t newId)
 
static int32_t GetNofSystemBits ()
 
static int32_t GetSystemId (uint32_t address)
 

Static Protected Attributes

static const int32_t fgkSystemBits = 4
 

Private Member Functions

 ClassDef (CbmMuchAddress, 1)
 

Static Private Attributes

static const int32_t fgkBits [kMuchNofLevels]
 
static const int32_t fgkShift [kMuchNofLevels]
 
static const int32_t fgkMask [kMuchNofLevels]
 

Detailed Description

Interface class to unique address for the MUCH.

Author
E.Kryshen e.kry.nosp@m.shen.nosp@m.@gsi..nosp@m.de
Version
1.0

Created as modification of CbmStsAddress class

The CbmMuchAddress interprets and modifies the unique address for the MUCH by the proper bit operation on the address bit field.

The current definition of the bit field for the MUCH is:

                                          3         2         1

Level Bits Max. Elements Shift 10987654321098765432109876543210
System (kMUCH) 4 16 0 0000000000000000000000000000xxxx
Station 3 8 4 0000000000000000000000000xxx0000
Layer 2 4 7 00000000000000000000000xx0000000
LayerSide 1 2 9 0000000000000000000000x000000000
Module 5 32 10 00000000000000000xxxxx0000000000
Sector 8 256 15 000000000xxxxxxxx000000000000000
Channel 9 512 23 xxxxxxxxx00000000000000000000000

Definition at line 55 of file CbmMuchAddress.h.

Member Function Documentation

◆ ClassDef()

CbmMuchAddress::ClassDef ( CbmMuchAddress ,
1  )
private

◆ GetAddress() [1/2]

uint32_t CbmMuchAddress::GetAddress ( int32_t * elementIds)
static

Definition at line 82 of file CbmMuchAddress.cxx.

References fgkBits, fgkShift, kMuch, kMuchNofLevels, kMuchSystem, and ToIntegralType().

◆ GetAddress() [2/2]

uint32_t CbmMuchAddress::GetAddress ( int32_t station = 0,
int32_t layer = 0,
int32_t side = 0,
int32_t module = 0,
int32_t sector = 0,
int32_t channel = 0 )
static

Construct address

Parameters
stationStation index
layerLayer index in station
sideSide index in layer
moduleModule index within layerside
sectorSector index within module
channelChannel number
Returns
Unique element address

Definition at line 44 of file CbmMuchAddress.cxx.

References fgkBits, fgkShift, kMuch, kMuchChannel, kMuchLayer, kMuchLayerSide, kMuchModule, kMuchSector, kMuchStation, kMuchSystem, and ToIntegralType().

Referenced by cbm::algo::much::ReadoutConfig::CreateMuchAddress(), CbmMuchUnpackAlgo::CreateMuchAddress(), CbmMcbm2018UnpackerAlgoMuch::CreateMuchDigi(), CbmMuchFindHitsGem::FindClusters(), and CbmMuch::GetDetId().

◆ GetChannelIndex()

static int32_t CbmMuchAddress::GetChannelIndex ( int32_t address)
inlinestatic

◆ GetElementAddress()

◆ GetElementId()

static int32_t CbmMuchAddress::GetElementId ( uint32_t address,
int32_t level )
inlinestatic

◆ GetLayerIndex()

◆ GetLayerSideIndex()

◆ GetModuleIndex()

◆ GetNofBits()

static int32_t CbmMuchAddress::GetNofBits ( int32_t level)
inlinestatic

Get the number of bits for a given hierarchy level

Parameters
levelRequested element level
Returns
Number of bits in address field

Definition at line 85 of file CbmMuchAddress.h.

References fgkBits, and kMuchNofLevels.

◆ GetNofLevels()

static int32_t CbmMuchAddress::GetNofLevels ( )
inlinestatic

Get the number of hierarchy levels For use in macros which do not include this header file.

Returns
Number of hierarchy levels

Definition at line 78 of file CbmMuchAddress.h.

References kMuchNofLevels.

◆ GetNofSystemBits()

static int32_t CbmAddress::GetNofSystemBits ( )
inlinestaticinherited

Number of bits for system Id in the address field

Returns
Number of bits

Definition at line 40 of file CbmAddress.h.

References CbmAddress::fgkSystemBits.

Referenced by TEST().

◆ GetSectorIndex()

static int32_t CbmMuchAddress::GetSectorIndex ( int32_t address)
inlinestatic

◆ GetStationIndex()

◆ GetSystemId()

static int32_t CbmAddress::GetSystemId ( uint32_t address)
inlinestaticinherited

Get the system Id from the address

Parameters
addressUnique address
Returns
systemId

Definition at line 47 of file CbmAddress.h.

References CbmAddress::fgkSystemBits.

Referenced by CbmRecoSts::ProcessData(), CbmRecoStsPixel::ProcessData(), and TEST().

◆ GetSystemIndex()

static int32_t CbmMuchAddress::GetSystemIndex ( int32_t address)
inlinestatic

Derivatives

Definition at line 104 of file CbmMuchAddress.h.

References GetElementId(), and kMuchSystem.

Referenced by CbmMuch::ProcessHits().

◆ Print()

void CbmMuchAddress::Print ( )
static

Print information on the bit field

Definition at line 101 of file CbmMuchAddress.cxx.

References fgkBits, fgkMask, and kMuchNofLevels.

◆ SetElementId()

uint32_t CbmMuchAddress::SetElementId ( uint32_t address,
int32_t level,
int32_t newId )
static

Set the index of an element leaving the other element levels untouched

Parameters
addressUnique element address
levelHierarchy level
newIdNew element index
Returns
New address

Definition at line 112 of file CbmMuchAddress.cxx.

References fgkBits, fgkMask, fgkShift, and kMuchNofLevels.

Referenced by CbmMuchSectorRadial::AddPads(), CbmMuchSectorRectangular::AddPads(), cbm::algo::much::ReadoutConfig::CreateMuchAddress(), and CbmMuchUnpackAlgo::CreateMuchAddress().

Member Data Documentation

◆ fgkBits

const int32_t CbmMuchAddress::fgkBits
staticprivate
Initial value:
3,
2,
1,
5,
8,
9}
static const int32_t fgkSystemBits
Definition CbmAddress.h:52

Number of bits for the different levels

Definition at line 16 of file CbmMuchAddress.h.

Referenced by GetAddress(), GetAddress(), GetElementAddress(), GetNofBits(), Print(), and SetElementId().

◆ fgkMask

const int32_t CbmMuchAddress::fgkMask
staticprivate
Initial value:
= {(1 << fgkBits[0]) - 1, (1 << fgkBits[1]) - 1, (1 << fgkBits[2]) - 1,
(1 << fgkBits[3]) - 1, (1 << fgkBits[4]) - 1, (1 << fgkBits[5]) - 1,
(1 << fgkBits[6]) - 1}
static const int32_t fgkBits[kMuchNofLevels]

Bit masks for the different levels

Definition at line 37 of file CbmMuchAddress.h.

Referenced by GetElementId(), Print(), and SetElementId().

◆ fgkShift

const int32_t CbmMuchAddress::fgkShift
staticprivate

◆ fgkSystemBits

const int32_t CbmAddress::fgkSystemBits = 4
staticprotectedinherited

Number of bits for system Id in the address field

Definition at line 52 of file CbmAddress.h.

Referenced by CbmAddress::GetNofSystemBits(), CbmAddress::GetSystemId(), and CbmTofAddress::GetUniqueAddress().


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