 |
Belle II Software
release-05-02-19
|
This class imports KLMLikelihoodParameters into the database.
More...
#include <KLMLikelihoodParametersImporter.h>
This class imports KLMLikelihoodParameters into the database.
Definition at line 30 of file KLMLikelihoodParametersImporter.h.
◆ writeLikelihoodParameters()
void writeLikelihoodParameters |
( |
| ) |
|
Write KLMLikelihoodParameters into the database.
cppcheck-suppress unreachableCode
Definition at line 33 of file KLMLikelihoodParametersImporter.cc.
35 B2WARNING(
"The method KLMLikelihoodParametersImporter::writeMuidParameters() is temporary unavailable, sorry! :(");
40 vector<string>
const hypotheses = {
"Positron",
"Electron" ,
"Deuteron",
"Antideuteron",
"Proton",
"Antiproton",
"PionPlus",
"PionMinus",
"KaonPlus",
"KaonMinus",
"MuonPlus",
"MuonMinus" };
41 for (
unsigned int hypothesis = 0; hypothesis < hypotheses.size(); hypothesis++) {
42 GearDir content(
"/Detector/Muid/MuidParameters//Experiment[@exp=\"0\"]/");
43 content.append(hypotheses[hypothesis]);
45 GearDir outcomeContent(content);
46 outcomeContent.append((boost::format(
"/LayerProfile/Outcome[@outcome=\"%1%\"]/") % (outcome)).str());
50 std::vector<double> layerPDF = outcomeContent.getArray((boost::format(
"LastLayer[@layer=\"%1%\"]") % (lastLayer)).str());
55 GearDir detectorContent(content);
56 if (detector == 0) detectorContent.append(
"/TransversePDF/BarrelAndEndcap");
57 if (detector == 1) detectorContent.append(
"/TransversePDF/BarrelOnly");
58 if (detector == 2) detectorContent.append(
"/TransversePDF/EndcapOnly");
60 double reducedChiSquaredThreshold = detectorContent.getDouble((boost::format(
"DegreesOfFreedom[@ndof=\"%1%\"]/Tail/Threshold") %
61 (2 * halfNdof)).str());
62 double reducedChiSquaredScaleY = detectorContent.getDouble((boost::format(
"DegreesOfFreedom[@ndof=\"%1%\"]/Tail/ScaleY") %
63 (2 * halfNdof)).str());
64 double reducedChiSquaredScaleX = detectorContent.getDouble((boost::format(
"DegreesOfFreedom[@ndof=\"%1%\"]/Tail/ScaleX") %
65 (2 * halfNdof)).str());
66 std::vector<double> reducedChiSquaredPDF = detectorContent.getArray((boost::format(
"DegreesOfFreedom[@ndof=\"%1%\"]/Histogram") %
67 (2 * halfNdof)).str());
68 likelihoodParameters->
setTransversePDF(hypothesis, detector, halfNdof * 2, reducedChiSquaredPDF);
69 likelihoodParameters->
setTransverseThreshold(hypothesis, detector, halfNdof * 2, reducedChiSquaredThreshold);
70 likelihoodParameters->
setTransverseScaleY(hypothesis, detector, halfNdof * 2, reducedChiSquaredScaleY);
71 likelihoodParameters->
setTransverseScaleX(hypothesis, detector, halfNdof * 2, reducedChiSquaredScaleX);
76 likelihoodParameters.
import(Iov);
The documentation for this class was generated from the following files:
A class that describes the interval of experiments/runs for which an object in the database is valid.
static constexpr int getMaximalOutcome()
Get maximal value of the track extrapolation outcome.
static constexpr int getMaximalHalfNdof()
Get maximal value of NDof/2 (for transverse scattering).
static bool checkExtrapolationOutcome(unsigned int outcome, int lastLayer)
Check the track extrapolation outcome.
void setTransverseThreshold(int hypothesis, int detector, int degreesOfFreedom, const double threshold)
Set the transverse probability density function (analytical): threshold for specific hypothesis,...
void construct(Args &&... params)
Construct an object of type T in this DBImportObjPtr using the provided constructor arguments.
bool import(const IntervalOfValidity &iov)
Import the object to database.
static constexpr int getMaximalBarrelLayer()
Get maximal barrel layer number (0-based).
void setTransversePDF(int hypothesis, int detector, int degreesOfFreedom, const std::vector< double > ¶ms)
Set the transverse probability density function for specific hypothesis, detector and degrees of free...
GearDir is the basic class used for accessing the parameter store.
Class for importing a single object to the database.
static constexpr int getMaximalDetector()
Get maximal value of the detector selector (for transverse scattering).
void setLongitudinalPDF(int hypothesis, int outcome, int lastLayer, const std::vector< double > ¶ms)
Set the longitudinal probability density function for specific hypothesis, outcome and last layer.
void setTransverseScaleX(int hypothesis, int detector, int degreesOfFreedom, const double scaleX)
Set the transverse probability density function (analytical): horizontal scale for specific hypothesi...
void setTransverseScaleY(int hypothesis, int detector, int degreesOfFreedom, const double scaleY)
Set the transverse probability density function (analytical): vertical scale for specific hypothesis,...