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

#include <CbmTofDetectorId_v21a.h>

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

Public Member Functions

 CbmTofDetectorId_v21a ()
 
 ~CbmTofDetectorId_v21a ()
 
CbmTofDetectorInfo GetDetectorInfo (const int32_t detectorId)
 
int32_t GetSystemId (int32_t detectorId)
 
int32_t GetSMType (const int32_t detectorId)
 
int32_t GetModuleType (const int32_t detectorId)
 
int32_t GetCounterType (const int32_t detectorId)
 
int32_t GetSModule (const int32_t detectorId)
 
int32_t GetModuleId (const int32_t detectorId)
 
int32_t GetCounter (const int32_t detectorId)
 
int32_t GetGap (const int32_t detectorId)
 
int32_t GetSide (const int32_t detectorId)
 
int32_t GetCell (const int32_t detectorId)
 
int32_t GetStrip (const int32_t detectorId)
 
int32_t GetRegion (const int32_t detectorId)
 
int32_t GetCellId (const int32_t detectorId)
 
int32_t SetDetectorInfo (const CbmTofDetectorInfo detectorInfo)
 

Private Attributes

int32_t result_array [array_length]
 
int32_t maskarray [array_length]
 
int32_t modulemask
 

Static Private Attributes

static const int32_t array_length = 7
 
static const int32_t shiftarray [] = {0, 4, 11, 15, 21, 22, 28}
 
static const int32_t bitarray [] = {4, 7, 4, 6, 1, 6, 4}
 

Detailed Description

CbmTofDetectorId.h Defines unique detector identifier for all TOF modules. This class is the implementation for tof geometry version v21a nh, 28.07.2021 add counter type nh, 11.03.2014 PAL, 23.09.2015: make the class common to both v14 and v15 geometries Field 4 used as Side index (or fake Gap index in digitizer) Naming as in TDR: SM -> Module, Module -> Counter, Cell -> Strip All classes which uses this scheme should have a data member of this class

Author
F. Uhlig f.uhl.nosp@m.ig@g.nosp@m.si.de Current definition: 10987654321098765432109876543210 System ID (kTOF=6) on bits 0-3 00000000000000000000000000001111 15 Module ID on bits 4-10 00000000000000000000011111110000 <<4 127 Module Type on bits 11-14 00000000000000000111100000000000 <<11 15 Counter ID on bits 15-20 00000000000111111000000000000000 <<15 63 Side/Gap NR on bits 21-21 00000000001000000000000000000000 <<21 1 Strip ID on bits 22-27 00001111110000000000000000000000 <<22 255 Counter Type on bits 28 - 31 11110000000000000000000000000000 <<28 15

Definition at line 41 of file CbmTofDetectorId_v21a.h.

Constructor & Destructor Documentation

◆ CbmTofDetectorId_v21a()

CbmTofDetectorId_v21a::CbmTofDetectorId_v21a ( )

Constructor

Definition at line 22 of file CbmTofDetectorId_v21a.cxx.

References array_length, bitarray, maskarray, modulemask, and shiftarray.

◆ ~CbmTofDetectorId_v21a()

CbmTofDetectorId_v21a::~CbmTofDetectorId_v21a ( )
inline

Destructor

Definition at line 48 of file CbmTofDetectorId_v21a.h.

Member Function Documentation

◆ GetCell()

int32_t CbmTofDetectorId_v21a::GetCell ( const int32_t detectorId)
virtual

Get cell number from detector ID

Implements CbmTofDetectorId.

Definition at line 86 of file CbmTofDetectorId_v21a.cxx.

References maskarray, and shiftarray.

Referenced by GetStrip().

◆ GetCellId()

int32_t CbmTofDetectorId_v21a::GetCellId ( const int32_t detectorId)
virtual

Get full cell number from detector ID. This is masking the the gap number if this is set.

Implements CbmTofDetectorId.

Definition at line 97 of file CbmTofDetectorId_v21a.cxx.

References modulemask.

◆ GetCounter()

int32_t CbmTofDetectorId_v21a::GetCounter ( const int32_t detectorId)
virtual

Get counter ID from detector ID

Implements CbmTofDetectorId.

Definition at line 71 of file CbmTofDetectorId_v21a.cxx.

References maskarray, and shiftarray.

◆ GetCounterType()

int32_t CbmTofDetectorId_v21a::GetCounterType ( const int32_t detectorId)

Definition at line 56 of file CbmTofDetectorId_v21a.cxx.

References maskarray, and shiftarray.

◆ GetDetectorInfo()

CbmTofDetectorInfo CbmTofDetectorId_v21a::GetDetectorInfo ( const int32_t detectorId)
virtual

Get complete system info from detector ID This will return a pointer to an integer array of length array_length

Implements CbmTofDetectorId.

Definition at line 37 of file CbmTofDetectorId_v21a.cxx.

References array_length, maskarray, result_array, and shiftarray.

◆ GetGap()

int32_t CbmTofDetectorId_v21a::GetGap ( const int32_t detectorId)
virtual

Get sector number from detector ID

Implements CbmTofDetectorId.

Definition at line 82 of file CbmTofDetectorId_v21a.cxx.

References GetSide().

◆ GetModuleId()

int32_t CbmTofDetectorId_v21a::GetModuleId ( const int32_t detectorId)

Definition at line 67 of file CbmTofDetectorId_v21a.cxx.

References GetSModule().

◆ GetModuleType()

int32_t CbmTofDetectorId_v21a::GetModuleType ( const int32_t detectorId)

Definition at line 55 of file CbmTofDetectorId_v21a.cxx.

References GetSMType().

◆ GetRegion()

int32_t CbmTofDetectorId_v21a::GetRegion ( const int32_t detectorId)
virtual

Get region number from detector ID

Implements CbmTofDetectorId.

Definition at line 95 of file CbmTofDetectorId_v21a.cxx.

◆ GetSide()

int32_t CbmTofDetectorId_v21a::GetSide ( const int32_t detectorId)

Get sector number from detector ID

Definition at line 78 of file CbmTofDetectorId_v21a.cxx.

References maskarray, and shiftarray.

Referenced by GetGap().

◆ GetSModule()

int32_t CbmTofDetectorId_v21a::GetSModule ( const int32_t detectorId)
virtual

Get Module ID from detector ID

Implements CbmTofDetectorId.

Definition at line 63 of file CbmTofDetectorId_v21a.cxx.

References maskarray, and shiftarray.

Referenced by GetModuleId().

◆ GetSMType()

int32_t CbmTofDetectorId_v21a::GetSMType ( const int32_t detectorId)
virtual

Get Module Type from detector ID

Implements CbmTofDetectorId.

Definition at line 51 of file CbmTofDetectorId_v21a.cxx.

References maskarray, and shiftarray.

Referenced by GetModuleType().

◆ GetStrip()

int32_t CbmTofDetectorId_v21a::GetStrip ( const int32_t detectorId)

Get Strip ID from detector ID

Definition at line 91 of file CbmTofDetectorId_v21a.cxx.

References GetCell().

◆ GetSystemId()

int32_t CbmTofDetectorId_v21a::GetSystemId ( int32_t detectorId)
virtual

Get the global sytem ID

Implements CbmTofDetectorId.

Definition at line 47 of file CbmTofDetectorId_v21a.cxx.

References maskarray.

◆ SetDetectorInfo()

int32_t CbmTofDetectorId_v21a::SetDetectorInfo ( const CbmTofDetectorInfo detectorInfo)
virtual

Calculate the unique detector ID This will return a pointer to an integer array of length array_length

Implements CbmTofDetectorId.

Definition at line 101 of file CbmTofDetectorId_v21a.cxx.

References CbmTofDetectorInfo::fCell, CbmTofDetectorInfo::fCounter, CbmTofDetectorInfo::fCounterType, CbmTofDetectorInfo::fDetectorSystem, CbmTofDetectorInfo::fGap, CbmTofDetectorInfo::fSModule, and CbmTofDetectorInfo::fSMtype.

Member Data Documentation

◆ array_length

const int32_t CbmTofDetectorId_v21a::array_length = 7
staticprivate

Definition at line 98 of file CbmTofDetectorId_v21a.h.

Referenced by CbmTofDetectorId_v21a(), and GetDetectorInfo().

◆ bitarray

const int32_t CbmTofDetectorId_v21a::bitarray = {4, 7, 4, 6, 1, 6, 4}
staticprivate

Definition at line 19 of file CbmTofDetectorId_v21a.h.

Referenced by CbmTofDetectorId_v21a().

◆ maskarray

int32_t CbmTofDetectorId_v21a::maskarray[array_length]
private

◆ modulemask

int32_t CbmTofDetectorId_v21a::modulemask
private

Definition at line 103 of file CbmTofDetectorId_v21a.h.

Referenced by CbmTofDetectorId_v21a(), and GetCellId().

◆ result_array

int32_t CbmTofDetectorId_v21a::result_array[array_length]
private

Definition at line 101 of file CbmTofDetectorId_v21a.h.

Referenced by GetDetectorInfo().

◆ shiftarray

const int32_t CbmTofDetectorId_v21a::shiftarray = {0, 4, 11, 15, 21, 22, 28}
staticprivate

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