17 int offset (
int fCapId1,
int fCapId2) {
23 return fCapId1*4 + fCapId2;
47 double sigma =
sqrt (0.5 * (s_xx_mean +
sqrt (s_xx_mean*s_xx_mean - 2*s_xy_mean*s_xy_mean)));
48 double corr = sigma == 0 ? 0 : 0.5*s_xy_mean /
sigma;
49 for (
unsigned i = 0;
i < fFrames;
i++) {
51 if (
i > 0) fNoise [
i] += fGauss[
i-1]*
corr;
52 if (
i < fFrames-1) fNoise [
i] += fGauss[
i+1]*
corr;
void setSigma(int fCapId1, int fCapId2, float fSigma)
float getWidth(int fCapId) const
get width (sqrt(sigma_i_i)) for capId = 0..3
void makeNoise(unsigned fFrames, const double *fGauss, double *fNoise) const
float getSigma(int fCapId1, int fCapId2) const
get correlation element for capId1/2 = 0..3
const float * getValues() const
get value for all capId = 0..3, 10 values in total
CastorPedestalWidth(int fId=0)