#include <energyCalibration.h>
Public Member Functions | |
energyCalibrationFunctions (int s=-1) | |
int | setScanSign (int s=0) |
Double_t | gaussChargeSharing (Double_t *x, Double_t *par) |
Double_t | erfFunction (Double_t *x, Double_t *par) |
Double_t | erfFunctionChargeSharing (Double_t *x, Double_t *par) |
Double_t | erfFuncFluo (Double_t *x, Double_t *par) |
Double_t | spectrum (Double_t *x, Double_t *par) |
Double_t | scurve (Double_t *x, Double_t *par) |
Double_t | scurveFluo (Double_t *x, Double_t *par) |
Static Public Member Functions | |
static float | median (float *x, int n) |
static int | quick_select (int arr[], int n) |
static int | kth_smallest (int *a, int n, int k) |
Private Attributes | |
int | sign |
class containing all the possible energy calibration functions (scurves with and without charge sharing, gaussian spectrum with and without charge sharing, possibility of chosing the sign of the X-axis)
energyCalibrationFunctions::energyCalibrationFunctions | ( | int | s = -1 |
) | [inline] |
Double_t energyCalibrationFunctions::erfFuncFluo | ( | Double_t * | x, | |
Double_t * | par | |||
) |
Double Erf function with charge sharing slope par[0] is the pedestal par[1] is the slope of the pedestal par[2] is the inflection point of the first energy par[3] is the RMS of the first energy par[4] is the amplitude of the first energy par[5] is the angual coefficient of the charge sharing slope of the first energy (scales with par[3]) par[6] is the inflection point of the second energy par[7] is the RMS of the second energy par[8] is the amplitude of the second energy par[9] is the angual coefficient of the charge sharing slope of the second energy (scales with par[8])
Double_t energyCalibrationFunctions::erfFunction | ( | Double_t * | x, | |
Double_t * | par | |||
) |
Basic erf function par[0] is the inflection point par[1] is the RMS par[2] is the amplitude
Double_t energyCalibrationFunctions::erfFunctionChargeSharing | ( | Double_t * | x, | |
Double_t * | par | |||
) |
Erf function with charge sharing slope par[0] is the pedestal par[1] is the slope of the pedestal par[2] is the inflection point par[3] is the RMS par[4] is the amplitude par[5] is the angual coefficient of the charge sharing slope (scales with par[3])
Double_t energyCalibrationFunctions::gaussChargeSharing | ( | Double_t * | x, | |
Double_t * | par | |||
) |
Gaussian Function with charge sharing pedestal par[0] is the absolute height of the background pedestal par[1] is the slope of the background pedestal par[2] is the gaussian peak position par[3] is the RMS of the gaussian (and of the pedestal) par[4] is the height of the function par[5] is the fractional height of the charge sharing pedestal (scales with par[3])
static int energyCalibrationFunctions::kth_smallest | ( | int * | a, | |
int | n, | |||
int | k | |||
) | [static] |
Calculates the median of an array of n elements (swaps the arrays!)
static float energyCalibrationFunctions::median | ( | float * | x, | |
int | n | |||
) | [static] |
Calculates the median of an array of n elements
static int energyCalibrationFunctions::quick_select | ( | int | arr[], | |
int | n | |||
) | [static] |
Calculates the median of an array of n elements (swaps the arrays!)
Double_t energyCalibrationFunctions::scurve | ( | Double_t * | x, | |
Double_t * | par | |||
) |
Erf function with charge sharing slope with the correct scan sign par[0] is the pedestal par[1] is the slope of the pedestal par[2] is the inflection point par[3] is the RMS par[4] is the amplitude par[5] is the angual coefficient of the charge sharing slope (scales with par[3])
Double_t energyCalibrationFunctions::scurveFluo | ( | Double_t * | x, | |
Double_t * | par | |||
) |
Double Erf function with charge sharing slope par[0] is the pedestal par[1] is the slope of the pedestal par[2] is the inflection point of the first energy par[3] is the RMS of the first energy par[4] is the amplitude of the first energy par[5] is the angual coefficient of the charge sharing slope of the first energy (scales with par[3]) par[6] is the inflection point of the second energy par[7] is the RMS of the second energy par[8] is the amplitude of the second energy par[9] is the angual coefficient of the charge sharing slope of the second energy (scales with par[8])
int energyCalibrationFunctions::setScanSign | ( | int | s = 0 |
) | [inline] |
sets scan sign
s | can be 1 (energy and x-axis have the same direction) or -1 (energy and x-axis have opposite directions) otherwise gets |
Double_t energyCalibrationFunctions::spectrum | ( | Double_t * | x, | |
Double_t * | par | |||
) |
static function Gaussian with charge sharing pedestal with the correct scan sign par[0] is the absolute height of the background pedestal par[1] is the fractional height of the charge sharing pedestal (scales with par[3] par[2] is the gaussian peak position par[3] is the RMS of the gaussian (and of the pedestal) par[4] is the height of the function
int energyCalibrationFunctions::sign [private] |