Class to hold the beta-gamma (bg) resolution function.
More...
#include <CDCDedxWidgetSigma.h>
|
| CDCDedxWidgetSigma () |
| Constructor.
|
|
virtual | ~CDCDedxWidgetSigma () |
| Destructor.
|
|
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 function depending dE/dx, nhit, and cos(theta)
|
|
Class to hold the beta-gamma (bg) resolution function.
Definition at line 22 of file CDCDedxWidgetSigma.h.
โ CDCDedxWidgetSigma()
โ ~CDCDedxWidgetSigma()
โ sigmaCurve()
double sigmaCurve |
( |
double * |
x, |
|
|
const std::vector< double > & |
par |
|
) |
| const |
|
inline |
calculate the predicted sigma value as a function of beta-gamma (bg) this is done with a different function depending dE/dx, nhit, and cos(theta)
Definition at line 40 of file CDCDedxWidgetSigma.h.
41 {
42
43 double f = 0;
44
45 if (par[0] == 1) {
46 if (par.size() == 3)
47 f = par[1] + par[2] * x[0];
48 }
49
50 else if (par[0] == 2) {
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) {
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 }
The documentation for this class was generated from the following file: