Skip to content
Snippets Groups Projects
Commit f2ef8c02 authored by Felix Weiglhofer's avatar Felix Weiglhofer
Browse files

sts::Hitfinder: Fix memory limits.

parent a1e7fca6
No related branches found
No related tags found
1 merge request!1231sts::Hitfinder: Fix memory limits.
Pipeline #23092 passed
......@@ -242,8 +242,9 @@ void sts::HitfinderChain::AllocateDynamic(size_t maxNDigisPerModule, size_t nDig
const int nModules = fPars->modules.size();
const int nModuleSides = 2 * nModules; // Number of module front + backsides
const size_t maxNClustersPerModule = maxNDigisPerModule * kClustersPerDigiFactor;
const size_t maxNHitsPerModule = maxNClustersPerModule * kHitsPerClustersFactor;
const size_t maxNClustersPerModule = maxNDigisPerModule * Params().sts.memoryLimits.clustersPerDigiModule;
const size_t maxNHitsPerModule = maxNClustersPerModule * Params().sts.memoryLimits.hitsPerClusterModule;
// Allocate Digi Buffers
fHitfinder.digiOffsetPerModule.reset(nModuleSides + 1, xpu::buf_io);
......
......@@ -58,14 +58,6 @@ namespace cbm::algo::sts
DigiMapSide back;
};
/**
* Factors used to estimate buffer sizes based on number of digis.
* TODO: These values might be wildly off. Look for better estimations.
* TODO: Should be configurable at runtime.
*/
static constexpr float kClustersPerDigiFactor = 1.f;
static constexpr float kHitsPerClustersFactor = 1.5f;
/**
* Ensure parameters were set. Raises log(fatal) otherwise.
*/
......
......@@ -18,5 +18,5 @@ sts:
clustersPerDigiTS: 1.0
clustersPerDigiModule: 1.0
hitsPerClusterTS: 1.0
hitsPerClusterModule: 1.0
hitsPerClusterModule: 2.0
...
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