Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

Anaphe::AIDA_Histogram_native::ProfileBin1D Class Reference

#include <ProfileBin1D.h>

Inheritance diagram for Anaphe::AIDA_Histogram_native::ProfileBin1D:

Inheritance graph
[legend]
List of all members.

Detailed Description

class holding the contents of a profile 1-dimensional histogram bin Assume data points have `w as their weight and `k as their character value. Assume: . l = SUM[ w ] . h = SUM[ w*k ] . e = SUM[ w*k*k ] . s = sqrt(fabs( e/l - (h/l)^2 )), the spread

The value of this bin then is : h/l

The error of the bin is . 0 if l==0 . sqrt(h/(l*l)) if s==0 . s/sqrt(l) otherwise

The spread of this bin is . 0 if l==0 . sqrt(h/l) if s==0 . s otherwise

Definition at line 30 of file ProfileBin1D.h.

Public Methods

 ProfileBin1D ()
 Default constructor.

 ~ProfileBin1D ()
 Destructor.

bool fill (double weight, double x, double y)
 Filling method.

bool reset ()
 Resets the contents of the bin.

bool scale (double scaleFactor)
 Scales the contents of the bin by the given factor.

bool increment (const ProfileBin1D &bin)
 Increments the contents from the data of another bin.

bool increment (int extraEntries, double extraValue, double extraError, double extraSpread, double extraCentre)
 Increments the contents given entries, value, error and spread.

bool set (int newEntries, double newValue, double newError, double newSpread, double newCentre)
 Sets the contents of the bin given all the parameters.

int entries () const
 Returns the number of entries.

double value () const
 Returns the value of the bin.

double error () const
 Returns the error.

double spread () const
 Returns the spread.

double centreOfGravityX () const
 Returns the gravity point.


Protected Methods

double sumOfWeights () const
 Returns the sum of weights.


Private Attributes

int m_entries
 Number of entries.

double m_sumOfWeights
 Internal running sums.

double m_sumOfWeightTimesExtraCoordinate
double m_sumOfWeightTimesSquaredExtraCoordinate
double m_sumOfWeightTimesCoordinate


Constructor & Destructor Documentation

Anaphe::AIDA_Histogram_native::ProfileBin1D::ProfileBin1D  
 

Definition at line 5 of file ProfileBin1D.cpp.

Anaphe::AIDA_Histogram_native::ProfileBin1D::~ProfileBin1D   [inline]
 

Definition at line 36 of file ProfileBin1D.h.


Member Function Documentation

double Anaphe::AIDA_Histogram_native::ProfileBin1D::centreOfGravityX   const
 

Definition at line 92 of file ProfileBin1D.cpp.

References m_sumOfWeights, and m_sumOfWeightTimesCoordinate.

Referenced by Anaphe::AIDA_Histogram_native::AIDA_Profile1D::binMean(), Anaphe::AIDA_Histogram_native::AIDA_Profile2D::binMeanX(), Anaphe::AIDA_Histogram_native::AIDA_Profile2D::calculateStatistics(), and Anaphe::AIDA_Histogram_native::AIDA_Profile1D::calculateStatistics().

int Anaphe::AIDA_Histogram_native::ProfileBin1D::entries   const
 

Referenced by Anaphe::AIDA_Histogram_native::AIDA_Profile2D::binEntriesX(), Anaphe::AIDA_Histogram_native::AIDA_Profile2D::binEntriesY(), Anaphe::AIDA_Histogram_native::AIDA_Profile1D::binMean(), Anaphe::AIDA_Histogram_native::AIDA_Profile2D::calculateStatistics(), and Anaphe::AIDA_Histogram_native::AIDA_Profile1D::calculateStatistics().

double Anaphe::AIDA_Histogram_native::ProfileBin1D::error   const
 

Definition at line 22 of file ProfileBin1D.cpp.

References m_sumOfWeights, m_sumOfWeightTimesExtraCoordinate, and spread().

bool Anaphe::AIDA_Histogram_native::ProfileBin1D::fill double    weight,
double    x,
double    y
 

bool Anaphe::AIDA_Histogram_native::ProfileBin1D::increment int    extraEntries,
double    extraValue,
double    extraError,
double    extraSpread,
double    extraCentre
 

Definition at line 56 of file ProfileBin1D.cpp.

References increment(), and set().

bool Anaphe::AIDA_Histogram_native::ProfileBin1D::increment const ProfileBin1D &    bin
 

Definition at line 44 of file ProfileBin1D.cpp.

References m_entries, m_sumOfWeights, m_sumOfWeightTimesCoordinate, m_sumOfWeightTimesExtraCoordinate, and m_sumOfWeightTimesSquaredExtraCoordinate.

Referenced by Anaphe::AIDA_Histogram_native::ProfileBin2D::increment(), and increment().

bool Anaphe::AIDA_Histogram_native::ProfileBin1D::reset  
 

Reimplemented in Anaphe::AIDA_Histogram_native::ProfileBin2D.

Referenced by Anaphe::AIDA_Histogram_native::ProfileBin2D::reset().

bool Anaphe::AIDA_Histogram_native::ProfileBin1D::scale double    scaleFactor
 

Reimplemented in Anaphe::AIDA_Histogram_native::ProfileBin2D.

Referenced by Anaphe::AIDA_Histogram_native::ProfileBin2D::scale().

bool Anaphe::AIDA_Histogram_native::ProfileBin1D::set int    newEntries,
double    newValue,
double    newError,
double    newSpread,
double    newCentre
 

Definition at line 69 of file ProfileBin1D.cpp.

References m_entries, m_sumOfWeights, m_sumOfWeightTimesCoordinate, m_sumOfWeightTimesExtraCoordinate, and m_sumOfWeightTimesSquaredExtraCoordinate.

Referenced by increment(), and Anaphe::AIDA_Histogram_native::ProfileBin2D::set().

double Anaphe::AIDA_Histogram_native::ProfileBin1D::spread   const
 

Definition at line 32 of file ProfileBin1D.cpp.

References m_sumOfWeights, m_sumOfWeightTimesExtraCoordinate, and m_sumOfWeightTimesSquaredExtraCoordinate.

Referenced by error().

double Anaphe::AIDA_Histogram_native::ProfileBin1D::sumOfWeights   const [protected]
 

Referenced by Anaphe::AIDA_Histogram_native::ProfileBin2D::centreOfGravityY().

double Anaphe::AIDA_Histogram_native::ProfileBin1D::value   const
 

Definition at line 15 of file ProfileBin1D.cpp.

References m_sumOfWeights, and m_sumOfWeightTimesExtraCoordinate.

Referenced by Anaphe::AIDA_Histogram_native::AIDA_Profile2D::binHeightX(), Anaphe::AIDA_Histogram_native::AIDA_Profile2D::binHeightY(), Anaphe::AIDA_Histogram_native::AIDA_Profile2D::calculateStatistics(), and Anaphe::AIDA_Histogram_native::AIDA_Profile1D::calculateStatistics().


Member Data Documentation

int Anaphe::AIDA_Histogram_native::ProfileBin1D::m_entries [private]
 

Definition at line 74 of file ProfileBin1D.h.

Referenced by increment(), and set().

double Anaphe::AIDA_Histogram_native::ProfileBin1D::m_sumOfWeights [private]
 

Definition at line 76 of file ProfileBin1D.h.

Referenced by centreOfGravityX(), error(), increment(), set(), spread(), and value().

double Anaphe::AIDA_Histogram_native::ProfileBin1D::m_sumOfWeightTimesCoordinate [private]
 

Reimplemented in Anaphe::AIDA_Histogram_native::ProfileBin2D.

Definition at line 79 of file ProfileBin1D.h.

Referenced by centreOfGravityX(), increment(), and set().

double Anaphe::AIDA_Histogram_native::ProfileBin1D::m_sumOfWeightTimesExtraCoordinate [private]
 

Definition at line 77 of file ProfileBin1D.h.

Referenced by error(), increment(), set(), spread(), and value().

double Anaphe::AIDA_Histogram_native::ProfileBin1D::m_sumOfWeightTimesSquaredExtraCoordinate [private]
 

Definition at line 78 of file ProfileBin1D.h.

Referenced by increment(), set(), and spread().


The documentation for this class was generated from the following files:
Generated on Tue Nov 19 12:32:25 2002 for AIDA_Histogram_native by doxygen1.2.16