Class to correct channels for walk in the onboard filters.
More...
#include <WalkCorrector.hpp>
|
double | Model_None () const |
|
double | Model_A (const std::vector< double > &par, double raw) const |
|
double | Model_B1 (const std::vector< double > &par, double raw) const |
|
double | Model_B2 (const std::vector< double > &par, double raw) const |
|
Class to correct channels for walk in the onboard filters.
The purpose of the WalkCorrector class is to correct certain channels for the walk (connected with the detector response, usually the lower the event energy, the slower is the response). The resulting correction should be subtracted from the raw time in order to compensate the slower response.
WalkCorrector::WalkCorrector |
( |
| ) |
|
|
inline |
void WalkCorrector::AddChannel |
( |
const Identifier & |
chanID, |
|
|
const std::string |
model, |
|
|
double |
min, |
|
|
double |
max, |
|
|
const std::vector< double > & |
par |
|
) |
| |
Add new channel, identified by chanID to the list of known channels and their calibration model, range and parameters
- Parameters
-
[in] | chanID | : The ID to add to the known list of corrections |
[in] | model | : the model to use to correct the channel |
[in] | min | : The lower bound of the correction range |
[in] | max | : The upper bound of the correction range |
[in] | par | : The vector of parameters to use for the calibration |
double WalkCorrector::GetCorrection |
( |
Identifier & |
chanID, |
|
|
double |
raw |
|
) |
| const |
Returns time correction that should be subtracted from the raw time. The channel is identified by Identifier class, the correction is return accordingly to the selected model and parameters for the particular channel. If channel has not been added to the list, it returns 0 as a default value.
- Parameters
-
[in] | chanID | : The channel identifier to get |
[in] | raw | : The raw value to perform the correction on |
- Returns
- The walk corrected value of raw
double WalkCorrector::Model_A |
( |
const std::vector< double > & |
par, |
|
|
double |
raw |
|
) |
| const |
|
private |
This model describes the correction as a function of raw energy (ch number): f(x) = a0 + a1 / (a2 + x) + a3 * exp(-x / a4) the returned value is in 'natural' pixie units Developed for 85,86Ga experiment
- Parameters
-
[in] | par | : the vector of parameters for calibration |
[in] | raw | : the raw value to calibrate |
- Returns
- The corrected time in pixie units
double WalkCorrector::Model_B1 |
( |
const std::vector< double > & |
par, |
|
|
double |
raw |
|
) |
| const |
|
private |
This model was developed for the 93Br experiment f(x) = a0 + a1 * x + a2 * x^2 + a3 * x^3 + a4 / (1 + exp((x - a5) / a6)) the returned value is in 'natural' pixie units
This function is intended for low energy part, for high energy part use B2 model.
- Parameters
-
[in] | par | : the vector of parameters for calibration |
[in] | raw | : the raw value to calibrate |
- Returns
- the corrected time in pixie units
double WalkCorrector::Model_B2 |
( |
const std::vector< double > & |
par, |
|
|
double |
raw |
|
) |
| const |
|
private |
This function is the second part of 'B' model developed for the 93Br experiment f(x) = a0 + a1 * x + (a2 + a3 * x + a4 * x^2) * exp(-x / a5) the returned value is in 'natural' pixie units
This function is intended for high energy part, for low energy part use B1 model.
- Parameters
-
[in] | par | : the vector of parameters for calibration |
[in] | raw | : the raw value to calibrate |
- Returns
- corrected time in pixie units
double WalkCorrector::Model_None |
( |
| ) |
const |
|
private |
- Returns
- always 0. Use if you want to switch off the correction. Also not adding the channel to the list results in returning 0 from GetCorrection function.
Map where key is a channel Identifier and value is a vector holding struct with calibration range and walk correction model and parameters.
The documentation for this class was generated from the following file: