CbmRoot
Loading...
Searching...
No Matches
CaStation.h
Go to the documentation of this file.
1/* Copyright (C) 2007-2022 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Sergey Gorbunov [committer], Igor Kulakov, Sergei Zharko */
4
5#pragma once // include this header only once per compilation unit
6
7#include "CaDefs.h"
8#include "CaSimd.h"
9#include "KfFieldRegion.h"
10
11#include <string>
12
13namespace cbm::algo::ca
14{
18 template<typename DataT>
19 class Station {
20 public:
21 // TODO: SZh 12.05.2022: Rewrite type into L1DetectorID, change detector indexing scheme
22 // TODO: SZh 12.05.2022: Provide getters to stations
23
24 int type = constants::Undef<int>; // TODO: replace with L1DetectorID
32
34
35 Station() = default;
36
38 template<typename DataIn>
40 : type(other.GetType())
41 , timeInfo(other.GetTimeStatus())
43 , geoLayerID(other.GetGeoLayerID())
44 , fZ(other.template GetZ<DataT>())
45 , Xmax(other.template GetXmax<DataT>())
46 , Ymax(other.template GetYmax<DataT>())
47 , fieldSlice(other.fieldSlice)
48 {
49 }
50
51 // Serialization block
53 template<class Archive>
54 void serialize(Archive& ar, const unsigned int)
55 {
56 ar& type;
57 ar& timeInfo;
58 ar& fieldStatus;
59 ar& geoLayerID;
60
61 ar& fZ;
62 ar& Xmax;
63 ar& Ymax;
64
65 ar& fieldSlice;
66 }
67
71 void CheckConsistency() const;
72
74 int GetType() const { return type; }
75
77 int GetTimeStatus() const { return timeInfo; }
78
80 int GetFieldStatus() const { return fieldStatus; }
81
83 int GetGeoLayerID() const { return geoLayerID; }
84
86 template<typename DataOut = DataT>
87 DataOut GetZ() const
88 {
89 return kfutils::simd::Cast<DataT, DataOut>(fZ);
90 }
91
93 template<typename DataOut = DataT>
94 DataOut GetXmax() const
95 {
96 return kfutils::simd::Cast<DataT, DataOut>(Xmax);
97 }
98
100 template<typename DataOut = DataT>
101 DataOut GetXmin() const
102 {
103 return kfutils::simd::Cast<DataT, DataOut>(-Xmax);
104 }
105
107 template<typename DataOut = DataT>
108 DataOut GetYmax() const
109 {
110 return kfutils::simd::Cast<DataT, DataOut>(Ymax);
111 }
112
114 template<typename DataOut = DataT>
115 DataOut GetYmin() const
116 {
117 return kfutils::simd::Cast<DataT, DataOut>(-Ymax);
118 }
119
123 std::string ToString(int verbosityLevel = 0, int indentLevel = 0, bool isHeader = false) const;
124
126
127} // namespace cbm::algo::ca
Compile-time constants definition for the CA tracking algorithm.
Magnetic flux density interpolation along the track vs. z-coordinate (header)
int geoLayerID
Index of layer in geometrical setup.
Definition CaStation.h:28
DataT Xmax
min radius of the station [cm]
Definition CaStation.h:30
DataOut GetXmax() const
Gets limit of the station size in x-axis direction.
Definition CaStation.h:94
void CheckConsistency() const
Verifies class invariant consistency.
Definition CaStation.cxx:17
Station(const Station< DataIn > &other)
Copy constructor with type conversion.
Definition CaStation.h:39
DataT fZ
z position of station [cm]
Definition CaStation.h:29
void serialize(Archive &ar, const unsigned int)
Definition CaStation.h:54
int timeInfo
flag: if time information can be used
Definition CaStation.h:25
std::string ToString(int verbosityLevel=0, int indentLevel=0, bool isHeader=false) const
String representation of class contents.
Definition CaStation.cxx:70
DataT Ymax
max radius of the station [cm]
Definition CaStation.h:31
DataOut GetYmax() const
Gets limit of the station size in y-axis direction.
Definition CaStation.h:108
DataOut GetXmin() const
Gets limit of the station size in x-axis direction.
Definition CaStation.h:101
int GetType() const
Gets type of the station.
Definition CaStation.h:74
int fieldStatus
flag: 1 - station is INSIDE the field, 0 - station is OUTSIDE the field
Definition CaStation.h:26
friend class boost::serialization::access
Definition CaStation.h:52
kf::FieldSlice< DataT > fieldSlice
Magnetic field near the station.
Definition CaStation.h:33
int GetGeoLayerID() const
Gets index of the layer in the geometry setup (which can include inactive stations as well)
Definition CaStation.h:83
int GetFieldStatus() const
Gets field status flag.
Definition CaStation.h:80
DataOut GetYmin() const
Gets limit of the station size in y-axis direction.
Definition CaStation.h:115
int GetTimeStatus() const
Gets time-measurement flag.
Definition CaStation.h:77
DataOut GetZ() const
Gets z-position of the station.
Definition CaStation.h:87
A magnetic field approximation on the two-dimensional plane.
constexpr int Undef< int >
Definition CaDefs.h:113
constexpr T2 Undef
Undefined values.
Definition CaDefs.h:110
TODO: SZh 8.11.2022: add selection of parameterisation.
Definition CaBranch.h:14
class cbm::algo::ca::WindowData _fvecalignment