Belle II Software development
CDCDedxWidgetSigma.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 {
23
24 public:
25
30
34 virtual ~CDCDedxWidgetSigma() {};
35
40 double sigmaCurve(double* x, const std::vector<double>& par) const
41 {
42
43 double f = 0;
44
45 if (par[0] == 1) { // return dedx parameterization
46 if (par.size() == 3)
47 f = par[1] + par[2] * x[0];
48 }
49
50 else if (par[0] == 2) { // return nhit or sin(theta) parameterization
51 if (par.size() == 6)
52 f = par[1] * std::pow(x[0], 4) + par[2] * std::pow(x[0], 3) +
53 par[3] * x[0] * x[0] + par[4] * x[0] + par[5];
54 }
55
56 else if (par[0] == 3) { // return cos(theta) parameterization
57 if (par.size() == 11)
58 f = par[1] * exp(-0.5 * pow(((x[0] - par[2]) / par[3]), 2)) +
59 par[4] * pow(x[0], 6) + par[5] * pow(x[0], 5) + par[6] * pow(x[0], 4) +
60 par[7] * pow(x[0], 3) + par[8] * x[0] * x[0] + par[9] * x[0] + par[10];
61 }
62
63 return f;
64 }
65 };
67} // Belle2 namespace
Class to hold the beta-gamma (bg) resolution function.
double sigmaCurve(double *x, const std::vector< double > &par) const
calculate the predicted sigma value as a function of beta-gamma (bg) this is done with a different fu...
virtual ~CDCDedxWidgetSigma()
Destructor.
Abstract base class for different kinds of events.