![]() |
Mixed Data Coincidence Analysis Software 1.0
A program to analyze files produced by the EventMixer software.
|
Public Member Functions | |
GammaLine (float tol, float bgTol) | |
void | addCoincidenceIfValid (pair< EventHit *, EventHit * > toAdd) |
Add a coincidence if it should be done. | |
float | getBackgroundMean () |
Get mean value of background. | |
float | getBackgroundSTD () |
Get standard deviation of background. | |
Public Attributes | |
float | gamma |
Gamma energy. | |
float | probability |
Probability. | |
vector< pair< EventHit *, EventHit * > > | coincidences |
Coincidences (valid) added to this gamma line. | |
Private Member Functions | |
float | AbsVal (float toAbs) |
Absolute value. | |
void | addBackground (float bg) |
float | standardDeviation (vector< float > toDeviate) |
Compute standard deviation. | |
float | meanValue (vector< float > toMean) |
Compute mean value. | |
float | sum (vector< float > toSum) |
Sum. | |
Private Attributes | |
float | tolerance |
Tolerance. | |
float | bgTolerance |
Background tolerance. | |
vector< float > | background |
Background events. |
Definition at line 21 of file GammaLine.hh.
GammaLine::GammaLine | ( | float | tol, |
float | bgTol | ||
) |
tol | Tolerance when adding a gamma energy. |
bgTol | Background tolerance when adding that energy. |
Definition at line 3 of file GammaLine.cc.
References background.
:tolerance(tol), bgTolerance(bgTol) { for(float i = tol-bgTol; i<=tol+bgTol; i+=2*tol) { background.push_back(0); } }
float GammaLine::AbsVal | ( | float | toAbs | ) | [private] |
Absolute value.
toAbs | Value to take abs of |
Definition at line 36 of file GammaLine.cc.
Referenced by addCoincidenceIfValid().
{ if(toAbs<0) return -toAbs; return toAbs; }
void GammaLine::addBackground | ( | float | bg | ) | [private] |
bg | Only add valid background, plz. |
Definition at line 12 of file GammaLine.cc.
References background, bgTolerance, and tolerance.
Referenced by addCoincidenceIfValid().
{ for(unsigned int i = 0; i<background.size(); i++) { if((tolerance-bgTolerance+i*tolerance)>bg) { ++background[i]; return; } } }
Add a coincidence if it should be done.
toAdd | The coincidence to add. |
Definition at line 24 of file GammaLine.cc.
References AbsVal(), addBackground(), bgTolerance, coincidences, gamma, and tolerance.
{ if(AbsVal(toAdd.second->Ge-gamma)<tolerance) { coincidences.push_back(toAdd); } if(AbsVal(toAdd.second->Ge-gamma)<bgTolerance) { addBackground(toAdd.second->Ge); } }
float GammaLine::standardDeviation | ( | vector< float > | toDeviate | ) | [private] |
Compute standard deviation.
toDeviate | To deviate... |
Definition at line 44 of file GammaLine.cc.
References meanValue().
Referenced by getBackgroundSTD().
{ if(toDeviate.size()<2) return 0; float mean = meanValue(toDeviate); float stdev = 0; for(vector<float>::iterator it = toDeviate.begin(); it!=toDeviate.end(); it++) { stdev+=pow(*it-mean,2); } stdev/=(toDeviate.size()-1); return sqrt(stdev); }
float GammaLine::sum | ( | vector< float > | toSum | ) | [private] |
Sum.
toSum | Elements to sum. |
Definition at line 64 of file GammaLine.cc.
Referenced by meanValue().