9#include <FairParamList.h>
41 Bool_t loadOk = kTRUE;
43 loadOk &= inList->fill(Form(
"%d-criId",
fAddress), &criId);
44 loadOk &= inList->fill(Form(
"%d-crobId",
fAddress), &crobId);
45 loadOk &= inList->fill(Form(
"%d-crobNr",
fAddress), &crobNr);
46 loadOk &= inList->fill(Form(
"%d-eLinkId",
fAddress), &eLinkId);
47 loadOk &= inList->fill(Form(
"%d-eLinkId",
fAddress), &eLinkId);
48 loadOk &= inList->fill(Form(
"%d-channelAddresses",
fAddress), &channelAddresses);
49 Int_t iAsicChannel(0);
51 channelIt = channelAddresses[iAsicChannel];
57 LOG(error) << GetName() << Form(
"Params could not be correctly loaded for asic %d",
fAddress);
62 LOG(debug4) << GetName() <<
"Params correctly loaded for asic " <<
fAddress <<
" with componentId " <<
fComponentId;
91 std::uint8_t returnId(-1);
102 std::uint8_t returnId(-1);
113 std::uint8_t eLinkId(-1);
117 LOG(error) << Form(
"CbmTrdParSpadic::GetElinkId(%d) - Incorrect channelId "
118 "(out of range %d > %d",
139 switch (moduleType) {
140 case (Int_t) eModuleTypes1D::kHighChDensitySmallR:
return 80;
break;
141 case (Int_t) eModuleTypes1D::kLowChDensitySmallR:
return 20;
break;
142 case (Int_t) eModuleTypes1D::kHighChDensityLargeR:
return 108;
break;
143 case (Int_t) eModuleTypes1D::kLowChDensityLargeR:
return 36;
break;
144 case (Int_t) eModuleTypes1D::kMcbmModule:
147 default:
return 1;
break;
155 switch (moduleType) {
156 case (Int_t) eModuleTypes1D::kHighChDensitySmallR: nAsicsPerCrob /= 4;
break;
157 case (Int_t) eModuleTypes1D::kLowChDensitySmallR: nAsicsPerCrob /= 1;
break;
158 case (Int_t) eModuleTypes1D::kHighChDensityLargeR: nAsicsPerCrob /= 6;
break;
159 case (Int_t) eModuleTypes1D::kLowChDensityLargeR: nAsicsPerCrob /= 2;
break;
160 case (Int_t) eModuleTypes1D::kMcbmModule:
163 default: nAsicsPerCrob /= -1;
break;
165 return nAsicsPerCrob;
185 if (map->size() > 0)
return;
188 UInt_t nthAsicElink = 0;
189 UInt_t rawchannel = 0;
192 if (rawchannel >=
NSPADICCH / 2) nthAsicElink = 1;
195 auto channelpair = std::pair<UInt_t, UInt_t>(ichannel, nthAsicElink);
196 map->emplace(channelpair);
204 UInt_t row = moduleChannel / nChannelsPerRow;
205 UInt_t column = moduleChannel % nChannelsPerRow;
206 UInt_t nelinksPerRow = nChannelsPerRow / (
NSPADICCH / 2);
210 UInt_t nthelink = (column / (
NSPADICCH / 2)) * 2 + (row / 2) * nelinksPerRow;
213 UInt_t asicRow = row % 2;
ClassImp(CbmConverterManager)
Definition of ASIC parameters.
std::vector< Int_t > fChannelAddresses
addresses of individual output channels
size_t fComponentId
Hardware component Id used for addressing For the digit decoding see ECbmTrdComponentIdDecoding....
Int_t fAddress
unique ASIC ID
Definition of SPADIC parameters.
static size_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,...
const std::vector< UInt_t > fVecSpadicChannels
CbmTrdParSpadic(Int_t address=0, Int_t FebGrouping=-1, Double_t x=0, Double_t y=0, Double_t z=0, size_t compId=0)
void FillAsicChannelToElinkMap(std::map< UInt_t, UInt_t > *map)
Write the eLink to asicChannel mapping to the passed map.
static Double_t fgSizeZ
SPADIC half size in z [cm].
static Double_t fgSizeX
SPADIC half size in x [cm].
std::uint8_t GetCrobNumber()
static Int_t GetNasicsPerCrob(Int_t moduleType)
Returns the number of asics per Crob on a given moduleType defined in eCbmTrdModuleTypes.
virtual void LoadParams(FairParamList *inList)
Loads the specific params for the spadic placed at fAddress, e.g. channel calibration parameters.
UInt_t GetElinkNr(Int_t moduleChannel, UInt_t nChannelsPerRow)
Return the number of the elink (counting started in channel order from bottom left to right) correlat...
static Int_t GetNasicsOnModule(Int_t moduleType)
Returns the number of asics on a given moduleType defined in eCbmTrdModuleTypes.
Int_t GetAsicChAddress(const Int_t asicChannel)
Returns the nth asic Channel in asic coordinates in single asic padplane coordinates....
static Double_t fgSizeY
SPADIC half size in y [cm].
static std::uint8_t GetElinkId(size_t componentId, Int_t channelId)
eLinkId for the given asicAddress and channelId (in the asic coordinates, i.e. 00....
std::map< UInt_t, UInt_t > fMapAsicChannelToElink