37 void setBinEdges(
const std::vector<float>& binEdgesX,
const std::vector<float>& binEdgesY);
85 void setAxisLabels(
const std::string& labelX,
const std::string& labelY)
182 bool checkRange(
const std::string& text,
float val,
const std::vector<float>& edges)
const;
190 short findBin(
float val, std::vector<float> array)
const;
203 short findBinFast(
float val, std::vector<float> array)
const;
This class holds the prior distribution for a single particle species.
void setErrorsTable(const std::vector< float > &errors)
Sets the priors error table from a 2D std::vector.
void printPrior() const
Prints the content of the table and the axes.
std::vector< float > m_errors
The matrix with the errors on the prior probabilities.
std::vector< float > m_binEdgesY
The array containing the bin edges for the Y axis.
bool checkRange(const std::string &text, float val, const std::vector< float > &edges) const
Checks if a value is within the range of an array.
void setBinEdges(const std::vector< float > &binEdgesX, const std::vector< float > &binEdgesY)
Sets the bin edges arrays.
std::vector< float > m_priors
The matrix with the prior probabilities.
float getPriorValue(float x, float y) const
Returns the prior probability for a given value of (x,y).
std::string m_yAxisLabel
label of the Y axis, indicating which variable is represented here
std::string getXAxisLabel() const
Returns the X axis label.
void setPriorValue(float x, float y, float value)
Sets the prior value for a single bin.
short findBinFast(float val, std::vector< float > array) const
This function returns the position of a number in a sorted array of bin edges This implementation sho...
std::string m_xAxisLabel
label of the X axis, indicating which variable is represented here
void printError() const
Prints the content of the error table and the axes.
float getErrorValue(float x, float y) const
Returns the error on the prior probability for a given value of (x,y).
short findBinWithFixedWidth(float val, std::vector< float > array) const
This function returns the position of a number in a sorted array of bin edges, assuming that the latt...
std::vector< float > m_binEdgesX
The array containing the bin edges for the X axis.
void setPriorsTable(const std::vector< float > &priors)
Sets the priors table from a 2D std::vector.
std::string getYAxisLabel() const
Returns the Y axis label.
void setAxisLabels(const std::string &labelX, const std::string &labelY)
Sets axes labels.
void setErrorValue(float x, float y, float value)
Sets the error on the prior value for a single bin.
float getPriorInBin(int iX, int iY) const
Returns the prior probability for a given bin.
short findBin(float val, std::vector< float > array) const
This function returns the position of a number in a sorted array of bin edges.
float getErrorInBin(int iX, int iY) const
Returns the error on prior probability for a given bin.
Abstract base class for different kinds of events.