![]() |
Belle II Software
release-05-01-25
|
A database class to hold the prior probability for the particle identification. More...
#include <PIDPriors.h>
Public Member Functions | |
PIDPriors () | |
Default constructor. | |
void | setPriors (const Const::ChargedStable &particle, const PIDPriorsTable &table) |
Sets the prior table for a particle species from a PIDPriorsTable object. More... | |
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 a the std::vectors of the bin edges and the probability values. More... | |
void | setPriors (const Const::ChargedStable &particle, TH2F *priorHistogram) |
Sets the prior table for a particle species from a TH2F. More... | |
void | setPriors (const Const::ChargedStable &particle, TH2F *counts, TH2F *normalization) |
Sets the prior table for a particle species starting from a TH2F of the counts and a TH2F of the normalization. More... | |
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. More... | |
void | setPriorsTable (const Const::ChargedStable &particle, std::vector< float > priorsTable) |
Sets the probability table for the priors of the selected particle species. More... | |
void | setErrorsTable (const Const::ChargedStable &particle, std::vector< float > errorsTable) |
Sets the probability error table for the priors of the selected particle species. More... | |
void | setAxisLabels (const Const::ChargedStable &particle, std::string xAxisLabel, std::string yAxisLabel) |
Sets the axis labels for the priors of the selected particle species. More... | |
PIDPriorsTable | getPriorsTable (const Const::ChargedStable &particle) const |
Returns the priors table of the selected particle species. More... | |
float | getPriorValue (const Const::ChargedStable &particle, float x, float y) const |
Returns the prior probability associated to a particle with defined species and parameters. More... | |
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 parameters. More... | |
std::string | getXAxisLabel (const Const::ChargedStable &particle) const |
Returns the X axis label of the prior. More... | |
std::string | getYAxisLabel (const Const::ChargedStable &particle) const |
Returns the Y axis label of the prior. More... | |
Private Member Functions | |
ClassDef (PIDPriors, 1) | |
Class revision number. | |
Private Attributes | |
PIDPriorsTable | m_priors [Const::ChargedStable::c_SetSize] |
The array of PIDPiorsTable, one per particle species. | |
A database class to hold the prior probability for the particle identification.
This prior probability for each particle species is stored as PIDPriorsTable object, that allows to bin it in 2 dimensions defined by two kinematic variables. This class provides a container for 6 PIDPriorsTable objects, some wrappers around the most used getters and setteres, and some setters that allow the user to load the priors starting from a TH2 object.
Definition at line 33 of file PIDPriors.h.
|
inline |
Returns the error on the prior probability associated to a particle with defined species and parameters.
particle | the charged stable type of the prior's species |
x | the value of the x-axis coordinate |
y | the value of the y-axis coordinate |
Definition at line 193 of file PIDPriors.h.
|
inline |
Returns the priors table of the selected particle species.
particle | the charged stabel type of the prior's species |
Definition at line 165 of file PIDPriors.h.
|
inline |
Returns the prior probability associated to a particle with defined species and parameters.
particle | the charged stable type of the prior's species |
x | the value of the x-axis coordinate |
y | the value of the y-axis coordinate |
Definition at line 179 of file PIDPriors.h.
|
inline |
Returns the X axis label of the prior.
particle | the charged stable type of the prior's species |
Definition at line 205 of file PIDPriors.h.
|
inline |
Returns the Y axis label of the prior.
particle | the charged stable type of the prior's species |
Definition at line 217 of file PIDPriors.h.
|
inline |
Sets the axis labels for the priors of the selected particle species.
particle | the charged stable type of the prior's species |
xAxisLabel | the label of the X axis |
yAxisLabel | the label of the Y axis |
Definition at line 152 of file PIDPriors.h.
|
inline |
Sets the probability error table for the priors of the selected particle species.
Effectively this is just a wrapper around PIDPriorsTable::setErrorssTable()
particle | the charged stable type of the prior's species |
errorsTable | a 2D vector containing the prior probabilities |
Definition at line 138 of file PIDPriors.h.
|
inline |
Sets the prior table for a particle species from a PIDPriorsTable object.
particle | the charged stable type of the particle |
table | the priors table |
Definition at line 54 of file PIDPriors.h.
|
inline |
Sets the prior table for a particle species from a the std::vectors of the bin edges and the probability values.
particle | the charged stable type of the particle |
xAxisEdge | the std::vector<float> containing the bin edges of the X axis |
yAxisEdge | the std::vector<float> containing the bin edges of the Y axis |
priorsTable | the 2D std::vector<float> containing the prior probabilities |
errorsTable | the 2D std::vector<float> containing the errors on prior probabilities |
Definition at line 70 of file PIDPriors.h.
void setPriors | ( | const Const::ChargedStable & | particle, |
TH2F * | counts, | ||
TH2F * | normalization | ||
) |
Sets the prior table for a particle species starting from a TH2F of the counts and a TH2F of the normalization.
The counts histogram is divided by the normalization one to get the probabilities and the errors The bin edges are taken form the TH2 axes, the prior probability from the bins content and the errors from the bins error
particle | the charged stable type of the particle |
counts | histogram of counts |
normalization | histogram used for normalization |
Definition at line 59 of file PIDPriors.cc.
void setPriors | ( | const Const::ChargedStable & | particle, |
TH2F * | priorHistogram | ||
) |
Sets the prior table for a particle species from a TH2F.
The bin edges are taken form the TH2 axes, the prior probability from the bins content and the errors from the bins error
particle | the charged stable type of the particle |
priorHistogram | the prior for the particle specie |
Definition at line 20 of file PIDPriors.cc.
|
inline |
Sets the axes for the priors table of the selected species.
Effectively this is just a wrapper around PIDPriorsTable::setBinEdges()
particle | the charged stable type of the prior's species |
xAxisEdge | the vector of edges of the X axis |
yAxisEdge | the vector of edges of the Y axis |
Definition at line 109 of file PIDPriors.h.
|
inline |
Sets the probability table for the priors of the selected particle species.
Effectively this is just a wrapper around PIDPriorsTable::setPriorsTable()
particle | the charged stable type of the prior's species |
priorsTable | a 2D vector containing the prior probabilities |
Definition at line 124 of file PIDPriors.h.