diff --git a/algo/detectors/tof/ReadoutConfig.cxx b/algo/detectors/tof/ReadoutConfig.cxx index 6843df6b1664f79263e3065672b52d2662e24430..cd91a65198b2269998a509a3234678dca24bb640 100644 --- a/algo/detectors/tof/ReadoutConfig.cxx +++ b/algo/detectors/tof/ReadoutConfig.cxx @@ -295,20 +295,29 @@ namespace cbm::algo::tof // ------------------------------------------------------------------------- void ReadoutConfig::BuildChannelsUidMapCbm(uint32_t& uCh, const config::CROB& crob) { - if (crob.rpcSide < 2) { // mTof modules - const int32_t RpcMap[5] = {4, 2, 0, 3, 1}; + if (crob.rpcSide < 4) { // mTof modules + const int32_t RpcMap[5] = {4, 2, 0, 3, 1}; + const int32_t RpcMapInv[5] = {0, 2, 4, 1, 3}; for (int32_t iRpc = 0; iRpc < crob.nRPC; iRpc++) { int32_t iStrMax = 32; uint32_t uChNext = 1; + int32_t iRpcMap = -1; + if (crob.rpcSide < 2) { + iRpcMap = RpcMap[iRpc]; + } + else { + iRpcMap = RpcMapInv[iRpc]; + } for (int32_t iStr = 0; iStr < iStrMax; iStr++) { int32_t iStrMap = iStr; - int32_t iRpcMap = RpcMap[iRpc]; - if (crob.rpcSide == 0) iStrMap = 31 - iStr; + if (crob.rpcSide % 2 == 0) { + iStrMap = 31 - iStr; + } if (crob.moduleId > -1) fviRpcChUId.at(uCh) = - CbmTofAddress::GetUniqueAddress(crob.moduleId, iRpcMap, iStrMap, crob.rpcSide, crob.rpcType); + CbmTofAddress::GetUniqueAddress(crob.moduleId, iRpcMap, iStrMap, crob.rpcSide % 2, crob.rpcType); else fviRpcChUId.at(uCh) = 0; uCh += uChNext; diff --git a/algo/detectors/tof/config/ReadoutPars_mCBM2024_05.cxx b/algo/detectors/tof/config/ReadoutPars_mCBM2024_05.cxx index 4e83e1a665e259ccfda1cfe76d0ee51999995db5..1c0ff327aec3c89b267149a848e9488d87ec4869 100644 --- a/algo/detectors/tof/config/ReadoutPars_mCBM2024_05.cxx +++ b/algo/detectors/tof/config/ReadoutPars_mCBM2024_05.cxx @@ -30,7 +30,7 @@ ReadoutPars ReadoutPars::MakeMCBM2024_05() const int32_t rpcType[NumCrob] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 9, 9, 6, 2, 2, 0, 0}; // side of Rpcs connected to Gbtx link, i.e. 0 or 1 - const int32_t rpcSide[NumCrob] = {0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 4, 0, 1, 0, 1}; + const int32_t rpcSide[NumCrob] = {0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 4, 2, 3, 2, 3}; // number of Rpcs connected to Gbtx link, i.e. 3 or 5 const int32_t numRpc[NumCrob] = {5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 2, 2, 2, 5, 5, 5, 5}; diff --git a/core/detectors/tof/CbmMcbm2018TofPar.cxx b/core/detectors/tof/CbmMcbm2018TofPar.cxx index 3f5e9e51739b75ae4121fa96fec0ead94e9dafba..6d02f8a30f03265cae552fe1bcddbc62f55f4ea7 100644 --- a/core/detectors/tof/CbmMcbm2018TofPar.cxx +++ b/core/detectors/tof/CbmMcbm2018TofPar.cxx @@ -355,21 +355,29 @@ void CbmMcbm2018TofPar::BuildChannelsUidMap() void CbmMcbm2018TofPar::BuildChannelsUidMapCbm(UInt_t& uCh, UInt_t uGbtx) { LOG(info) << " Map mTof box " << fiModuleId[uGbtx] << " at GBTX " << uGbtx << " - uCh = " << uCh; - if (fiRpcSide[uGbtx] < 2) { // mTof modules + if (fiRpcSide[uGbtx] < 4) { // mTof modules LOG(debug) << " Map mTof box " << fiModuleId[uGbtx] << " at GBTX - uCh = " << uCh; - const Int_t RpcMap[5] = {4, 2, 0, 3, 1}; + const Int_t RpcMap[5] = {4, 2, 0, 3, 1}; + const Int_t RpcMapInv[5] = {0, 2, 4, 1, 3}; for (Int_t iRpc = 0; iRpc < fiNrOfRpc[uGbtx]; iRpc++) { Int_t iStrMax = 32; UInt_t uChNext = 1; - + Int_t iRpcMap = -1; + if (fiRpcSide[uGbtx] < 2) { + iRpcMap = RpcMap[iRpc]; + } + else { + iRpcMap = RpcMapInv[iRpc]; + } for (Int_t iStr = 0; iStr < iStrMax; iStr++) { Int_t iStrMap = iStr; - Int_t iRpcMap = RpcMap[iRpc]; - if (fiRpcSide[uGbtx] == 0) iStrMap = 31 - iStr; + if (fiRpcSide[uGbtx] % 2 == 0) { + iStrMap = 31 - iStr; + } if (fiModuleId[uGbtx] > -1) - fviRpcChUId[uCh] = - CbmTofAddress::GetUniqueAddress(fiModuleId[uGbtx], iRpcMap, iStrMap, fiRpcSide[uGbtx], fiRpcType[uGbtx]); + fviRpcChUId[uCh] = CbmTofAddress::GetUniqueAddress(fiModuleId[uGbtx], iRpcMap, iStrMap, fiRpcSide[uGbtx] % 2, + fiRpcType[uGbtx]); else fviRpcChUId[uCh] = 0; // LOG(debug)<<Form("Map Ch %d to Address 0x%08x",uCh,fviRpcChUId[uCh]); diff --git a/macro/beamtime/mcbm2024/mTofCriPar_2024_05_08.par b/macro/beamtime/mcbm2024/mTofCriPar_2024_05_08.par index 3112eced35b1fda0d299e6ddfceaa9c98e41df48..79b48bbfbee0f122458df36b6253481ed99f612a 100644 --- a/macro/beamtime/mcbm2024/mTofCriPar_2024_05_08.par +++ b/macro/beamtime/mcbm2024/mTofCriPar_2024_05_08.par @@ -4,19 +4,19 @@ McbmTof2024: Int_t 1 NrOfGdpbs: Int_t 19 GdpbIdArray: Int_t \ -0xabc0 0xabc1 0xabc2 0xabc3 0xabc4 0xabc5 0xabc6 0xabc7 0xabc8 0xabc9 0xabca 0xabcb 0xabd0 0xabd1 0xbbc0 0xabcc 0xabcd 0xabce 0xabcf +0xabc0 0xabc1 0xabc2 0xabc3 0xabc4 0xabc5 0xabc6 0xabc7 0xabc8 0xabc9 0xabca 0xabcb 0xabd0 0xabd1 0xbbc0 0xabcc 0xabcd 0xabce 0xabcf NrOfFeesPerGdpb: Int_t 5 NrOfGet4PerFee: Int_t 8 NrOfChannelsPerGet4: Int_t 4 -NrOfGbtx: Int_t 15 +NrOfGbtx: Int_t 19 NrOfModule: Int_t 3 // NrOfRpc used as RpcId NrOfRpc: Int_t \ - 5 5 5 5 5 5 5 5 5 5 5 5 2 2 2 5 5 5 5 + 5 5 5 5 5 5 5 5 5 5 5 5 2 2 2 5 5 5 5 RpcType: Int_t \ 0 0 0 0 0 0 0 0 0 0 2 2 9 9 6 2 2 0 0 RpcSide: Int_t \ - 0 1 0 1 0 1 0 1 0 1 0 1 0 0 4 0 1 0 1 + 0 1 0 1 0 1 0 1 0 1 0 1 0 0 4 2 3 2 3 ModuleId: Int_t \ 0 0 1 1 2 2 3 3 4 4 0 0 0 1 0 1 1 5 5 NbMsTot: Int_t 100