CbmRoot
Loading...
Searching...
No Matches
RecoParams.h
Go to the documentation of this file.
1/* Copyright (C) 2023 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 "Definitions.h"
8#include "util/EnumDict.h"
9#include "yaml/Property.h"
10#include "yaml/Yaml.h"
11
12#include <xpu/defines.h>
13
14namespace cbm::algo
15{
16
20 struct RecoParams {
21 enum class SortMode : u8
22 {
23 BlockSort = 0,
25 };
26 enum class AllocationMode : u8
27 {
28 Auto, //< Static on GPU, dynamic on CPU
29 Static, //< Allocate all buffers beforehand
30 Dynamic, //< Allocate buffers per timeslice
31 };
32
33 struct STS {
36
38
43
46
47 struct Memory {
53
54 u64 NClustersUpperBound(u64 nDigis) const { return nDigis * clustersPerDigi; }
55 u64 NHitsUpperBound(u64 nDigis) const { return NClustersUpperBound(nDigis) * hitsPerCluster; }
56
59
63
65 yaml::Property(&Memory::allocationMode, "allocationMode", "Allocation mode (Auto, Static, Dynamic)"),
66 yaml::Property(&Memory::maxNDigisPerTS, "maxNDigisPerTS", "Maximal number of digis per time slice"),
67 yaml::Property(&Memory::maxNDigisPerModule, "maxNDigisPerModule", "Maximal number of digis per module"),
68 yaml::Property(&Memory::clustersPerDigi, "clustersPerDigi", "Number of clusters per digi in a time slice"),
69 yaml::Property(&Memory::hitsPerCluster, "hitsPerCluster", "Number of hits per cluster in a time slice"));
71
73 yaml::Property(&STS::digiSortMode, "digiSortMode",
74 "Digi sort mode (0 = block sort, 1 = cub segmented sort))"),
75 yaml::Property(&STS::clusterSortMode, "clusterSortMode", "Cluster sort mode"),
76
77 yaml::Property(&STS::findClustersMultiKernels, "findClustersMultiKernels",
78 "Split cluster finding into multiple kernels"),
79
80 yaml::Property(&STS::timeCutDigiAbs, "timeCutDigiAbs",
81 "Time delta for neighboring digis to be considered for the same cluster. [ns]"),
83 &STS::timeCutDigiSig, "timeCutDigiSig",
84 "Used if timeCutDigiAbs is negative. Time delta must be < 'value * sqrt2 * timeResolution'. [ns]"),
85 yaml::Property(&STS::timeCutClusterAbs, "timeCutClusterAbs",
86 "Maximal time difference between two clusters in a hit [ns]."
87 " Setting to a positive value will override timeCutClustersSig."),
89 &STS::timeCutClusterSig, "timeCutClusterSig",
90 "Time cut for clusters."
91 " Two clusters are considered it their time difference is below 'value * sqrt(terr1**2 + terr2*+2)'"),
92
93 yaml::Property(&STS::doChargeCorrelation, "doChargeCorrelation",
94 "Enable charge correlation between front+back clusters during hit finding"),
95 yaml::Property(&STS::chargeCorrelationDelta, "chargeCorrelationDelta", "Delta in total charge between front and back clusters to be considered for hit finding"),
96 yaml::Property(&STS::memory, "memory", "Memory limits for STS reco"));
97 };
98
100
101 CBM_YAML_PROPERTIES(yaml::Property(&RecoParams::sts, "sts", "STS reco settings"));
102 };
103
104} // namespace cbm::algo
105
107
109 {"BlockSort", RecoParams::SortMode::BlockSort},
110 {"CUBSegmentedSort", RecoParams::SortMode::CUBSegmentedSort}
111);
112
114 {"Auto", RecoParams::AllocationMode::Auto},
115 {"Static", RecoParams::AllocationMode::Static},
116 {"Dynamic", RecoParams::AllocationMode::Dynamic}
117);
118
119#endif // CBM_ALGO_BASE_RECOPARAMS_H
#define CBM_ENUM_DICT(type,...)
Definition EnumDict.h:106
#define CBM_YAML_EXTERN_DECL(type)
Declare the external instantiation of the Read and Dump functions for a type.
Definition Yaml.h:297
float f32
Definition Definitions.h:24
std::uint64_t u64
Definition Definitions.h:23
std::uint8_t u8
Definition Definitions.h:17
double f64
Definition Definitions.h:25
u64 NClustersUpperBound(u64 nDigis) const
Definition RecoParams.h:54
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:55
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:20
CBM_YAML_PROPERTIES(yaml::Property(&RecoParams::sts, "sts", "STS reco settings"))