#include <SubsetStat.h>
Public Member Functions | |
| SubsetStat () | |
| virtual | ~SubsetStat () |
| void | Fill (const double &value) |
| double | GetMean () const |
| double | GetSigma () const |
| unsigned int | GetSize () const |
| double | GetSum () const |
| double | GetSum2 () const |
| void | Reset () |
Private Attributes | |
| unsigned int | size |
| double | sum |
| double | sum2 |
|
|
Definition at line 12 of file SubsetStat.cxx.
|
|
|
Definition at line 26 of file SubsetStat.h. 00026 {};
|
|
|
Definition at line 19 of file SubsetStat.cxx. References size, sum, and sum2. Referenced by AlignmentAlgorithm::AnalyzeModuleResiduals(), AlignmentAlgorithm::AnalyzeStripData(), AlignmentRunSummary::Fill(), StatisticalFluctuations::FillModuleSubsetStat(), and StatisticalFluctuations::FillStripSubsetStat().
|
|
|
Definition at line 27 of file SubsetStat.cxx. Referenced by AlignmentAlgorithm::AnalyzeModuleResiduals(), AlignmentAlgorithm::AnalyzeStripData(), AlignmentRunSummary::FillSummary(), and StatisticalFluctuations::Reset(). 00028 {
00029 if(size < 1) return 0.0;
00030
00031 //calculate mean
00032 const double mean = sum/double(size);
00033
00034 return mean;
00035 }
|
|
|
Definition at line 37 of file SubsetStat.cxx. References pow(), size, sum, and sum2. Referenced by AlignmentAlgorithm::AnalyzeModuleResiduals(), AlignmentAlgorithm::AnalyzeStripData(), AlignmentRunSummary::FillSummary(), and StatisticalFluctuations::Reset(). 00038 {
00039 if(size < 2) return 0.0;
00040
00041 //calculate standard deviation
00042 const double size_tmp = size;
00043 const double sigma = (size_tmp*sum2 - sum*sum)/(size_tmp*(size_tmp-1.0));
00044
00045 if(sigma < 0.0)
00046 {
00047 std::cout << "Floating point error: sigma can not be negative!" << std::endl;
00048 return 0.0;
00049 }
00050
00051 return std::pow(sigma, 0.5);
00052 }
|
|
|
Definition at line 38 of file SubsetStat.h. Referenced by AlignmentAlgorithm::AnalyzeModuleResiduals(), AlignmentAlgorithm::AnalyzeStripData(), AlignmentRunSummary::FillSummary(), and StatisticalFluctuations::Reset(). 00038 {return size;};
|
|
|
Definition at line 41 of file SubsetStat.h. Referenced by AlignmentRunSummary::FillSummary(), and StatisticalFluctuations::Reset(). 00041 {return sum;};
|
|
|
Definition at line 44 of file SubsetStat.h. 00044 {return sum2;};
|
|
|
Definition at line 54 of file SubsetStat.cxx. Referenced by AlignmentRunSummary::FillSummary().
|
|
|
Definition at line 51 of file SubsetStat.h. Referenced by Fill(), GetMean(), GetSigma(), and Reset(). |
|
|
Definition at line 52 of file SubsetStat.h. Referenced by Fill(), GetMean(), GetSigma(), and Reset(). |
|
|
Definition at line 53 of file SubsetStat.h. Referenced by Fill(), and GetSigma(). |
1.3.9.1