Skip to content
Snippets Groups Projects
Commit 7b6e3331 authored by Pierre-Alain Loizeau's avatar Pierre-Alain Loizeau
Browse files

Add support for new TOF components in online unpacker config

parent 25cd9dc1
No related branches found
No related tags found
1 merge request!1808Add TOF CriPar file, provided by Norbert Herrmann, refs #3283
Pipeline #29307 passed
......@@ -117,6 +117,7 @@ set(SRCS
detectors/tof/TrackingInterface.cxx
detectors/tof/config/ReadoutPars_mCBM2022.cxx
detectors/tof/config/ReadoutPars_mCBM2024.cxx
detectors/tof/config/ReadoutPars_mCBM2024_05.cxx
detectors/bmon/ReadoutConfig.cxx
detectors/bmon/Unpack.cxx
detectors/bmon/UnpackMS.cxx
......
......@@ -21,6 +21,7 @@ namespace cbm::algo::tof::config
static ReadoutPars MakeMCBM2022();
static ReadoutPars MakeMCBM2024();
static ReadoutPars MakeMCBM2024_05();
bool mcbmTof2024 = false;
......
/* Copyright (C) 2024 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
SPDX-License-Identifier: GPL-3.0-only
Authors: Felix Weiglhofer [committer], Dominik Smith */
#include "Exceptions.h"
#include "ReadoutPars.h"
using namespace cbm::algo::tof::config;
ReadoutPars ReadoutPars::MakeMCBM2024_05()
{
// This here refers to the mCBM 2022 and 2024 setups.
// Taken from CbmMcbm2018TofPar in combination with macro/beamtime/mcbm2022/mTofCriParNickel.par
// and mTofCriParNickel_withBmon.par (?)
ReadoutPars pars;
pars.mcbmTof2024 = true;
pars.nFebsPerComponent = 5;
pars.nAsicsPerFeb = 8;
pars.nChannelsPerAsic = 4;
pars.nCrobPerComponent = 1;
constexpr int NumCrob = 19;
// Module Identifier connected to Gbtx link, has to match geometry
const int32_t moduleId[NumCrob] = {0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 0, 0, 0, 1, 0, 1, 1, 5, 5};
// type of Rpcs connected to Gbtx link
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};
// 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};
for (int i = 0; i < NumCrob; ++i) {
pars.crobs.push_back({moduleId[i], rpcType[i], rpcSide[i], numRpc[i]});
}
pars.eqIds = {0xabc0, 0xabc1, 0xabc2, 0xabc3, 0xabc4, 0xabc5, 0xabc6, 0xabc7, 0xabc8, 0xabc9,
0xabca, 0xabcb, 0xabd0, 0xabd1, 0xbbc0, 0xabcc, 0xabcd, 0xabce, 0xabcf};
pars.elink2Asic = {27, 2, 7, 3, 31, 26, 30, 1, 33, 37, 32, 13, 9, 14, 10, 15, 17, 21, 16, 35,
34, 38, 25, 24, 0, 6, 20, 23, 18, 22, 28, 4, 29, 5, 19, 36, 39, 8, 12, 11};
pars.elink2AsicInner = {0, 16, 8, 17, 1, 18, 9, 19, 2, 20, 10, 21, 3, 22, 11, 23, 4, 24, 12, 25,
5, 26, 13, 27, 6, 28, 14, 29, 7, 30, 15, 31, 32, 33, 34, 35, 36, 37, 38, 39};
// Mapping in Readout chain PCBs
pars.asic2PadI = {
3, 2, 1, 0, 7, 6, 5, 4, 11, 10, 9, 8, 15, 14, 13, 12,
19, 18, 17, 16, 23, 22, 21, 20, 27, 26, 25, 24, 31, 30, 29, 28}; //! Map from GET4 channel to PADI channel
if (pars.NElinksPerCrob() != static_cast<i32>(pars.elink2Asic.size())) {
throw FatalError("tof::ReadoutPars::MakeMCBM2024_05 => size of elink2Asic not matching, {} vs {}, stop there!",
static_cast<uint32_t>(pars.elink2Asic.size()), static_cast<uint32_t>(pars.NElinksPerCrob()));
}
if (pars.NElinksPerCrob() != static_cast<i32>(pars.elink2AsicInner.size())) {
throw FatalError("tof::ReadoutPars::MakeMCBM2024_05 => size of elink2AsicInner not matching, {} vs {}, stop there!",
static_cast<uint32_t>(pars.elink2Asic.size()), static_cast<uint32_t>(pars.NElinksPerCrob()));
}
if (pars.NChansPerFeb() != static_cast<i32>(pars.asic2PadI.size())) {
throw FatalError("tof::ReadoutPars::MakeMCBM2024_05 => size of asic2PadI not matching, {} vs {}, stop there!",
static_cast<uint32_t>(pars.elink2Asic.size()), static_cast<uint32_t>(pars.NChansPerFeb()));
}
return pars;
}
......@@ -134,7 +134,8 @@ void Reco::Init(const Options& opts)
}
if (Opts().Has(Subsystem::TOF) && Opts().Has(Step::Unpack)) {
tof::ReadoutConfig cfg{2724 <= Opts().RunId() ? tof::config::ReadoutPars::MakeMCBM2024()
tof::ReadoutConfig cfg{2918 <= Opts().RunId() ? tof::config::ReadoutPars::MakeMCBM2024_05()
: 2724 <= Opts().RunId() ? tof::config::ReadoutPars::MakeMCBM2024()
: tof::config::ReadoutPars::MakeMCBM2022()};
fTofUnpack = std::make_unique<tof::Unpack>(cfg);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment