CbmRoot
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 UInt_t GetAddress (Int_t station=0, Int_t layer=0, Int_t side=0, Int_t module=0, Int_t sector=0, Int_t channel=0)
 
static UInt_t GetAddress (Int_t *elementIds)
 
static Int_t GetNofLevels ()
 
static Int_t GetNofBits (Int_t level)
 
static Int_t GetElementId (UInt_t address, Int_t level)
 
static Int_t GetSystemIndex (Int_t address)
 
static Int_t GetStationIndex (Int_t address)
 
static Int_t GetLayerIndex (Int_t address)
 
static Int_t GetLayerSideIndex (Int_t address)
 
static Int_t GetModuleIndex (Int_t address)
 
static Int_t GetSectorIndex (Int_t address)
 
static Int_t GetChannelIndex (Int_t address)
 
static Int_t GetElementAddress (Int_t address, Int_t level)
 
static void Print ()
 
static UInt_t SetElementId (UInt_t address, Int_t level, Int_t newId)
 
static Int_t GetNofSystemBits ()
 
static Int_t GetSystemId (UInt_t address)
 

Static Protected Attributes

static const Int_t fgkSystemBits = 4
 

Private Member Functions

 ClassDef (CbmMuchAddress, 1)
 

Static Private Attributes

static const Int_t fgkBits [kMuchNofLevels]
 
static const Int_t fgkShift [kMuchNofLevels]
 
static const Int_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 49 of file CbmMuchAddress.h.

Member Function Documentation

◆ ClassDef()

CbmMuchAddress::ClassDef ( CbmMuchAddress  ,
 
)
private

◆ GetAddress() [1/2]

UInt_t CbmMuchAddress::GetAddress ( Int_t *  elementIds)
static

Definition at line 92 of file CbmMuchAddress.cxx.

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

◆ GetAddress() [2/2]

UInt_t CbmMuchAddress::GetAddress ( Int_t  station = 0,
Int_t  layer = 0,
Int_t  side = 0,
Int_t  module = 0,
Int_t  sector = 0,
Int_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 43 of file CbmMuchAddress.cxx.

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

Referenced by CbmMcbm2018UnpackerAlgoMuch::CreateMuchDigi(), CbmMuchFindHitsGem::FindClusters(), and CbmMuch::GetDetId().

◆ GetChannelIndex()

static Int_t CbmMuchAddress::GetChannelIndex ( Int_t  address)
inlinestatic

Definition at line 118 of file CbmMuchAddress.h.

References GetElementId(), and kMuchChannel.

Referenced by CbmMuchModuleGem::GetPad(), and CbmMuchDigitizeGem::ReadAndRegister().

◆ GetElementAddress()

◆ GetElementId()

static Int_t CbmMuchAddress::GetElementId ( UInt_t  address,
Int_t  level 
)
inlinestatic

◆ GetLayerIndex()

◆ GetLayerSideIndex()

◆ GetModuleIndex()

◆ GetNofBits()

static Int_t CbmMuchAddress::GetNofBits ( Int_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 83 of file CbmMuchAddress.h.

References fgkBits, and kMuchNofLevels.

◆ GetNofLevels()

static Int_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 76 of file CbmMuchAddress.h.

References kMuchNofLevels.

◆ GetNofSystemBits()

static Int_t CbmAddress::GetNofSystemBits ( )
inlinestaticinherited

Number of bits for system Id in the address field

Returns
Number of bits

Definition at line 36 of file CbmAddress.h.

References CbmAddress::fgkSystemBits.

Referenced by TEST().

◆ GetSectorIndex()

static Int_t CbmMuchAddress::GetSectorIndex ( Int_t  address)
inlinestatic

◆ GetStationIndex()

static Int_t CbmMuchAddress::GetStationIndex ( Int_t  address)
inlinestatic

Definition at line 103 of file CbmMuchAddress.h.

References GetElementId(), and kMuchStation.

Referenced by CbmMuchLayer::CbmMuchLayer(), CbmMuchDigitizeGem::ConvertSignalToDigi(), CbmMuchHitFinderQa::DigitizerQa(), CbmMuchDigitizerQa::DigitizerQa(), CbmMuchHitFinderQa::Exec(), CbmMuchSegmentAuto::Exec(), CbmMuchTransportQa::Exec(), CbmMuchDigitizerQa::FillTotalPadsHistos(), CbmMuchFindHitsGem::FindClusters(), CbmMuch::GetDetId(), CbmMuchGeoScheme::GetGemModules(), CbmMuchFindVectors::GetHits(), CbmMuchFindVectorsGem::GetHits(), CbmMuchGeoScheme::GetModules(), CbmMuchSector::GetPadByChannelIndex(), CbmMuchSegmentManual::GetPadMaxSize(), CbmMuchSegmentManual::GetRegionIndex(), CbmMuchSegmentManual::GetSectorMaxSize(), CbmMuchGeoScheme::GetStationByDetId(), CbmMuchHitFinderQa::Init(), CbmMuchMergeVectorsQA::Init(), CbmMuchFindVectorsQA::Init(), CbmMuchMergeVectors::Init(), CbmMuchFindVectors::Init(), CbmMuchFindVectorsGem::Init(), CbmMuchGeoScheme::InitModules(), CbmMuchSegmentManual::IsIncompleteSector(), CbmMuchHitFinderQa::OccupancyQa(), CbmMuchDigitizerQa::OccupancyQa(), CbmMuchDigitizerQa::PrintFrontLayerDigis(), CbmMuchDigitizerQa::PrintFrontLayerPoints(), CbmMuch::ProcessHits(), CbmMuchHitFinderQa::PullsQa(), CbmMuchSegmentSector::SegmentModule(), CbmMuchSegmentManual::SegmentModule(), CbmMuchSegmentAuto::SegmentSector(), CbmMuchSegmentManual::SegmentSector(), CbmMuchSegmentManual::ShouldSegment(), CbmMuchSegmentAuto::ShouldSegmentByX(), CbmMuchSegmentAuto::ShouldSegmentByY(), and CbmMuchHitFinderQa::StatisticsQa().

◆ GetSystemId()

static Int_t CbmAddress::GetSystemId ( UInt_t  address)
inlinestaticinherited

Get the system Id from the address

Parameters
addressUnique address
Returns
systemId

Definition at line 43 of file CbmAddress.h.

References CbmAddress::fgkSystemBits.

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

◆ GetSystemIndex()

static Int_t CbmMuchAddress::GetSystemIndex ( Int_t  address)
inlinestatic

Derivatives

Definition at line 100 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 110 of file CbmMuchAddress.cxx.

References fgkBits, fgkMask, and kMuchNofLevels.

◆ SetElementId()

static UInt_t CbmMuchAddress::SetElementId ( UInt_t  address,
Int_t  level,
Int_t  newId 
)
inlinestatic

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 140 of file CbmMuchAddress.h.

References fgkBits, fgkMask, fgkShift, and kMuchNofLevels.

Referenced by CbmMuchSectorRadial::AddPads(), and CbmMuchSectorRectangular::AddPads().

Member Data Documentation

◆ fgkBits

const Int_t CbmMuchAddress::fgkBits
staticprivate
Initial value:
3,
2,
1,
5,
8,
9}

Number of bits for the different levels

Definition at line 153 of file CbmMuchAddress.h.

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

◆ fgkMask

const Int_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}

Bit masks for the different levels

Definition at line 159 of file CbmMuchAddress.h.

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

◆ fgkShift

◆ fgkSystemBits

const Int_t CbmAddress::fgkSystemBits = 4
staticprotectedinherited

Number of bits for system Id in the address field

Definition at line 50 of file CbmAddress.h.

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


The documentation for this class was generated from the following files:
CbmAddress::fgkSystemBits
static const Int_t fgkSystemBits
Definition: CbmAddress.h:50
CbmMuchAddress::fgkShift
static const Int_t fgkShift[kMuchNofLevels]
Definition: CbmMuchAddress.h:156
CbmMuchAddress::fgkBits
static const Int_t fgkBits[kMuchNofLevels]
Definition: CbmMuchAddress.h:153