Marlin  01.17.01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
marlin::ErrorOfSigma Class Reference

Small helper class that computes the lower and upper error of sigma assuming a normal distribution, i.e. More...

#include <ErrorOfSigma.h>

Public Member Functions

 ErrorOfSigma (unsigned n)
 C'tor takes the number of measured values. More...
 
virtual ~ErrorOfSigma ()
 Virtual d'tor. More...
 
double lowerError (double sigma)
 The lower error of sigma. More...
 
double upperError (double sigma)
 The upper error of sigma. More...
 

Protected Member Functions

virtual double getChiSquaredPlus ()
 Returns the chisquared value with P(chisquared) == 0.84. More...
 
virtual double getChiSquaredMinus ()
 Returns the chisquared value with P(chisquared) == 0.16. More...
 

Protected Attributes

unsigned _n
 The number of degrees of freedom. More...
 

Detailed Description

Small helper class that computes the lower and upper error of sigma assuming a normal distribution, i.e.

sigma has been computed as sigma = 1. / (n-1) * SUM_i_n( x_i - a_i )**2.

Author
F. Gaede, DESY
Version
Id:
ErrorOfSigma.h,v 1.2 2005-10-11 12:56:28 gaede Exp

Definition at line 13 of file ErrorOfSigma.h.

Constructor & Destructor Documentation

marlin::ErrorOfSigma::ErrorOfSigma ( unsigned  n)

C'tor takes the number of measured values.

Definition at line 10 of file ErrorOfSigma.cc.

References std::endl().

virtual marlin::ErrorOfSigma::~ErrorOfSigma ( )
inlinevirtual

Virtual d'tor.

Definition at line 22 of file ErrorOfSigma.h.

Member Function Documentation

double marlin::ErrorOfSigma::getChiSquaredMinus ( )
protectedvirtual

Returns the chisquared value with P(chisquared) == 0.16.

Definition at line 56 of file ErrorOfSigma.cc.

References _n, std::pow(), and std::sqrt().

Referenced by upperError().

double marlin::ErrorOfSigma::getChiSquaredPlus ( )
protectedvirtual

Returns the chisquared value with P(chisquared) == 0.84.

Definition at line 37 of file ErrorOfSigma.cc.

References _n, std::pow(), and std::sqrt().

Referenced by lowerError().

double marlin::ErrorOfSigma::lowerError ( double  sigma)

The lower error of sigma.

Definition at line 24 of file ErrorOfSigma.cc.

References _n, getChiSquaredPlus(), and std::sqrt().

double marlin::ErrorOfSigma::upperError ( double  sigma)

The upper error of sigma.

Definition at line 30 of file ErrorOfSigma.cc.

References _n, getChiSquaredMinus(), and std::sqrt().

Member Data Documentation

unsigned marlin::ErrorOfSigma::_n
protected

The number of degrees of freedom.

Definition at line 43 of file ErrorOfSigma.h.

Referenced by getChiSquaredMinus(), getChiSquaredPlus(), lowerError(), and upperError().


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