Skip to content
Snippets Groups Projects
Commit cc158d61 authored by Felix Weiglhofer's avatar Felix Weiglhofer Committed by Volker Friese
Browse files

algo::Unpack: Add flag to toggle walk correction.

parent 0d974bcd
No related branches found
No related tags found
1 merge request!1201cbmreco: Integrate algo::Unpack
......@@ -153,7 +153,7 @@ namespace cbm::algo
elinkPar.fTimeOffset = fSystemTimeOffset[fles::SubsystemIdentifier::STS];
elinkPar.fAdcOffset = 1.;
elinkPar.fAdcGain = 1.;
elinkPar.fWalk = fStsConfig.WalkMap(elinkPar.fAddress, elinkPar.fAsicNr);
if (fApplyWalkCorrection) elinkPar.fWalk = fStsConfig.WalkMap(elinkPar.fAddress, elinkPar.fAsicNr);
// TODO: Add parameters for time and ADC calibration
par->fElinkParams.push_back(elinkPar);
}
......@@ -274,7 +274,8 @@ namespace cbm::algo
L_(debug) << "--- Configured equipment " << equip << " with " << numAsics << " asics";
}
L_(info) << "--- Configured " << fAlgoSts.size() << " unpacker algorithms for STS.";
L_(info) << "--- Configured " << fAlgoSts.size()
<< " unpacker algorithms for STS. (Walk correction = " << fApplyWalkCorrection << ")";
L_(debug) << "Readout map:" << fStsConfig.PrintReadoutMap();
L_(info) << "--- Configured " << fAlgoMuch.size() << " unpacker algorithms for MUCH.";
L_(info) << "--- Configured " << fAlgoRich.size() << " unpacker algorithms for RICH.";
......
......@@ -101,6 +101,12 @@ namespace cbm::algo
/** @brief Parameters for RICH unpackers **/
RichReadoutConfig fRichConfig {};
/**
* @brief Set whether to apply walk correction. Must be set before Init(). (default: true)
**/
void SetApplyWalkCorrection(bool applyWalkCorrection) { fApplyWalkCorrection = applyWalkCorrection; }
/** @brief Initialize unpackers and fill parameters from config objects
* @param subIds: vector of subsystem identifiers to unpack, default: all
* @see Init()
......@@ -128,8 +134,9 @@ namespace cbm::algo
std::vector<MonitorData>* monitorMs, uint8_t sys_ver);
private: // members
std::vector<fles::SubsystemIdentifier> fSubIds = {}; ///< Detector identifiers to unpack
private: // members
bool fApplyWalkCorrection = true; ///< Apply walk correction
std::vector<fles::SubsystemIdentifier> fSubIds = {}; ///< Detector identifiers to unpack
/** @brief STS unpackers **/
std::map<uint16_t, UnpackSts> fAlgoSts = {};
......
......@@ -7,6 +7,8 @@ using namespace cbm::algo;
void UnpackChain::Init()
{
// Disable walk correction for now. 2022 data crashes unpacker with hardcoded 2021 params.
fUnpack.SetApplyWalkCorrection(false);
fUnpack.Init(std::vector<fles::SubsystemIdentifier> {
fles::SubsystemIdentifier::STS,
// fles::SubsystemIdentifier::MUCH,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment