35 : fName(name), fN(0), fW(0.), fW2(0.), fM(0.), fM2(0.)
38 for (Int_t i = 0; i < n; i++) {
54 ROOT::CallRecursiveRemoveIfNeeded(*
this);
72 Warning(
"Fill",
"Sum of weights is zero - ignore current data point");
77 Double_t rr = ( tW * val -
fM);
78 fM2 += w * rr * rr / (tW *
fW);
88 Printf(
" OBJ: TStatistic\t %s = %.5g +- %.4g \t RMS = %.5g \t N = %lld",
99 while (TObject *o = nxo()) {
102 if (
fW == 0 || c->
fW == 0 || ((
fW + c->
fW) == 0) ) {
103 Error(
"Merge",
"Zero sum of weights - cannot merge data from %s",c->
GetName() );
106 double temp = (c->
fW)/(
fW) *
fM - c->
fM;
const char * GetName() const
Double_t GetMeanErr() const
void Print(Option_t *="") const
TStatistic(const char *name="")
Statistical variable, defined by its mean and variance (RMS).
~TStatistic()
TStatistic destructor.
void Fill(Double_t val, Double_t w=1.)
Int_t Merge(TCollection *in)