dE/dx eletronic ADC non-linearity correction for highly ionising particles (used in offline hadron saturation calibration) paramters are for X vs Y relation and sep for inner and outer layer vector array 0,1 for inner and 2,3 for outer layers
More...
#include <CDCDedxADCNonLinearity.h>
|
std::vector< std::vector< double > > | m_nonlADC |
| ADC vs corrected ADC mapping.
|
|
dE/dx eletronic ADC non-linearity correction for highly ionising particles (used in offline hadron saturation calibration) paramters are for X vs Y relation and sep for inner and outer layer vector array 0,1 for inner and 2,3 for outer layers
Definition at line 29 of file CDCDedxADCNonLinearity.h.
◆ getCorrectedADC()
double getCorrectedADC |
( |
const double & |
ADC, |
|
|
const int |
layer |
|
) |
| const |
|
inline |
Return corrected ADC with given parameters.
- Parameters
-
ADC | uncorrected version |
layer | outer vs inner 0 to 56 indexing |
Definition at line 78 of file CDCDedxADCNonLinearity.h.
82 if (layer < 0 || layer > 55) {
83 B2WARNING(
"CDCDedxADCNonLinearity:returning uncorrected ADC as input layer is out of range: must be 0-55");
86 if (layer >= 8) mylayer = 2;
89 std::vector<double> tempX =
m_nonlADC[mylayer];
90 std::vector<double> tempY =
m_nonlADC[mylayer + 1];
92 if (tempX.size() != tempY.size()) {
93 B2WARNING(
"CDCDedxADCNonLinearity:returning uncorrected ADC as parameters range don't match: X=Y in bins");
98 unsigned int ibin = TMath::BinarySearch(tempY.size(), tempY.data(),
double(ADC));
100 if (ibin >= tempY.size() - 1)ibin = tempY.size() - 2;
101 if (ibin >= tempY.size() - 1) {
102 B2WARNING(
"CDCDedxADCNonLinearity:returning uncorrected ADC as bins are not in range");
106 double slope = (tempY[ibin + 1] - tempY[ibin]) / (tempX[ibin + 1] - tempX[ibin]);
107 return std::round(tempX[ibin] + (ADC - tempY[ibin]) / slope);
std::vector< std::vector< double > > m_nonlADC
ADC vs corrected ADC mapping.
◆ getNonLinearityPar()
double getNonLinearityPar |
( |
int |
layer, |
|
|
int |
axis, |
|
|
unsigned int |
par |
|
) |
| const |
|
inline |
return specific hadron parameter
- Parameters
-
layer | outer(8-55) vs inner(0-7) |
axis | 0 for X and 1 for Y |
par | number starts from 0 |
Definition at line 115 of file CDCDedxADCNonLinearity.h.
◆ getSize()
unsigned int getSize |
( |
int |
layer, |
|
|
int |
axis |
|
) |
| const |
|
inline |
Get the number of bins for the non-linearity angle correction.
- Parameters
-
layer | outer vs inner 0 to 56 indexing |
axis | 0 for X and 1 for Y |
Definition at line 52 of file CDCDedxADCNonLinearity.h.
◆ printNonLinearityPars()
void printNonLinearityPars |
( |
int |
layer, |
|
|
int |
axis |
|
) |
| const |
|
inline |
print requested hadron parameter array
- Parameters
-
layer | outer vs inner |
axis | 0 for X and 1 for Y |
Definition at line 145 of file CDCDedxADCNonLinearity.h.
◆ setNonLinearityPar()
void setNonLinearityPar |
( |
unsigned int |
layer, |
|
|
unsigned int |
axis, |
|
|
unsigned int |
par, |
|
|
double |
value |
|
) |
| |
|
inline |
set specific hadron parameter
- Parameters
-
layer | outer(8-55) vs inner(0-7) |
axis | 0 for X and 1 for Y |
par | number starts from 0 |
value | of parameter to set |
Definition at line 175 of file CDCDedxADCNonLinearity.h.
The documentation for this class was generated from the following file: