Belle II Software development
MuidBuilder.h
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#pragma once
10
11/* KLM headers. */
12#include <klm/dbobjects/KLMLikelihoodParameters.h>
13#include <klm/muid/MuidElementNumbers.h>
14
15/* Basf2 headers. */
16#include <framework/database/DBObjPtr.h>
17
18namespace Belle2 {
24 class KLMMuidLikelihood;
25
30
31 public:
32
37 explicit MuidBuilder(int pdg);
38
43
48 double getPDF(const KLMMuidLikelihood* muid) const;
49
50 private:
51
56
61
66
72
77 double getLongitudinalPDF(const KLMMuidLikelihood* muid) const;
78
83 double getTransversePDF(const KLMMuidLikelihood* muid) const;
84
90
95
100
105
111
117
123
129
134
139
140 };
141
143}
Class for accessing objects in the database.
Definition: DBObjPtr.h:21
Class to store the likelihoods from KLM with additional information related to the extrapolation.
Build the Muid likelihoods starting from the hit pattern and the transverse scattering in the KLM.
Definition: MuidBuilder.h:29
MuidBuilder()
Default constructor.
Definition: MuidBuilder.cc:24
double getLongitudinalPDF(const KLMMuidLikelihood *muid) const
Calculate the longitudinal PDF for a given hypothesis.
Definition: MuidBuilder.cc:114
double getTransversePDF(const KLMMuidLikelihood *muid) const
Calculate the transverse PDF for a given hypothesis.
Definition: MuidBuilder.cc:166
double m_LayerPDF[MuidElementNumbers::getMaximalOutcome()+1][MuidElementNumbers::getMaximalBarrelLayer()+1][MuidElementNumbers::getMaximalBarrelLayer()+MuidElementNumbers::getMaximalEndcapForwardLayer()+2]
Longitudinal PDF.
Definition: MuidBuilder.h:89
double m_ReducedChiSquaredPDF[MuidElementNumbers::getMaximalDetector()+1][MuidElementNumbers::getMaximalHalfNdof()+1][MuidElementNumbers::getSizeReducedChiSquared()]
Reduced chi-squared (transverse) PDF (overflows in last bin).
Definition: MuidBuilder.h:110
void fillPDFs(MuidElementNumbers::Hypothesis hypothesis)
Retrieve the PDFs from the database according to the given hypothesis.
Definition: MuidBuilder.cc:66
double m_ReducedChiSquaredDx
Reduced chi-squared (transverse) PDF's bin size.
Definition: MuidBuilder.h:133
double m_ReducedChiSquaredScaleY[MuidElementNumbers::getMaximalDetector()+1][MuidElementNumbers::getMaximalHalfNdof()+1]
Reduced chi-squared (transverse) analytical PDF: vertical scale.
Definition: MuidBuilder.h:104
double m_ReducedChiSquaredD1[MuidElementNumbers::getMaximalDetector()+1][MuidElementNumbers::getMaximalHalfNdof()+1][MuidElementNumbers::getSizeReducedChiSquared()]
First derivative of reduced chi-squared PDF (for spline interpolation).
Definition: MuidBuilder.h:116
double getPDF(const KLMMuidLikelihood *muid) const
Get total PDG for a given hypothesis.
Definition: MuidBuilder.cc:109
MuidBuilder(MuidBuilder &)
Copy constructor.
DBObjPtr< KLMLikelihoodParameters > m_LikelihoodParameters
Likelihood parameters.
Definition: MuidBuilder.h:138
double m_ReducedChiSquaredThreshold[MuidElementNumbers::getMaximalDetector()+1][MuidElementNumbers::getMaximalHalfNdof()+1]
Reduced chi-squared (transverse) analytical PDF: threshold.
Definition: MuidBuilder.h:94
~MuidBuilder()
Destructor.
Definition: MuidBuilder.cc:62
double m_ReducedChiSquaredD2[MuidElementNumbers::getMaximalDetector()+1][MuidElementNumbers::getMaximalHalfNdof()+1][MuidElementNumbers::getSizeReducedChiSquared()]
Second derivative of reduced chi-squared PDF (for spline interpolation).
Definition: MuidBuilder.h:122
MuidBuilder & operator=(const MuidBuilder &)
Copy assignment.
double m_ReducedChiSquaredScaleX[MuidElementNumbers::getMaximalDetector()+1][MuidElementNumbers::getMaximalHalfNdof()+1]
Reduced chi-squared (transverse) analytical PDF: horizontal scale ~ 1.
Definition: MuidBuilder.h:99
double m_ReducedChiSquaredD3[MuidElementNumbers::getMaximalDetector()+1][MuidElementNumbers::getMaximalHalfNdof()+1][MuidElementNumbers::getSizeReducedChiSquared()]
Third derivative of reduced chi-squared PDF (for spline interpolation).
Definition: MuidBuilder.h:128
static constexpr int getMaximalDetector()
Get maximal value of the detector selector (for transverse scattering).
static constexpr int getMaximalEndcapForwardLayer()
Get maximal endcap-forward layer number (0-based).
static constexpr int getMaximalHalfNdof()
Get maximal value of NDof/2 (for transverse scattering).
static constexpr int getMaximalBarrelLayer()
Get maximal barrel layer number (0-based).
static constexpr int getSizeReducedChiSquared()
Get size of array with reduced chi-squared values (for transverse scattering).
static constexpr int getMaximalOutcome()
Get maximal value of the track extrapolation outcome.
Abstract base class for different kinds of events.