13#include <analysis/dbobjects/PIDPriorsTable.h>
14#include <framework/gearbox/Const.h>
54 auto index = particle.getIndex();
69 std::vector<float> priorsTable, std::vector<float> errorsTable)
71 auto index = particle.getIndex();
72 m_priors[index].setBinEdges(xAxisEdges, yAxisEdges);
73 m_priors[index].setBinEdges(xAxisEdges, yAxisEdges);
74 m_priors[index].setPriorsTable(priorsTable);
75 m_priors[index].setErrorsTable(errorsTable);
109 auto index = particle.getIndex();
110 m_priors[index].setBinEdges(xAxisEdges, yAxisEdges);
111 m_priors[index].setBinEdges(xAxisEdges, yAxisEdges);
124 auto index = particle.getIndex();
125 m_priors[index].setPriorsTable(priorsTable);
138 auto index = particle.getIndex();
139 m_priors[index].setErrorsTable(errorsTable);
152 auto index = particle.getIndex();
153 m_priors[index].setAxisLabels(xAxisLabel, yAxisLabel);
165 auto index = particle.getIndex();
179 auto index = particle.getIndex();
180 return m_priors[index].getPriorValue(x, y);
193 auto index = particle.getIndex();
194 return m_priors[index].getErrorValue(x, y);
205 auto index = particle.getIndex();
206 return m_priors[index].getXAxisLabel();
217 auto index = particle.getIndex();
218 return m_priors[index].getYAxisLabel();
Provides a type-safe way to pass members of the chargedStableSet set.
static const unsigned int c_SetSize
Number of elements (for use in array bounds etc.)
This class holds the prior distribution for a single particle species.
void setErrorsTable(const Const::ChargedStable &particle, std::vector< float > errorsTable)
Sets the probability error table for the priors of the selected particle species.
void setPriors(const Const::ChargedStable &particle, std::vector< float > xAxisEdges, std::vector< float > yAxisEdges, std::vector< float > priorsTable, std::vector< float > errorsTable)
Sets the prior table for a particle species from the std::vectors of the bin edges and the probabilit...
float getPriorError(const Const::ChargedStable &particle, float x, float y) const
Returns the error on the prior probability associated to a particle with defined species and paramete...
std::string getXAxisLabel(const Const::ChargedStable &particle) const
Returns the X axis label of the prior.
PIDPriorsTable m_priors[Const::ChargedStable::c_SetSize]
The array of PIDPiorsTable, one per particle species.
PIDPriorsTable getPriorsTable(const Const::ChargedStable &particle) const
Returns the priors table of the selected particle species.
ClassDef(PIDPriors, 1)
Class revision number.
std::string getYAxisLabel(const Const::ChargedStable &particle) const
Returns the Y axis label of the prior.
void setAxisLabels(const Const::ChargedStable &particle, std::string xAxisLabel, std::string yAxisLabel)
Sets the axis labels for the priors of the selected particle species.
void setPriors(const Const::ChargedStable &particle, const PIDPriorsTable &table)
Sets the prior table for a particle species from a PIDPriorsTable object.
void setPriorsTable(const Const::ChargedStable &particle, std::vector< float > priorsTable)
Sets the probability table for the priors of the selected particle species.
PIDPriors()
Default constructor.
float getPriorValue(const Const::ChargedStable &particle, float x, float y) const
Returns the prior probability associated to a particle with defined species and parameters.
void setPriorsAxes(const Const::ChargedStable &particle, std::vector< float > xAxisEdges, std::vector< float > yAxisEdges)
Sets the axes for the priors table of the selected species.
Abstract base class for different kinds of events.