Belle II Software development
|
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. | |
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 probability values. | |
void | setPriors (const Const::ChargedStable &particle, TH2F *priorHistogram) |
Sets the prior table for a particle species from a TH2F. | |
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. | |
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. | |
void | setPriorsTable (const Const::ChargedStable &particle, std::vector< float > priorsTable) |
Sets the probability table for the priors of the selected 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 | setAxisLabels (const Const::ChargedStable &particle, std::string xAxisLabel, std::string yAxisLabel) |
Sets the axis labels for the priors of the selected particle species. | |
PIDPriorsTable | getPriorsTable (const Const::ChargedStable &particle) const |
Returns the priors table of the selected particle species. | |
float | getPriorValue (const Const::ChargedStable &particle, float x, float y) const |
Returns the prior probability associated to a particle with defined species and parameters. | |
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. | |
std::string | getXAxisLabel (const Const::ChargedStable &particle) const |
Returns the X axis label of the prior. | |
std::string | getYAxisLabel (const Const::ChargedStable &particle) const |
Returns the Y axis label of the prior. | |
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 setters, and some setters that allow the user to load the priors starting from a TH2 object.
Definition at line 31 of file PIDPriors.h.
|
inline |
|
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 191 of file PIDPriors.h.
|
inline |
Returns the priors table of the selected particle species.
particle | the charged stable type of the prior's species |
Definition at line 163 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 177 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 203 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 215 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 150 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 136 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 52 of file PIDPriors.h.
|
inline |
Sets the prior table for a particle species from the std::vectors of the bin edges and the probability values.
particle | the charged stable type of the particle |
xAxisEdges | the std::vector<float> containing the bin edges of the X axis |
yAxisEdges | 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 68 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 57 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 18 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 |
xAxisEdges | the vector of edges of the X axis |
yAxisEdges | the vector of edges of the Y axis |
Definition at line 107 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 122 of file PIDPriors.h.
|
private |
The array of PIDPiorsTable, one per particle species.
Definition at line 222 of file PIDPriors.h.