dE/dx wire gain calibration constants
More...
#include <CDCDedxCosineCor.h>
|
std::vector< double > | m_cosgains |
| dE/dx gains in cos(theta) bins
|
|
dE/dx wire gain calibration constants
Definition at line 26 of file CDCDedxCosineCor.h.
◆ CDCDedxCosineCor() [1/2]
Default constructor.
Definition at line 33 of file CDCDedxCosineCor.h.
std::vector< double > m_cosgains
dE/dx gains in cos(theta) bins
◆ CDCDedxCosineCor() [2/2]
◆ ~CDCDedxCosineCor()
◆ getCosCor()
std::vector< double > getCosCor |
( |
| ) |
const |
|
inline |
◆ getMean() [1/2]
double getMean |
( |
double |
costh | ) |
const |
|
inline |
Return dE/dx mean value for given cos(theta)
- Parameters
-
costh | for const with costh theta value |
Definition at line 89 of file CDCDedxCosineCor.h.
90 {
91 if (std::abs(costh) > 1) return 0;
92
93
94
96 int bin = std::floor((costh - 0.5 * binsize + 1.0) / binsize);
97
98
99
100
101 int thisbin = bin, nextbin = bin + 1;
102 if ((costh + 1) < (binsize / 2) || (costh > 0 && std::fabs(costh) < (binsize / 2))) {
103 thisbin = bin + 1; nextbin = bin + 2;
104 } else {
105 if ((costh - 1) > -1.0 * (binsize / 2) || (costh < 0 && std::fabs(costh) < (binsize / 2))) {
106 thisbin = bin - 1; nextbin = bin;
107 }
108 }
109 double frac = ((costh - 0.5 * binsize + 1.0) / binsize) - thisbin;
110
111 if (thisbin < 0 || (
unsigned)nextbin >=
m_cosgains.size()) {
112 B2WARNING("Problem with extrapolation of CDC dE/dx cosine correction");
113 return 1.0;
114 }
116 };
◆ getMean() [2/2]
double getMean |
( |
unsigned int |
bin | ) |
const |
|
inline |
Return dE/dx mean value for the given bin.
- Parameters
-
bin | for const with cosine bin |
Definition at line 80 of file CDCDedxCosineCor.h.
◆ getSize()
unsigned int getSize |
( |
| ) |
const |
|
inline |
◆ operator*=()
Combine payloads.
Definition at line 48 of file CDCDedxCosineCor.h.
49 {
51 B2WARNING("Cosine gain parameters do not match, cannot merge!");
52 return *this;
53 }
54 std::vector<double> rhsgains = rhs.getCosCor();
55 int scale = std::floor(
m_cosgains.size() / rhs.getSize() + 0.001);
56 for (
unsigned int bin = 0; bin <
m_cosgains.size(); ++bin) {
57 m_cosgains[bin] *= rhsgains[std::floor(bin / scale + 0.001)];
58 }
59 return *this;
60 }
◆ setCosCor()
void setCosCor |
( |
int |
bin, |
|
|
double |
value |
|
) |
| |
|
inline |
◆ m_cosgains
std::vector<double> m_cosgains |
|
private |
The documentation for this class was generated from the following file: