CbmRoot
|
A class to collect statistics for a material budget map of the KF-framework. More...
#include <KfMaterialMonitor.h>
Public Member Functions | |
MaterialMonitor () | |
Default constructor. | |
MaterialMonitor (const MaterialMap *materialMap, const std::string &name="") | |
Constructor. | |
void | SetMaterial (const MaterialMap *materialMap) |
Set a material budget map. | |
void | SetName (const std::string &name) |
Set a name of the material budget map. | |
void | ResetActiveBins () |
Reset the map of active bins. | |
void | MarkActiveBin (float x, float y) |
Mark a bin as active. | |
void | EvaluateStatistics () |
Update values of statistical variables with respect to the active map. | |
std::string | ToString () |
Print statistics to a string. | |
int | GetActiveNbins () const |
Get number of active bins in the map. | |
double | GetActiveRadThickMin () const |
Get minimal radiation thickness among all active bins. | |
double | GetActiveRadThickMax () const |
Get maximal radiation thickness among all active bins. | |
double | GetActiveRadThickMean () const |
Get average radiation thickness among all active bins. | |
int | GetPassiveNbins () const |
Get number of passive bins in the map. | |
double | GetPassiveRadThickMin () const |
Get minimal radiation thickness among all passive bins. | |
double | GetPassiveRadThickMax () const |
Get maximal radiation thickness among all passive bins. | |
double | GetPassiveRadThickMean () const |
Get average radiation thickness among all passive bins. | |
double | GetRatioOfOutsideHits () const |
Get the ration of hits that show up outside the material map. | |
double | GetNhits () const |
Get the number of processed hits. | |
Private Attributes | |
std::string | fName {} |
Name of the material map. | |
std::vector< char > | fActiveBinMap {} |
Map of active bins in the material map (bins where hits appear) | |
const MaterialMap * | fMaterial {nullptr} |
Pointer to the material map. | |
double | fActiveRadThickMin {defs::Undef<double>} |
Active material: minimal thickness. | |
double | fActiveRadThickMax {defs::Undef<double>} |
Active material: maximal thickness. | |
double | fActiveRadThickMean {defs::Undef<double>} |
Active material: average thickness. | |
double | fPassiveRadThickMin {defs::Undef<double>} |
Passive material: minimal thickness. | |
double | fPassiveRadThickMax {defs::Undef<double>} |
Passive material: maximal thickness. | |
double | fPassiveRadThickMean {defs::Undef<double>} |
Passive material: average thickness. | |
unsigned long | fNhitsTotal {0} |
number of hits in statistics | |
unsigned long | fNhitsOutside {0} |
number of hits outside the material map | |
int | fActiveNbins {defs::Undef<int>} |
Active material: number of bins. | |
int | fPassiveNbins {defs::Undef<int>} |
Passive material: number of bins. | |
A class to collect statistics for a material budget map of the KF-framework.
Definition at line 23 of file KfMaterialMonitor.h.
|
inline |
Default constructor.
Definition at line 26 of file KfMaterialMonitor.h.
|
inline |
Constructor.
materialMap | Material map to be monitored |
name | Name of the material map |
Definition at line 31 of file KfMaterialMonitor.h.
References SetMaterial().
void cbm::algo::kf::MaterialMonitor::EvaluateStatistics | ( | ) |
Update values of statistical variables with respect to the active map.
update values of statistical variables with respect to the active map
Definition at line 63 of file KfMaterialMonitor.cxx.
References fActiveBinMap, fActiveNbins, fActiveRadThickMax, fActiveRadThickMean, fActiveRadThickMin, fMaterial, fPassiveNbins, fPassiveRadThickMax, fPassiveRadThickMean, fPassiveRadThickMin, cbm::algo::kf::MaterialMap::GetBinThicknessX0(), cbm::algo::kf::MaterialMap::GetNbins(), and cbm::algo::kf::defs::Undef< double >.
Referenced by SetMaterial(), and ToString().
|
inline |
Get number of active bins in the map.
Definition at line 59 of file KfMaterialMonitor.h.
References fActiveNbins.
|
inline |
Get maximal radiation thickness among all active bins.
Definition at line 65 of file KfMaterialMonitor.h.
References fPassiveRadThickMax.
|
inline |
Get average radiation thickness among all active bins.
Definition at line 68 of file KfMaterialMonitor.h.
References fPassiveRadThickMean.
|
inline |
Get minimal radiation thickness among all active bins.
Definition at line 62 of file KfMaterialMonitor.h.
References fPassiveRadThickMin.
|
inline |
Get the number of processed hits.
Definition at line 86 of file KfMaterialMonitor.h.
References fNhitsTotal.
|
inline |
Get number of passive bins in the map.
Definition at line 71 of file KfMaterialMonitor.h.
References fPassiveNbins.
|
inline |
Get maximal radiation thickness among all passive bins.
Definition at line 77 of file KfMaterialMonitor.h.
References fPassiveRadThickMax.
|
inline |
Get average radiation thickness among all passive bins.
Definition at line 80 of file KfMaterialMonitor.h.
References fPassiveRadThickMean.
|
inline |
Get minimal radiation thickness among all passive bins.
Definition at line 74 of file KfMaterialMonitor.h.
References fPassiveRadThickMin.
|
inline |
Get the ration of hits that show up outside the material map.
Definition at line 83 of file KfMaterialMonitor.h.
References fNhitsOutside, and fNhitsTotal.
void cbm::algo::kf::MaterialMonitor::MarkActiveBin | ( | float | x, |
float | y ) |
Mark a bin as active.
x | X-coordinate of the bin |
y | Y-coordinate of the bin |
mark a bin as active
Definition at line 44 of file KfMaterialMonitor.cxx.
References fActiveBinMap, fMaterial, fNhitsOutside, fNhitsTotal, cbm::algo::kf::MaterialMap::GetBin(), x, and y.
|
inline |
Reset the map of active bins.
Definition at line 45 of file KfMaterialMonitor.h.
References fActiveBinMap.
void cbm::algo::kf::MaterialMonitor::SetMaterial | ( | const MaterialMap * | materialMap | ) |
Set a material budget map.
materialMap | Material budget map to be monitored |
Definition at line 25 of file KfMaterialMonitor.cxx.
References EvaluateStatistics(), fActiveBinMap, fMaterial, fNhitsOutside, fNhitsTotal, and cbm::algo::kf::MaterialMap::GetNbins().
Referenced by MaterialMonitor().
|
inline |
Set a name of the material budget map.
name | Name of the material map |
Definition at line 42 of file KfMaterialMonitor.h.
References fName.
std::string cbm::algo::kf::MaterialMonitor::ToString | ( | ) |
Print statistics to a string.
print statistics to a string
Definition at line 134 of file KfMaterialMonitor.cxx.
References EvaluateStatistics(), fActiveNbins, fActiveRadThickMax, fActiveRadThickMean, fActiveRadThickMin, fName, fNhitsOutside, fNhitsTotal, fPassiveNbins, fPassiveRadThickMax, fPassiveRadThickMean, and fPassiveRadThickMin.
|
private |
Map of active bins in the material map (bins where hits appear)
Definition at line 90 of file KfMaterialMonitor.h.
Referenced by EvaluateStatistics(), MarkActiveBin(), ResetActiveBins(), and SetMaterial().
|
private |
Active material: number of bins.
Definition at line 105 of file KfMaterialMonitor.h.
Referenced by EvaluateStatistics(), GetActiveNbins(), and ToString().
|
private |
Active material: maximal thickness.
Definition at line 95 of file KfMaterialMonitor.h.
Referenced by EvaluateStatistics(), and ToString().
|
private |
Active material: average thickness.
Definition at line 96 of file KfMaterialMonitor.h.
Referenced by EvaluateStatistics(), and ToString().
|
private |
Active material: minimal thickness.
Definition at line 94 of file KfMaterialMonitor.h.
Referenced by EvaluateStatistics(), and ToString().
|
private |
Pointer to the material map.
Definition at line 92 of file KfMaterialMonitor.h.
Referenced by EvaluateStatistics(), MarkActiveBin(), and SetMaterial().
|
private |
Name of the material map.
Definition at line 89 of file KfMaterialMonitor.h.
Referenced by SetName(), and ToString().
|
private |
number of hits outside the material map
Definition at line 103 of file KfMaterialMonitor.h.
Referenced by GetRatioOfOutsideHits(), MarkActiveBin(), SetMaterial(), and ToString().
|
private |
number of hits in statistics
Definition at line 102 of file KfMaterialMonitor.h.
Referenced by GetNhits(), GetRatioOfOutsideHits(), MarkActiveBin(), SetMaterial(), and ToString().
|
private |
Passive material: number of bins.
Definition at line 106 of file KfMaterialMonitor.h.
Referenced by EvaluateStatistics(), GetPassiveNbins(), and ToString().
|
private |
Passive material: maximal thickness.
Definition at line 99 of file KfMaterialMonitor.h.
Referenced by EvaluateStatistics(), GetActiveRadThickMax(), GetPassiveRadThickMax(), and ToString().
|
private |
Passive material: average thickness.
Definition at line 100 of file KfMaterialMonitor.h.
Referenced by EvaluateStatistics(), GetActiveRadThickMean(), GetPassiveRadThickMean(), and ToString().
|
private |
Passive material: minimal thickness.
Definition at line 98 of file KfMaterialMonitor.h.
Referenced by EvaluateStatistics(), GetActiveRadThickMin(), GetPassiveRadThickMin(), and ToString().