CbmRoot
CbmTofAddress Class Reference

CBM ToF interface class to the unique address. More...

#include <CbmTofAddress.h>

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

Public Member Functions

 CbmTofAddress ()
 
virtual ~CbmTofAddress ()
 

Static Public Member Functions

static Int_t GetNofSmIdBits ()
 
static Int_t GetNofSmTypeBits ()
 
static Int_t GetNofRpcIdBits ()
 
static Int_t GetNofChannelIdBits ()
 
static Int_t GetNofChSideBits ()
 
static Int_t GetSmId (UInt_t address)
 
static Int_t GetSmType (UInt_t address)
 
static Int_t GetRpcId (UInt_t address)
 
static Int_t GetChannelId (UInt_t address)
 
static Int_t GetChannelSide (UInt_t address)
 
static Int_t GetModFullId (UInt_t address)
 
static UInt_t GetUniqueAddress (UInt_t Sm, UInt_t Rpc, UInt_t Channel, UInt_t Side=0, UInt_t SmType=0)
 
static Bool_t SameModule (UInt_t addressA, UInt_t addressB)
 
static UInt_t ConvertCbmTofDetectorInfo (CbmTofDetectorInfo infoInput)
 
static UInt_t ConvertCbmTofDetectorId (Int_t detIdInput)
 
static Int_t GetNofSystemBits ()
 
static Int_t GetSystemId (UInt_t address)
 

Static Protected Attributes

static const Int_t fgkSystemBits = 4
 

Static Private Attributes

static const Int_t fgkSmIdBits = 8
 
static const Int_t fgkSmTypeBits = 4
 
static const Int_t fgkRpcIdBits = 7
 
static const Int_t fgkChannelSideBits = 1
 
static const Int_t fgkChannelIdBits = 8
 
static const Int_t fgkSmIdOffset = CbmAddress::fgkSystemBits
 
static const Int_t fgkSmTypeOffset
 
static const Int_t fgkChannelSideOffset
 
static const Int_t fgkRpcIdOffset
 
static const Int_t fgkChannelIdOffset
 
static const Int_t fgkiModFullIdMask
 

Detailed Description

CBM ToF interface class to the unique address.

Author
Pierre-Alain Loizeau loize.nosp@m.au@p.nosp@m.hysi..nosp@m.uni-.nosp@m.heide.nosp@m.lber.nosp@m.g.de
Version
1.0

CbmTofAddress is the class for the concrete interfaces to the unique address, which is encoded in a 32-bit field (Int_t), for the ToF detector elements. Difference to CbmTofDetectorId is that this class is adapted to real data instead of simulated data => no Gap info but instead info on strip side. Conversion functions are provided for now, but version dependent! 3 2 1 0 Shift Bits Values Current definition: 10987654321098765432109876543210 System ID (kTof=6) on bits 0- 3 00000000000000000000000000001111 << 0 4 15 Super Module (SM) on bits 4-11 00000000000000000000111111110000 << 4 8 256 SM Type on bits 12-14 00000000000000001111000000000000 <<12 4 15 RPC ID on bits 16-22 00000000011111110000000000000000 <<16 7 128 Channel Side on bits 23-23 00000000100000000000000000000000 <<23 1 2 Channel ID on bits 24-31 11111111000000000000000000000000 <<24 8 256

Changing the number of bits of a fields automatically shift all others => to adapt field length, just change its size and the size of one of the other fields

Definition at line 40 of file CbmTofAddress.h.

Constructor & Destructor Documentation

◆ CbmTofAddress()

CbmTofAddress::CbmTofAddress ( )
inline

Constructor

Definition at line 43 of file CbmTofAddress.h.

◆ ~CbmTofAddress()

virtual CbmTofAddress::~CbmTofAddress ( )
inlinevirtual

Destructor

Definition at line 46 of file CbmTofAddress.h.

Member Function Documentation

◆ ConvertCbmTofDetectorId()

static UInt_t CbmTofAddress::ConvertCbmTofDetectorId ( Int_t  detIdInput)
inlinestatic

◆ ConvertCbmTofDetectorInfo()

static UInt_t CbmTofAddress::ConvertCbmTofDetectorInfo ( CbmTofDetectorInfo  infoInput)
inlinestatic

◆ GetChannelId()

◆ GetChannelSide()

static Int_t CbmTofAddress::GetChannelSide ( UInt_t  address)
inlinestatic

Get the Channel Side from the address

Parameters
addressUnique address
Returns
systemId

Definition at line 103 of file CbmTofAddress.h.

References fgkChannelSideBits, and fgkChannelSideOffset.

Referenced by CbmTofDigi::GetSide().

◆ GetModFullId()

static Int_t CbmTofAddress::GetModFullId ( UInt_t  address)
inlinestatic

Get the module Full Id from the address

Parameters
addressUnique address
Returns
systemId

Definition at line 111 of file CbmTofAddress.h.

References fgkiModFullIdMask.

Referenced by CbmTofHitFinderTBQA::Exec(), CbmGlobalTrackingTofGeometry::Prepare(), CbmGlobalTrackingTofGeometry::Read(), and SameModule().

◆ GetNofChannelIdBits()

static Int_t CbmTofAddress::GetNofChannelIdBits ( )
inlinestatic

Number of bits for Channel Id in the address field

Returns
Number of bits

Definition at line 64 of file CbmTofAddress.h.

References fgkChannelIdBits.

◆ GetNofChSideBits()

static Int_t CbmTofAddress::GetNofChSideBits ( )
inlinestatic

Number of bits for Channel Side in the address field

Returns
Number of bits

Definition at line 68 of file CbmTofAddress.h.

References fgkChannelSideBits.

◆ GetNofRpcIdBits()

static Int_t CbmTofAddress::GetNofRpcIdBits ( )
inlinestatic

Number of bits for Rpc Id in the address field

Returns
Number of bits

Definition at line 60 of file CbmTofAddress.h.

References fgkRpcIdBits.

◆ GetNofSmIdBits()

static Int_t CbmTofAddress::GetNofSmIdBits ( )
inlinestatic

Field size accessors Number of bits for Super Module Id in the address field

Returns
Number of bits

Definition at line 52 of file CbmTofAddress.h.

References fgkSmIdBits.

◆ GetNofSmTypeBits()

static Int_t CbmTofAddress::GetNofSmTypeBits ( )
inlinestatic

Number of bits for Super Module Type in the address field

Returns
Number of bits

Definition at line 56 of file CbmTofAddress.h.

References fgkSmTypeBits.

◆ 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().

◆ GetRpcId()

◆ GetSmId()

◆ GetSmType()

◆ 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().

◆ GetUniqueAddress()

static UInt_t CbmTofAddress::GetUniqueAddress ( UInt_t  Sm,
UInt_t  Rpc,
UInt_t  Channel,
UInt_t  Side = 0,
UInt_t  SmType = 0 
)
inlinestatic

Builder Get the unique address from all parameters

Parameters
[in]SmSuper Module Id.
[in]RpcRpc Id.
[in]ChannelChannel Id.
[in]SideChannel Side (optional, used for strips).
[in]SmType Super Module Type (optional).
Returns
address

Definition at line 124 of file CbmTofAddress.h.

References fgkChannelIdBits, fgkChannelIdOffset, fgkChannelSideBits, fgkChannelSideOffset, fgkRpcIdBits, fgkRpcIdOffset, fgkSmIdBits, fgkSmIdOffset, fgkSmTypeBits, fgkSmTypeOffset, CbmAddress::fgkSystemBits, kTof, and ToIntegralType().

Referenced by CbmDeviceHitBuilderTof::AddNextChan(), CbmTofCosmicClusterizer::AddNextChan(), CbmTofTestBeamClusterizer::AddNextChan(), CbmTofEventClusterizer::AddNextChan(), CbmTofSimpClusterizer::BuildClusters(), CbmTofCosmicClusterizer::BuildClusters(), CbmTofTestBeamClusterizer::BuildClusters(), CbmDeviceHitBuilderTof::BuildHits(), CbmTofEventClusterizer::BuildHits(), CbmTofDigi::CbmTofDigi(), ConvertCbmTofDetectorId(), ConvertCbmTofDetectorInfo(), CbmTofCalibrator::CreateCalHist(), CbmDeviceHitBuilderTof::CreateHistograms(), CbmTofCosmicClusterizer::CreateHistos(), CbmTofTestBeamClusterizer::CreateHistos(), CbmTofEventClusterizer::CreateHistos(), CbmTofDigitize::DigitizeDirectClusterSize(), CbmTofDigitize::DigitizeFlatDisc(), CbmTofDigitize::DigitizeGaussCharge(), CbmTofTrackFinderNN::DoFind(), CbmTofTBClusterizer::Exec(), CbmTofFindTracks::FillHistograms(), CbmTofAnaTestbeam::FillHistos(), CbmTofDigiBdfPar::getParams(), CbmTofTestBeamClusterizer::Init(), CbmTofCosmicClusterizer::Init(), CbmTofEventClusterizer::Init(), CbmDeviceHitBuilderTof::InitContainers(), CbmMcbm2018UnpackerAlgoTof::InitParameters(), CbmTofAnaTestbeam::InitParameters(), CbmDeviceUnpackTofMcbm2018::InitTask(), CbmDeviceHitBuilderTof::LoadGeometry(), CbmTofCosmicClusterizer::LoadGeometry(), CbmTofTestBeamClusterizer::LoadGeometry(), CbmTofEventClusterizer::LoadGeometry(), CbmGlobalTrackingTofGeometry::Read(), CbmDeviceUnpackTofMcbm2018::ReInitContainers(), CbmTofDigi::SetAddress(), CbmTofFindTracks::SetBeamCounter(), CbmTofAnaTestbeam::SetBeamRefRpc(), CbmTofAnaTestbeam::SetBeamRefSmId(), CbmTofAnaTestbeam::SetBeamRefSmType(), CbmTofTestBeamClusterizer::SetCalRpc(), CbmTofCosmicClusterizer::SetCalRpc(), CbmTofEventClusterizer::SetCalRpc(), CbmTofTestBeamClusterizer::SetCalSmType(), CbmTofCosmicClusterizer::SetCalSmType(), CbmTofEventClusterizer::SetCalSmType(), CbmTofAnaTestbeam::SetDut(), CbmTofAnaTestbeam::SetDutRpc(), CbmTofAnaTestbeam::SetDutSm(), CbmTofAnaTestbeam::SetMrpcRef(), CbmTofAnaTestbeam::SetMrpcRefRpc(), CbmTofAnaTestbeam::SetMrpcRefSm(), CbmTofAnaTestbeam::SetMrpcSel2(), CbmTofAnaTestbeam::SetMrpcSel2Rpc(), CbmTofAnaTestbeam::SetMrpcSel2Sm(), CbmTofAnaTestbeam::SetMrpcSel3(), CbmTofAnaTestbeam::SetMrpcSel3Rpc(), CbmTofAnaTestbeam::SetMrpcSel3Sm(), CbmTofFindTracks::SetStation(), and CbmTofFindTracks::SetStations().

◆ SameModule()

static Bool_t CbmTofAddress::SameModule ( UInt_t  addressA,
UInt_t  addressB 
)
inlinestatic

Definition at line 138 of file CbmTofAddress.h.

References GetModFullId().

Member Data Documentation

◆ fgkChannelIdBits

const Int_t CbmTofAddress::fgkChannelIdBits = 8
staticprivate

Number of bits for Channel Id in the address field

Definition at line 183 of file CbmTofAddress.h.

Referenced by GetChannelId(), GetNofChannelIdBits(), and GetUniqueAddress().

◆ fgkChannelIdOffset

const Int_t CbmTofAddress::fgkChannelIdOffset
staticprivate
Initial value:

Offset in bits for Channel Id in the address field

Definition at line 200 of file CbmTofAddress.h.

Referenced by GetChannelId(), and GetUniqueAddress().

◆ fgkChannelSideBits

const Int_t CbmTofAddress::fgkChannelSideBits = 1
staticprivate

Number of bits for Channel Side in the address field

Definition at line 181 of file CbmTofAddress.h.

Referenced by GetChannelSide(), GetNofChSideBits(), and GetUniqueAddress().

◆ fgkChannelSideOffset

const Int_t CbmTofAddress::fgkChannelSideOffset
staticprivate
Initial value:

Offset in bits for Channel Side Id in the address field

Definition at line 196 of file CbmTofAddress.h.

Referenced by GetChannelSide(), and GetUniqueAddress().

◆ fgkiModFullIdMask

const Int_t CbmTofAddress::fgkiModFullIdMask
staticprivate
Initial value:
=
(((1 << fgkSystemBits) - 1)) + (((1 << fgkSmIdBits) - 1) << fgkSmIdOffset)
+ (((1 << fgkSmTypeBits) - 1) << fgkSmTypeOffset)
+ (((1 << fgkRpcIdBits) - 1) << fgkRpcIdOffset)

For the module Full Id determination

Definition at line 205 of file CbmTofAddress.h.

Referenced by GetModFullId().

◆ fgkRpcIdBits

const Int_t CbmTofAddress::fgkRpcIdBits = 7
staticprivate

Number of bits for Rpc Id in the address field

Definition at line 179 of file CbmTofAddress.h.

Referenced by GetNofRpcIdBits(), GetRpcId(), and GetUniqueAddress().

◆ fgkRpcIdOffset

const Int_t CbmTofAddress::fgkRpcIdOffset
staticprivate
Initial value:

Offset in bits for Rpc Id in the address field

Definition at line 198 of file CbmTofAddress.h.

Referenced by GetRpcId(), and GetUniqueAddress().

◆ fgkSmIdBits

const Int_t CbmTofAddress::fgkSmIdBits = 8
staticprivate

To adapt the address sub-fields repartition in size, you just need to change number of bits of the two sub-fields changing length. Sub-fields sizes in bits
Number of bits for Super Module Id in the address field

Definition at line 175 of file CbmTofAddress.h.

Referenced by GetNofSmIdBits(), GetSmId(), and GetUniqueAddress().

◆ fgkSmIdOffset

const Int_t CbmTofAddress::fgkSmIdOffset = CbmAddress::fgkSystemBits
staticprivate

To adapt the address sub-fields repartition in order, you just need to change the way the offset are calculated. Sub-fields offsets in bits Offset in bits for Super Module Id in the address field

Offset in bits for Super Module Id in the address field

Definition at line 192 of file CbmTofAddress.h.

Referenced by GetSmId(), and GetUniqueAddress().

◆ fgkSmTypeBits

const Int_t CbmTofAddress::fgkSmTypeBits = 4
staticprivate

Number of bits for Super Module Type in the address field

Definition at line 177 of file CbmTofAddress.h.

Referenced by GetNofSmTypeBits(), GetSmType(), and GetUniqueAddress().

◆ fgkSmTypeOffset

const Int_t CbmTofAddress::fgkSmTypeOffset
staticprivate
Initial value:

Offset in bits for Super Module Type in the address field

Definition at line 194 of file CbmTofAddress.h.

Referenced by GetSmType(), and GetUniqueAddress().

◆ 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 GetUniqueAddress().


The documentation for this class was generated from the following files:
CbmTofAddress::fgkSmIdBits
static const Int_t fgkSmIdBits
Definition: CbmTofAddress.h:175
CbmAddress::fgkSystemBits
static const Int_t fgkSystemBits
Definition: CbmAddress.h:50
CbmTofAddress::fgkRpcIdOffset
static const Int_t fgkRpcIdOffset
Definition: CbmTofAddress.h:198
CbmTofAddress::fgkRpcIdBits
static const Int_t fgkRpcIdBits
Definition: CbmTofAddress.h:179
CbmTofAddress::fgkSmTypeBits
static const Int_t fgkSmTypeBits
Definition: CbmTofAddress.h:177
CbmTofAddress::fgkSmTypeOffset
static const Int_t fgkSmTypeOffset
Definition: CbmTofAddress.h:194
CbmTofAddress::fgkChannelSideBits
static const Int_t fgkChannelSideBits
Definition: CbmTofAddress.h:181
CbmTofAddress::fgkChannelSideOffset
static const Int_t fgkChannelSideOffset
Definition: CbmTofAddress.h:196
CbmTofAddress::fgkSmIdOffset
static const Int_t fgkSmIdOffset
Definition: CbmTofAddress.h:192