#include <AutoCorrMat.h>
Public Member Functions | |
void | add (int *adc) |
AutoCorrMat () | |
float * | mat () |
void | zero () |
~AutoCorrMat () | |
Private Attributes | |
int | evar [12] |
int | evt |
float | Mat [12] |
float | mymean [12] |
float | N [12] |
float | tMat [12] |
float | variance [12] |
Definition at line 11 of file AutoCorrMat.h.
AutoCorrMat::AutoCorrMat | ( | ) | [inline] |
AutoCorrMat::~AutoCorrMat | ( | ) | [inline] |
Definition at line 22 of file AutoCorrMat.h.
{}
void AutoCorrMat::add | ( | int * | adc | ) | [inline] |
Definition at line 37 of file AutoCorrMat.h.
References evar, evt, i, Mat, mymean, N, mathSSE::sqrt(), and variance.
Referenced by Chamber_AutoCorrMat::add().
{ int pairs[12][2]={{3,3},{3,4},{4,4},{3,5},{4,5},{5,5},{4,6},{5,6},{6,6},{5,7},{6,7},{7,7}}; double ped=(adc[0]+adc[1])/2.; evt++; for(int i=3;i<8;i++){ if(fabs(adc[i]-ped)<25.){ evar[i]++; mymean[i] += adc[i]-ped; variance[i] += (adc[i]-ped)*(adc[i]-ped); } } for(int i=0;i<12;i++){ //Add values within 3 sigma of mean only float threeSigma0 = 3. * sqrt(variance[pairs[i][0]]/evar[pairs[i][0]]); float threeSigma1 = 3. * sqrt(variance[pairs[i][1]]/evar[pairs[i][1]]); if (fabs(adc[pairs[i][0]]-ped)<threeSigma0 && fabs(adc[pairs[i][1]]-ped)<threeSigma1){ N[i]=N[i]+1; Mat[i]=Mat[i]+(adc[pairs[i][0]]-ped)*(adc[pairs[i][1]]-ped); } //end 3 sigma } }
float* AutoCorrMat::mat | ( | ) | [inline] |
void AutoCorrMat::zero | ( | ) | [inline] |
int AutoCorrMat::evar[12] [private] |
Definition at line 79 of file AutoCorrMat.h.
int AutoCorrMat::evt [private] |
Definition at line 78 of file AutoCorrMat.h.
float AutoCorrMat::Mat[12] [private] |
Definition at line 73 of file AutoCorrMat.h.
Referenced by add(), AutoCorrMat(), mat(), and zero().
float AutoCorrMat::mymean[12] [private] |
Definition at line 76 of file AutoCorrMat.h.
float AutoCorrMat::N[12] [private] |
Definition at line 74 of file AutoCorrMat.h.
Referenced by add(), AutoCorrMat(), mat(), and zero().
float AutoCorrMat::tMat[12] [private] |
Definition at line 75 of file AutoCorrMat.h.
Referenced by mat().
float AutoCorrMat::variance[12] [private] |
Definition at line 77 of file AutoCorrMat.h.