CbmRoot
|
#include <Histogram.h>
Public Member Functions | |
Prof2D (const std::string &name, const std::string &title, uint32_t nBinsX, double xMin, double xMax, uint32_t nBinsY, double yMin, double yMax, double zMin=0., double zMax=0.) | |
Constructor for 2D-histogram. | |
Prof2D ()=default | |
Default constructor. | |
Prof2D (const Prof2D &)=default | |
Copy constructor. | |
Prof2D (Prof2D &&)=default | |
Move constructor. | |
Prof2D & | operator= (const Prof2D &)=default |
Copy assignment operator. | |
Prof2D & | operator= (Prof2D &&)=default |
Move assignment operator. | |
int | Fill (double x, double y, double z, double w=1.) |
Fills histogram. | |
auto | GetBinAccumulator (uint32_t iBinX, uint32_t iBinY) const |
Gets underlying bin accumulator. | |
double | GetBinContent (uint32_t iBinX, uint32_t iBinY) const |
Gets bin content. | |
double | GetBinCount (uint32_t iBinX, uint32_t iBinY) const |
Gets bin entries. | |
double | GetBinError (uint32_t iBinX, uint32_t iBinY) const |
Gets bin error. | |
double | GetMinZ () const |
Gets z-axis lower bound. | |
double | GetMaxZ () const |
Gets z-axis lower bound. | |
template<EAxis A, unsigned IA = static_cast<unsigned>(A), std::enable_if_t<(IA< Rank), bool > = true> | |
double | GetAxisMin () const |
Gets range lower bound of the selected axis. | |
template<EAxis A, unsigned IA = static_cast<unsigned>(A), std::enable_if_t<(IA< Rank), bool > = true> | |
double | GetAxisMax () const |
Gets range upper bound of the selected axis. | |
template<EAxis A, unsigned IA = static_cast<unsigned>(A), std::enable_if_t<(IA< Rank), bool > = true> | |
uint32_t | GetAxisNbins () const |
Gets number of bins in axis. | |
double | GetEntries () const |
Gets number of entries. | |
bool | GetFlag (EHistFlag key) const |
Get flag. | |
const std::string & | GetName () const |
Gets name. | |
const HistogramMetadata & | GetMetadata () const |
Gets metadata instance. | |
std::string | GetMetadataString () const |
Gets metadata string. | |
uint32_t | GetNbinsX () const |
Gets number of bins for x axis. | |
double | GetMinX () const |
Gets x-axis lower bound. | |
double | GetMaxX () const |
Gets x-axis lower bound. | |
template<unsigned RankCheck = Rank, std::enable_if_t<(RankCheck > 1), bool > = true> | |
uint32_t | GetNbinsY () const |
Gets number of bins for y axis. | |
template<unsigned RankCheck = Rank, std::enable_if_t<(RankCheck > 1), bool > = true> | |
double | GetMinY () const |
Gets y-axis lower bound. | |
template<unsigned RankCheck = Rank, std::enable_if_t<(RankCheck > 1), bool > = true> | |
double | GetMaxY () const |
Gets y-axis lower bound. | |
double | GetMaximum () const |
Gets maximum value. | |
double | GetMinimum () const |
Gets minimum value. | |
const std::string & | GetTitle () const |
Gets title. | |
void | Reset () |
Resets the histogram. | |
void | SetFlag (EHistFlag key, bool flag=true) |
Get flag. | |
void | SetName (const std::string &name) |
Sets name. | |
void | SetTitle (const std::string &title) |
Sets title. | |
Protected Types | |
using | Hist_t = bh::histogram<Axes, Storage> |
Static Protected Member Functions | |
static int | GetBinBH (uint32_t iBin) |
Gets bin index in underlying boost histogram. | |
Protected Attributes | |
Hist_t | fHistogram |
Underlying boost histogram. | |
std::string | fName = "" |
Name of the histogram. | |
std::string | fTitle = "" |
Title of the histogram. | |
int | fEntries = 0 |
Number of histogram entries. | |
HistogramMetadata | fMetadata |
Meta-data for histogram. | |
Static Protected Attributes | |
static constexpr unsigned | Rank = std::tuple_size_v<Axes> |
Private Member Functions | |
template<class Archive > | |
void | serialize (Archive &ar, const unsigned int) |
Private Attributes | |
double | fZmin = 0. |
Lower bound of the profile z-axis. | |
double | fZmax = 0. |
Upper bound of the profile z-axis. | |
Friends | |
class | boost::serialization::access |
Serialization rule. | |
Definition at line 699 of file Histogram.h.
|
protectedinherited |
Definition at line 252 of file Histogram.h.
|
inline |
Constructor for 2D-histogram.
name | Name of histogram |
title | Title of histogram |
nBinsX | Number of x bins |
xMin | Lower x bound |
xMax | Upper x bound |
nBinsY | Number of y bins |
yMin | Lower y bound |
yMax | Upper y bound |
zMin | Lower z bound (optional) |
zMax | Upper z bound (optional) |
Definition at line 715 of file Histogram.h.
|
default |
Default constructor.
|
default |
Copy constructor.
|
default |
Move constructor.
|
inline |
Fills histogram.
x | Value along x-axis |
y | Value along y-axis |
z | Value along z-axis |
w | Weight |
Skip measurement, if it goes beyond the defined [fYmin, fYmax] range
Definition at line 745 of file Histogram.h.
References cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::fEntries, cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::fHistogram, fZmax, fZmin, cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::GetNbinsX(), cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::GetNbinsY(), x, and y.
|
inlineinherited |
Gets range upper bound of the selected axis.
AxisType | An axis |
Definition at line 270 of file Histogram.h.
References cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::fHistogram, and cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::GetAxisNbins().
Referenced by cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::GetMaxX(), and cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::GetMaxY().
|
inlineinherited |
Gets range lower bound of the selected axis.
AxisType | An axis |
Definition at line 262 of file Histogram.h.
References cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::fHistogram.
Referenced by cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::GetMinX(), and cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::GetMinY().
|
inlineinherited |
Gets number of bins in axis.
AxisT | An axis |
D |
Definition at line 279 of file Histogram.h.
References cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::fHistogram.
Referenced by cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::GetAxisMax(), cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::GetNbinsX(), and cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::GetNbinsY().
|
inline |
Gets underlying bin accumulator.
iBinX | Bin index along x-axis |
iBinY | Bin index along y-axis |
Definition at line 772 of file Histogram.h.
References cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::fHistogram, and cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::GetBinBH().
|
inlinestaticprotectedinherited |
Gets bin index in underlying boost histogram.
iBin | Bin in histogram |
Definition at line 410 of file Histogram.h.
Referenced by cbm::algo::qa::H1D::GetBinAccumulator(), cbm::algo::qa::H2D::GetBinAccumulator(), cbm::algo::qa::Prof1D::GetBinAccumulator(), GetBinAccumulator(), cbm::algo::qa::H1D::GetBinContent(), cbm::algo::qa::H2D::GetBinContent(), cbm::algo::qa::Prof1D::GetBinContent(), GetBinContent(), cbm::algo::qa::Prof1D::GetBinCount(), GetBinCount(), cbm::algo::qa::H1D::GetBinError(), cbm::algo::qa::H2D::GetBinError(), cbm::algo::qa::Prof1D::GetBinError(), and GetBinError().
|
inline |
Gets bin content.
iBinX | Bin index along x-axis |
iBinY | Bin index along y-axis |
Definition at line 780 of file Histogram.h.
References cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::fHistogram, and cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::GetBinBH().
|
inline |
Gets bin entries.
iBinX | Bin index along x-axis |
iBinY | Bin index along y-axis |
Definition at line 788 of file Histogram.h.
References cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::fHistogram, and cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::GetBinBH().
|
inline |
Gets bin error.
iBinX | Bin index along x-axis |
iBinY | Bin index along y-axis |
Definition at line 796 of file Histogram.h.
References cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::fHistogram, and cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::GetBinBH().
|
inlineinherited |
Gets number of entries.
Definition at line 286 of file Histogram.h.
References cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::fEntries.
Referenced by CbmTaskDigiEventQa::ToTH1D().
|
inlineinherited |
Get flag.
key | Flag key from the EHistFlag enumeration |
Definition at line 294 of file Histogram.h.
References cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::fMetadata, and cbm::algo::qa::HistogramMetadata::GetFlag().
|
inlineinherited |
Gets maximum value.
Definition at line 336 of file Histogram.h.
References cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::fHistogram.
|
inlineinherited |
Gets x-axis lower bound.
Definition at line 312 of file Histogram.h.
References cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::GetAxisMax().
Referenced by cbm::qa::OnlineInterface::ROOTHistogram(), cbm::qa::OnlineInterface::ROOTHistogram(), cbm::qa::OnlineInterface::ROOTHistogram(), cbm::qa::OnlineInterface::ROOTHistogram(), and CbmTaskDigiEventQa::ToTH1D().
|
inlineinherited |
Gets y-axis lower bound.
Definition at line 330 of file Histogram.h.
References cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::GetAxisMax().
Referenced by cbm::qa::OnlineInterface::ROOTHistogram(), and cbm::qa::OnlineInterface::ROOTHistogram().
|
inline |
Gets z-axis lower bound.
Definition at line 805 of file Histogram.h.
References fZmax.
Referenced by cbm::qa::OnlineInterface::ROOTHistogram().
|
inlineinherited |
Gets metadata instance.
Definition at line 300 of file Histogram.h.
References cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::fMetadata.
|
inlineinherited |
Gets metadata string.
Definition at line 303 of file Histogram.h.
References cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::fMetadata, and cbm::algo::qa::HistogramMetadata::ToString().
|
inlineinherited |
Gets minimum value.
Definition at line 342 of file Histogram.h.
References cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::fHistogram.
|
inlineinherited |
Gets x-axis lower bound.
Definition at line 309 of file Histogram.h.
References cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::GetAxisMin().
Referenced by cbm::qa::OnlineInterface::ROOTHistogram(), cbm::qa::OnlineInterface::ROOTHistogram(), cbm::qa::OnlineInterface::ROOTHistogram(), cbm::qa::OnlineInterface::ROOTHistogram(), and CbmTaskDigiEventQa::ToTH1D().
|
inlineinherited |
Gets y-axis lower bound.
Definition at line 323 of file Histogram.h.
References cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::GetAxisMin().
Referenced by cbm::qa::OnlineInterface::ROOTHistogram(), and cbm::qa::OnlineInterface::ROOTHistogram().
|
inline |
Gets z-axis lower bound.
Definition at line 802 of file Histogram.h.
References fZmin.
Referenced by cbm::qa::OnlineInterface::ROOTHistogram().
|
inlineinherited |
Gets name.
Definition at line 297 of file Histogram.h.
References cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::fName.
Referenced by cbm::qa::OnlineInterface::ROOTHistogram(), cbm::qa::OnlineInterface::ROOTHistogram(), cbm::qa::OnlineInterface::ROOTHistogram(), cbm::qa::OnlineInterface::ROOTHistogram(), and CbmTaskDigiEventQa::ToTH1D().
|
inlineinherited |
Gets number of bins for x axis.
Definition at line 306 of file Histogram.h.
References cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::GetAxisNbins().
Referenced by cbm::algo::qa::H1D::Fill(), cbm::algo::qa::H2D::Fill(), cbm::algo::qa::Prof1D::Fill(), Fill(), cbm::qa::OnlineInterface::ROOTHistogram(), cbm::qa::OnlineInterface::ROOTHistogram(), cbm::qa::OnlineInterface::ROOTHistogram(), cbm::qa::OnlineInterface::ROOTHistogram(), and CbmTaskDigiEventQa::ToTH1D().
|
inlineinherited |
Gets number of bins for y axis.
Definition at line 316 of file Histogram.h.
References cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::GetAxisNbins().
Referenced by cbm::algo::qa::H2D::Fill(), Fill(), cbm::qa::OnlineInterface::ROOTHistogram(), and cbm::qa::OnlineInterface::ROOTHistogram().
|
inlineinherited |
Gets title.
Definition at line 348 of file Histogram.h.
References cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::fTitle.
Referenced by cbm::qa::OnlineInterface::ROOTHistogram(), cbm::qa::OnlineInterface::ROOTHistogram(), cbm::qa::OnlineInterface::ROOTHistogram(), and cbm::qa::OnlineInterface::ROOTHistogram().
|
inlineinherited |
Resets the histogram.
Definition at line 351 of file Histogram.h.
References cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::fEntries, and cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::fHistogram.
|
inlineprivate |
Definition at line 811 of file Histogram.h.
|
inlineinherited |
Get flag.
key | Flag key from the EHistFlag enumeration |
flag | Flag value |
Definition at line 361 of file Histogram.h.
References cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::fMetadata, and cbm::algo::qa::HistogramMetadata::SetFlag().
|
inlineinherited |
Sets name.
name | Histogram name |
Definition at line 365 of file Histogram.h.
References cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::fName.
|
inlineinherited |
Sets title.
title | Histogram title |
Definition at line 370 of file Histogram.h.
References cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::fTitle.
|
friend |
Serialization rule.
Definition at line 809 of file Histogram.h.
|
protectedinherited |
Number of histogram entries.
Definition at line 415 of file Histogram.h.
Referenced by cbm::algo::qa::H1D::Fill(), cbm::algo::qa::H2D::Fill(), cbm::algo::qa::Prof1D::Fill(), Fill(), cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::GetEntries(), cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::Reset(), and cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::serialize().
|
protectedinherited |
Underlying boost histogram.
Definition at line 412 of file Histogram.h.
Referenced by cbm::algo::qa::H1D::Fill(), cbm::algo::qa::H2D::Fill(), cbm::algo::qa::Prof1D::Fill(), Fill(), cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::GetAxisMax(), cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::GetAxisMin(), cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::GetAxisNbins(), cbm::algo::qa::H1D::GetBinAccumulator(), cbm::algo::qa::H2D::GetBinAccumulator(), cbm::algo::qa::Prof1D::GetBinAccumulator(), GetBinAccumulator(), cbm::algo::qa::H1D::GetBinContent(), cbm::algo::qa::H2D::GetBinContent(), cbm::algo::qa::Prof1D::GetBinContent(), GetBinContent(), cbm::algo::qa::Prof1D::GetBinCount(), GetBinCount(), cbm::algo::qa::H1D::GetBinError(), cbm::algo::qa::H2D::GetBinError(), cbm::algo::qa::Prof1D::GetBinError(), GetBinError(), cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::GetMaximum(), cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::GetMinimum(), cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::Reset(), and cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::serialize().
|
protectedinherited |
Meta-data for histogram.
Definition at line 416 of file Histogram.h.
Referenced by cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::GetFlag(), cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::GetMetadata(), cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::GetMetadataString(), cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::serialize(), and cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::SetFlag().
|
protectedinherited |
Name of the histogram.
Definition at line 413 of file Histogram.h.
Referenced by cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::GetName(), cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::serialize(), and cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::SetName().
|
protectedinherited |
Title of the histogram.
Definition at line 414 of file Histogram.h.
Referenced by cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::GetTitle(), cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::serialize(), and cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::SetTitle().
|
private |
Upper bound of the profile z-axis.
Definition at line 819 of file Histogram.h.
Referenced by Fill(), GetMaxZ(), and serialize().
|
private |
Lower bound of the profile z-axis.
Definition at line 818 of file Histogram.h.
Referenced by Fill(), GetMinZ(), and serialize().
|
staticconstexprprotectedinherited |
Definition at line 253 of file Histogram.h.