Belle II Software  release-08-01-10
KLMLikelihoodParameters.cc
1 /**************************************************************************
2  * basf2 (Belle II Analysis Software Framework) *
3  * Author: The Belle II Collaboration *
4  * *
5  * See git log for contributors and copyright holders. *
6  * This file is licensed under LGPL-3.0, see LICENSE.md. *
7  **************************************************************************/
8 
9 /* Own header. */
10 #include <klm/dbobjects/KLMLikelihoodParameters.h>
11 
12 /* Basf2 headers. */
13 #include <framework/logging/Logger.h>
14 
15 using namespace Belle2;
16 
17 const std::vector<double>& KLMLikelihoodParameters::getLongitudinalPDF(const int id) const
18 {
19  std::map<int, std::vector<double>>::const_iterator it = m_LongitudinalPDF.find(id);
20  if (it != m_LongitudinalPDF.end()) {
21  return it->second;
22  } else {
23  B2FATAL("Longitudinal for KLMLikelihoodParameters not found!");
24  }
25 }
26 
27 const std::vector<double>& KLMLikelihoodParameters::getTransversePDF(const int id) const
28 {
29  std::map<int, std::vector<double>>::const_iterator it = m_TransversePDF.find(id);
30  if (it != m_TransversePDF.end()) {
31  return it->second;
32  } else {
33  B2FATAL("Transverse PDF for KLMLikelihoodParameters not found!");
34  }
35 }
36 
38 {
39  std::map<int, double>::const_iterator it = m_TransverseThreshold.find(id);
40  if (it != m_TransverseThreshold.end()) {
41  return it->second;
42  } else {
43  B2FATAL("Transverse threshold for KLMLikelihoodParameters not found!");
44  }
45 }
46 
48 {
49  std::map<int, double>::const_iterator it = m_TransverseScaleX.find(id);
50  if (it != m_TransverseScaleX.end()) {
51  return it->second;
52  } else {
53  B2FATAL("Horizontal transverse scale for KLMLikelihoodParameters not found!");
54  }
55 }
56 
58 {
59  std::map<int, double>::const_iterator it = m_TransverseScaleY.find(id);
60  if (it != m_TransverseScaleY.end()) {
61  return it->second;
62  } else {
63  B2FATAL("Vertical transverse scale for KLMLikelihoodParameters not found!");
64  }
65 }
std::map< int, std::vector< double > > m_TransversePDF
Transverse probability density function.
const std::vector< double > & getLongitudinalPDF(int hypothesis, int outcome, int lastLayer) const
Get the longitudinal probability density function for specific hypothesis, outcome and last layer.
double getTransverseThreshold(int hypothesis, int detector, int degreesOfFreedom) const
Get the transverse probability density function (analytical): threshold for specific hypothesis,...
std::map< int, double > m_TransverseScaleY
Transverse probability density function (analytical): vertical scale.
double getTransverseScaleY(int hypothesis, int detector, int degreesOfFreedom) const
Get the transverse probability density function (analytical): vertical scale for specific hypothesis,...
std::map< int, std::vector< double > > m_LongitudinalPDF
Longitudinal probability density function.
std::map< int, double > m_TransverseScaleX
Transverse probability density function (analytical): horizontal scale.
std::map< int, double > m_TransverseThreshold
Transverse probability density function (analytical): threshold.
double getTransverseScaleX(int hypothesis, int detector, int degreesOfFreedom) const
Get the transverse probability density function (analytical): horizontal scale for specific hypothesi...
const std::vector< double > & getTransversePDF(int hypothesis, int detector, int degreesOfFreedom) const
Get the transverse probability density function for specific hypothesis, detector and degrees of free...
Abstract base class for different kinds of events.