fdhwlib
2.0.25
|
#include <calibpulse.h>
Analyse the ADC data to find a the calibration pulse and characterize it.
Definition at line 27 of file calibpulse.h.
CalibPulse::CalibPulse | ( | ) |
virtual CalibPulse::~CalibPulse | ( | ) | [virtual] |
void CalibPulse::display | ( | FILE * | fout, |
int | col = 0 , |
||
int | row = 0 |
||
) |
Display gain and statistical parameters.
void CalibPulse::displayHeader | ( | FILE * | fout | ) |
Display the header of the tabular with the results.
void CalibPulse::displayIntegral | ( | FILE * | fout, |
int | col = 0 , |
||
int | row = 0 |
||
) |
Dispaly integration of the pulse.
void CalibPulse::findPosition | ( | unsigned short * | data, |
int | n, | ||
float * | t1, | ||
float * | t2, | ||
int | fLen = 4 , |
||
int | prec = -1 , |
||
int | iBegin = 0 |
||
) |
The function is intended to find the position of the calibration pulse in the ADC data.
The ADC data is expected to be an array of size n it spans 100us.
data | Pointer to the ADC data |
n | Length of the ADC data array |
t1 | Calculated start of the pulse |
t2 | Calculated end of the pulse |
fLen | Length of the edge filter used to determine the position of the peak |
prec | Desired precision of the result. The parameter specifies the the number of samples used for the calculation: -1 interpolate between the samples, 1 use every sample, 2 use every second sample, i use every i.th sample. |
iBegin | Index of the first element of the given data. Only necessary if the analysis# should not start at the beginning of the ADC data. |
void CalibPulse::getFilteredData | ( | float * | t, |
float * | y, | ||
int * | n | ||
) |
Return the filtered data to display the filter result.
float CalibPulse::getGain | ( | unsigned short * | data, |
int | n, | ||
int | nRamp = 4 |
||
) |
Calculate the gain of the complete signal chain from the PMT to the digital interface.
The calculation will use the position of the pulse determined by the function findPosition - the pointer to the ADC data has to be the same in both calls!
data | Pointer to the ADC data |
n | Length of the ADC data array |
nRamp | Number of samples to leave out at the edges of the pulse |
float CalibPulse::getGradient | ( | ) |
Calculate gradient of the pulse.
Alogrithm: (mean_(pulse) - mean(var)) / ( t_2 - t_1)
float CalibPulse::getIntegral | ( | unsigned short * | data, |
int | n, | ||
float * | t1, | ||
float * | t2, | ||
float | prec = 0 , |
||
int | iBegin = 0 |
||
) |
Calculate the integral charge of the pulse.
The maximum value and the pedestal obtained from getGain is used to determine the length of the pulse and the charge.
data | Pointer to the ADC data |
n | |
t1 | Lower limit |
t2 | Upper limit |
prec | Minimal value for the integral border |
iBegin | Index of the first element of the given data. Only necessary if the analysis# should not start at the beginning of the ADC data. |
iBegin |
void CalibPulse::getInterpolatedData | ( | float * | t, |
float * | y, | ||
int * | n | ||
) |
Return the filtered data with the interpolated samples to display the filter result.
float CalibPulse::getPedestal | ( | ) |
Return the pedestal.
float CalibPulse::getPulseHeight | ( | ) |
Return the pulse height (wo pedestal)
void CalibPulse::getPulseShape | ( | float * | t, |
float * | y, | ||
int * | n | ||
) |
Return a array with the aproximated pulse shape.
float CalibPulse::getSNR | ( | ) |
Get the signal to noise ration of the pulse.
Algorigm: (mean_(pulse) - mean(var)) / var_(ped)
int CalibPulse::isMuonPulse | ( | float | minGradient = 100. | ) |
Has the pulse the characteristics of a direct hit of the PMTs by a myon?
minGradient | Required gradient for a muon pulse [ADC units / us] |
int CalibPulse::isPulse | ( | float | minSNR = 1. | ) |
Has the pulse finder been successful?
long CalibPulse::dy1[FLT_PAGE_SIZE] [private] |
Array to hold the result of the edge filter operation.
Definition at line 189 of file calibpulse.h.
long CalibPulse::dy2[FLT_PAGE_SIZE] [private] |
Array to hold the result of the edge filter operation if sub sample precision is required.
Definition at line 194 of file calibpulse.h.
int CalibPulse::filterLength [private] |
Store the length of the used filter.
Definition at line 178 of file calibpulse.h.
float CalibPulse::gain [private] |
Calculated gain of this pixel.
Definition at line 221 of file calibpulse.h.
float CalibPulse::gradient [private] |
Gradient of pulses rising edge.
Definition at line 224 of file calibpulse.h.
int CalibPulse::indexBegin [private] |
Index of the first element.
If the analysis dows not start with the first element iMin specifies the offset from the start
Definition at line 186 of file calibpulse.h.
float CalibPulse::integral [private] |
Integral of the pulse.
The limits are stored in tIntMin and tIntMax.
Definition at line 229 of file calibpulse.h.
int CalibPulse::len [private] |
Length of the data in the arrays.
Definition at line 181 of file calibpulse.h.
float CalibPulse::maxPulse [private] |
Maximum of the pulse.
Definition at line 218 of file calibpulse.h.
float CalibPulse::meanPed [private] |
Mean value of the pededestal.
Definition at line 202 of file calibpulse.h.
float CalibPulse::meanPulse [private] |
Mean value of the calibration pulse.
Definition at line 212 of file calibpulse.h.
int CalibPulse::nPed [private] |
Number of samples used to determine the statistics of the pedestal.
Definition at line 199 of file calibpulse.h.
int CalibPulse::nPulse [private] |
Number of samples used to determine the statistics of the calibration pulse.
Definition at line 209 of file calibpulse.h.
float CalibPulse::tBegin [private] |
Start time of the pulse [us].
Definition at line 166 of file calibpulse.h.
float CalibPulse::tEnd [private] |
End time of the pulse [us].
Definition at line 169 of file calibpulse.h.
float CalibPulse::tIntBegin [private] |
Lower border of the integral.
Definition at line 172 of file calibpulse.h.
float CalibPulse::tIntEnd [private] |
Upper border of the interval.
Definition at line 175 of file calibpulse.h.
float CalibPulse::tMax [private] |
Time of the maximum of the edge filter [us].
Definition at line 163 of file calibpulse.h.
float CalibPulse::tMin [private] |
Time of the minimum of the edge filter [us].
Definition at line 160 of file calibpulse.h.
float CalibPulse::varPed [private] |
Variance of the pedestal.
Definition at line 205 of file calibpulse.h.
float CalibPulse::varPulse [private] |
Varinace of the calibration pulse.
Definition at line 215 of file calibpulse.h.