|
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=default | |
| Move constructor. | |
| MaterialMap & | operator= (MaterialMap &&other) noexcept=default |
| 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. | |
| 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.
References MaterialMap().
Referenced by Add(), MaterialMap(), MaterialMap(), MaterialMap(), operator<, operator=(), operator=(), and ~MaterialMap().
| 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(), fFactor, fNbins, fTable, fXYmax, fZmax, fZmin, and fZref.
|
default |
Copy constructor.
References MaterialMap().
|
defaultnoexcept |
Move constructor.
References MaterialMap().
|
defaultnoexcept |
Destructor.
References Add(), GetBin(), MaterialMap(), x, and y.
| 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 36 of file KfMaterialMap.cxx.
References fNbins, fTable, fXYmax, fZmax, fZmin, fZref, GetThicknessX0(), and MaterialMap().
Referenced by ~MaterialMap().
|
private |
Checks the object consistency.
| std::logic_error | If the object is in non-valid mode |
Definition at line 154 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 71 of file KfMaterialMap.cxx.
References fFactor, fNbins, fXYmax, x, and y.
Referenced by ~MaterialMap().
|
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.
References fTable, and GetBinThicknessX0().
Referenced by GetBinThicknessX0(), GetBinThicknessX0(), 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.
References fNbins, and GetBinThicknessX0().
|
inline |
Gets number of bins (rows or columns) of the material table.
Definition at line 64 of file KfMaterialMap.h.
References fNbins, and GetNbins().
Referenced by GetNbins(), 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.
References fFactor, fNbins, fTable, fXYmax, GetThicknessX0(), x, and y.
Referenced by Add(), cbm::algo::ca::SearchWindowMapContainerFactory::Create(), CbmKfTrackFitter< FlagFitTime >::FitTrajectory(), and GetThicknessX0().
|
inline |
Gets radius of the material table [cm].
Definition at line 67 of file KfMaterialMap.h.
References fXYmax.
Referenced by kf::tools::RootUtils::ToHistogram().
|
inline |
Gets maximal Z of the collected material [cm].
Definition at line 76 of file KfMaterialMap.h.
References fZmax.
|
inline |
Gets minimal Z of the collected material [cm].
Definition at line 73 of file KfMaterialMap.h.
References fZmin.
|
inline |
Gets reference Z of the material [cm].
Definition at line 70 of file KfMaterialMap.h.
References fZref.
|
inline |
Function to test the instance for NaN.
Definition at line 132 of file KfMaterialMap.h.
References fFactor, fNbins, fXYmax, fZmax, fZmin, fZref, and cbm::algo::kf::utils::IsUndefined().
Referenced by cbm::algo::kf::Target< T >::SetMaterial().
|
default |
Copy assignment operator.
References MaterialMap().
|
defaultnoexcept |
Move assignment operator.
References MaterialMap().
| void MaterialMap::Rebin | ( | int | factor | ) |
Reduces number of bins by a given factor.
| factor | Number of bins in a new bin |
Definition at line 83 of file KfMaterialMap.cxx.
|
inlineprivate |
|
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.
References fNbins, and fTable.
Referenced by kf::tools::MaterialMapFactory::GenerateMaterialMap().
| std::string MaterialMap::ToString | ( | int | indentLevel = 0, |
| int | verbose = 1 ) const |
|
friend |
Serialization function.
Definition at line 173 of file KfMaterialMap.h.
|
friend |
Comparison operator (material map ordering by fZref)
Definition at line 156 of file KfMaterialMap.h.
References fZref, and MaterialMap().
|
private |
Util. var. for the conversion of point coordinates to row/column id.
Definition at line 166 of file KfMaterialMap.h.
Referenced by GetBin(), GetThicknessX0(), IsUndefined(), MaterialMap(), Rebin(), and serialize().
|
private |
Number of rows (== N columns) in the material budget table.
Definition at line 164 of file KfMaterialMap.h.
Referenced by Add(), CheckConsistency(), GetBin(), GetBinThicknessX0(), GetNbins(), GetThicknessX0(), IsUndefined(), MaterialMap(), Rebin(), serialize(), SetRadThickBin(), and ToString().
|
private |
Material budget table.
Definition at line 170 of file KfMaterialMap.h.
Referenced by Add(), GetBinThicknessX0(), GetThicknessX0(), MaterialMap(), Rebin(), serialize(), and SetRadThickBin().
|
private |
Size of the station in x and y dimensions [cm].
Definition at line 165 of file KfMaterialMap.h.
Referenced by Add(), CheckConsistency(), GetBin(), GetThicknessX0(), GetXYmax(), IsUndefined(), MaterialMap(), serialize(), and ToString().
|
private |
Minimal Z of the collected material [cm].
Definition at line 169 of file KfMaterialMap.h.
Referenced by Add(), CheckConsistency(), GetZmax(), IsUndefined(), MaterialMap(), serialize(), and ToString().
|
private |
Minimal Z of the collected material [cm].
Definition at line 168 of file KfMaterialMap.h.
Referenced by Add(), CheckConsistency(), GetZmin(), IsUndefined(), MaterialMap(), serialize(), and ToString().
|
private |
Reference Z of the collected material [cm].
Definition at line 167 of file KfMaterialMap.h.
Referenced by Add(), CheckConsistency(), GetZref(), IsUndefined(), MaterialMap(), operator<, serialize(), and ToString().