NAGASH 0.9.8
Next Generation Analysis System
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
NAGASH::CountBase Class Reference

Base class for Count. This class provide a base class for Count. You can also use it if you don't need other functions from NAGASH::Result. More...

#include "NAGASH/Count.h"

Inheritance diagram for NAGASH::CountBase:
NAGASH::Count

Public Member Functions

void Add (const CountBase &)
 Add another CountBase object to this one.
 
void Add (double x=1, double w=1)
 Add a value along with its weight.
 
double Chi2 (const CountBase &) const
 Calculate the \(\chi^2\) with this and another CountBase object.
 
void Clear ()
 Clear this CountBase object.
 
double GetMean () const
 Get the mean \(\bar{x}\).
 
double GetMeanStatUnc () const
 Get the statistical uncertainty of the mean \(\sigma(x)\cdot\sqrt{\sum w^2} / \sum w\).
 
double GetStdVar () const
 Get the standard variance \(\sigma(x)\).
 
double GetSum () const
 Get the sum of the values \(\sum x\cdot w\).
 
double GetSum2 () const
 Get the sum of the values squared \(\sum x^2\cdot w\).
 
double GetSumStatUnc () const
 Get the statistical uncertainty of the sum \(\bar{x}\cdot\sqrt{\sum w^2}\).
 
double GetSumW () const
 Get the sum of the weights \(\sum w\).
 
double GetSumW2 () const
 Get the sum of the weights squared \(\sum w^2\).
 
double GetVar () const
 Get the variance \(\sigma^2(x)\).
 

Protected Attributes

double SumW = 0
 
double SumW2 = 0
 
double SumX = 0
 
double SumX2 = 0
 

Detailed Description

Base class for Count. This class provide a base class for Count. You can also use it if you don't need other functions from NAGASH::Result.

Definition at line 18 of file Count.h.

Member Function Documentation

◆ Add() [1/2]

void NAGASH::CountBase::Add ( const CountBase subCountBase)
inline

Add another CountBase object to this one.

Parameters
subCountBasethe CountBase object to be added.

Definition at line 44 of file Count.h.

◆ Add() [2/2]

void NAGASH::CountBase::Add ( double  x = 1,
double  w = 1 
)
inline

Add a value along with its weight.

Parameters
xthe value to be added.
wthe weight of the value.

Definition at line 55 of file Count.h.

◆ Chi2()

double NAGASH::CountBase::Chi2 ( const CountBase count) const
inline

Calculate the \(\chi^2\) with this and another CountBase object.

Parameters
countthe CountBase object that you want to calculate the \(\chi^2\) with.
Returns

Definition at line 66 of file Count.h.

◆ Clear()

void NAGASH::CountBase::Clear ( )
inline

Clear this CountBase object.

Definition at line 72 of file Count.h.

◆ GetMean()

double NAGASH::CountBase::GetMean ( ) const
inline

Get the mean \(\bar{x}\).

Definition at line 85 of file Count.h.

◆ GetMeanStatUnc()

double NAGASH::CountBase::GetMeanStatUnc ( ) const
inline

Get the statistical uncertainty of the mean \(\sigma(x)\cdot\sqrt{\sum w^2} / \sum w\).

Definition at line 88 of file Count.h.

◆ GetStdVar()

double NAGASH::CountBase::GetStdVar ( ) const
inline

Get the standard variance \(\sigma(x)\).

Definition at line 92 of file Count.h.

◆ GetSum()

double NAGASH::CountBase::GetSum ( ) const
inline

Get the sum of the values \(\sum x\cdot w\).

Definition at line 80 of file Count.h.

◆ GetSum2()

double NAGASH::CountBase::GetSum2 ( ) const
inline

Get the sum of the values squared \(\sum x^2\cdot w\).

Definition at line 81 of file Count.h.

◆ GetSumStatUnc()

double NAGASH::CountBase::GetSumStatUnc ( ) const
inline

Get the statistical uncertainty of the sum \(\bar{x}\cdot\sqrt{\sum w^2}\).

Definition at line 84 of file Count.h.

◆ GetSumW()

double NAGASH::CountBase::GetSumW ( ) const
inline

Get the sum of the weights \(\sum w\).

Definition at line 82 of file Count.h.

◆ GetSumW2()

double NAGASH::CountBase::GetSumW2 ( ) const
inline

Get the sum of the weights squared \(\sum w^2\).

Definition at line 83 of file Count.h.

◆ GetVar()

double NAGASH::CountBase::GetVar ( ) const
inline

Get the variance \(\sigma^2(x)\).

Definition at line 90 of file Count.h.

Member Data Documentation

◆ SumW

double NAGASH::CountBase::SumW = 0
protected

Definition at line 36 of file Count.h.

◆ SumW2

double NAGASH::CountBase::SumW2 = 0
protected

Definition at line 37 of file Count.h.

◆ SumX

double NAGASH::CountBase::SumX = 0
protected

Definition at line 38 of file Count.h.

◆ SumX2

double NAGASH::CountBase::SumX2 = 0
protected

Definition at line 39 of file Count.h.


The documentation for this class was generated from the following file: