CbmRoot
Loading...
Searching...
No Matches
cbm::algo::kf::MaterialMonitor Class Reference

A class to collect statistics for a material budget map of the KF-framework. More...

#include <KfMaterialMonitor.h>

Collaboration diagram for cbm::algo::kf::MaterialMonitor:
[legend]

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 MaterialMapfMaterial {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.
 

Detailed Description

A class to collect statistics for a material budget map of the KF-framework.

Definition at line 23 of file KfMaterialMonitor.h.

Constructor & Destructor Documentation

◆ MaterialMonitor() [1/2]

cbm::algo::kf::MaterialMonitor::MaterialMonitor ( )
inline

Default constructor.

Definition at line 26 of file KfMaterialMonitor.h.

◆ MaterialMonitor() [2/2]

cbm::algo::kf::MaterialMonitor::MaterialMonitor ( const MaterialMap * materialMap,
const std::string & name = "" )
inline

Constructor.

Parameters
materialMapMaterial map to be monitored
nameName of the material map

Definition at line 31 of file KfMaterialMonitor.h.

References SetMaterial().

Member Function Documentation

◆ EvaluateStatistics()

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().

◆ GetActiveNbins()

int cbm::algo::kf::MaterialMonitor::GetActiveNbins ( ) const
inline

Get number of active bins in the map.

Definition at line 59 of file KfMaterialMonitor.h.

References fActiveNbins.

◆ GetActiveRadThickMax()

double cbm::algo::kf::MaterialMonitor::GetActiveRadThickMax ( ) const
inline

Get maximal radiation thickness among all active bins.

Definition at line 65 of file KfMaterialMonitor.h.

References fPassiveRadThickMax.

◆ GetActiveRadThickMean()

double cbm::algo::kf::MaterialMonitor::GetActiveRadThickMean ( ) const
inline

Get average radiation thickness among all active bins.

Definition at line 68 of file KfMaterialMonitor.h.

References fPassiveRadThickMean.

◆ GetActiveRadThickMin()

double cbm::algo::kf::MaterialMonitor::GetActiveRadThickMin ( ) const
inline

Get minimal radiation thickness among all active bins.

Definition at line 62 of file KfMaterialMonitor.h.

References fPassiveRadThickMin.

◆ GetNhits()

double cbm::algo::kf::MaterialMonitor::GetNhits ( ) const
inline

Get the number of processed hits.

Definition at line 86 of file KfMaterialMonitor.h.

References fNhitsTotal.

◆ GetPassiveNbins()

int cbm::algo::kf::MaterialMonitor::GetPassiveNbins ( ) const
inline

Get number of passive bins in the map.

Definition at line 71 of file KfMaterialMonitor.h.

References fPassiveNbins.

◆ GetPassiveRadThickMax()

double cbm::algo::kf::MaterialMonitor::GetPassiveRadThickMax ( ) const
inline

Get maximal radiation thickness among all passive bins.

Definition at line 77 of file KfMaterialMonitor.h.

References fPassiveRadThickMax.

◆ GetPassiveRadThickMean()

double cbm::algo::kf::MaterialMonitor::GetPassiveRadThickMean ( ) const
inline

Get average radiation thickness among all passive bins.

Definition at line 80 of file KfMaterialMonitor.h.

References fPassiveRadThickMean.

◆ GetPassiveRadThickMin()

double cbm::algo::kf::MaterialMonitor::GetPassiveRadThickMin ( ) const
inline

Get minimal radiation thickness among all passive bins.

Definition at line 74 of file KfMaterialMonitor.h.

References fPassiveRadThickMin.

◆ GetRatioOfOutsideHits()

double cbm::algo::kf::MaterialMonitor::GetRatioOfOutsideHits ( ) const
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.

◆ MarkActiveBin()

void cbm::algo::kf::MaterialMonitor::MarkActiveBin ( float x,
float y )

Mark a bin as active.

Parameters
xX-coordinate of the bin
yY-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.

◆ ResetActiveBins()

void cbm::algo::kf::MaterialMonitor::ResetActiveBins ( )
inline

Reset the map of active bins.

Definition at line 45 of file KfMaterialMonitor.h.

References fActiveBinMap.

◆ SetMaterial()

void cbm::algo::kf::MaterialMonitor::SetMaterial ( const MaterialMap * materialMap)

Set a material budget map.

Parameters
materialMapMaterial 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().

◆ SetName()

void cbm::algo::kf::MaterialMonitor::SetName ( const std::string & name)
inline

Set a name of the material budget map.

Parameters
nameName of the material map

Definition at line 42 of file KfMaterialMonitor.h.

References fName.

◆ ToString()

std::string cbm::algo::kf::MaterialMonitor::ToString ( )

Member Data Documentation

◆ fActiveBinMap

std::vector<char> cbm::algo::kf::MaterialMonitor::fActiveBinMap {}
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().

◆ fActiveNbins

int cbm::algo::kf::MaterialMonitor::fActiveNbins {defs::Undef<int>}
private

Active material: number of bins.

Definition at line 105 of file KfMaterialMonitor.h.

Referenced by EvaluateStatistics(), GetActiveNbins(), and ToString().

◆ fActiveRadThickMax

double cbm::algo::kf::MaterialMonitor::fActiveRadThickMax {defs::Undef<double>}
private

Active material: maximal thickness.

Definition at line 95 of file KfMaterialMonitor.h.

Referenced by EvaluateStatistics(), and ToString().

◆ fActiveRadThickMean

double cbm::algo::kf::MaterialMonitor::fActiveRadThickMean {defs::Undef<double>}
private

Active material: average thickness.

Definition at line 96 of file KfMaterialMonitor.h.

Referenced by EvaluateStatistics(), and ToString().

◆ fActiveRadThickMin

double cbm::algo::kf::MaterialMonitor::fActiveRadThickMin {defs::Undef<double>}
private

Active material: minimal thickness.

Definition at line 94 of file KfMaterialMonitor.h.

Referenced by EvaluateStatistics(), and ToString().

◆ fMaterial

const MaterialMap* cbm::algo::kf::MaterialMonitor::fMaterial {nullptr}
private

Pointer to the material map.

Definition at line 92 of file KfMaterialMonitor.h.

Referenced by EvaluateStatistics(), MarkActiveBin(), and SetMaterial().

◆ fName

std::string cbm::algo::kf::MaterialMonitor::fName {}
private

Name of the material map.

Definition at line 89 of file KfMaterialMonitor.h.

Referenced by SetName(), and ToString().

◆ fNhitsOutside

unsigned long cbm::algo::kf::MaterialMonitor::fNhitsOutside {0}
private

number of hits outside the material map

Definition at line 103 of file KfMaterialMonitor.h.

Referenced by GetRatioOfOutsideHits(), MarkActiveBin(), SetMaterial(), and ToString().

◆ fNhitsTotal

unsigned long cbm::algo::kf::MaterialMonitor::fNhitsTotal {0}
private

number of hits in statistics

Definition at line 102 of file KfMaterialMonitor.h.

Referenced by GetNhits(), GetRatioOfOutsideHits(), MarkActiveBin(), SetMaterial(), and ToString().

◆ fPassiveNbins

int cbm::algo::kf::MaterialMonitor::fPassiveNbins {defs::Undef<int>}
private

Passive material: number of bins.

Definition at line 106 of file KfMaterialMonitor.h.

Referenced by EvaluateStatistics(), GetPassiveNbins(), and ToString().

◆ fPassiveRadThickMax

double cbm::algo::kf::MaterialMonitor::fPassiveRadThickMax {defs::Undef<double>}
private

Passive material: maximal thickness.

Definition at line 99 of file KfMaterialMonitor.h.

Referenced by EvaluateStatistics(), GetActiveRadThickMax(), GetPassiveRadThickMax(), and ToString().

◆ fPassiveRadThickMean

double cbm::algo::kf::MaterialMonitor::fPassiveRadThickMean {defs::Undef<double>}
private

Passive material: average thickness.

Definition at line 100 of file KfMaterialMonitor.h.

Referenced by EvaluateStatistics(), GetActiveRadThickMean(), GetPassiveRadThickMean(), and ToString().

◆ fPassiveRadThickMin

double cbm::algo::kf::MaterialMonitor::fPassiveRadThickMin {defs::Undef<double>}
private

Passive material: minimal thickness.

Definition at line 98 of file KfMaterialMonitor.h.

Referenced by EvaluateStatistics(), GetActiveRadThickMin(), GetPassiveRadThickMin(), and ToString().


The documentation for this class was generated from the following files: