22 void Add(
double x = 1,
double w = 1);
100 Count(std::shared_ptr<MSGTool> MSG, std::shared_ptr<ConfigTool> c,
const TString &rname,
const TString &fname =
"") :
Result(MSG, c, rname, fname),
CountBase(){};
102 void Combine(std::shared_ptr<Result> result);
109 auto subCount = std::dynamic_pointer_cast<std::remove_pointer<
decltype(
this)>::type>(result);
110 if (subCount !=
nullptr)
112 SumW += subCount->SumW;
113 SumW2 += subCount->SumW2;
114 SumX += subCount->SumX;
115 SumX2 += subCount->SumX2;
Base class for Count. This class provide a base class for Count. You can also use it if you don't nee...
double GetSumW() const
Get the sum of the weights .
double GetVar() const
Get the variance .
double GetMean() const
Get the mean .
double Chi2(const CountBase &) const
Calculate the with this and another CountBase object.
void Add(const CountBase &)
Add another CountBase object to this one.
double GetSumW2() const
Get the sum of the weights squared .
double GetMeanStatUnc() const
Get the statistical uncertainty of the mean .
double GetSum() const
Get the sum of the values .
double GetStdVar() const
Get the standard variance .
double GetSumStatUnc() const
Get the statistical uncertainty of the sum .
void Clear()
Clear this CountBase object.
double GetSum2() const
Get the sum of the values squared .
Use CountBase with the interface of provided by NAGASH::Result.
Count(std::shared_ptr< MSGTool > MSG, std::shared_ptr< ConfigTool > c, const TString &rname, const TString &fname="")
void Combine(std::shared_ptr< Result > result)
Combine with another Count object, interface provided by NAGASH::Result.
Provide virtual interface to manipulate all the results inside NAGASH.