CbmRoot
Loading...
Searching...
No Matches
RecoParams.h
Go to the documentation of this file.
1/* Copyright (C) 2023-2025 FIAS Frankfurt Institute for Advanced Studies, Frankfurt / Main
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Felix Weiglhofer [committer] */
4#ifndef CBM_ALGO_BASE_RECOPARAMS_H
5#define CBM_ALGO_BASE_RECOPARAMS_H
6
7#include "CbmYaml.h"
8#include "Definitions.h"
9
10#include <xpu/defines.h>
11
12namespace cbm::algo
13{
14
18 struct RecoParams {
19 enum class SortMode : u8
20 {
23 };
24 enum class AllocationMode : u8
25 {
26 Auto, //< Static on GPU, dynamic on CPU
27 Static, //< Allocate all buffers beforehand
28 Dynamic, //< Allocate buffers per timeslice
29 };
30
31 struct STS {
34
36
41
44
45 struct Memory {
51
52 u64 NClustersUpperBound(u64 nDigis) const { return nDigis * clustersPerDigi; }
53 u64 NHitsUpperBound(u64 nDigis) const { return NClustersUpperBound(nDigis) * hitsPerCluster; }
54
57
61
63 yaml::Property(&Memory::allocationMode, "allocationMode", "Allocation mode (Auto, Static, Dynamic)"),
64 yaml::Property(&Memory::maxNDigisPerTS, "maxNDigisPerTS", "Maximal number of digis per time slice"),
65 yaml::Property(&Memory::maxNDigisPerModule, "maxNDigisPerModule", "Maximal number of digis per module"),
66 yaml::Property(&Memory::clustersPerDigi, "clustersPerDigi", "Number of clusters per digi in a time slice"),
67 yaml::Property(&Memory::hitsPerCluster, "hitsPerCluster", "Number of hits per cluster in a time slice"));
69
71 yaml::Property(&STS::digiSortMode, "digiSortMode",
72 "Digi sort mode (0 = block sort, 1 = cub segmented sort))"),
73 yaml::Property(&STS::clusterSortMode, "clusterSortMode", "Cluster sort mode"),
74
75 yaml::Property(&STS::findClustersMultiKernels, "findClustersMultiKernels",
76 "Split cluster finding into multiple kernels"),
77
78 yaml::Property(&STS::timeCutDigiAbs, "timeCutDigiAbs",
79 "Time delta for neighboring digis to be considered for the same cluster. [ns]"),
80 yaml::Property(
81 &STS::timeCutDigiSig, "timeCutDigiSig",
82 "Used if timeCutDigiAbs is negative. Time delta must be < 'value * sqrt2 * timeResolution'. [ns]"),
83 yaml::Property(&STS::timeCutClusterAbs, "timeCutClusterAbs",
84 "Maximal time difference between two clusters in a hit [ns]."
85 " Setting to a positive value will override timeCutClustersSig."),
86 yaml::Property(
87 &STS::timeCutClusterSig, "timeCutClusterSig",
88 "Time cut for clusters."
89 " Two clusters are considered it their time difference is below 'value * sqrt(terr1**2 + terr2*+2)'"),
90
91 yaml::Property(&STS::doChargeCorrelation, "doChargeCorrelation",
92 "Enable charge correlation between front+back clusters during hit finding"),
93 yaml::Property(&STS::chargeCorrelationDelta, "chargeCorrelationDelta", "Delta in total charge between front and back clusters to be considered for hit finding"),
94 yaml::Property(&STS::memory, "memory", "Memory limits for STS reco"));
95 };
96
98
99 CBM_YAML_PROPERTIES(yaml::Property(&RecoParams::sts, "sts", "STS reco settings"));
100 };
101
102} // namespace cbm::algo
103
105
109);
110
115);
116
117#endif // CBM_ALGO_BASE_RECOPARAMS_H
#define CBM_ENUM_DICT(type,...)
#define CBM_YAML_EXTERN_DECL(type)
Declare the external instantiation of the Read and Dump functions for a type.
Definition CbmYaml.h:342
float f32
Definition Definitions.h:24
uint64_t u64
Definition Definitions.h:23
uint8_t u8
Definition Definitions.h:17
double f64
Definition Definitions.h:25
u64 NClustersUpperBound(u64 nDigis) const
Definition RecoParams.h:52
CBM_YAML_PROPERTIES(yaml::Property(&Memory::allocationMode, "allocationMode", "Allocation mode (Auto, Static, Dynamic)"), yaml::Property(&Memory::maxNDigisPerTS, "maxNDigisPerTS", "Maximal number of digis per time slice"), yaml::Property(&Memory::maxNDigisPerModule, "maxNDigisPerModule", "Maximal number of digis per module"), yaml::Property(&Memory::clustersPerDigi, "clustersPerDigi", "Number of clusters per digi in a time slice"), yaml::Property(&Memory::hitsPerCluster, "hitsPerCluster", "Number of hits per cluster in a time slice"))
u64 NHitsUpperBound(u64 nDigis) const
Definition RecoParams.h:53
struct cbm::algo::RecoParams::STS::Memory memory
CBM_YAML_PROPERTIES(yaml::Property(&STS::digiSortMode, "digiSortMode", "Digi sort mode (0 = block sort, 1 = cub segmented sort))"), yaml::Property(&STS::clusterSortMode, "clusterSortMode", "Cluster sort mode"), yaml::Property(&STS::findClustersMultiKernels, "findClustersMultiKernels", "Split cluster finding into multiple kernels"), yaml::Property(&STS::timeCutDigiAbs, "timeCutDigiAbs", "Time delta for neighboring digis to be considered for the same cluster. [ns]"), yaml::Property(&STS::timeCutDigiSig, "timeCutDigiSig", "Used if timeCutDigiAbs is negative. Time delta must be < 'value * sqrt2 * timeResolution'. [ns]"), yaml::Property(&STS::timeCutClusterAbs, "timeCutClusterAbs", "Maximal time difference between two clusters in a hit [ns]." " Setting to a positive value will override timeCutClustersSig."), yaml::Property(&STS::timeCutClusterSig, "timeCutClusterSig", "Time cut for clusters." " Two clusters are considered it their time difference is below 'value * sqrt(terr1**2 + terr2*+2)'"), yaml::Property(&STS::doChargeCorrelation, "doChargeCorrelation", "Enable charge correlation between front+back clusters during hit finding"), yaml::Property(&STS::chargeCorrelationDelta, "chargeCorrelationDelta", "Delta in total charge between front and back clusters to be considered for hit finding"), yaml::Property(&STS::memory, "memory", "Memory limits for STS reco"))
RecoParams contains all parameters to configure reconstruction.
Definition RecoParams.h:18
CBM_YAML_PROPERTIES(yaml::Property(&RecoParams::sts, "sts", "STS reco settings"))