From 2aeb001e2b14ad5c507caf563185c1ff6ce9ecad Mon Sep 17 00:00:00 2001 From: Alexandru Bercuci <abercuci@niham.nipne.ro> Date: Tue, 4 Feb 2025 17:35:51 +0200 Subject: [PATCH] add calibration parameters for TRD2D. Introduce clear separation between readout setup and calibration parameters --- algo/detectors/trd2d/ReadoutConfig.cxx | 65 ++++++++++++++++++----- algo/detectors/trd2d/ReadoutConfig.h | 70 ++++++++++++++++++++++--- algo/detectors/trd2d/Unpack.cxx | 29 +++++----- algo/detectors/trd2d/Unpack.h | 11 ++-- algo/detectors/trd2d/UnpackMS.cxx | 27 ++++++---- algo/detectors/trd2d/UnpackMS.h | 16 ++++++ algo/global/ParFiles.cxx | 3 +- algo/global/ParFiles.h | 1 + algo/global/Reco.cxx | 4 +- reco/tasks/CbmTaskTrdUnpackParWrite.cxx | 10 ++-- reco/tasks/CbmTaskUnpack.cxx | 4 +- 11 files changed, 188 insertions(+), 52 deletions(-) diff --git a/algo/detectors/trd2d/ReadoutConfig.cxx b/algo/detectors/trd2d/ReadoutConfig.cxx index 675b8084ac..7d3dc97ef7 100644 --- a/algo/detectors/trd2d/ReadoutConfig.cxx +++ b/algo/detectors/trd2d/ReadoutConfig.cxx @@ -15,24 +15,45 @@ using std::pair; using std::setw; -CBM_YAML_INSTANTIATE(cbm::algo::trd2d::ReadoutConfig); +CBM_YAML_INSTANTIATE(cbm::algo::trd2d::ReadoutSetup); +CBM_YAML_INSTANTIATE(cbm::algo::trd2d::ReadoutCalib); namespace cbm::algo::trd2d { // --- Constructor ------------------------------------------------------------------ - ReadoutConfig::ReadoutConfig() {} + ReadoutCalib::ReadoutCalib() {} // ------------------------------------------------------------------------------------ // --- Destructor ----------------------------------------------------------------- - ReadoutConfig::~ReadoutConfig() {} + ReadoutCalib::~ReadoutCalib() {} + // ------------------------------------------------------------------------------------ + + ReadoutCalib::ChanDescriptor ReadoutCalib::GetChannelFeeCalib(uint16_t modId, uint16_t padId) + { + ChanDescriptor result; + if (fCalibMap.find(modId) == fCalibMap.end()) return result; + if (padId >= NFASPMOD * NFASPCH) return result; + result = fCalibMap[modId][padId]; + return result; + } + + + // --- Constructor ------------------------------------------------------------------ + ReadoutSetup::ReadoutSetup() {} + + // ------------------------------------------------------------------------------------ + + + // --- Destructor ----------------------------------------------------------------- + ReadoutSetup::~ReadoutSetup() {} // ------------------------------------------------------------------------------------ // --- Equipment IDs -------------------------------------------------------------- - std::vector<uint16_t> ReadoutConfig::GetEquipmentIds() + std::vector<uint16_t> ReadoutSetup::GetEquipmentIds() { std::vector<uint16_t> result; for (auto& entry : fReadoutMap) @@ -43,7 +64,7 @@ namespace cbm::algo::trd2d // --- Number of Asics for a component / equipment ------------------------------- - size_t ReadoutConfig::GetNumAsics(uint16_t equipmentId) + size_t ReadoutSetup::GetNumAsics(uint16_t equipmentId) { size_t result = 0; auto it = fChannelMap.find(equipmentId); @@ -53,7 +74,7 @@ namespace cbm::algo::trd2d // ------------------------------------------------------------------------------------ // --- List of ASICs registered to the ROB --------------------- - std::vector<uint8_t> ReadoutConfig::GetAsicList(uint16_t equipmentId) + std::vector<uint8_t> ReadoutSetup::GetAsicList(uint16_t equipmentId) { std::vector<uint8_t> result; for (auto& entry : fChannelMap[equipmentId]) @@ -64,7 +85,7 @@ namespace cbm::algo::trd2d // --- Number of Channels for a component / equipment, asic pair --------------------- - size_t ReadoutConfig::GetNumChans(uint16_t equipmentId, uint16_t asicId) + size_t ReadoutSetup::GetNumChans(uint16_t equipmentId, uint16_t asicId) { size_t result = 0; auto it = fChannelMap.find(equipmentId); @@ -80,7 +101,7 @@ namespace cbm::algo::trd2d // ------------------------------------------------------------------------------------ // --- Initialise the component mapping structure ---------------------------------- - void ReadoutConfig::InitComponentMap(const std::map<uint32_t, std::vector<uint16_t>>& map) + void ReadoutSetup::InitComponentMap(const std::map<uint32_t, std::vector<uint16_t>>& map) { // Receive map (moduleId, crobId) -> (equipId) // Invert to obtain component map (equipId) -> (module iq, crob id) @@ -97,7 +118,7 @@ namespace cbm::algo::trd2d // ------------------------------------------------------------------------------------ // --- Initialise the mapping structure -------------------------------------------- - void ReadoutConfig::InitChannelMap( + void ReadoutSetup::InitChannelMap( const std::map<size_t, std::map<size_t, std::map<size_t, std::tuple<int32_t, bool, uint8_t, uint16_t>>>>& channelMap) { @@ -123,7 +144,7 @@ namespace cbm::algo::trd2d // --- Mapping (equimentId, asicId, channel) -> (pad address, mask flag, daq offset) ----- - ReadoutConfig::ChanMapping ReadoutConfig::ChanMap(uint16_t equipId, uint16_t asicId, uint16_t chanId) + ReadoutSetup::ChanMapping ReadoutSetup::ChanMap(uint16_t equipId, uint16_t asicId, uint16_t chanId) { ChanMapping result = {-1, false, 0, 0}; auto it = fChannelMap.find(equipId); @@ -143,7 +164,7 @@ namespace cbm::algo::trd2d // --- Mapping (equimentId) -> (module id, crob id) --------------------------------- - ReadoutConfig::CompMapping ReadoutConfig::CompMap(uint16_t equipId) + ReadoutSetup::CompMapping ReadoutSetup::CompMap(uint16_t equipId) { CompMapping result = {}; auto equipIter = fReadoutMap.find(equipId); @@ -156,7 +177,7 @@ namespace cbm::algo::trd2d // ----- Print readout map ------------------------------------------------ - std::string ReadoutConfig::PrintReadoutMap() + std::string ReadoutSetup::PrintReadoutMap() { std::stringstream ss; for (auto comp : fReadoutMap) { @@ -198,4 +219,24 @@ namespace cbm::algo::trd2d // ---------------------------------------------------------------------------- + // ----- Print readout map ------------------------------------------------ + std::string ReadoutCalib::PrintCalibMap() + { + std::stringstream ss; + ss << "fCalibMap.size=" << fCalibMap.size() << "\n"; + for (const auto& [mod, pars] : fCalibMap) { + ss << "Mod 0x" << mod << "\n"; + int ipar(0); + for (auto par : pars) { + if (ipar % NFASPCH == 0) ss << "\t"; + ss << " " << std::setw(4) << par.gainfee; + if (ipar % NFASPCH == NFASPCH - 1) ss << "\n"; + ipar++; + } + } + return ss.str(); + } + // ---------------------------------------------------------------------------- + + } // namespace cbm::algo::trd2d diff --git a/algo/detectors/trd2d/ReadoutConfig.h b/algo/detectors/trd2d/ReadoutConfig.h index ebd29530d0..3974f8b397 100644 --- a/algo/detectors/trd2d/ReadoutConfig.h +++ b/algo/detectors/trd2d/ReadoutConfig.h @@ -29,7 +29,7 @@ namespace cbm::algo::trd2d ** The mapping of the two address spaces is hard-coded in this class. **/ - class ReadoutConfig { + class ReadoutSetup { public: struct CompMapping { @@ -56,11 +56,11 @@ namespace cbm::algo::trd2d }; /** @brief Constructor **/ - ReadoutConfig(); + ReadoutSetup(); /** @brief Destructor **/ - ~ReadoutConfig(); + ~ReadoutSetup(); /** @brief Equipment in the configuration @@ -138,13 +138,67 @@ namespace cbm::algo::trd2d std::map<uint16_t, std::map<uint8_t, std::vector<ChanMapping>>> fChannelMap = {}; //! CBM_YAML_PROPERTIES( - yaml::Property(&ReadoutConfig::fSystemTimeOffset, "timeOffset", "System time offset for TRD2D"), - yaml::Property(&ReadoutConfig::fReadoutMap, "readoutMap", "Maps equipment to module and Optical fibre Id", YAML::Hex), - yaml::Property(&ReadoutConfig::fChannelMap, "channelMap", + yaml::Property(&ReadoutSetup::fSystemTimeOffset, "timeOffset", "System time offset for TRD2D"), + yaml::Property(&ReadoutSetup::fReadoutMap, "readoutMap", "Maps equipment to module and Optical fibre Id", YAML::Hex), + yaml::Property(&ReadoutSetup::fChannelMap, "channelMap", "Maps equipment, ASIC and channel to pad address, mask flag and DAQ offset", YAML::Hex)); - }; + }; // end struct cbm::algo::trd2d::ReadoutSetup + + class ReadoutCalib { + + public: + struct ChanDescriptor { + bool maskFlag; /// HW mask flag for channel + uint8_t tOffset; /// time correction in clk + uint16_t lThreshold; /// SW threshold for ringing channels + float baseline; /// Baseline correction for channel + float gainfee; /// ASIC gain deviation for channel + + CBM_YAML_FORMAT(YAML::Flow); + CBM_YAML_PROPERTIES( + yaml::Property(&ChanDescriptor::maskFlag, "mask", "Channel masking flag"), + yaml::Property(&ChanDescriptor::tOffset, "toff", "Channel wise time offset"), + yaml::Property(&ChanDescriptor::lThreshold, "thres", "SW masking by threshold"), + yaml::Property(&ChanDescriptor::baseline, "bline", "Baseline correction"), + yaml::Property(&ChanDescriptor::gainfee, "gainfee", "Gain correction for FEE channel")); + }; + + /** @brief Constructor **/ + ReadoutCalib(); + + + /** @brief Destructor **/ + ~ReadoutCalib(); + + /** @brief Retrieve calibration for one channel + * \param[in] modId module id according to geometry + * \param[in] padId paired-pad id [0-2879] according to geometry + * \return calibration in the struct ChanDescriptor + */ + ChanDescriptor GetChannelFeeCalib(uint16_t modId, uint16_t padId); + + /** @brief Get system reference signal for calibration **/ + float GetSystemCalibSignal() { return fSystemCalibSignal; }; + + /** @brief Debug output of readout map **/ + std::string PrintCalibMap(); + + private: + float fSystemCalibSignal = 900.; /// reference signal [ADU] to which the FEE gain is refereed + + // --- TRD2D-FEE calibration map + // --- Map index: (module_id), map value: (array of channel calibration parameters) + std::map<uint16_t, std::array<ChanDescriptor, NFASPMOD* NFASPCH>> fCalibMap = {}; //! + + CBM_YAML_PROPERTIES( + yaml::Property(&ReadoutCalib::fSystemCalibSignal, "sCalib", "System wide calibrating signal for TRD2D"), + yaml::Property(&ReadoutCalib::fCalibMap, "calibMap", + "Maps of FEE calibration: mask, DAQ time offset, etc.", + YAML::Hex)); + }; // end struct cbm::algo::trd2d::ReadoutCalib } // namespace cbm::algo::trd2d -CBM_YAML_EXTERN_DECL(cbm::algo::trd2d::ReadoutConfig); +CBM_YAML_EXTERN_DECL(cbm::algo::trd2d::ReadoutSetup); +CBM_YAML_EXTERN_DECL(cbm::algo::trd2d::ReadoutCalib); diff --git a/algo/detectors/trd2d/Unpack.cxx b/algo/detectors/trd2d/Unpack.cxx index f42c185148..880a610914 100644 --- a/algo/detectors/trd2d/Unpack.cxx +++ b/algo/detectors/trd2d/Unpack.cxx @@ -9,7 +9,7 @@ using namespace cbm::algo::trd2d; using fles::Subsystem; -Unpack::Unpack(const ReadoutConfig& readout) : fReadout(readout) +Unpack::Unpack(const Config& config) : fConfig(config) { /** Register the algorithm versions available for TRD2D. For the moment (25.01.14), there is * no distinction between ALGO and MESSAGE version. The following mapping is @@ -20,32 +20,37 @@ Unpack::Unpack(const ReadoutConfig& readout) : fReadout(readout) constexpr std::array<u8, 2> AlgoVersion = {(u8) eMessageVersion::kMessLegacy, (u8) eMessageVersion::kMess24}; // Create one algorithm per component for TRD and configure it with parameters - auto equipIdsTrd2d = fReadout.GetEquipmentIds(); + ReadoutSetup setup = fConfig.roSetup; + ReadoutCalib calib = fConfig.roCalib; + auto equipIdsTrd2d = setup.GetEquipmentIds(); for (auto& equip : equipIdsTrd2d) { - trd2d::UnpackPar par{}; - const size_t numAsics = fReadout.GetNumAsics(equip); + auto comppars = setup.CompMap(equip); + par.fSystemTimeOffset = setup.GetSystemTimeOffset(); + par.fModId = comppars.moduleId; + par.fEqAdd = equip; + par.fEqId = comppars.fiberId; + par.fRefSignal = calib.GetSystemCalibSignal(); - auto asics = fReadout.GetAsicList(equip); + const size_t numAsics = setup.GetNumAsics(equip); + auto asics = setup.GetAsicList(equip); for (auto asic : asics) { trd2d::UnpackAsicPar asicPar; - const size_t numChans = fReadout.GetNumChans(equip, asic); + const size_t numChans = setup.GetNumChans(equip, asic); for (size_t chan = 0; chan < numChans; chan++) { trd2d::UnpackChannelPar chanPar; - auto pars = fReadout.ChanMap(equip, asic, chan); + auto pars = setup.ChanMap(equip, asic, chan); chanPar.fPadAddress = pars.padAddress; // Pad address for channel + uint16_t ch = std::abs(pars.padAddress); + auto calDet = calib.GetChannelFeeCalib(par.fModId, ch); + par.fCalibParams[ch] = {calDet.maskFlag, calDet.tOffset, calDet.lThreshold, calDet.baseline, calDet.gainfee}; chanPar.fMask = pars.maskFlag; // Flag channel mask chanPar.fDaqOffset = pars.tOffset; // Time calibration parameter chanPar.fSignalThres = pars.lThreshold; // Threshold cut asicPar.fChanParams.push_back(chanPar); } L_(debug) << "--- Configured asic " << (int) asic << " with " << numChans << " channels"; - auto comppars = fReadout.CompMap(equip); - par.fSystemTimeOffset = fReadout.GetSystemTimeOffset(); - par.fModId = comppars.moduleId; - par.fEqAdd = equip; - par.fEqId = comppars.fiberId; par.fAsicParams[asic] = asicPar; } L_(debug) << "--- Configured equipment 0x" << std::hex << (int) equip << " with " << std::dec << numAsics diff --git a/algo/detectors/trd2d/Unpack.h b/algo/detectors/trd2d/Unpack.h index d2c1f37b9e..0495ddaa0a 100644 --- a/algo/detectors/trd2d/Unpack.h +++ b/algo/detectors/trd2d/Unpack.h @@ -19,16 +19,21 @@ namespace cbm::algo::trd2d class Unpack : public detail::UnpackBase { public: + struct Config { + ReadoutSetup roSetup; + ReadoutCalib roCalib; + }; using Result_t = detail::UnpackBase::Result_t; - Unpack(const ReadoutConfig& readout); + Unpack(const Config& config); + //Unpack(const ReadoutConfig& readout); Result_t operator()(const fles::Timeslice&) const; - const ReadoutConfig& Readout() const { return fReadout; } + const Config& Readout() const { return fConfig; } private: - ReadoutConfig fReadout; + Config fConfig; }; } // namespace cbm::algo::trd2d diff --git a/algo/detectors/trd2d/UnpackMS.cxx b/algo/detectors/trd2d/UnpackMS.cxx index 9184338d6a..1739bcd04d 100644 --- a/algo/detectors/trd2d/UnpackMS.cxx +++ b/algo/detectors/trd2d/UnpackMS.cxx @@ -135,12 +135,17 @@ namespace cbm::algo::trd2d void UnpackPar::dump() const { - L_(debug) << "UnpackPar::dump()"; - L_(debug) << "mod=" << fModId << " elink[" << (int) fEqId << "]=0x" << std::hex << (int) fEqAdd - << " nAsics=" << std::dec << fAsicParams.size(); + L_(debug) << "UnpackPar::dump() mod=" << fModId << " SysOff=" << fSystemTimeOffset << " sRef=" << fRefSignal; + L_(debug) << " elink[" << (int) fEqId << "]=0x" << std::hex << (int) fEqAdd << " nAsics=" << std::dec + << fAsicParams.size(); for (const auto& [fasp, par] : fAsicParams) { L_(debug) << " fasp=" << int(fasp) << " par=" << std::hex << ∥ } + for (int ipad(0); ipad < NFASPMOD * NFASPCH; ipad++) { + float gn(fCalibParams[ipad].fGainFee), bl(fCalibParams[ipad].fBaseline); + if (gn < 0) continue; + L_(debug) << " pad=" << ipad << " bl=" << bl << " gn=" << gn; + } L_(debug) << "UnpackPar::dump(-----------------------)"; } @@ -453,13 +458,17 @@ namespace cbm::algo::trd2d for (auto imess : messes) { const UnpackChannelPar& chPar = asicPar.fChanParams[imess.ch]; + const uint32_t mch = std::abs(chPar.fPadAddress); + const CalibChannelPar& calPar = fParams.fCalibParams.at(mch); // skip message if threshold set and signal under - if (chPar.fSignalThres && imess.data <= chPar.fSignalThres) continue; - const int32_t pad = std::abs(chPar.fPadAddress) / 2; - const bool hasPairingR = bool(chPar.fPadAddress > 0); - const uint64_t lTime = time + chPar.fDaqOffset + imess.tlab; - const uint16_t lchR = hasPairingR ? imess.data : 0; - const uint16_t lchT = hasPairingR ? 0 : imess.data; + if (calPar.fSignalThres && imess.data <= calPar.fSignalThres) continue; + const uint32_t pad = mch / 2; + const bool hasPairingR = bool(chPar.fPadAddress > 0); + const uint64_t lTime = time + calPar.fDaqOffset + imess.tlab; + const uint16_t sgn = + uint16_t((imess.data - fParams.fRefSignal) * calPar.fGainFee - calPar.fBaseline + fParams.fRefSignal); + const uint16_t lchR = hasPairingR ? sgn : 0; + const uint16_t lchT = hasPairingR ? 0 : sgn; std::vector<CbmTrdDigi>& digiBuffer = ctx.fRobDigi[pad]; // init pad position in array and build digi for message diff --git a/algo/detectors/trd2d/UnpackMS.h b/algo/detectors/trd2d/UnpackMS.h index 631bb4db6d..fc00cd1a91 100644 --- a/algo/detectors/trd2d/UnpackMS.h +++ b/algo/detectors/trd2d/UnpackMS.h @@ -129,6 +129,19 @@ namespace cbm::algo::trd2d std::vector<UnpackChannelPar> fChanParams; ///< Parameters for different channels }; + /** @struct CalibChannelPar + ** @author Alexandru Bercuci <abercuci@niham.nipne.ro> + ** @since 4 February 2025 + ** @brief TRD2D Calibration parameters (time and signal) for one Asic channel + **/ + struct CalibChannelPar { + bool fMask = false; ///< Flag for channel masking + uint8_t fDaqOffset = 0; ///< Time calibration parameter + uint16_t fSignalThres = 0; ///< Signal threshold to remove ringing channels + float fBaseline = 0.; ///< baseline correction + float fGainFee = -1.; ///< gain correction wrt to reference + }; + /** @struct UnpackPar ** @author Dominik Smith <d.smith@gsi.de> ** @since 31 January 2023 @@ -139,7 +152,10 @@ namespace cbm::algo::trd2d uint16_t fModId = 0; ///< Module ID of component uint16_t fEqAdd = 0; ///< Equipment (optical fiber) address [HEX] uint8_t fEqId = 0xff; ///< Equipment (optical fiber) ID of component + float fRefSignal = 900; ///< reference signal for calibration std::map<uint8_t, UnpackAsicPar> fAsicParams = {}; ///< Parameters for each ASIC + std::array<CalibChannelPar, NFASPMOD* NFASPCH> fCalibParams = + {}; ///< Parameters for each ASIC channel for each module /** \brief Write to the debug stream the content of the current param object*/ void dump() const; diff --git a/algo/global/ParFiles.cxx b/algo/global/ParFiles.cxx index b704ef84e2..7ac22ffb63 100644 --- a/algo/global/ParFiles.cxx +++ b/algo/global/ParFiles.cxx @@ -77,7 +77,8 @@ ParFiles::ParFiles(uint32_t runId) tof.hitfinder = "mcbm2024_05/TofHitfinderPar.yaml"; trd.readout = "mcbm2024_05/TrdReadoutSetup.yaml"; - trd.readout2d = "mcbm2024_05/Trd2dReadoutSetup.yaml"; + trd.readout2d = "mcbm2025/Trd2dReadoutSetup.yaml"; + trd.fee2d = "mcbm2025/Trd2dCalibFee.yaml"; trd.hitfinder = "mcbm2024_05/TrdHitfinderPar.yaml"; trd.hitfinder2d = "mcbm2024_05/TrdHitfinder2DPar.yaml"; diff --git a/algo/global/ParFiles.h b/algo/global/ParFiles.h index 9411227464..9c966ac637 100644 --- a/algo/global/ParFiles.h +++ b/algo/global/ParFiles.h @@ -44,6 +44,7 @@ namespace cbm::algo struct { fs::path readout; fs::path readout2d; + fs::path fee2d; fs::path hitfinder; fs::path hitfinder2d; } trd; diff --git a/algo/global/Reco.cxx b/algo/global/Reco.cxx index 003f1c592e..6ca23944bd 100644 --- a/algo/global/Reco.cxx +++ b/algo/global/Reco.cxx @@ -162,7 +162,9 @@ void Reco::Init(const Options& opts) } if (Opts().Has(Subsystem::TRD2D) && Opts().Has(Step::Unpack)) { - auto cfg = yaml::ReadFromFile<trd2d::ReadoutConfig>(Opts().ParamsDir() / parFiles.trd.readout2d); + auto setup = yaml::ReadFromFile<trd2d::ReadoutSetup>(Opts().ParamsDir() / parFiles.trd.readout2d); + auto calib = yaml::ReadFromFile<trd2d::ReadoutCalib>(Opts().ParamsDir() / parFiles.trd.fee2d); + trd2d::Unpack::Config cfg{.roSetup = setup, .roCalib = calib}; fTrd2dUnpack = std::make_unique<trd2d::Unpack>(cfg); } diff --git a/reco/tasks/CbmTaskTrdUnpackParWrite.cxx b/reco/tasks/CbmTaskTrdUnpackParWrite.cxx index aa85f8906c..078d7f32bf 100644 --- a/reco/tasks/CbmTaskTrdUnpackParWrite.cxx +++ b/reco/tasks/CbmTaskTrdUnpackParWrite.cxx @@ -34,7 +34,7 @@ InitStatus CbmTaskTrdUnpackParWrite::Init() // TRD2D =================================================================== { // Output object - cbm::algo::trd2d::ReadoutConfig trd2dConfig; + cbm::algo::trd2d::ReadoutSetup trd2dSetup; // Map (moduleId) -> (array of crobId) std::map<uint32_t, std::vector<uint16_t>> crobMap; @@ -85,17 +85,17 @@ InitStatus CbmTaskTrdUnpackParWrite::Init() } } - trd2dConfig.InitComponentMap(crobMap); - trd2dConfig.InitChannelMap(channelMap); + trd2dSetup.InitComponentMap(crobMap); + trd2dSetup.InitChannelMap(channelMap); // Apply system time offset // See <source_dir>/macro/run/run_unpack_tsa.C if (fPars.setup == Setup::mCBM2022 || fPars.setup == Setup::mCBM2024_03 || fPars.setup == Setup::mCBM2024_05) { // Ni 2022, Au 2022, Ni 2024 - trd2dConfig.SetSystemTimeOffset(-510); + trd2dSetup.SetSystemTimeOffset(-510); } - std::ofstream("Trd2dReadoutSetup.yaml") << yaml::Dump{}(trd2dConfig); + std::ofstream("Trd2dReadoutSetup.yaml") << yaml::Dump{}(trd2dSetup); } // TRD1D =================================================================== diff --git a/reco/tasks/CbmTaskUnpack.cxx b/reco/tasks/CbmTaskUnpack.cxx index db0d9042fe..a41254d09c 100644 --- a/reco/tasks/CbmTaskUnpack.cxx +++ b/reco/tasks/CbmTaskUnpack.cxx @@ -76,7 +76,9 @@ CbmTaskUnpack::CbmTaskUnpack(fs::path paramsDir, uint32_t runId) : FairTask("Unp auto trdCfg = yaml::ReadFromFile<trd::ReadoutConfig>(paramsDir / parFiles.trd.readout); fTrdUnpack = std::make_unique<trd::Unpack>(trdCfg); - auto trd2dCfg = yaml::ReadFromFile<trd2d::ReadoutConfig>(paramsDir / parFiles.trd.readout2d); + trd2d::ReadoutSetup setup = yaml::ReadFromFile<trd2d::ReadoutSetup>(paramsDir / parFiles.trd.readout2d); + trd2d::ReadoutCalib calib = yaml::ReadFromFile<trd2d::ReadoutCalib>(paramsDir / parFiles.trd.fee2d); + trd2d::Unpack::Config trd2dCfg{.roSetup = setup, .roCalib = calib}; fTrd2dUnpack = std::make_unique<trd2d::Unpack>(trd2dCfg); much::ReadoutConfig muchCfg{}; -- GitLab