Class for handling the PID calibration weight matrix.
More...
#include <PIDCalibrationWeight.h>
Class for handling the PID calibration weight matrix.
Definition at line 35 of file PIDCalibrationWeight.h.
◆ PIDCalibrationWeight() [1/2]
◆ PIDCalibrationWeight() [2/2]
Constructor with the initial WeightMatrix.
Definition at line 42 of file PIDCalibrationWeight.h.
43 {
45 };
WeightMatrix m_weightMatrix
PID calibration weight matrix.
◆ getWeight() [1/2]
Get the weight for the given combination of the PDG code and the detector in Const::EDetector.
- Parameters
-
- Returns
- weight for the given set of the PDG code and the detector in Const::EDetector
Definition at line 94 of file PIDCalibrationWeight.h.
95 {
96 std::vector<double> weightVector =
getWeights(pdg);
97
99 return weightVector[det_index];
100 };
int getIndex(EDetector det) const
Getter for the index of a given detector in this set.
static const DetectorSet c_set
The set of valid PID detectors.
std::vector< double > getWeights(int pdg) const
Get the weights for the given PDG code.
◆ getWeight() [2/2]
double getWeight |
( |
int |
pdg, |
|
|
std::string |
detector |
|
) |
| const |
|
inline |
Get the weight for the given combination of the PDG code and the detector name.
- Parameters
-
pdg | is the PDG code |
detector | is the detector name |
- Returns
- weight for the given combination of the PDG code and the detector name
Definition at line 70 of file PIDCalibrationWeight.h.
71 {
72 std::vector<double> weightVector =
getWeights(pdg);
73
75 boost::to_lower(detector);
76 if (detector == "svd") det = Const::SVD;
77 else if (detector == "cdc") det = Const::CDC;
78 else if (detector == "top") det = Const::TOP;
79 else if (detector == "arich") det = Const::ARICH;
80 else if (detector == "ecl") det = Const::ECL;
81 else if (detector == "klm") det = Const::KLM;
82 else B2FATAL("Unknown detector component: " << detector);
84
85 return weightVector[det_index];
86 };
EDetector
Enum for identifying the detector components (detector and subdetector).
◆ getWeightMatrix()
◆ getWeights()
std::vector< double > getWeights |
( |
int |
pdg | ) |
const |
|
inline |
Get the weights for the given PDG code.
- Parameters
-
- Returns
- weights for the given PDG code
Definition at line 107 of file PIDCalibrationWeight.h.
108 {
109 int p_index = -1;
111 if (pdgIter.getPDGCode() == pdg) {
112 p_index = pdgIter.getIndex();
113 break;
114 }
115 }
116 if (p_index == -1)
117 B2FATAL("Invalid particle: " << pdg);
118
120 };
static const ParticleSet chargedStableSet
set of charged stable particles
◆ setWeightMatrix()
Set the WeightMatrix.
- Parameters
-
weightMatrix | is the weight matrix to be set. |
Definition at line 51 of file PIDCalibrationWeight.h.
◆ m_weightMatrix
The documentation for this class was generated from the following file: