Belle II Software development
KLMLikelihoodParameters Class Reference

Database object used to store the parameters for KLM likelihood computation. More...

#include <KLMLikelihoodParameters.h>

Inheritance diagram for KLMLikelihoodParameters:

Public Member Functions

 KLMLikelihoodParameters ()
 Constructor.
 
 ~KLMLikelihoodParameters ()
 Destructor.
 
void setLongitudinalPDF (int hypothesis, int outcome, int lastLayer, const std::vector< double > &params)
 Set the longitudinal probability density function for specific hypothesis, outcome and last layer.
 
void setTransversePDF (int hypothesis, int detector, int degreesOfFreedom, const std::vector< double > &params)
 Set the transverse probability density function for specific hypothesis, detector and degrees of freedom.
 
void setTransverseThreshold (int hypothesis, int detector, int degreesOfFreedom, const double threshold)
 Set the transverse probability density function (analytical): threshold for specific hypothesis, detector and degrees of freedom.
 
void setTransverseScaleX (int hypothesis, int detector, int degreesOfFreedom, const double scaleX)
 Set the transverse probability density function (analytical): horizontal scale for specific hypothesis, detector and degrees of freedom.
 
void setTransverseScaleY (int hypothesis, int detector, int degreesOfFreedom, const double scaleY)
 Set the transverse probability density function (analytical): vertical scale for specific hypothesis, detector and degrees of freedom.
 
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.
 
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 freedom.
 
double getTransverseThreshold (int hypothesis, int detector, int degreesOfFreedom) const
 Get the transverse probability density function (analytical): threshold for specific hypothesis, detector and degrees of freedom.
 
double getTransverseScaleX (int hypothesis, int detector, int degreesOfFreedom) const
 Get the transverse probability density function (analytical): horizontal scale for specific hypothesis, detector and degrees of freedom.
 
double getTransverseScaleY (int hypothesis, int detector, int degreesOfFreedom) const
 Get the transverse probability density function (analytical): vertical scale for specific hypothesis, detector and degrees of freedom.
 

Private Member Functions

void setLongitudinalPDF (const int id, const std::vector< double > &params)
 Set the longitudinal probability density function for a given identifier.
 
void setTransversePDF (const int id, const std::vector< double > &params)
 Set the transverse probability density function for a given identifier.
 
void setTransverseThreshold (const int id, const double threshold)
 Set the transverse probability density function (analytical): threshold for a given identifier.
 
void setTransverseScaleX (const int id, const double scaleX)
 Set the transverse probability density function (analytical): horizontal scale for a given identifier.
 
void setTransverseScaleY (const int id, const double scaleY)
 Set the transverse probability density function (analytical): vertical scale for a given identifier.
 
const std::vector< double > & getLongitudinalPDF (const int id) const
 Get the longitudinal probability density function for a given identifier.
 
const std::vector< double > & getTransversePDF (const int id) const
 Get the transverse probability density function for a given identifier.
 
double getTransverseThreshold (const int id) const
 Get the transverse probability density function (analytical): threshold for a given identifier.
 
double getTransverseScaleX (const int id) const
 Get the transverse probability density function (analytical): horizontal scale for a given identifier.
 
double getTransverseScaleY (const int id) const
 Get the transverse probability density function (analytical): vertical scale for a given identifier.
 
 ClassDef (KLMLikelihoodParameters, 1)
 Class version.
 

Private Attributes

std::map< int, std::vector< double > > m_LongitudinalPDF
 Longitudinal probability density function.
 
std::map< int, std::vector< double > > m_TransversePDF
 Transverse probability density function.
 
std::map< int, double > m_TransverseThreshold
 Transverse probability density function (analytical): threshold.
 
std::map< int, double > m_TransverseScaleX
 Transverse probability density function (analytical): horizontal scale.
 
std::map< int, double > m_TransverseScaleY
 Transverse probability density function (analytical): vertical scale.
 

Detailed Description

Database object used to store the parameters for KLM likelihood computation.

Definition at line 28 of file KLMLikelihoodParameters.h.

Constructor & Destructor Documentation

◆ KLMLikelihoodParameters()

Constructor.

Definition at line 35 of file KLMLikelihoodParameters.h.

36 {
37 }

◆ ~KLMLikelihoodParameters()

Destructor.

Definition at line 42 of file KLMLikelihoodParameters.h.

43 {
44 }

Member Function Documentation

◆ getLongitudinalPDF() [1/2]

const std::vector< double > & getLongitudinalPDF ( const int  id) const
private

Get the longitudinal probability density function for a given identifier.

Parameters
[in]idLongitudinal identifier.

Definition at line 17 of file KLMLikelihoodParameters.cc.

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}
std::map< int, std::vector< double > > m_LongitudinalPDF
Longitudinal probability density function.

◆ getLongitudinalPDF() [2/2]

const std::vector< double > & getLongitudinalPDF ( int  hypothesis,
int  outcome,
int  lastLayer 
) const
inline

Get the longitudinal probability density function for specific hypothesis, outcome and last layer.

Parameters
[in]hypothesisHypothesis number.
[in]outcomeTrack extrapolation outcome.
[in]lastLayerLast layer crossed during the extrapolation.

Definition at line 117 of file KLMLikelihoodParameters.h.

118 {
119 const int id = MuidElementNumbers::getLongitudinalID(hypothesis, outcome, lastLayer);
120 return getLongitudinalPDF(id);
121 }
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.
static int getLongitudinalID(int hypothesis, int outcome, int lastLayer)
Get the unique longitudinal identifier for given hypothesis, outcome and last layer crossed.

◆ getTransversePDF() [1/2]

const std::vector< double > & getTransversePDF ( const int  id) const
private

Get the transverse probability density function for a given identifier.

Parameters
[in]idTransverse identifier.

Definition at line 27 of file KLMLikelihoodParameters.cc.

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}
std::map< int, std::vector< double > > m_TransversePDF
Transverse probability density function.

◆ getTransversePDF() [2/2]

const std::vector< double > & getTransversePDF ( int  hypothesis,
int  detector,
int  degreesOfFreedom 
) const
inline

Get the transverse probability density function for specific hypothesis, detector and degrees of freedom.

Parameters
[in]hypothesisHypothesis number.
[in]detectorDetector number.
[in]degreesOfFreedomNumber of degrees of freedom.

Definition at line 129 of file KLMLikelihoodParameters.h.

130 {
131 const int id = MuidElementNumbers::getTransverseID(hypothesis, detector, degreesOfFreedom);
132 return getTransversePDF(id);
133 }
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...
static int getTransverseID(int hypothesis, int detector, int degreesOfFreedom)
Get the unique transverse identifier for given hypothesis, detector and degrees of freedom.

◆ getTransverseScaleX() [1/2]

double getTransverseScaleX ( const int  id) const
private

Get the transverse probability density function (analytical): horizontal scale for a given identifier.

Parameters
[in]idTransverse identifier.

Definition at line 47 of file KLMLikelihoodParameters.cc.

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}
std::map< int, double > m_TransverseScaleX
Transverse probability density function (analytical): horizontal scale.

◆ getTransverseScaleX() [2/2]

double getTransverseScaleX ( int  hypothesis,
int  detector,
int  degreesOfFreedom 
) const
inline

Get the transverse probability density function (analytical): horizontal scale for specific hypothesis, detector and degrees of freedom.

Parameters
[in]hypothesisHypothesis number.
[in]detectorDetector number.
[in]degreesOfFreedomNumber of degrees of freedom.

Definition at line 153 of file KLMLikelihoodParameters.h.

154 {
155 const int id = MuidElementNumbers::getTransverseID(hypothesis, detector, degreesOfFreedom);
156 return getTransverseScaleX(id);
157 }
double getTransverseScaleX(int hypothesis, int detector, int degreesOfFreedom) const
Get the transverse probability density function (analytical): horizontal scale for specific hypothesi...

◆ getTransverseScaleY() [1/2]

double getTransverseScaleY ( const int  id) const
private

Get the transverse probability density function (analytical): vertical scale for a given identifier.

Parameters
[in]idTransverse identifier.

Definition at line 57 of file KLMLikelihoodParameters.cc.

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, double > m_TransverseScaleY
Transverse probability density function (analytical): vertical scale.

◆ getTransverseScaleY() [2/2]

double getTransverseScaleY ( int  hypothesis,
int  detector,
int  degreesOfFreedom 
) const
inline

Get the transverse probability density function (analytical): vertical scale for specific hypothesis, detector and degrees of freedom.

Parameters
[in]hypothesisHypothesis number.
[in]detectorDetector number.
[in]degreesOfFreedomNumber of degrees of freedom.

Definition at line 165 of file KLMLikelihoodParameters.h.

166 {
167 const int id = MuidElementNumbers::getTransverseID(hypothesis, detector, degreesOfFreedom);
168 return getTransverseScaleY(id);
169 }
double getTransverseScaleY(int hypothesis, int detector, int degreesOfFreedom) const
Get the transverse probability density function (analytical): vertical scale for specific hypothesis,...

◆ getTransverseThreshold() [1/2]

double getTransverseThreshold ( const int  id) const
private

Get the transverse probability density function (analytical): threshold for a given identifier.

Parameters
[in]idTransverse identifier.

Definition at line 37 of file KLMLikelihoodParameters.cc.

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}
std::map< int, double > m_TransverseThreshold
Transverse probability density function (analytical): threshold.

◆ getTransverseThreshold() [2/2]

double getTransverseThreshold ( int  hypothesis,
int  detector,
int  degreesOfFreedom 
) const
inline

Get the transverse probability density function (analytical): threshold for specific hypothesis, detector and degrees of freedom.

Parameters
[in]hypothesisHypothesis number.
[in]detectorDetector number.
[in]degreesOfFreedomNumber of degrees of freedom.

Definition at line 141 of file KLMLikelihoodParameters.h.

142 {
143 const int id = MuidElementNumbers::getTransverseID(hypothesis, detector, degreesOfFreedom);
144 return getTransverseThreshold(id);
145 }
double getTransverseThreshold(int hypothesis, int detector, int degreesOfFreedom) const
Get the transverse probability density function (analytical): threshold for specific hypothesis,...

◆ setLongitudinalPDF() [1/2]

void setLongitudinalPDF ( const int  id,
const std::vector< double > &  params 
)
inlineprivate

Set the longitudinal probability density function for a given identifier.

Parameters
[in]idLongitudinal identifier.
[in]paramsLikelihood parameters.

Definition at line 178 of file KLMLikelihoodParameters.h.

179 {
180 m_LongitudinalPDF.insert(std::pair<int, std::vector<double>>(id, params));
181 }

◆ setLongitudinalPDF() [2/2]

void setLongitudinalPDF ( int  hypothesis,
int  outcome,
int  lastLayer,
const std::vector< double > &  params 
)
inline

Set the longitudinal probability density function for specific hypothesis, outcome and last layer.

Parameters
[in]hypothesisHypothesis number.
[in]outcomeTrack extrapolation outcome.
[in]lastLayerLast layer crossed during the extrapolation.
[in]paramsLikelihood parameters.

Definition at line 53 of file KLMLikelihoodParameters.h.

54 {
55 const int id = MuidElementNumbers::getLongitudinalID(hypothesis, outcome, lastLayer);
56 setLongitudinalPDF(id, params);
57 }
void setLongitudinalPDF(int hypothesis, int outcome, int lastLayer, const std::vector< double > &params)
Set the longitudinal probability density function for specific hypothesis, outcome and last layer.

◆ setTransversePDF() [1/2]

void setTransversePDF ( const int  id,
const std::vector< double > &  params 
)
inlineprivate

Set the transverse probability density function for a given identifier.

Parameters
[in]idTransverse identifier.
[in]paramsLikelihood parameters.

Definition at line 188 of file KLMLikelihoodParameters.h.

189 {
190 m_TransversePDF.insert(std::pair<int, std::vector<double>>(id, params));
191 }

◆ setTransversePDF() [2/2]

void setTransversePDF ( int  hypothesis,
int  detector,
int  degreesOfFreedom,
const std::vector< double > &  params 
)
inline

Set the transverse probability density function for specific hypothesis, detector and degrees of freedom.

Parameters
[in]hypothesisHypothesis number.
[in]detectorDetector number.
[in]degreesOfFreedomNumber of degrees of freedom.
[in]paramsLikelihood parameters.

Definition at line 66 of file KLMLikelihoodParameters.h.

67 {
68 int id = MuidElementNumbers::getTransverseID(hypothesis, detector, degreesOfFreedom);
69 setTransversePDF(id, params);
70 }
void setTransversePDF(int hypothesis, int detector, int degreesOfFreedom, const std::vector< double > &params)
Set the transverse probability density function for specific hypothesis, detector and degrees of free...

◆ setTransverseScaleX() [1/2]

void setTransverseScaleX ( const int  id,
const double  scaleX 
)
inlineprivate

Set the transverse probability density function (analytical): horizontal scale for a given identifier.

Parameters
[in]idTransverse identifier.
[in]scaleXHorizontal scale.

Definition at line 208 of file KLMLikelihoodParameters.h.

209 {
210 m_TransverseScaleX.insert(std::pair<int, double>(id, scaleX));
211 }

◆ setTransverseScaleX() [2/2]

void setTransverseScaleX ( int  hypothesis,
int  detector,
int  degreesOfFreedom,
const double  scaleX 
)
inline

Set the transverse probability density function (analytical): horizontal scale for specific hypothesis, detector and degrees of freedom.

Parameters
[in]hypothesisHypothesis number.
[in]detectorDetector number.
[in]degreesOfFreedomNumber of degrees of freedom.
[in]scaleXHorizontal scale.

Definition at line 92 of file KLMLikelihoodParameters.h.

93 {
94 int id = MuidElementNumbers::getTransverseID(hypothesis, detector, degreesOfFreedom);
95 setTransverseScaleX(id, scaleX);
96 }
void setTransverseScaleX(int hypothesis, int detector, int degreesOfFreedom, const double scaleX)
Set the transverse probability density function (analytical): horizontal scale for specific hypothesi...

◆ setTransverseScaleY() [1/2]

void setTransverseScaleY ( const int  id,
const double  scaleY 
)
inlineprivate

Set the transverse probability density function (analytical): vertical scale for a given identifier.

Parameters
[in]idTransverse identifier.
[in]scaleYVertical scale.

Definition at line 218 of file KLMLikelihoodParameters.h.

219 {
220 m_TransverseScaleY.insert(std::pair<int, double>(id, scaleY));
221 }

◆ setTransverseScaleY() [2/2]

void setTransverseScaleY ( int  hypothesis,
int  detector,
int  degreesOfFreedom,
const double  scaleY 
)
inline

Set the transverse probability density function (analytical): vertical scale for specific hypothesis, detector and degrees of freedom.

Parameters
[in]hypothesisHypothesis number.
[in]detectorDetector number.
[in]degreesOfFreedomNumber of degrees of freedom.
[in]scaleYVertical scale.

Definition at line 105 of file KLMLikelihoodParameters.h.

106 {
107 int id = MuidElementNumbers::getTransverseID(hypothesis, detector, degreesOfFreedom);
108 setTransverseScaleY(id, scaleY);
109 }
void setTransverseScaleY(int hypothesis, int detector, int degreesOfFreedom, const double scaleY)
Set the transverse probability density function (analytical): vertical scale for specific hypothesis,...

◆ setTransverseThreshold() [1/2]

void setTransverseThreshold ( const int  id,
const double  threshold 
)
inlineprivate

Set the transverse probability density function (analytical): threshold for a given identifier.

Parameters
[in]idTransverse identifier.
[in]thresholdTransverse threshold.

Definition at line 198 of file KLMLikelihoodParameters.h.

199 {
200 m_TransverseThreshold.insert(std::pair<int, double>(id, threshold));
201 }

◆ setTransverseThreshold() [2/2]

void setTransverseThreshold ( int  hypothesis,
int  detector,
int  degreesOfFreedom,
const double  threshold 
)
inline

Set the transverse probability density function (analytical): threshold for specific hypothesis, detector and degrees of freedom.

Parameters
[in]hypothesisHypothesis number.
[in]detectorDetector number.
[in]degreesOfFreedomNumber of degrees of freedom.
[in]thresholdTransverse threshold.

Definition at line 79 of file KLMLikelihoodParameters.h.

80 {
81 int id = MuidElementNumbers::getTransverseID(hypothesis, detector, degreesOfFreedom);
82 setTransverseThreshold(id, threshold);
83 }
void setTransverseThreshold(int hypothesis, int detector, int degreesOfFreedom, const double threshold)
Set the transverse probability density function (analytical): threshold for specific hypothesis,...

Member Data Documentation

◆ m_LongitudinalPDF

std::map<int, std::vector<double> > m_LongitudinalPDF
private

Longitudinal probability density function.

Definition at line 254 of file KLMLikelihoodParameters.h.

◆ m_TransversePDF

std::map<int, std::vector<double> > m_TransversePDF
private

Transverse probability density function.

Definition at line 257 of file KLMLikelihoodParameters.h.

◆ m_TransverseScaleX

std::map<int, double> m_TransverseScaleX
private

Transverse probability density function (analytical): horizontal scale.

Definition at line 263 of file KLMLikelihoodParameters.h.

◆ m_TransverseScaleY

std::map<int, double> m_TransverseScaleY
private

Transverse probability density function (analytical): vertical scale.

Definition at line 266 of file KLMLikelihoodParameters.h.

◆ m_TransverseThreshold

std::map<int, double> m_TransverseThreshold
private

Transverse probability density function (analytical): threshold.

Definition at line 260 of file KLMLikelihoodParameters.h.


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