Belle II Software  release-08-01-10
PIDCalibrationWeight Class Reference

Class for handling the PID calibration weight matrix. More...

#include <PIDCalibrationWeight.h>

Inheritance diagram for PIDCalibrationWeight:
Collaboration diagram for PIDCalibrationWeight:

Public Member Functions

 PIDCalibrationWeight ()
 Constructor.
 
 PIDCalibrationWeight (WeightMatrix weightMatrix)
 Constructor with the initial WeightMatrix.
 
void setWeightMatrix (WeightMatrix weightMatrix)
 Set the WeightMatrix. More...
 
WeightMatrix getWeightMatrix () const
 Get the WeightMatrix.
 
double getWeight (int pdg, std::string detector) const
 Get the weight for the given combination of the PDG code and the detector name. More...
 
double getWeight (int pdg, Const::EDetector det) const
 Get the weight for the given combination of the PDG code and the detector in Const::EDetector. More...
 
std::vector< double > getWeights (int pdg) const
 Get the weights for the given PDG code. More...
 

Private Member Functions

 ClassDef (PIDCalibrationWeight, 1)
 ClassDef as this is a TObject.
 

Private Attributes

WeightMatrix m_weightMatrix
 PID calibration weight matrix.
 

Detailed Description

Class for handling the PID calibration weight matrix.

Definition at line 35 of file PIDCalibrationWeight.h.

Member Function Documentation

◆ getWeight() [1/2]

double getWeight ( int  pdg,
Const::EDetector  det 
) const
inline

Get the weight for the given combination of the PDG code and the detector in Const::EDetector.

Parameters
pdgis the PDG code
detis the detector in Const::EDetector
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 
98  int det_index = Const::PIDDetectors::c_set.getIndex(det);
99  return weightVector[det_index];
100  };
int getIndex(EDetector det) const
Getter for the index of a given detector in this set.
Definition: UnitConst.cc:278
static const DetectorSet c_set
The set of valid PID detectors.
Definition: Const.h:366
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
pdgis the PDG code
detectoris 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.

◆ getWeights()

std::vector<double> getWeights ( int  pdg) const
inline

Get the weights for the given PDG code.

Parameters
pdgis the PDG code
Returns
weights for the given PDG code

Definition at line 107 of file PIDCalibrationWeight.h.

◆ setWeightMatrix()

void setWeightMatrix ( WeightMatrix  weightMatrix)
inline

Set the WeightMatrix.

Parameters
weightMatrixis the weight matrix to be set.

Definition at line 51 of file PIDCalibrationWeight.h.


The documentation for this class was generated from the following file: