CbmRoot
Loading...
Searching...
No Matches
CaSearchWindow.h
Go to the documentation of this file.
1/* Copyright (C) 2022 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Sergey Gorbunov, Sergei Zharko [committer] */
4
9
10#pragma once // include this header only once per compilation unit
11
12#include <boost/serialization/array.hpp>
13#include <boost/serialization/string.hpp>
14
15#include <array>
16#include <string>
17
18
20
21namespace cbm::algo::ca
22{
26 class SearchWindow {
27 public:
31 SearchWindow(int stationID, int trackGrID);
32
34 SearchWindow() = default;
35
37 ~SearchWindow() = default;
38
40 SearchWindow(const SearchWindow& other) = default;
41
43 SearchWindow& operator=(const SearchWindow& other) = default;
44
46 SearchWindow(SearchWindow&& other) noexcept = default;
47
49 SearchWindow& operator=(SearchWindow&& other) = default;
50
52 float DxMaxVsX0(float /*x*/) const { return fvParams[kDxMaxVsX0 /*+ 0*/]; }
53
55 float DxMinVsX0(float /*x*/) const { return fvParams[kDxMinVsX0 /*+ 0*/]; }
56
58 float DxMaxVsY0(float /*x*/) const { return fvParams[kDxMaxVsY0 /*+ 0*/]; }
59
61 float DxMinVsY0(float /*x*/) const { return fvParams[kDxMinVsY0 /*+ 0*/]; }
62
64 float DyMaxVsX0(float /*x*/) const { return fvParams[kDyMaxVsX0 /*+ 0*/]; }
65
67 float DyMinVsX0(float /*x*/) const { return fvParams[kDyMinVsX0 /*+ 0*/]; }
68
70 float DyMaxVsY0(float /*y*/) const { return fvParams[kDyMaxVsY0 /*+ 0*/]; }
71
73 float DyMinVsY0(float /*y*/) const { return fvParams[kDyMinVsY0 /*+ 0*/]; }
74
75
77 int GetStationID() const { return fStationID; }
78
80 int GetTrackGroupID() const { return fTrackGroupID; }
81
85 void SetTag(const char* name) { fsTag = name; }
86
87 // TODO: SZh 08.11.2022: Implement variadic template function
88 // TODO: SZh 08.11.2022: Try to reduce number of functions
92 void SetParamDxMaxVsX0(int id, float val);
93
97 void SetParamDxMinVsX0(int id, float val);
98
102 void SetParamDxMaxVsY0(int id, float val);
103
107 void SetParamDxMinVsY0(int id, float val);
108
112 void SetParamDyMaxVsX0(int id, float val);
113
117 void SetParamDyMinVsX0(int id, float val);
118
122 void SetParamDyMaxVsY0(int id, float val);
123
127 void SetParamDyMinVsY0(int id, float val);
128
130 std::string ToString() const;
131
132 private:
133 static constexpr unsigned char kNpars = 1;
134 static constexpr unsigned char kNdeps = 8;
135
148
158 std::array<float, kNdeps* kNpars> fvParams = {0};
159
160 int fStationID = -1;
161 int fTrackGroupID = -1;
162 std::string fsTag = "";
163
166 template<class Archive>
167 void serialize(Archive& ar, const unsigned int)
168 {
169 ar& fvParams;
170 ar& fStationID;
171 ar& fTrackGroupID;
172 ar& fsTag;
173 }
174 };
175} // namespace cbm::algo::ca
Class L1SearchWindow defines a parameterisation of hits search window for CA tracking algorithm TODO:...
float DyMaxVsY0(float) const
Parameterisation function for dy_max(y0)
void SetParamDxMinVsX0(int id, float val)
Sets parameters for dx_min(x0)
void SetParamDyMaxVsX0(int id, float val)
Sets parameters for dy_max(x0)
int GetStationID() const
Gets station id.
float DxMinVsY0(float) const
Parameterisation function for dx_min(y0)
void serialize(Archive &ar, const unsigned int)
float DxMaxVsY0(float) const
Parameterisation function for dx_max(y0)
SearchWindow(SearchWindow &&other) noexcept=default
Move constructor.
float DyMaxVsX0(float) const
Parameterisation function for dy_max(x0)
void SetParamDxMaxVsY0(int id, float val)
Sets parameters for dx_max(y0)
float DyMinVsY0(float) const
Parameterisation function for dy_min(y0)
SearchWindow & operator=(SearchWindow &&other)=default
Move assignment operator.
int GetTrackGroupID() const
Gets track group id.
float DyMinVsX0(float) const
Parameterisation function for dy_min(x0)
static constexpr unsigned char kNpars
Max number of parameters for one dependency.
SearchWindow()=default
Default constructor.
float DxMaxVsX0(float) const
Parameterisation function for dx_max(x0)
int fTrackGroupID
Index of tracks group.
void SetParamDyMinVsX0(int id, float val)
Sets parameters for dy_min(x0)
SearchWindow(const SearchWindow &other)=default
Copy constructor.
std::array< float, kNdeps *kNpars > fvParams
Search window parameter array containing parameters from.
std::string fsTag
Tag, containing information on the tracks group (TODO: can be omitted?)
~SearchWindow()=default
Destructor.
void SetParamDyMaxVsY0(int id, float val)
Sets parameters for dy_max(y0)
void SetParamDxMinVsY0(int id, float val)
Sets parameters for dx_min(y0)
void SetParamDyMinVsY0(int id, float val)
Sets parameters for dy_min(y0)
void SetParamDxMaxVsX0(int id, float val)
Sets parameters for dx_max(x0)
int fStationID
Global index of active tracking station.
std::string ToString() const
String representation of the contents.
friend class boost::serialization::access
Serialization function.
float DxMinVsX0(float) const
Parameterisation function for dx_min(x0)
static constexpr unsigned char kNdeps
Number of the dependencies.
SearchWindow & operator=(const SearchWindow &other)=default
Copy assignment operator.
void SetTag(const char *name)
Sets tag.
EDependency
Enumeration for dependencies stored.
TODO: SZh 8.11.2022: add selection of parameterisation.
Definition CaBranch.h:14