Belle II Software  release-05-02-19
MuidBuilder Class Reference

Build the Muid likelihoods starting from the hit pattern and the transverse scattering in the KLM. More...

#include <MuidBuilder.h>

Collaboration diagram for MuidBuilder:

Public Member Functions

 MuidBuilder (int pdg)
 Constructor. More...
 
 ~MuidBuilder ()
 Destructor.
 
double getPDF (const KLMMuidLikelihood *muid) const
 Get total PDG for a given hypothesis. More...
 

Private Member Functions

 MuidBuilder ()
 Default constructor.
 
 MuidBuilder (MuidBuilder &)
 Copy constructor.
 
MuidBuilderoperator= (const MuidBuilder &)
 Copy assignment.
 
void fillPDFs (MuidElementNumbers::Hypothesis hypothesis)
 Retrieve the PDFs from the database according to the given hypothesis. More...
 
void spline (int n, double dx, double Y[], double B[], double C[], double D[])
 Construct spline interpolation coefficients (first, second, third derivatives). More...
 
double getLongitudinalPDF (const KLMMuidLikelihood *muid) const
 Calculate the longitudinal PDF for a given hypothesis. More...
 
double getTransversePDF (const KLMMuidLikelihood *muid) const
 Calculate the transverse PDF for a given hypothesis. More...
 

Private Attributes

double m_LayerPDF [MuidElementNumbers::getMaximalOutcome()+1][MuidElementNumbers::getMaximalBarrelLayer()+1][MuidElementNumbers::getMaximalBarrelLayer()+MuidElementNumbers::getMaximalEndcapForwardLayer()+2]
 Longitudinal PDF.
 
double m_ReducedChiSquaredThreshold [MuidElementNumbers::getMaximalDetector()+1][MuidElementNumbers::getMaximalHalfNdof()+1]
 Reduced chi-squared (transverse) analytical PDF: threshold.
 
double m_ReducedChiSquaredScaleX [MuidElementNumbers::getMaximalDetector()+1][MuidElementNumbers::getMaximalHalfNdof()+1]
 Reduced chi-squared (transverse) analytical PDF: horizontal scale ~ 1.
 
double m_ReducedChiSquaredScaleY [MuidElementNumbers::getMaximalDetector()+1][MuidElementNumbers::getMaximalHalfNdof()+1]
 Reduced chi-squared (transverse) analytical PDF: vertical scale.
 
double m_ReducedChiSquaredPDF [MuidElementNumbers::getMaximalDetector()+1][MuidElementNumbers::getMaximalHalfNdof()+1][MuidElementNumbers::getSizeReducedChiSquared()]
 Reduced chi-squared (transverse) PDF (overflows in last bin).
 
double m_ReducedChiSquaredD1 [MuidElementNumbers::getMaximalDetector()+1][MuidElementNumbers::getMaximalHalfNdof()+1][MuidElementNumbers::getSizeReducedChiSquared()]
 First derivative of reduced chi-squared PDF (for spline interpolation).
 
double m_ReducedChiSquaredD2 [MuidElementNumbers::getMaximalDetector()+1][MuidElementNumbers::getMaximalHalfNdof()+1][MuidElementNumbers::getSizeReducedChiSquared()]
 Second derivative of reduced chi-squared PDF (for spline interpolation).
 
double m_ReducedChiSquaredD3 [MuidElementNumbers::getMaximalDetector()+1][MuidElementNumbers::getMaximalHalfNdof()+1][MuidElementNumbers::getSizeReducedChiSquared()]
 Third derivative of reduced chi-squared PDF (for spline interpolation).
 
double m_ReducedChiSquaredDx
 Reduced chi-squared (transverse) PDF's bin size.
 
DBObjPtr< KLMLikelihoodParametersm_LikelihoodParameters
 Likelihood parameters.
 

Detailed Description

Build the Muid likelihoods starting from the hit pattern and the transverse scattering in the KLM.

Definition at line 39 of file MuidBuilder.h.

Constructor & Destructor Documentation

◆ MuidBuilder()

MuidBuilder ( int  pdg)
explicit

Constructor.

Parameters
[in]pdgPDG code of the particle hypothesis.

Definition at line 52 of file MuidBuilder.cc.

53 {
55  if (hypothesis == MuidElementNumbers::c_NotValid)
56  B2FATAL("The particle associated to the PDG code " << pdg << " is not supported.");
57  /* Fill PDFs by reading database. */
58  fillPDFs(hypothesis);
59  if (m_ReducedChiSquaredDx == 0.0)
60  B2FATAL("Invalid PDFs for PDG code " << pdg);
61 }

Member Function Documentation

◆ fillPDFs()

void fillPDFs ( MuidElementNumbers::Hypothesis  hypothesis)
private

Retrieve the PDFs from the database according to the given hypothesis.

Parameters
[in]hypothesisHypothesis number.

Definition at line 67 of file MuidBuilder.cc.

◆ getLongitudinalPDF()

double getLongitudinalPDF ( const KLMMuidLikelihood muid) const
private

Calculate the longitudinal PDF for a given hypothesis.

Parameters
[in]muidKLMMuidLikelihood dataobject.

Definition at line 150 of file MuidBuilder.cc.

◆ getPDF()

double getPDF ( const KLMMuidLikelihood muid) const

Get total PDG for a given hypothesis.

Parameters
[in]muidKLMMuidLikelihood dataobject.

Definition at line 145 of file MuidBuilder.cc.

◆ getTransversePDF()

double getTransversePDF ( const KLMMuidLikelihood muid) const
private

Calculate the transverse PDF for a given hypothesis.

Parameters
[in]muidKLMMuidLikelihood dataobject.

Definition at line 202 of file MuidBuilder.cc.

◆ spline()

void spline ( int  n,
double  dx,
double  Y[],
double  B[],
double  C[],
double  D[] 
)
private

Construct spline interpolation coefficients (first, second, third derivatives).

Parameters
[in]nNumber of bins.
[in]dxWidth of each bin.
[in]YValue of the bins.
[in]BFirst derivative.
[in]CSecond derivative.
[in]DThird derivative.

Definition at line 110 of file MuidBuilder.cc.


The documentation for this class was generated from the following files:
Belle2::MuidElementNumbers::Hypothesis
Hypothesis
Hypothesis number.
Definition: MuidElementNumbers.h:75
Belle2::MuidElementNumbers::calculateHypothesisFromPDG
static Hypothesis calculateHypothesisFromPDG(int pdg)
Calculate hypothesis number from PDG code.
Definition: MuidElementNumbers.cc:123
Belle2::MuidBuilder::fillPDFs
void fillPDFs(MuidElementNumbers::Hypothesis hypothesis)
Retrieve the PDFs from the database according to the given hypothesis.
Definition: MuidBuilder.cc:67
Belle2::MuidBuilder::m_ReducedChiSquaredDx
double m_ReducedChiSquaredDx
Reduced chi-squared (transverse) PDF's bin size.
Definition: MuidBuilder.h:154