11 #include <analysis/dbobjects/PIDCalibrationWeight.h> 
   12 #include <analysis/dbobjects/PIDDetectorWeights.h> 
   13 #include <framework/database/DBObjPtr.h> 
   14 #include <framework/logging/Logger.h> 
   16 #include <framework/gearbox/Const.h> 
   39         B2FATAL(
"The dbobject PIDCalibrationWeight could not be found! It is necessary for the weighted PID variables.");
 
   49       if (
m_matrixName.find(
"PIDDetectorWeights") != std::string::npos) {
 
   52           B2FATAL(
"The dbobject PIDDetectorWeights, " << 
m_matrixName <<
 
   53                   " could not be found! It is necessary for the weighted PID variables.");
 
   57           B2FATAL(
"The dbobject PIDCalibrationWeight, " << 
m_matrixName <<
 
   58                   " could not be found! It is necessary for the weighted PID variables.");
 
   67       if (
m_matrixName.find(
"PIDDetectorWeights") != std::string::npos) {
 
   70         return (*m_pidCalibWeightDB)->getWeight(pdg, det);
 
   77     std::unique_ptr<DBObjPtr<PIDDetectorWeights>>
 
The ParticleType class for identifying different particle types.
EDetector
Enum for identifying the detector components (detector and subdetector).
Class to call calibration weight matrix.
PIDCalibrationWeightUtil(std::string matrixName)
Constructor with the name of the calibration weight matrix.
std::unique_ptr< DBObjPtr< PIDCalibrationWeight > > m_pidCalibWeightDB
db object for the calibration weight matrix.
PIDCalibrationWeightUtil()
Constructor.
double getWeight(int pdg, Const::EDetector det, double p, double theta) const
Get the weight for the given combination of the PDG code and the detector in Const::EDetector.
std::unique_ptr< DBObjPtr< PIDDetectorWeights > > m_pidDetWeightDB
db object for the detector weight matrix for momentum and theta dependent matrix.
std::string m_matrixName
name of the matrix.
Abstract base class for different kinds of events.