diff --git a/algo/CMakeLists.txt b/algo/CMakeLists.txt index a6af3283b8c23d194d568d18aa37aeb038f6d5dc..358c59fea0ed05418ff7a8dd70b5b78a529a6f97 100644 --- a/algo/CMakeLists.txt +++ b/algo/CMakeLists.txt @@ -120,6 +120,8 @@ set(SRCS detectors/bmon/ReadoutConfig.cxx detectors/bmon/Unpack.cxx detectors/bmon/UnpackMS.cxx + detectors/bmon/config/ReadoutPars_mCBM2022.cxx + detectors/bmon/config/ReadoutPars_mCBM2024.cxx detectors/trd/Cluster.cxx detectors/trd/Clusterizer.cxx detectors/trd/Cluster2D.cxx diff --git a/algo/detectors/bmon/ReadoutConfig.cxx b/algo/detectors/bmon/ReadoutConfig.cxx index a7f37185b293d7c1d661fb0249a4a04f3ea27290..2412dc88ce506553096e1104e7693b5a44d3f9ec 100644 --- a/algo/detectors/bmon/ReadoutConfig.cxx +++ b/algo/detectors/bmon/ReadoutConfig.cxx @@ -6,6 +6,7 @@ #include "CbmTofAddress.h" #include "Exceptions.h" +#include "config/ReadoutPars.h" #include "gDpbMessv100.h" #include <bitset> @@ -19,7 +20,7 @@ using namespace std; namespace cbm::algo::bmon { // --- Constructor ------------------------------------------------------------------ - ReadoutConfig::ReadoutConfig() { Init(); } + ReadoutConfig::ReadoutConfig(const config::ReadoutPars& pars) { Init(pars); } // ------------------------------------------------------------------------------------ // --- Destructor ----------------------------------------------------------------- @@ -61,31 +62,25 @@ namespace cbm::algo::bmon } // ------------------------------------------------------------------------------------ - void ReadoutConfig::Init() + void ReadoutConfig::Init(const config::ReadoutPars& pars) { - // This here refers to the mCBM 2022 setup. - // Taken from CbmMcbm2018TofPar in combination with macro/beamtime/mcbm2022/mBmonCriPar.par - - // Array to hold the unique IDs (equipment ID) for all TOF DPBs - uint16_t eqId[numComp] = {0xabf3, 0xabf2, 0xabf1, 0xabf0}; - // Constructing the map (equipmentId, eLink, channel) -> (TOF address) - const uint32_t numElinksPerComp = numFebsPerComp * numAsicsPerFeb; - const uint32_t numChanPerComp = numChanPerAsic * numElinksPerComp; + const uint32_t numChanPerComp = pars.NChansPerComponent(); // Constructs the fviRpcChUId array - BuildChannelsUidMap(); + BuildChannelsUidMap(pars); - for (uint16_t comp = 0; comp < numComp; comp++) { - uint16_t equipment = eqId[comp]; - fReadoutMap[equipment].resize(numElinksPerComp); + for (uint16_t comp = 0; comp < pars.NComponents(); comp++) { - for (uint16_t elink = 0; elink < numElinksPerComp; elink++) { - fReadoutMap[equipment][elink].resize(numChanPerAsic); + uint16_t equipment = pars.eqIds.at(comp); + fReadoutMap[equipment].resize(pars.NElinksPerComponent()); - for (uint16_t channel = 0; channel < numChanPerAsic; channel++) { + for (uint16_t elink = 0; elink < pars.NElinksPerComponent(); elink++) { + fReadoutMap[equipment][elink].resize(pars.nChannelsPerAsic); - const uint32_t chanInComp = elink * numChanPerAsic + channel; + for (uint16_t channel = 0; channel < pars.nChannelsPerAsic; channel++) { + + const uint32_t chanInComp = elink * pars.nChannelsPerAsic + channel; uint32_t chanInSys = comp * numChanPerComp + chanInComp; { // hack? perhaps can be removed @@ -103,24 +98,28 @@ namespace cbm::algo::bmon } // ------------------------------------------------------------------------- - void ReadoutConfig::BuildChannelsUidMap() + void ReadoutConfig::BuildChannelsUidMap(const config::ReadoutPars& pars) { - const uint32_t numAsics = numComp * numFebsPerComp * numAsicsPerFeb; - const uint32_t numChan = numAsics * numChanPerAsic; + const uint32_t numAsics = pars.NComponents() * pars.nFebsPerComponent * pars.nAsicsPerFeb; + const uint32_t numChan = numAsics * pars.nChannelsPerAsic; fviRpcChUId.resize(numChan); + L_(debug) << "============================================================"; + L_(debug) << "================== BMON Mapping ============================"; + uint32_t uCh = 0; - for (uint32_t uGbtx = 0; uGbtx < numCrob; ++uGbtx) { + for (uint32_t uGbtx = 0; uGbtx < pars.NCROBs(); ++uGbtx) { const uint32_t uCh0 = uCh; - switch (rpcType[uGbtx]) { + const auto& crob = pars.crobs.at(uGbtx); + switch (crob.rpcType) { case 5: { /// Special Treatment for the Bmon diamond - BuildChannelsUidMapBmon(uCh, uGbtx); + BuildChannelsUidMapBmon(uCh, uGbtx, pars); break; } case 99: { /// Special Treatment for the 2022 Bmon diamond, keep past behavior for older data! - BuildChannelsUidMapBmon_2022(uCh, uGbtx); + BuildChannelsUidMapBmon_2022(uCh, uGbtx, pars); break; } case -1: { @@ -129,28 +128,88 @@ namespace cbm::algo::bmon break; } default: { - L_(error) << "Invalid Bmon Type specifier for GBTx " << std::setw(2) << uGbtx << ": " << rpcType[uGbtx]; + L_(error) << "Invalid Bmon Type specifier for GBTx " << std::setw(2) << uGbtx << ": " << crob.rpcType; } - } // switch (rpcType[uGbtx]) - if ((int32_t)(uCh - uCh0) != numFebsPerComp * numAsicsPerFeb * numChanPerAsic / 2) { - throw FatalError("Bmon mapping error for Gbtx {}, diff = {}", uGbtx, uCh - uCh0); + } // switch (crob.rpcType) + if ((int32_t)(uCh - uCh0) != pars.nFebsPerComponent * pars.nAsicsPerFeb * pars.nChannelsPerAsic / 2) { + throw FatalError("Bmon mapping error for Gbtx {}, diff = {}, expected = {}", uGbtx, uCh - uCh0, + pars.nFebsPerComponent * pars.nAsicsPerFeb * pars.nChannelsPerAsic / 2); } - } + + L_(info) << " Map for CROB " << uGbtx; + std::vector<int32_t> vAddrBunch(8, -1); + for (uint32_t uChPrint = uCh0; uChPrint < uCh; ++uChPrint) { + vAddrBunch[uChPrint % 8] = fviRpcChUId[uChPrint]; + if (7 == uChPrint % 8) { + L_(debug) << std::hex << std::setfill('0') << "0x" << std::setw(8) << vAddrBunch[0] << " 0x" << std::setw(8) + << vAddrBunch[1] << " 0x" << std::setw(8) << vAddrBunch[2] << " 0x" << std::setw(8) << vAddrBunch[3] + << " 0x" << std::setw(8) << vAddrBunch[4] << " 0x" << std::setw(8) << vAddrBunch[5] << " 0x" + << std::setw(8) << vAddrBunch[6] << " 0x" << std::setw(8) << vAddrBunch[7] << std::dec; + } + } + switch (uCh % 8) { + case 0: { + break; + } + case 1: { + L_(debug) << std::hex << std::setfill('0') << "0x" << std::setw(8) << vAddrBunch[0] << std::dec; + break; + } + case 2: { + L_(debug) << std::hex << std::setfill('0') << "0x" << std::setw(8) << vAddrBunch[0] << " 0x" << std::setw(8) + << vAddrBunch[1] << std::dec; + break; + } + case 3: { + L_(debug) << std::hex << std::setfill('0') << "0x" << std::setw(8) << vAddrBunch[0] << " 0x" << std::setw(8) + << vAddrBunch[1] << " 0x" << std::setw(8) << vAddrBunch[2] << std::dec; + break; + } + case 4: { + L_(debug) << std::hex << std::setfill('0') << "0x" << std::setw(8) << vAddrBunch[0] << " 0x" << std::setw(8) + << vAddrBunch[1] << " 0x" << std::setw(8) << vAddrBunch[2] << " 0x" << std::setw(8) << vAddrBunch[3] + << std::dec; + break; + } + case 5: { + L_(debug) << std::hex << std::setfill('0') << "0x" << std::setw(8) << vAddrBunch[0] << " 0x" << std::setw(8) + << vAddrBunch[1] << " 0x" << std::setw(8) << vAddrBunch[2] << " 0x" << std::setw(8) << vAddrBunch[3] + << " 0x" << std::setw(8) << vAddrBunch[4] << std::dec; + break; + } + case 6: { + L_(debug) << std::hex << std::setfill('0') << "0x" << std::setw(8) << vAddrBunch[0] << " 0x" << std::setw(8) + << vAddrBunch[1] << " 0x" << std::setw(8) << vAddrBunch[2] << " 0x" << std::setw(8) << vAddrBunch[3] + << " 0x" << std::setw(8) << vAddrBunch[4] << " 0x" << std::setw(8) << vAddrBunch[5] << std::dec; + break; + } + case 7: { + L_(debug) << std::hex << std::setfill('0') << "0x" << std::setw(8) << vAddrBunch[0] << " 0x" << std::setw(8) + << vAddrBunch[1] << " 0x" << std::setw(8) << vAddrBunch[2] << " 0x" << std::setw(8) << vAddrBunch[3] + << " 0x" << std::setw(8) << vAddrBunch[4] << " 0x" << std::setw(8) << vAddrBunch[5] << " 0x" + << std::setw(8) << vAddrBunch[6] << std::dec; + break; + } + } + } // for (UInt_t uGbtx = 0; uGbtx < numCrob; ++uGbtx) + + L_(debug) << "============================================================"; } // ------------------------------------------------------------------------- - void ReadoutConfig::BuildChannelsUidMapBmon(uint32_t& uCh, uint32_t uGbtx) + void ReadoutConfig::BuildChannelsUidMapBmon(uint32_t& uCh, uint32_t uGbtx, const config::ReadoutPars& pars) { - L_(debug) << " Map diamond " << moduleId[uGbtx] << " at GBTX " << uGbtx << " - uCh = " << uCh; - for (uint32_t uGet4 = 0; uGet4 < numElinksPerCrob; ++uGet4) { - for (uint32_t uGet4Ch = 0; uGet4Ch < numChanPerAsic; ++uGet4Ch) { + const auto& crob = pars.crobs.at(uGbtx); + L_(debug) << " Map diamond " << crob.moduleId << " at GBTX " << uGbtx << " - uCh = " << uCh; + for (uint32_t uGet4 = 0; uGet4 < pars.NElinksPerCrob(); ++uGet4) { + for (uint32_t uGet4Ch = 0; uGet4Ch < pars.nChannelsPerAsic; ++uGet4Ch) { /// Mapping for the 2022 beamtime - if (uGet4 < 32 && 0 == uGet4Ch && -1 < moduleId[uGbtx]) { - uint32_t uChannelBmon = uGet4 + 32 * rpcSide[uGbtx]; + if (uGet4 < 32 && 0 == uGet4Ch && -1 < crob.moduleId) { + uint32_t uChannelBmon = uGet4 + 32 * crob.rpcSide; uChannelBmon /= 8; - fviRpcChUId[uCh] = CbmTofAddress::GetUniqueAddress(moduleId[uGbtx], 0, uChannelBmon, 0, rpcType[uGbtx]); - L_(debug) << fmt::format(" Bmon channel: %u from GBTx %2u, indx %d address %08x", uChannelBmon, uGbtx, uCh, - fviRpcChUId[uCh]); + fviRpcChUId[uCh] = CbmTofAddress::GetUniqueAddress(crob.moduleId, 0, uChannelBmon, 0, crob.rpcType); + L_(debug) << " Bmon channel: " << uChannelBmon << " from GBTx " << uGbtx << " , indx " << uCh + << " address 0x" << std::hex << std::setfill('0') << std::setw(8) << fviRpcChUId[uCh] << std::dec; } // Valid Bmon channel else { fviRpcChUId[uCh] = 0; @@ -161,20 +220,22 @@ namespace cbm::algo::bmon } // ------------------------------------------------------------------------- - void ReadoutConfig::BuildChannelsUidMapBmon_2022(uint32_t& uCh, uint32_t uGbtx) + void ReadoutConfig::BuildChannelsUidMapBmon_2022(uint32_t& uCh, uint32_t uGbtx, const config::ReadoutPars& pars) { - L_(debug) << " Map 2022 diamond " << moduleId[uGbtx] << " at GBTX " << uGbtx << " - uCh = " << uCh; - for (uint32_t uGet4 = 0; uGet4 < numElinksPerCrob; ++uGet4) { - for (uint32_t uGet4Ch = 0; uGet4Ch < numChanPerAsic; ++uGet4Ch) { + const auto& crob = pars.crobs.at(uGbtx); + L_(debug) << " Map 2022 diamond " << crob.moduleId << " at GBTX " << uGbtx << " - uCh = " << uCh; + for (uint32_t uGet4 = 0; uGet4 < pars.NElinksPerCrob(); ++uGet4) { + for (uint32_t uGet4Ch = 0; uGet4Ch < pars.nChannelsPerAsic; ++uGet4Ch) { /// Mapping for the 2022 beamtime - if (-1 < moduleId[uGbtx] && uGet4 < 32 && 0 == uGet4 % 4 && 0 == uGet4Ch) { + if (-1 < crob.moduleId && uGet4 < 32 && 0 == uGet4 % 4 && 0 == uGet4Ch) { /// 1 channel per physical GET4, 2 links per physical GET4, 4 physical GET4s per GBTx, 1 GBTx per comp. /// 16 channels for one side, 16 for the other uint32_t uChannelBmon = (uGet4 / 8 + 4 * (uGbtx / 2)) % 16; /// Type hard-coded to allow different parameter values to separate 2022 Bmon and pre-2022 Bmon - fviRpcChUId[uCh] = CbmTofAddress::GetUniqueAddress(moduleId[uGbtx], 0, uChannelBmon, rpcSide[uGbtx], 5); - L_(debug) << fmt::format(" Bmon channel: %u side %u from GBTx %2u, indx %d address %08x \n", uChannelBmon, - rpcSide[uGbtx], uGbtx, uCh, fviRpcChUId[uCh]); + fviRpcChUId[uCh] = CbmTofAddress::GetUniqueAddress(crob.moduleId, 0, uChannelBmon, crob.rpcSide, 5); + L_(debug) << " Bmon channel: " << uChannelBmon << " side " << crob.rpcSide << " from GBTx " << uGbtx + << " , indx " << uCh << " address 0x" << std::hex << std::setfill('0') << std::setw(8) + << fviRpcChUId[uCh] << std::dec; } // Valid Bmon channel else { fviRpcChUId[uCh] = 0; diff --git a/algo/detectors/bmon/ReadoutConfig.h b/algo/detectors/bmon/ReadoutConfig.h index fa2fb8ea1ab25ba92f629bd89a0d460d91c00329..2d4b8a5894e53ef1a37f79e0de4b6c01e5ecbd5f 100644 --- a/algo/detectors/bmon/ReadoutConfig.h +++ b/algo/detectors/bmon/ReadoutConfig.h @@ -10,13 +10,19 @@ #include <map> #include <vector> +namespace cbm::algo::bmon::config +{ + struct CROB; + struct ReadoutPars; +} // namespace cbm::algo::bmon::config + namespace cbm::algo::bmon { class ReadoutConfig { public: /** @brief Constructor **/ - ReadoutConfig(); + ReadoutConfig(const config::ReadoutPars& pars); /** @brief Destructor **/ virtual ~ReadoutConfig(); @@ -45,34 +51,13 @@ namespace cbm::algo::bmon std::map<uint16_t, std::vector<std::vector<uint32_t>>> fReadoutMap = {}; /** @brief Initialisation of readout map **/ - void Init(); - - /// Constants - /// Taken from mBmonCriPar.par - static const uint16_t numComp = 4; ///< Total number of TOF DPBs in system - static const uint32_t numFebsPerComp = 10; ///< Number of FEEs which are connected to one GDPB - static const uint32_t numAsicsPerFeb = 8; ///< Number of ASICs connected in each FEB for TOF - static const uint32_t numChanPerAsic = 4; ///< Number of channels in each ASIC - static const uint32_t numCrob = 8; ///< Total number of Gbtx links - - /// Taken from CbmMcbm2018TofPar.h - static const uint32_t numFebsPerCrob = 5; ///< Number of FEBs connected to each CROB for mTof 2019 - static const uint32_t numElinksPerCrob = numAsicsPerFeb * numFebsPerCrob; - - // Module Identifier connected to Gbtx link, has to match geometry - const int32_t moduleId[numCrob] = {0, -1, 0, -1, 0, -1, 0, -1}; - - // type of Rpcs connected to Gbtx link - const int32_t rpcType[numCrob] = {99, -1, 99, -1, 99, -1, 99, -1}; - - // side of Rpcs connected to Gbtx link, i.e. 0 or 1 - const int32_t rpcSide[numCrob] = {0, 0, 0, 0, 0, 0, 0, 0}; + void Init(const config::ReadoutPars& pars); std::vector<int32_t> fviRpcChUId = {}; ///< UID/address for each channel, build from type, side and module - void BuildChannelsUidMap(); - void BuildChannelsUidMapBmon(uint32_t& uCh, uint32_t uGbtx); - void BuildChannelsUidMapBmon_2022(uint32_t& uCh, uint32_t uGbtx); + void BuildChannelsUidMap(const config::ReadoutPars& pars); + void BuildChannelsUidMapBmon(uint32_t& uCh, uint32_t uGbtx, const config::ReadoutPars& pars); + void BuildChannelsUidMapBmon_2022(uint32_t& uCh, uint32_t uGbtx, const config::ReadoutPars& pars); }; } // namespace cbm::algo::bmon diff --git a/algo/detectors/bmon/config/ReadoutPars.h b/algo/detectors/bmon/config/ReadoutPars.h new file mode 100644 index 0000000000000000000000000000000000000000..81832fab2c699097153620d8762d7b14e8d99688 --- /dev/null +++ b/algo/detectors/bmon/config/ReadoutPars.h @@ -0,0 +1,47 @@ +/* Copyright (C) 2024 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt + SPDX-License-Identifier: GPL-3.0-only + Authors: Pierre-Alain Loizeau [committer], Felix Weiglhofer, Dominik Smith */ +#pragma once + +#include "Definitions.h" + +#include <vector> + +namespace cbm::algo::bmon::config +{ + + struct CROB { + i32 moduleId; + i32 rpcType; + i32 rpcSide; + i32 nRPC; + }; + + struct ReadoutPars { + + static ReadoutPars MakeMCBM2022(); + static ReadoutPars MakeMCBM2024(); + + i32 nFebsPerComponent; + i32 nAsicsPerFeb; + i32 nChannelsPerAsic; + i32 nCrobPerComponent; + + std::vector<CROB> crobs; + size_t NCROBs() const { return crobs.size(); } + + // Array to hold the unique IDs (equipment ID) for all TOF DPBs + std::vector<u16> eqIds; + size_t NComponents() const { return eqIds.size(); } + + i32 NFebsPerCrob() const { return nFebsPerComponent / nCrobPerComponent; } + i32 NChansPerFeb() const { return nAsicsPerFeb * nChannelsPerAsic; } + i32 NChansPerComponent() const { return nChannelsPerAsic * NElinksPerComponent(); } + i32 NElinksPerCrob() const { return nAsicsPerFeb * NFebsPerCrob(); } + i32 NElinksPerComponent() const { return NElinksPerCrob() * nCrobPerComponent; } + + bool CheckBmonComp(uint32_t uCompId) const { return ((uCompId & 0xFFF0) == 0xABF0); } + bool CheckInnerComp(uint32_t uCompId) const { return ((uCompId & 0xFFF0) == 0xBBC0); } + }; + +} // namespace cbm::algo::bmon::config diff --git a/algo/detectors/bmon/config/ReadoutPars_mCBM2022.cxx b/algo/detectors/bmon/config/ReadoutPars_mCBM2022.cxx new file mode 100644 index 0000000000000000000000000000000000000000..e0e1647f946984160738d314a0bc1d03b979b905 --- /dev/null +++ b/algo/detectors/bmon/config/ReadoutPars_mCBM2022.cxx @@ -0,0 +1,42 @@ +/* Copyright (C) 2024 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt + SPDX-License-Identifier: GPL-3.0-only + Authors: Pierre-Alain Loizeau [committer], Felix Weiglhofer, Dominik Smith */ +#include "Exceptions.h" +#include "ReadoutPars.h" + +using namespace cbm::algo::bmon::config; + +ReadoutPars ReadoutPars::MakeMCBM2022() +{ + // This here refers to the mCBM 2022 and mCBM 2024 Au setups. + // Taken from CbmMcbm2018TofPar in combination with macro/beamtime/mcbm2022/mBmonCriPar.par + + ReadoutPars pars; + + pars.nFebsPerComponent = 10; + pars.nAsicsPerFeb = 8; + pars.nChannelsPerAsic = 4; + pars.nCrobPerComponent = 2; + + constexpr int NumCrob = 8; + + // Module Identifier connected to Gbtx link, has to match geometry + const int32_t moduleId[NumCrob] = {0, -1, 0, -1, 0, -1, 0, -1}; + + // type of Rpcs connected to Gbtx link + const int32_t rpcType[NumCrob] = {99, -1, 99, -1, 99, -1, 99, -1}; + + // side of Rpcs connected to Gbtx link, i.e. 0 or 1 + const int32_t rpcSide[NumCrob] = {0, 0, 0, 0, 0, 0, 0, 0}; + + // number of Rpcs connected to Gbtx link, i.e. 3 or 5 + const int32_t numRpc[NumCrob] = {1, 0, 1, 0, 1, 0, 1, 0}; + + for (int i = 0; i < NumCrob; ++i) { + pars.crobs.push_back({moduleId[i], rpcType[i], rpcSide[i], numRpc[i]}); + } + + pars.eqIds = {0xabf3, 0xabf2, 0xabf1, 0xabf0}; + + return pars; +} diff --git a/algo/detectors/bmon/config/ReadoutPars_mCBM2024.cxx b/algo/detectors/bmon/config/ReadoutPars_mCBM2024.cxx new file mode 100644 index 0000000000000000000000000000000000000000..35d89ffaf7dac9b2f31bf0561635c90c82384876 --- /dev/null +++ b/algo/detectors/bmon/config/ReadoutPars_mCBM2024.cxx @@ -0,0 +1,42 @@ +/* Copyright (C) 2024 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt + SPDX-License-Identifier: GPL-3.0-only + Authors: Pierre-Alain Loizeau [committer], Felix Weiglhofer, Dominik Smith */ +#include "Exceptions.h" +#include "ReadoutPars.h" + +using namespace cbm::algo::bmon::config; + +ReadoutPars ReadoutPars::MakeMCBM2024() +{ + // This here refers to the mCBM 2024 setups. + // Taken from CbmMcbm2018TofPar in combination with macro/beamtime/mcbm2024/mBmonCriPar + + ReadoutPars pars; + + pars.nFebsPerComponent = 10; + pars.nAsicsPerFeb = 8; + pars.nChannelsPerAsic = 4; + pars.nCrobPerComponent = 2; + + constexpr int NumCrob = 10; + + // Module Identifier connected to Gbtx link, has to match geometry + const int32_t moduleId[NumCrob] = {0, -1, 0, -1, 0, -1, 0, -1, 0, -1}; + + // type of Rpcs connected to Gbtx link + const int32_t rpcType[NumCrob] = {99, -1, 99, -1, 99, -1, 99, -1, 99, -1}; + + // side of Rpcs connected to Gbtx link, i.e. 0 or 1 + const int32_t rpcSide[NumCrob] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 0}; + + // number of Rpcs connected to Gbtx link, i.e. 3 or 5 + const int32_t numRpc[NumCrob] = {1, 0, 1, 0, 1, 0, 1, 0, 1, 0}; + + for (int i = 0; i < NumCrob; ++i) { + pars.crobs.push_back({moduleId[i], rpcType[i], rpcSide[i], numRpc[i]}); + } + + pars.eqIds = {0xabf3, 0xabf2, 0xabf1, 0xabf0, 0xabf4}; + + return pars; +} diff --git a/algo/global/Reco.cxx b/algo/global/Reco.cxx index 249a912361f2cab80e2018f5767b595f8b216f64..f2951e7fad0c57378c171c3bd7c23491a31b80e5 100644 --- a/algo/global/Reco.cxx +++ b/algo/global/Reco.cxx @@ -12,6 +12,7 @@ #include "StsDigiQa.h" #include "TrackingSetup.h" #include "bmon/Unpack.h" +#include "bmon/config/ReadoutPars.h" #include "ca/TrackingChain.h" #include "compat/OpenMP.h" #include "evbuild/Config.h" @@ -101,7 +102,8 @@ void Reco::Init(const Options& opts) // Unpackers if (Opts().Has(Subsystem::BMON) && Opts().Has(Step::Unpack)) { - bmon::ReadoutConfig cfg{}; + bmon::ReadoutConfig cfg{2941 <= Opts().RunId() ? bmon::config::ReadoutPars::MakeMCBM2024() + : bmon::config::ReadoutPars::MakeMCBM2022()}; fBmonUnpack = std::make_unique<bmon::Unpack>(cfg); } diff --git a/reco/tasks/CbmTaskUnpack.cxx b/reco/tasks/CbmTaskUnpack.cxx index f0caef8188e9f5e150621020fe7f918bea72551b..f4eb372149d9424126dab2791578ff5335e0c824 100644 --- a/reco/tasks/CbmTaskUnpack.cxx +++ b/reco/tasks/CbmTaskUnpack.cxx @@ -19,6 +19,7 @@ #include "CbmTrdParSpadic.h" #include "MicrosliceDescriptor.hpp" #include "System.hpp" +#include "bmon/config/ReadoutPars.h" #include "tof/config/ReadoutPars.h" #include "yaml/Yaml.h" @@ -165,7 +166,9 @@ InitStatus CbmTaskUnpack::Init() // ---- Initialize unpacker - fBmonUnpack = std::make_unique<bmon::Unpack>(bmon::ReadoutConfig{}); + auto bmonReadoutPars = bmon::config::ReadoutPars::MakeMCBM2022(); + fBmonUnpack = std::make_unique<bmon::Unpack>(bmon::ReadoutConfig{bmonReadoutPars}); + fMuchUnpack = std::make_unique<much::Unpack>(much::ReadoutConfig{}); fRichUnpack = std::make_unique<rich::Unpack>(rich::ReadoutConfig{});