Belle II Software development
CDCDedxWidgetCurve.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 <math.h>
12
13namespace Belle2 {
24
25 public:
26
31
35 virtual ~CDCDedxWidgetCurve() {};
36
37
42 double meanCurve(double* x, const std::vector<double>& par) const
43 {
44 double f = 0;
45
46 if (par[0] == 1) {
47 if (par.size() == 8)
48 f = par[1] * std::pow(std::sqrt(x[0] * x[0] + 1), par[3]) / std::pow(x[0], par[3]) *
49 (par[2] - par[5] * std::log(1 / x[0])) - par[4] + std::exp(par[6] + par[7] * x[0]);
50 } else if (par[0] == 2) {
51 if (par.size() == 5)
52 f = par[1] * std::pow(x[0], 3) + par[2] * x[0] * x[0] + par[3] * x[0] + par[4];
53 } else if (par[0] == 3) {
54 if (par.size() == 5)
55 f = -1.0 * par[1] * std::log(par[4] + std::pow(1 / x[0], par[2])) + par[3];
56 }
57 return f;
58 }
59
60 };
62} // Belle2 namespace
Class to hold the beta-gamma (bg) mean function.
virtual ~CDCDedxWidgetCurve()
Destructor.
double meanCurve(double *x, const std::vector< double > &par) const
calculate the predicted mean value as a function of beta-gamma (bg) this is done with a different fun...
Abstract base class for different kinds of events.