10#include <framework/dbobjects/dEdxPDFs.h>
21 if (cachePDFs.empty()) {
23 for (
const auto& pdf : PDFs) cachePDFs.push_back(&pdf);
33 int nx = PDFs[0].GetNbinsX();
34 int ny = PDFs[0].GetNbinsY();
35 double xmin = PDFs[0].GetXaxis()->GetXmin();
36 double xmax = PDFs[0].GetXaxis()->GetXmax();
37 double ymin = PDFs[0].GetYaxis()->GetXmin();
38 double ymax = PDFs[0].GetYaxis()->GetXmax();
40 for (
const auto& h : PDFs) {
41 if (h.GetNbinsX() != nx)
return false;
42 if (h.GetNbinsY() != ny)
return false;
43 if (h.GetXaxis()->GetXmin() != xmin)
return false;
44 if (h.GetXaxis()->GetXmax() != xmax)
return false;
45 if (h.GetYaxis()->GetXmin() != ymin)
return false;
46 if (h.GetYaxis()->GetXmax() != ymax)
return false;
std::vector< const TH2F * > m_cachePDFs
cache for a vector of pointers to PDFs
std::array< TH2F, Const::ChargedStable::c_SetSize > m_dEdxPDFs
Array of dE/dx PDFs for each particle hypothesis.
std::array< TH2F, Const::ChargedStable::c_SetSize > m_dEdxPDFsTruncated
Array of truncated dE/dx PDFs for each particle hypothesis.
std::vector< const TH2F * > m_cachePDFsTruncated
do not write out
const std::vector< const TH2F * > & getPDFs(bool truncated) const
Return all PDF's as a vector of histogram pointers.
bool checkPDFs(bool truncated) const
Check PDF histograms if they are defined in the same range and with the same binning.
Abstract base class for different kinds of events.