14#include <boost/serialization/vector.hpp>
38 MaterialMap(
int nBins,
float xyMax,
float zRef,
float zMin,
float zMax);
85 if constexpr (std::is_same_v<I, fvec>) {
87 for (
size_t i = 0; i < utils::simd::Size<I>(); ++i) {
97 i = (i < fNbins && i >= 0) ? i :
fNbins / 2;
98 j = (j < fNbins && j >= 0) ? j :
fNbins / 2;
109 if constexpr (std::is_same_v<I, fvec>) {
111 for (
size_t i = 0; i < utils::simd::Size<I>(); ++i) {
139 void Rebin(
int factor);
153 std::string
ToString(
int indentLevel = 0,
int verbose = 1)
const;
161 void CheckConsistency()
const;
173 friend class boost::serialization::access;
174 template<
class Archive>
std::string ToString(CbmCutId id)
Convert CbmCutId to a string representation.
Common constant definitions for the Kalman Filter library.
float GetXYmax() const
Gets radius of the material table [cm].
std::vector< float > fTable
Material budget table.
MaterialMap & operator=(const MaterialMap &other)=default
Copy assignment operator.
float GetZmin() const
Gets minimal Z of the collected material [cm].
float fFactor
Util. var. for the conversion of point coordinates to row/column id.
int fNbins
Number of rows (== N columns) in the material budget table.
~MaterialMap() noexcept=default
Destructor.
float GetZref() const
Gets reference Z of the material [cm].
MaterialMap & operator=(MaterialMap &&other) noexcept=default
Move assignment operator.
float fXYmax
Size of the station in x and y dimensions [cm].
float fZmax
Minimal Z of the collected material [cm].
float fZref
Reference Z of the collected material [cm].
int GetNbins() const
Gets number of bins (rows or columns) of the material table.
void SetRadThickBin(int iBinX, int iBinY, float thickness)
Sets value of material thickness in units of X0 for a given cell of the material table.
MaterialMap(MaterialMap &&other) noexcept=default
Move constructor.
MaterialMap(const MaterialMap &other)=default
Copy constructor.
MaterialMap()=default
Default constructor.
I GetBinThicknessX0(int iGlob) const
Gets material thickness in units of radiational length X0.
int GetBin(float x, float y) const
Gets bin index for (x,y). Returns -1 when outside of the map.
friend bool operator<(const MaterialMap &lhs, const MaterialMap &rhs)
Comparison operator (material map ordering by fZref)
I GetThicknessX0(const I &x, const I &y) const
Gets material thickness in units of radiational length X0.
float fZmin
Minimal Z of the collected material [cm].
void Add(const MaterialMap &other, float zTarg=defs::Undef< float >)
Adds material layer.
void serialize(Archive &ar, const unsigned int)
float GetZmax() const
Gets maximal Z of the collected material [cm].
bool IsUndefined() const
Function to test the instance for NaN.
I GetBinThicknessX0(int iX, int iY) const
Gets material thickness in units of radiational length X0.
constexpr T2 Undef
Undefined values.
bool IsUndefined(const T &val)
Checks whether a variable of a particular type defined.