Belle II Software development
CDCDedxMeanPred.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#include <reconstruction/dbobjects/CDCDedxMeanPars.h>
13
14#include <vector>
15
16namespace Belle2 {
27
28 public:
29
33 std::vector<double> getMeanVector() const
34 {
35 if (!m_DBMeanPars || m_DBMeanPars->getSize() == 0) {
36 B2WARNING("No dE/dx mean parameters!");
37 std::vector<double> meanpar;
38 for (int i = 0; i < 15; ++i)
39 meanpar.push_back(1.0);
40 return meanpar;
41 } else
42 return m_DBMeanPars->getMeanPars();
43 }
44
48 double getMean(double bg);
49
53 double meanCurve(double* x, double* par, int version) const;
54
55
56 private:
57
58 std::vector<double> m_meanpars;
62 };
64} // Belle2 namespace
Class to hold the prediction of mean as a function of beta-gamma (bg)
std::vector< double > getMeanVector() const
Return the mean vector from payload.
double meanCurve(double *x, double *par, int version) const
beta-gamma (bg) curve function
const DBObjPtr< CDCDedxMeanPars > m_DBMeanPars
db object for dE/dx mean parameters
std::vector< double > m_meanpars
dE/dx mean parameters
double getMean(double bg)
Return the predicted mean value as a function of beta-gamma (bg)
Class for accessing objects in the database.
Definition: DBObjPtr.h:21
Abstract base class for different kinds of events.