CbmRoot
|
A map of station thickness in units of radiation length (X0) to the specific point in XY plane. More...
#include <KfMaterialMap.h>
Public Member Functions | |
MaterialMap ()=default | |
Default constructor. | |
MaterialMap (int nBins, float xyMax, float zRef, float zMin, float zMax) | |
Constructor from parameters. | |
MaterialMap (const MaterialMap &other)=default | |
Copy constructor. | |
MaterialMap & | operator= (const MaterialMap &other)=default |
Copy assignment operator. | |
MaterialMap (MaterialMap &&other) noexcept | |
Move constructor. | |
MaterialMap & | operator= (MaterialMap &&other) noexcept |
Move assignment operator. | |
~MaterialMap () noexcept=default | |
Destructor. | |
void | Add (const MaterialMap &other, float zTarg=defs::Undef< float >) |
Adds material layer. | |
int | GetBin (float x, float y) const |
Gets bin index for (x,y). Returns -1 when outside of the map. | |
int | GetNbins () const |
Gets number of bins (rows or columns) of the material table. | |
float | GetXYmax () const |
Gets radius of the material table [cm]. | |
float | GetZref () const |
Gets reference Z of the material [cm]. | |
float | GetZmin () const |
Gets minimal Z of the collected material [cm]. | |
float | GetZmax () const |
Gets maximal Z of the collected material [cm]. | |
template<typename I > | |
I | GetThicknessX0 (const I &x, const I &y) const |
Gets material thickness in units of radiational length X0. | |
template<typename I > | |
I | GetBinThicknessX0 (int iGlob) const |
Gets material thickness in units of radiational length X0. | |
template<typename I > | |
I | GetBinThicknessX0 (int iX, int iY) const |
Gets material thickness in units of radiational length X0. | |
bool | IsUndefined () const |
Function to test the instance for NaN. | |
void | Rebin (int factor) |
Reduces number of bins by a given factor. | |
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. | |
void | Swap (MaterialMap &other) noexcept |
Swap method. | |
std::string | ToString (int indentLevel=0, int verbose=1) const |
String representation of the object. | |
Private Member Functions | |
void | CheckConsistency () const |
Checks the object consistency. | |
template<class Archive > | |
void | serialize (Archive &ar, const unsigned int) |
Private Attributes | |
int | fNbins = defs::Undef<int> |
Number of rows (== N columns) in the material budget table. | |
float | fXYmax = defs::Undef<float> |
Size of the station in x and y dimensions [cm]. | |
float | fFactor = defs::Undef<float> |
Util. var. for the conversion of point coordinates to row/column id. | |
float | fZref = defs::Undef<float> |
Reference Z of the collected material [cm]. | |
float | fZmin = defs::Undef<float> |
Minimal Z of the collected material [cm]. | |
float | fZmax = defs::Undef<float> |
Minimal Z of the collected material [cm]. | |
std::vector< float > | fTable {} |
Material budget table. | |
Friends | |
class | boost::serialization::access |
Serialization function. | |
bool | operator< (const MaterialMap &lhs, const MaterialMap &rhs) |
Comparison operator (material map ordering by fZref) | |
A map of station thickness in units of radiation length (X0) to the specific point in XY plane.
Definition at line 27 of file KfMaterialMap.h.
|
default |
Default constructor.
MaterialMap::MaterialMap | ( | int | nBins, |
float | xyMax, | ||
float | zRef, | ||
float | zMin, | ||
float | zMax ) |
Constructor from parameters.
nBins | Number of rows or columns |
xyMax | Size of station in x and y dimensions [cm] |
zRef | Reference z-coordinate of the material layer [cm] |
zMin | Lower boundary z-coordinate for the material layer [cm] |
zMax | Upper boundary z-coordinate for the material layer [cm] |
Definition at line 22 of file KfMaterialMap.cxx.
References CheckConsistency(), fNbins, and fTable.
|
default |
Copy constructor.
|
noexcept |
Move constructor.
Definition at line 36 of file KfMaterialMap.cxx.
|
defaultnoexcept |
Destructor.
void MaterialMap::Add | ( | const MaterialMap & | other, |
float | zTarg = defs::Undef<float> ) |
Adds material layer.
other | Other material layer |
zTarg | z-coordinate of the target |
Definition at line 51 of file KfMaterialMap.cxx.
References fNbins, fTable, fXYmax, fZmax, fZmin, fZref, and GetThicknessX0().
|
private |
Checks the object consistency.
std::logic_error | If the object is in non-valid mode |
Definition at line 182 of file KfMaterialMap.cxx.
References fNbins, fXYmax, fZmax, fZmin, and fZref.
Referenced by MaterialMap().
int MaterialMap::GetBin | ( | float | x, |
float | y ) const |
Gets bin index for (x,y). Returns -1 when outside of the map.
Definition at line 86 of file KfMaterialMap.cxx.
References fFactor, fNbins, fXYmax, x, and y.
Referenced by cbm::algo::kf::MaterialMonitor::MarkActiveBin().
|
inline |
Gets material thickness in units of radiational length X0.
I | Type of material thickness |
iGlob | Global bin number: iGlob = iX + iY * fNbins |
Definition at line 107 of file KfMaterialMap.h.
Referenced by cbm::algo::kf::MaterialMonitor::EvaluateStatistics(), and kf::tools::RootUtils::ToHistogram().
|
inline |
Gets material thickness in units of radiational length X0.
I | Type of material thickness |
iX | Bin number along x axis |
iY | Bin number along y axis |
Definition at line 126 of file KfMaterialMap.h.
|
inline |
Gets number of bins (rows or columns) of the material table.
Definition at line 64 of file KfMaterialMap.h.
Referenced by cbm::algo::kf::MaterialMonitor::EvaluateStatistics(), cbm::algo::kf::MaterialMonitor::SetMaterial(), and kf::tools::RootUtils::ToHistogram().
|
inline |
Gets material thickness in units of radiational length X0.
I | Type of the x and y (floating point) |
x | X coordinate of the point [cm] |
y | Y coordinate of the point [cm] |
Definition at line 83 of file KfMaterialMap.h.
Referenced by Add().
|
inline |
Gets radius of the material table [cm].
Definition at line 67 of file KfMaterialMap.h.
Referenced by kf::tools::RootUtils::ToHistogram().
|
inline |
Gets maximal Z of the collected material [cm].
Definition at line 76 of file KfMaterialMap.h.
|
inline |
Gets minimal Z of the collected material [cm].
Definition at line 73 of file KfMaterialMap.h.
|
inline |
Gets reference Z of the material [cm].
Definition at line 70 of file KfMaterialMap.h.
|
inline |
Function to test the instance for NaN.
Definition at line 132 of file KfMaterialMap.h.
Referenced by cbm::algo::kf::Target< T >::SetMaterial().
|
default |
Copy assignment operator.
|
noexcept |
Move assignment operator.
Definition at line 40 of file KfMaterialMap.cxx.
void MaterialMap::Rebin | ( | int | factor | ) |
Reduces number of bins by a given factor.
factor | Number of bins in a new bin |
Definition at line 98 of file KfMaterialMap.cxx.
|
inlineprivate |
Definition at line 178 of file KfMaterialMap.h.
|
inline |
Sets value of material thickness in units of X0 for a given cell of the material table.
iBinX | Index of table column |
iBinY | Index of table row |
thickness | Thickness of the material in units of X0 |
Definition at line 148 of file KfMaterialMap.h.
Referenced by kf::tools::MaterialMapFactory::GenerateMaterialMap().
|
noexcept |
Swap method.
Definition at line 133 of file KfMaterialMap.cxx.
std::string MaterialMap::ToString | ( | int | indentLevel = 0, |
int | verbose = 1 ) const |
|
friend |
Serialization function.
Definition at line 176 of file KfMaterialMap.h.
|
friend |
Comparison operator (material map ordering by fZref)
Definition at line 159 of file KfMaterialMap.h.
|
private |
Util. var. for the conversion of point coordinates to row/column id.
Definition at line 169 of file KfMaterialMap.h.
|
private |
Number of rows (== N columns) in the material budget table.
Definition at line 167 of file KfMaterialMap.h.
Referenced by Add(), CheckConsistency(), GetBin(), MaterialMap(), Rebin(), and ToString().
|
private |
Material budget table.
Definition at line 173 of file KfMaterialMap.h.
Referenced by Add(), MaterialMap(), and Rebin().
|
private |
Size of the station in x and y dimensions [cm].
Definition at line 168 of file KfMaterialMap.h.
Referenced by Add(), CheckConsistency(), GetBin(), and ToString().
|
private |
Minimal Z of the collected material [cm].
Definition at line 172 of file KfMaterialMap.h.
Referenced by Add(), CheckConsistency(), and ToString().
|
private |
Minimal Z of the collected material [cm].
Definition at line 171 of file KfMaterialMap.h.
Referenced by Add(), CheckConsistency(), and ToString().
|
private |
Reference Z of the collected material [cm].
Definition at line 170 of file KfMaterialMap.h.
Referenced by Add(), CheckConsistency(), and ToString().