TrkOutAvgTimeCalculator::ws Class Reference

List of all members.

Public Member Functions

 ws (double x=0, double w=0)
wsoperator+= (const ws &x)
wsoperator-= (const ws &x)
bool operator== (const ws &x) const
bool isPhysical () const
double mean () const
double sigma () const
double pull (const ws &x) const
unsigned n () const

Private Member Functions

double sigma2 () const

Private Attributes

double _w
double _wx
unsigned _n

Detailed Description

Definition at line 42 of file TrkOutAvgTimeCalculator.h.


Constructor & Destructor Documentation

TrkOutAvgTimeCalculator::ws::ws ( double  x = 0,
double  w = 0 
) [inline]

Definition at line 44 of file TrkOutAvgTimeCalculator.h.

References w.

00044 :_w(w),_wx(w*x),_n(w>0?1:0) { assert(!(w<0));}


Member Function Documentation

bool TrkOutAvgTimeCalculator::ws::isPhysical (  )  const [inline]

Definition at line 48 of file TrkOutAvgTimeCalculator.h.

References _w.

Referenced by TrkOutAvgTimeCalculator::trackTime().

00048 { return _w>0;}

double TrkOutAvgTimeCalculator::ws::mean (  )  const [inline]

Definition at line 49 of file TrkOutAvgTimeCalculator.h.

References _w, and _wx.

Referenced by pull(), and TrkOutAvgTimeCalculator::trackTime().

00049 {return _wx/_w;}

unsigned TrkOutAvgTimeCalculator::ws::n (  )  const [inline]

Definition at line 52 of file TrkOutAvgTimeCalculator.h.

References _n.

Referenced by TrkOutAvgTimeCalculator::trackTime().

00052 { return _n;}

ws& TrkOutAvgTimeCalculator::ws::operator+= ( const ws x  )  [inline]

Definition at line 45 of file TrkOutAvgTimeCalculator.h.

References _n, _w, _wx, and x.

00045 { _wx += x._wx; _w+=x._w; _n+=x._n; return *this;}

ws& TrkOutAvgTimeCalculator::ws::operator-= ( const ws x  )  [inline]

Definition at line 46 of file TrkOutAvgTimeCalculator.h.

References _n, _w, _wx, and x.

00046 { _wx -= x._wx; _w-=x._w; _n-=x._n; return *this;}

bool TrkOutAvgTimeCalculator::ws::operator== ( const ws x  )  const [inline]

Definition at line 47 of file TrkOutAvgTimeCalculator.h.

References _n, _w, _wx, and x.

00047 { return _w==x._w && _wx==x._wx && _n==x._n;}

double TrkOutAvgTimeCalculator::ws::pull ( const ws x  )  const [inline]

Definition at line 51 of file TrkOutAvgTimeCalculator.h.

References mean(), sigma2(), and x.

00051 { return (mean()-x.mean())/sqrt(sigma2()+x.sigma2()); }

double TrkOutAvgTimeCalculator::ws::sigma (  )  const [inline]

Definition at line 50 of file TrkOutAvgTimeCalculator.h.

References _w.

Referenced by TrkOutAvgTimeCalculator::trackTime().

00050 { return double(1)/sqrt(_w);}

double TrkOutAvgTimeCalculator::ws::sigma2 (  )  const [inline, private]

Definition at line 54 of file TrkOutAvgTimeCalculator.h.

References _w.

Referenced by pull().

00054 { return double(1)/_w;}


Member Data Documentation

unsigned TrkOutAvgTimeCalculator::ws::_n [private]

Definition at line 56 of file TrkOutAvgTimeCalculator.h.

Referenced by n(), operator+=(), operator-=(), and operator==().

double TrkOutAvgTimeCalculator::ws::_w [private]

Definition at line 55 of file TrkOutAvgTimeCalculator.h.

Referenced by isPhysical(), mean(), operator+=(), operator-=(), operator==(), sigma(), and sigma2().

double TrkOutAvgTimeCalculator::ws::_wx [private]

Definition at line 55 of file TrkOutAvgTimeCalculator.h.

Referenced by mean(), operator+=(), operator-=(), and operator==().


Generated on Tue Nov 29 23:36:15 2016 for BOSS_7.0.2 by  doxygen 1.4.7