20 using namespace cbm::algo;
48 LOG(fatal) <<
"MaterialMonitor: material map is not set";
85 LOG(fatal) <<
"MaterialMonitor: map of active bins is not consistent with the material map: nbins "
90 for (
int i = 0; i < nBins; i++) {
91 double r =
fMaterial->GetBinThicknessX0<
double>(i);
121 LOG(fatal) <<
"MaterialMonitor: wrong calculation of N passive / active bins ";
142 std::stringstream ss;
143 ss << std::setprecision(2) << std::fixed;
144 ss <<
"material map " <<
fName <<
". ";
152 ss <<
"No active material. ";
155 ss <<
"No hits yet to identify active areas. ";
164 ss <<
"No passive material. ";
169 ss <<
"No hits outside of the map. ";
176 ss <<
"No hit statistics yet. ";
A class to collect statistics for kf::MaterialMap.
A map of station thickness in units of radiation length (X0) to the specific point in XY plane.
const MaterialMap * fMaterial
Pointer to the material map.
unsigned long fNhitsOutside
number of hits outside the material map
double fActiveRadThickMax
Active material: maximal thickness.
std::string fName
Name of the material map.
std::vector< char > fActiveBinMap
Map of active bins in the material map (bins where hits appear)
double fPassiveRadThickMin
Passive material: minimal thickness.
double fPassiveRadThickMean
Passive material: average thickness.
unsigned long fNhitsTotal
number of hits in statistics
void EvaluateStatistics()
Update values of statistical variables with respect to the active map.
std::string ToString()
Print statistics to a string.
int fPassiveNbins
Passive material: number of bins.
int fActiveNbins
Active material: number of bins.
void MarkActiveBin(float x, float y)
Mark a bin as active.
void SetMaterial(const MaterialMap *materialMap)
Set a material budget map.
double fActiveRadThickMin
Active material: minimal thickness.
double fPassiveRadThickMax
Passive material: maximal thickness.
double fActiveRadThickMean
Active material: average thickness.
constexpr T2 Undef
Undefined values.