Belle II Software development
CDCDedxSigmaPred.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#include <framework/database/DBObjPtr.h>
12
13#include <reconstruction/dbobjects/CDCDedxMeanPars.h>
14#include <reconstruction/dbobjects/CDCDedxSigmaPars.h>
15
16#include <vector>
17
18#include <memory>
19#include <cmath>
20
21namespace Belle2 {
32
33 public:
34
38 std::vector<double> getSigmaVector() const
39 {
40
41 // make sure the resolution parameters are reasonable
42 if (!m_DBSigmaPars || m_DBSigmaPars->getSize() == 0) {
43 B2WARNING("No dE/dx sigma parameters!");
44 std::vector<double> sigmapar;
45 for (int i = 0; i < 12; ++i)
46 sigmapar.push_back(1.0);
47 return sigmapar;
48 } else return m_DBSigmaPars->getSigmaPars();
49 }
50
54 double sigmaCurve(double* x, const double* par, int version) const;
55
59 double getSigma(double dedx, double nhit, double cos, double timereso);
60
64 double nhitPrediction(double nhit);
65
69 double ionzPrediction(double dedx);
70
74 double cosPrediction(double cos);
75
76 private:
77
78 std::vector<double> m_sigmapars;
82 };
84} // Belle2 namespace
Class to hold the prediction of resolution depending dE/dx, nhit, and cos(theta)
double ionzPrediction(double dedx)
Return sigma from the ionization parameterization.
const DBObjPtr< CDCDedxSigmaPars > m_DBSigmaPars
db object for dE/dx resolution parameters
double sigmaCurve(double *x, const double *par, int version) const
resolution functions depending on dE/dx, nhit, and cos(theta)
double getSigma(double dedx, double nhit, double cos, double timereso)
Return the predicted resolution depending on dE/dx, nhit, and cos(theta)
double cosPrediction(double cos)
Return sigma from the cos parameterization.
std::vector< double > m_sigmapars
dE/dx resolution parameters
double nhitPrediction(double nhit)
Return sigma from the nhit parameterization.
std::vector< double > getSigmaVector() const
Return the resolution vector from payload.
Class for accessing objects in the database.
Definition: DBObjPtr.h:21
Abstract base class for different kinds of events.