Pixie16 Analysis Software Suite
Analysis code for processing of .ldf files
WalkCorrector Class Reference

Class to correct channels for walk in the onboard filters. More...

#include <WalkCorrector.hpp>

Collaboration diagram for WalkCorrector:

Public Member Functions

 WalkCorrector ()
 
void AddChannel (const Identifier &chanID, const std::string model, double min, double max, const std::vector< double > &par)
 
double GetCorrection (Identifier &chanID, double raw) const
 

Private Member Functions

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
 

Private Attributes

std::map< Identifier, std::vector< CorrectionParams > > channels_
 

Detailed Description

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.

Constructor & Destructor Documentation

WalkCorrector::WalkCorrector ( )
inline

Default Constructor

Member Function Documentation

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.

Field Documentation

std::map<Identifier, std::vector<CorrectionParams> > WalkCorrector::channels_
private

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: