#include <Moments.h>
Public Member Functions | |
| Moments () | |
| void | AddPoint (const Double_t x, const Double_t w=1.0) |
| Double_t | GetMean () const |
| Double_t | GetRMS () const |
Private Attributes | |
| Long64_t | n |
| Double_t | sum |
| Double_t | sum2 |
| Double_t | sumw |
|
|
Definition at line 21 of file Moments.cxx.
|
|
||||||||||||
|
Definition at line 23 of file Moments.cxx. References n, sum, sum2, and sumw. Referenced by MadTVAnalysis::CreatePAN(), and MadMKAnalysis::CreatePAN(). 00023 {
00024 if(w<=0.0) return;
00025 n++;
00026 sum+=(x*w);
00027 sum2+=(x*x*w);
00028 sumw+=w;
00029 }
|
|
|
Definition at line 31 of file Moments.cxx. Referenced by GetRMS().
|
|
|
Definition at line 36 of file Moments.cxx. References GetMean(), n, sum2, and sumw. Referenced by MadTVAnalysis::CreatePAN(), and MadMKAnalysis::CreatePAN(). 00036 {
00037 if(n<=1) return 0;
00038 else{
00039 Double_t mean = GetMean();
00040 Double_t var= (sum2 - mean*mean*sumw)/( (n-1)*sumw/double(n));
00041 return std::sqrt( std::abs(var) );
00042 }
00043 }
|
|
|
Definition at line 33 of file Moments.h. Referenced by AddPoint(), GetMean(), and GetRMS(). |
|
|
Definition at line 34 of file Moments.h. Referenced by AddPoint(), and GetMean(). |
|
|
Definition at line 35 of file Moments.h. Referenced by AddPoint(), and GetRMS(). |
|
|
Definition at line 36 of file Moments.h. Referenced by AddPoint(), and GetRMS(). |
1.3.9.1