CbmRoot
Loading...
Searching...
No Matches
CbmStsUnpackAlgoBase.cxx
Go to the documentation of this file.
1/* Copyright (C) 2021 Fair GmbH, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Pierre-Alain Loizeau, Dominik Smith [committer] */
4
6
7CbmStsUnpackAlgoBase::CbmStsUnpackAlgoBase(std::string name) : CbmRecoUnpackAlgo(name) {}
8
10
11// ---- GetParContainerRequest ----
12std::vector<std::pair<std::string, std::shared_ptr<FairParGenericSet>>>*
13 CbmStsUnpackAlgoBase::GetParContainerRequest(std::string /*geoTag*/, std::uint32_t /*runId*/)
14{
15 // Basepath for default Sts parameter sets (those connected to a geoTag)
16 std::string basepath = Form("%s", fParFilesBasePath.data());
17 std::string temppath = "";
18
19 // // Get parameter container
20 temppath = basepath + "mStsPar.par";
21 fParContVec.emplace_back(std::make_pair(temppath, std::make_shared<CbmMcbm2018StsPar>()));
22
23 return &fParContVec;
24}
25
26void CbmStsUnpackAlgoBase::SetWalkMap(const std::map<uint32_t, CbmStsParModule>& mapIn)
27{
28 for (auto& mapInEntry : mapIn) {
29 const std::vector<CbmStsParAsic>& asicPars = (mapInEntry.second).GetAsicParams();
30 uint32_t uNbAsics = asicPars.size();
31 fWalkLookup[mapInEntry.first].resize(uNbAsics);
32 LOG(debug) << Form("[STS-UNPACKER] setting TW parameters: %x\n", mapInEntry.first);
33 for (uint32_t asicIdx = 0; asicIdx < uNbAsics; ++asicIdx) {
34 fWalkLookup[mapInEntry.first][asicIdx].resize(31);
35 for (uint32_t uAdc = 0; uAdc < 31; ++uAdc) {
36 fWalkLookup[mapInEntry.first][asicIdx][uAdc] = asicPars[asicIdx].GetWalkCoef(uAdc);
37 }
38 }
39 }
41}
42
ClassImp(CbmConverterManager)
Baseclass for the Sts unpacker algorithms.
bool fbUseTimeWalkCorrection
Enable/Disable time-walk correction.
void SetWalkMap(const std::map< uint32_t, CbmStsParModule > &mapIn)
Enable/Disable time-walk correction.
virtual ~CbmStsUnpackAlgoBase()
Destroy the Cbm Sts Unpack Task object.
std::map< uint32_t, std::vector< std::vector< double > > > fWalkLookup
Per-ASIC's sensors Time-Walk correction mapping.
CbmStsUnpackAlgoBase(std::string name)
Create the Cbm Sts Unpack AlgoBase object.
virtual std::vector< std::pair< std::string, std::shared_ptr< FairParGenericSet > > > * GetParContainerRequest(std::string geoTag, std::uint32_t runId)
Get the requested parameter containers. To be defined in the derived classes! Return the required par...