CbmRoot
CbmTrdParSpadic Class Reference

Definition of SPADIC parameters. More...

#include <CbmTrdParSpadic.h>

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

Public Types

enum  ECbmTrdComponentIdDecoding : ULong_t { kElinkIdPosition = 1, kCrobNrPosition = 100, kCrobIdPosition = 1000, kCriIdPosition = 100000 }
 Enum for decodation of spadic componentId (Hardware to software mapping) Since the length of the CriIds is currently unknown, this is defined as ULong to not loose the needed precision. More...
 

Public Member Functions

 CbmTrdParSpadic (Int_t address=0, Int_t FebGrouping=-1, Double_t x=0, Double_t y=0, Double_t z=0, std::uint64_t compId=0)
 
virtual ~CbmTrdParSpadic ()
 
virtual void LoadParams (FairParamList *inList)
 Loads the specific params for the spadic placed at fAddress, e.g. channel calibration parameters. More...
 
virtual Int_t GetNchannels () const
 
virtual Double_t GetSizeX () const
 
virtual Double_t GetSizeY () const
 
virtual Double_t GetSizeZ () const
 
std::uint16_t GetCriId ()
 
std::uint8_t GetCrobId ()
 
std::uint8_t GetCrobNumber ()
 
std::uint8_t GetElinkId (Int_t channelId)
 eLinkId for the current asic par set and the given channelId (in the asic coordinates, i.e. 00..31). More...
 
UInt_t GetAddressOnModule () const
 Returns the number of the asic on the module counted from top left. More...
 
Int_t GetAsicChAddress (const Int_t asicChannel)
 Returns the nth asic Channel in asic coordinates in single asic padplane coordinates. Spadic channels are not mapped from 00 to 31 in padplane coordinates, this function returns the padplane channelnumber in the system of one asic(not in the channel map of a full module !) More...
 
virtual Double_t GetX () const
 
virtual Double_t GetY () const
 
virtual Double_t GetZ () const
 
virtual Int_t GetAddress () const
 
virtual std::uint64_t GetComponentId () const
 
virtual Int_t GetFebGrouping () const
 
virtual Int_t GetChannelAddress (Int_t ich) const
 
virtual std::vector< Int_t > GetChannelAddresses () const
 
virtual void Print (Option_t *opt="") const
 
virtual Int_t QueryChannel (Int_t ch) const
 Query ASIC for specific pad address. More...
 
virtual void SetChannelAddress (Int_t address)
 
virtual void SetChannelAddresses (std::vector< Int_t > addresses)
 
virtual void SetFebGrouping (Int_t feb)
 
virtual void SetPosition (Double_t x=0, Double_t y=0, Double_t z=0)
 
virtual void SetComponentId (std::uint64_t id)
 
virtual Int_t GetModuleId () const
 
virtual void SetModuleId (Int_t m)
 

Static Public Member Functions

static std::uint64_t CreateComponentId (Int_t criId, Int_t crobId, Int_t nThCrobOnModule, Int_t eLinkId)
 Create the componentId from a given criId, crobId, eLinkId and the nThCrobOnModule count, according to the scheme, defined by ECbmTrdComponentIdDecoding. More...
 
static Int_t GetNasicsOnModule (Int_t moduleType)
 Returns the number of asics on a given moduleType defined in eCbmTrdModuleTypes. More...
 
static Int_t GetNasicsPerCrob (Int_t moduleType)
 Returns the number of asics per Crob on a given moduleType defined in eCbmTrdModuleTypes. More...
 
static std::uint16_t GetCriId (std::uint64_t componentId)
 Extracts the CriId from a given componentId - Remark when the par files are created from geometries the CriId is set to the unique module number. More...
 
static std::uint8_t GetCrobId (std::uint64_t componentId)
 Extracts the CrobId from a given componentId. More...
 
static std::uint8_t GetCrobNumber (std::uint64_t componentId)
 Extracts the CrobNumber (nTh Crob on the module) from a given componentId. More...
 
static std::uint8_t GetElinkId (std::uint64_t componentId, Int_t channelId)
 eLinkId for the given asicAddress and channelId (in the asic coordinates, i.e. 00..31). Remark: no check of a correct componentId is performed More...
 

Protected Attributes

Int_t fAddress
 unique ASIC ID More...
 
Double_t fX
 center of asic in global c.s. [cm] More...
 
Double_t fY
 center of asic in global c.s. [cm] More...
 
Double_t fZ
 center of asic in global c.s. [cm] More...
 
Int_t fFebGrouping
 no of ASIC in ROB More...
 
std::uint64_t fComponentId
 For the digit decoding see ECbmTrdComponentIdDecoding. nTh cRob on the module counted from top to bottom a long the sensitive side. This Id is needed to connect the microslice to a given channel, has to be set "by hand", i.e. is not given in the geometry macros. ComponentIdMaps for the Spadic are stored in CbmTrdHardwareSetupR. A macro to write those Ids to the parameter files can be found at https://git.cbm.gsi.de/trd/macros/mcbm2020/blob/master/writeSpadicHwAddresses.C. More...
 
std::vector< Int_t > fChannelAddresses
 addresses of individual output channels More...
 
Int_t fModuleId
 module id More...
 

Private Attributes

const std::vector< Int_t > fVecSpadicChannels
 

Static Private Attributes

static Double_t fgSizeX = 6.0
 SPADIC half size in x [cm]. More...
 
static Double_t fgSizeY = 3.0
 SPADIC half size in y [cm]. More...
 
static Double_t fgSizeZ = 0.5
 SPADIC half size in z [cm]. More...
 

Detailed Description

Definition of SPADIC parameters.

Definition at line 16 of file CbmTrdParSpadic.h.

Member Enumeration Documentation

◆ ECbmTrdComponentIdDecoding

Enum for decodation of spadic componentId (Hardware to software mapping) Since the length of the CriIds is currently unknown, this is defined as ULong to not loose the needed precision.

Enumerator
kElinkIdPosition 
kCrobNrPosition 
kCrobIdPosition 
kCriIdPosition 

Definition at line 27 of file CbmTrdParAsic.h.

Constructor & Destructor Documentation

◆ CbmTrdParSpadic()

CbmTrdParSpadic::CbmTrdParSpadic ( Int_t  address = 0,
Int_t  FebGrouping = -1,
Double_t  x = 0,
Double_t  y = 0,
Double_t  z = 0,
std::uint64_t  compId = 0 
)

Definition at line 18 of file CbmTrdParSpadic.cxx.

References CbmTrdParAsic::fChannelAddresses, and NSPADICCH.

◆ ~CbmTrdParSpadic()

virtual CbmTrdParSpadic::~CbmTrdParSpadic ( )
inlinevirtual

Definition at line 24 of file CbmTrdParSpadic.h.

Member Function Documentation

◆ CreateComponentId()

std::uint64_t CbmTrdParSpadic::CreateComponentId ( Int_t  criId,
Int_t  crobId,
Int_t  nThCrobOnModule,
Int_t  eLinkId 
)
static

Create the componentId from a given criId, crobId, eLinkId and the nThCrobOnModule count, according to the scheme, defined by ECbmTrdComponentIdDecoding.

Definition at line 68 of file CbmTrdParSpadic.cxx.

Referenced by LoadParams().

◆ GetAddress()

virtual Int_t CbmTrdParAsic::GetAddress ( ) const
inlinevirtualinherited

◆ GetAddressOnModule()

UInt_t CbmTrdParSpadic::GetAddressOnModule ( ) const
inline

Returns the number of the asic on the module counted from top left.

Definition at line 69 of file CbmTrdParSpadic.h.

References CbmTrdParAsic::fAddress.

◆ GetAsicChAddress()

Int_t CbmTrdParSpadic::GetAsicChAddress ( const Int_t  asicChannel)

Returns the nth asic Channel in asic coordinates in single asic padplane coordinates. Spadic channels are not mapped from 00 to 31 in padplane coordinates, this function returns the padplane channelnumber in the system of one asic(not in the channel map of a full module !)

< Returns the nth asic Channel in asic coordinates in single asic padplane coordinates. Spadic channels are not mapped from 00 to 31 in padplane coordinates, this function returns the padplane channelnumber in the system of one asic(not in the channel map of a full module !)

Definition at line 187 of file CbmTrdParSpadic.cxx.

References fVecSpadicChannels.

Referenced by CbmTrdParManager::CreateModuleParameters().

◆ GetChannelAddress()

virtual Int_t CbmTrdParAsic::GetChannelAddress ( Int_t  ich) const
inlinevirtualinherited

Reimplemented in CbmTrdParFasp.

Definition at line 45 of file CbmTrdParAsic.h.

References CbmTrdParAsic::fChannelAddresses, and CbmTrdParAsic::GetNchannels().

◆ GetChannelAddresses()

virtual std::vector<Int_t> CbmTrdParAsic::GetChannelAddresses ( ) const
inlinevirtualinherited

◆ GetComponentId()

virtual std::uint64_t CbmTrdParAsic::GetComponentId ( ) const
inlinevirtualinherited

◆ GetCriId() [1/2]

std::uint16_t CbmTrdParSpadic::GetCriId ( )

Definition at line 80 of file CbmTrdParSpadic.cxx.

References CbmTrdParAsic::fComponentId.

Referenced by CbmTrdParSetAsic::putParams().

◆ GetCriId() [2/2]

std::uint16_t CbmTrdParSpadic::GetCriId ( std::uint64_t  componentId)
static

Extracts the CriId from a given componentId - Remark when the par files are created from geometries the CriId is set to the unique module number.

Definition at line 83 of file CbmTrdParSpadic.cxx.

◆ GetCrobId() [1/2]

std::uint8_t CbmTrdParSpadic::GetCrobId ( )

Definition at line 90 of file CbmTrdParSpadic.cxx.

References CbmTrdParAsic::fComponentId.

Referenced by CbmTrdParSetAsic::putParams().

◆ GetCrobId() [2/2]

std::uint8_t CbmTrdParSpadic::GetCrobId ( std::uint64_t  componentId)
static

Extracts the CrobId from a given componentId.

Definition at line 93 of file CbmTrdParSpadic.cxx.

◆ GetCrobNumber() [1/2]

std::uint8_t CbmTrdParSpadic::GetCrobNumber ( )

Definition at line 101 of file CbmTrdParSpadic.cxx.

References CbmTrdParAsic::fComponentId.

Referenced by CbmTrdParSetAsic::putParams().

◆ GetCrobNumber() [2/2]

std::uint8_t CbmTrdParSpadic::GetCrobNumber ( std::uint64_t  componentId)
static

Extracts the CrobNumber (nTh Crob on the module) from a given componentId.

Definition at line 106 of file CbmTrdParSpadic.cxx.

◆ GetElinkId() [1/2]

std::uint8_t CbmTrdParSpadic::GetElinkId ( Int_t  channelId)

eLinkId for the current asic par set and the given channelId (in the asic coordinates, i.e. 00..31).

Definition at line 114 of file CbmTrdParSpadic.cxx.

References CbmTrdParAsic::fComponentId, and GetElinkId().

◆ GetElinkId() [2/2]

std::uint8_t CbmTrdParSpadic::GetElinkId ( std::uint64_t  componentId,
Int_t  channelId 
)
static

eLinkId for the given asicAddress and channelId (in the asic coordinates, i.e. 00..31). Remark: no check of a correct componentId is performed

Definition at line 119 of file CbmTrdParSpadic.cxx.

References NSPADICCH.

Referenced by CbmTrdHardwareSetupR::CreateAsicChannelMap(), CbmTrdHardwareSetupR::CreateHwToSwAsicAddressTranslatorMap(), GetElinkId(), and CbmTrdParSetAsic::putParams().

◆ GetFebGrouping()

virtual Int_t CbmTrdParAsic::GetFebGrouping ( ) const
inlinevirtualinherited

Definition at line 44 of file CbmTrdParAsic.h.

References CbmTrdParAsic::fFebGrouping.

◆ GetModuleId()

virtual Int_t CbmTrdParMod::GetModuleId ( ) const
inlinevirtualinherited

◆ GetNasicsOnModule()

Int_t CbmTrdParSpadic::GetNasicsOnModule ( Int_t  moduleType)
static

Returns the number of asics on a given moduleType defined in eCbmTrdModuleTypes.

Definition at line 148 of file CbmTrdParSpadic.cxx.

References kHighChDensityLargeR, kHighChDensitySmallR, kLowChDensityLargeR, kLowChDensitySmallR, and kMcbmModule.

Referenced by CbmTrdParManager::CreateModuleParameters(), and GetNasicsPerCrob().

◆ GetNasicsPerCrob()

Int_t CbmTrdParSpadic::GetNasicsPerCrob ( Int_t  moduleType)
static

Returns the number of asics per Crob on a given moduleType defined in eCbmTrdModuleTypes.

Definition at line 162 of file CbmTrdParSpadic.cxx.

References GetNasicsOnModule(), kHighChDensityLargeR, kHighChDensitySmallR, kLowChDensityLargeR, kLowChDensitySmallR, and kMcbmModule.

◆ GetNchannels()

virtual Int_t CbmTrdParSpadic::GetNchannels ( ) const
inlinevirtual

Implements CbmTrdParAsic.

Definition at line 30 of file CbmTrdParSpadic.h.

References NSPADICCH.

Referenced by CbmTrdParManager::CreateModuleParameters().

◆ GetSizeX()

virtual Double_t CbmTrdParSpadic::GetSizeX ( ) const
inlinevirtual

Accessors

Implements CbmTrdParAsic.

Definition at line 32 of file CbmTrdParSpadic.h.

References fgSizeX.

◆ GetSizeY()

virtual Double_t CbmTrdParSpadic::GetSizeY ( ) const
inlinevirtual

Implements CbmTrdParAsic.

Definition at line 33 of file CbmTrdParSpadic.h.

References fgSizeY.

◆ GetSizeZ()

virtual Double_t CbmTrdParSpadic::GetSizeZ ( ) const
inlinevirtual

Definition at line 34 of file CbmTrdParSpadic.h.

References fgSizeZ.

◆ GetX()

virtual Double_t CbmTrdParAsic::GetX ( ) const
inlinevirtualinherited

Definition at line 37 of file CbmTrdParAsic.h.

References CbmTrdParAsic::fX.

Referenced by CbmTrdHitRateFastQa::ScanModulePlane().

◆ GetY()

virtual Double_t CbmTrdParAsic::GetY ( ) const
inlinevirtualinherited

Definition at line 38 of file CbmTrdParAsic.h.

References CbmTrdParAsic::fY.

Referenced by CbmTrdHitRateFastQa::ScanModulePlane().

◆ GetZ()

virtual Double_t CbmTrdParAsic::GetZ ( ) const
inlinevirtualinherited

Definition at line 39 of file CbmTrdParAsic.h.

References CbmTrdParAsic::fZ.

◆ LoadParams()

void CbmTrdParSpadic::LoadParams ( FairParamList *  inList)
virtual

Loads the specific params for the spadic placed at fAddress, e.g. channel calibration parameters.

Reimplemented from CbmTrdParAsic.

Definition at line 29 of file CbmTrdParSpadic.cxx.

References CreateComponentId(), CbmTrdParAsic::fAddress, CbmTrdParAsic::fChannelAddresses, CbmTrdParAsic::fComponentId, and NSPADICCH.

◆ Print()

void CbmTrdParAsic::Print ( Option_t *  opt = "") const
virtualinherited

Reimplemented in CbmTrdParFasp.

Definition at line 24 of file CbmTrdParAsic.cxx.

References CbmTrdParAsic::fAddress, CbmTrdParAsic::fX, and CbmTrdParAsic::fY.

Referenced by CbmTrdParFasp::Print().

◆ QueryChannel()

Int_t CbmTrdParAsic::QueryChannel ( Int_t  ch) const
virtualinherited

Query ASIC for specific pad address.

Parameters
[in]chpad address within module as provided by CbmTrdModuleAbstract::GetPadAddress()
Returns
channel index within ASIC

Definition at line 30 of file CbmTrdParAsic.cxx.

References CbmTrdParAsic::fChannelAddresses.

Referenced by CbmTrdParManager::CreateModuleParameters(), CbmTrdParSetAsic::GetAsicAddress(), CbmTrdParFasp::GetChannel(), and CbmTrdParAsic::SetChannelAddress().

◆ SetChannelAddress()

void CbmTrdParAsic::SetChannelAddress ( Int_t  address)
virtualinherited

◆ SetChannelAddresses()

void CbmTrdParAsic::SetChannelAddresses ( std::vector< Int_t >  addresses)
virtualinherited

◆ SetComponentId()

virtual void CbmTrdParAsic::SetComponentId ( std::uint64_t  id)
inlinevirtualinherited

◆ SetFebGrouping()

virtual void CbmTrdParAsic::SetFebGrouping ( Int_t  feb)
inlinevirtualinherited

Definition at line 60 of file CbmTrdParAsic.h.

References CbmTrdParAsic::fFebGrouping.

◆ SetModuleId()

virtual void CbmTrdParMod::SetModuleId ( Int_t  m)
inlinevirtualinherited

Definition at line 17 of file CbmTrdParMod.h.

References CbmTrdParMod::fModuleId, and m.

Referenced by CbmTrdParManager::CreateModuleParameters().

◆ SetPosition()

virtual void CbmTrdParAsic::SetPosition ( Double_t  x = 0,
Double_t  y = 0,
Double_t  z = 0 
)
inlinevirtualinherited

Definition at line 61 of file CbmTrdParAsic.h.

References CbmTrdParAsic::fX, CbmTrdParAsic::fY, CbmTrdParAsic::fZ, x, and y.

Member Data Documentation

◆ fAddress

Int_t CbmTrdParAsic::fAddress
protectedinherited

◆ fChannelAddresses

◆ fComponentId

std::uint64_t CbmTrdParAsic::fComponentId
protectedinherited

For the digit decoding see ECbmTrdComponentIdDecoding. nTh cRob on the module counted from top to bottom a long the sensitive side. This Id is needed to connect the microslice to a given channel, has to be set "by hand", i.e. is not given in the geometry macros. ComponentIdMaps for the Spadic are stored in CbmTrdHardwareSetupR. A macro to write those Ids to the parameter files can be found at https://git.cbm.gsi.de/trd/macros/mcbm2020/blob/master/writeSpadicHwAddresses.C.

Definition at line 75 of file CbmTrdParAsic.h.

Referenced by CbmTrdParAsic::GetComponentId(), GetCriId(), GetCrobId(), GetCrobNumber(), GetElinkId(), LoadParams(), and CbmTrdParAsic::SetComponentId().

◆ fFebGrouping

Int_t CbmTrdParAsic::fFebGrouping
protectedinherited

no of ASIC in ROB

Definition at line 73 of file CbmTrdParAsic.h.

Referenced by CbmTrdParAsic::GetFebGrouping(), and CbmTrdParAsic::SetFebGrouping().

◆ fgSizeX

Double_t CbmTrdParSpadic::fgSizeX = 6.0
staticprivate

SPADIC half size in x [cm].

Definition at line 77 of file CbmTrdParSpadic.h.

Referenced by GetSizeX().

◆ fgSizeY

Double_t CbmTrdParSpadic::fgSizeY = 3.0
staticprivate

SPADIC half size in y [cm].

Definition at line 78 of file CbmTrdParSpadic.h.

Referenced by GetSizeY().

◆ fgSizeZ

Double_t CbmTrdParSpadic::fgSizeZ = 0.5
staticprivate

SPADIC half size in z [cm].

Definition at line 79 of file CbmTrdParSpadic.h.

Referenced by GetSizeZ().

◆ fModuleId

◆ fVecSpadicChannels

const std::vector<Int_t> CbmTrdParSpadic::fVecSpadicChannels
private
Initial value:
= {
23, 7, 22, 6, 21, 19, 5, 20, 18, 4, 3, 17, 16, 2, 1, 0,
31, 30, 29, 15, 14, 28, 27, 13, 11, 26, 12, 10, 25, 9, 24, 8}

Definition at line 81 of file CbmTrdParSpadic.h.

Referenced by GetAsicChAddress().

◆ fX

Double_t CbmTrdParAsic::fX
protectedinherited

center of asic in global c.s. [cm]

Definition at line 70 of file CbmTrdParAsic.h.

Referenced by CbmTrdParAsic::GetX(), CbmTrdParAsic::Print(), and CbmTrdParAsic::SetPosition().

◆ fY

Double_t CbmTrdParAsic::fY
protectedinherited

center of asic in global c.s. [cm]

Definition at line 71 of file CbmTrdParAsic.h.

Referenced by CbmTrdParAsic::GetY(), CbmTrdParAsic::Print(), and CbmTrdParAsic::SetPosition().

◆ fZ

Double_t CbmTrdParAsic::fZ
protectedinherited

center of asic in global c.s. [cm]

Definition at line 72 of file CbmTrdParAsic.h.

Referenced by CbmTrdParAsic::GetZ(), and CbmTrdParAsic::SetPosition().


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