Belle II Software light-2406-ragdoll
|
Class for handling the PID weights per detector, used to calculate the track helix isolation score per particle. More...
#include <PIDDetectorWeights.h>
Classes | |
class | WeightsTable |
Nested class acting as a container the per-detector weights. More... | |
Public Member Functions | |
PIDDetectorWeights () | |
Default constructor, necessary for ROOT to stream the object. | |
~PIDDetectorWeights () | |
Destructor. | |
PIDDetectorWeights (const std::string &weightsCSVFileName) | |
Constructor from CSV file of weights. | |
PIDDetectorWeights (const std::string &treeName, const std::string &weightsROOTFileName) | |
Constructor from ROOT file w/ TTree of weights. | |
ROOT::RDataFrame | getWeightsRDF () const |
Get the RDataFrame of detector weights. | |
double | getWeight (Const::ChargedStable hypo, Const::EDetector det, double p, double theta) const |
Lookup the weight from the internal map structures. | |
Private Member Functions | |
void | fillWeightsTablePerHypoFromRDF () |
Fill the internal weights container class per particle hypo, based on the content of the RDataFrame. | |
ClassDef (PIDDetectorWeights, 4) | |
ClassDef as this is a TObject. | |
Private Attributes | |
std::map< int, WeightsTable > | m_weightsTablePerHypo |
Map containing a WeightsTable object per particle hypo. | |
ROOT::RDataFrame | m_weightsRDataFrame = ROOT::RDataFrame(1) |
The RDataFrame containing the detector weights per particle hypo, per phase space bin. | |
std::map< std::string, std::string > | m_weightNames |
The names of the per-detector weight columns in the RDataFrame. | |
Class for handling the PID weights per detector, used to calculate the track helix isolation score per particle.
Definition at line 31 of file PIDDetectorWeights.h.
|
inline |
Default constructor, necessary for ROOT to stream the object.
Definition at line 75 of file PIDDetectorWeights.h.
|
inline |
|
inline |
Constructor from CSV file of weights.
NB: please ensure all numeric types are stored as double in the CSV!
weightsCSVFileName | the path to the CSV file containing the detector weights per std charged particle hypothesis, in bins of p and theta. |
Definition at line 88 of file PIDDetectorWeights.h.
|
inline |
Constructor from ROOT file w/ TTree of weights.
treeName | the name of the TTree with detector weights per std charged particle hypothesis, in bins of p and theta. |
weightsROOTFileName | the path to the ROOT file containing the TTree. |
Definition at line 99 of file PIDDetectorWeights.h.
|
private |
Fill the internal weights container class per particle hypo, based on the content of the RDataFrame.
Definition at line 15 of file PIDDetectorWeights.cc.
double getWeight | ( | Const::ChargedStable | hypo, |
Const::EDetector | det, | ||
double | p, | ||
double | theta | ||
) | const |
Lookup the weight from the internal map structures.
hypo | the input std charged particle. |
det | the input PID detector. |
p | the particle momentum in [GeV/c]. |
theta | the particle polar angle in [rad]. |
Definition at line 112 of file PIDDetectorWeights.cc.
|
inline |
Get the RDataFrame of detector weights.
To be used for testing/debugging only when creating the payload.
Definition at line 109 of file PIDDetectorWeights.h.
|
private |
The names of the per-detector weight columns in the RDataFrame.
Definition at line 141 of file PIDDetectorWeights.h.
|
private |
The RDataFrame containing the detector weights per particle hypo, per phase space bin.
Using an RDataFrame is convenient when creating the payload from an input CSV file. However, an RDataFrame cannot be streamed in the persistent ROOT file, thus we must prevent this from happening.
Definition at line 136 of file PIDDetectorWeights.h.
|
private |
Map containing a WeightsTable object per particle hypo.
Use to lookup the index corresponding to a (p, theta) pair.
Definition at line 129 of file PIDDetectorWeights.h.