diff --git a/algo/detectors/sts/StsReadoutConfig.cxx b/algo/detectors/sts/StsReadoutConfig.cxx index c9f808a7f0a7b54cb4bd895f444b2ac49ac886da..a1ec9b3f64f671ea741121543fc275d421174198 100644 --- a/algo/detectors/sts/StsReadoutConfig.cxx +++ b/algo/detectors/sts/StsReadoutConfig.cxx @@ -115,7 +115,7 @@ namespace cbm::algo // Type 0 had the connector at the right side, type 1 at the left side. // For type 0, the mapping of FEB to module side as above applies, // for type 1, it has to be inverted. - bool modType[numModules] = {0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1}; + bool modType[numModules] = {0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1}; // Module addresses (CbmStsAddress) int32_t modAddress[numModules]; @@ -127,11 +127,11 @@ namespace cbm::algo modAddress[5] = 0x10008412; modAddress[6] = 0x10018412; modAddress[7] = 0x101FFC02; - modAddress[8] = 0x10008012; - modAddress[9] = 0x10018012; - modAddress[10] = 0x10008812; - modAddress[11] = 0x10018812; - modAddress[12] = 0x10028812; + modAddress[8] = 0x10008812; + modAddress[9] = 0x10018812; + modAddress[10] = 0x10028812; + modAddress[11] = 0x10008012; + modAddress[12] = 0x10018012; // Constructing the map (equipmentId, eLink) -> (module, ASIC within module) @@ -149,6 +149,8 @@ namespace cbm::algo int16_t feb = elink2Feb[elinkId]; // FEB within CROB if (feb != -1) { int16_t module = feb2module[comp][crob][feb]; // Module index + moduleAddress = modAddress[module]; + if (module != -1) { assert(module < numModules); bool moduleType = modType[module]; // 0 or 1 @@ -157,8 +159,7 @@ namespace cbm::algo uint32_t asicIndex = (febType == 0 ? elink2AsicFebA[elinkId] : elink2AsicFebB[elinkId]); uint32_t asicInFeb = asicIndex % numAsicsPerFeb; // ASIC number within FEB - moduleAddress = modAddress[module]; - asicInModule = (moduleSide == 0 ? asicInFeb : asicInFeb + numAsicsPerFeb); + asicInModule = (moduleSide == 1 ? asicInFeb : asicInFeb + numAsicsPerFeb); } } fReadoutMap[equipment][elink] = std::make_pair(moduleAddress, asicInModule); diff --git a/algo/detectors/sts/UnpackSts.cxx b/algo/detectors/sts/UnpackSts.cxx index 4d25a03410930148d46134572428fbaad96de958..d5a38c0a25765637ead6be06bcc6041991f31523 100644 --- a/algo/detectors/sts/UnpackSts.cxx +++ b/algo/detectors/sts/UnpackSts.cxx @@ -113,7 +113,8 @@ namespace cbm::algo channel = message.GetHitChannel() + fParams.fNumChansPerAsic * asicNr; } else { // back side (p side) - channel = numChansPerModule - message.GetHitChannel() + 1; + channel = numChansPerModule - message.GetHitChannel() + - fParams.fNumChansPerAsic * (asicNr - fParams.fNumAsicsPerModule / 2) - 1; } // --- Expand time stamp to time within timeslice (in clock cycle) diff --git a/reco/tasks/CbmTaskUnpack.cxx b/reco/tasks/CbmTaskUnpack.cxx index 034167b09f3025cb4634db54dde1d1ab9db040aa..92e376bccc4a7c44ec601dc552cf95487c9a2d41 100644 --- a/reco/tasks/CbmTaskUnpack.cxx +++ b/reco/tasks/CbmTaskUnpack.cxx @@ -255,8 +255,8 @@ InitStatus CbmTaskUnpack::Init() elinkPar.fAddress = mapEntry.first; // Module address for this elink elinkPar.fAsicNr = mapEntry.second; // ASIC number within module elinkPar.fTimeOffset = 0.; - elinkPar.fAdcOffset = 0.; - elinkPar.fAdcGain = 0.; + elinkPar.fAdcOffset = 1.; + elinkPar.fAdcGain = 1.; // TODO: Add parameters for time and ADC calibration par->fElinkParams.push_back(elinkPar); }