zav Class Reference

#include <zav.h>

List of all members.

Public Member Functions

 zav ()
 zav (int)
void set (const zav *)
double chisq () const
void add (double, double, double)
double calculate ()
double a () const
double b () const
double z (double s) const
double d (double s, double z) const
int nc () const
void clear (void)
 zav ()
 zav (int)
void set (const zav *)
double chisq () const
void add (double, double, double)
double calculate ()
double a () const
double b () const
double z (double s) const
double d (double s, double z) const
int nc () const
void clear (void)

Private Attributes

double _a
double _b
double _w
double _sav
double _ssav
double _zav
double _szav
double _zzav
double _chisq
double _sig_inv
double _c11
double _c21
double _c22
int _nc

Friends

std::ostreamoperator<< (std::ostream &, const zav &)
std::ostreamoperator<< (std::ostream &, const zav &)


Detailed Description

Definition at line 12 of file zav.h.


Constructor & Destructor Documentation

zav::zav (  )  [inline]

Definition at line 47 of file zav.h.

References _a, _b, _c11, _c21, _c22, _chisq, _nc, _sav, _sig_inv, _ssav, _szav, _w, _zav, and _zzav.

00047                 {
00048   _a = _b = _w = _sav = _ssav = _zav = _szav = _zzav = 0;
00049   _chisq = -1;
00050   _c22 = _c21 = _c11 = _sig_inv = 0;
00051   _nc = 0;
00052 }

zav::zav ( int   )  [inline]

Definition at line 15 of file zav.h.

00015 {} // dummy for one of the chain constructor

zav::zav (  ) 

zav::zav ( int   )  [inline]

Definition at line 14 of file zav.h.

00014 {} // dummy for one of the chain constructor


Member Function Documentation

double zav::a ( void   )  const [inline]

Definition at line 20 of file zav.h.

References _a.

00020 { return _a; }

double zav::a ( void   )  const [inline]

Definition at line 21 of file zav.h.

References _a.

Referenced by FTTrack::s_zFit(), and FTFinder::VertexFit().

00021 { return _a; }

void zav::add ( double  ,
double  ,
double   
)

void zav::add ( double  ,
double  ,
double   
) [inline]

Definition at line 83 of file zav.h.

References _chisq, _nc, _sav, _ssav, _szav, _w, _zav, and _zzav.

Referenced by FTTrack::s_zFit().

00083                                                   {
00084   _w += w;
00085   double sw = s * w;
00086   _sav += sw;
00087   _ssav += sw * s;
00088   double zw = z * w;
00089   _zav += zw;
00090   _szav += zw * s;
00091   _zzav += zw * z;
00092   _chisq = -1;
00093   _nc++;
00094 }

double zav::b (  )  const [inline]

Definition at line 21 of file zav.h.

References _b.

00021 { return _b; }

double zav::b (  )  const [inline]

Definition at line 22 of file zav.h.

References _b.

Referenced by FTTrack::s_zFit(), and FTFinder::VertexFit().

00022 { return _b; }

double zav::calculate (  ) 

double zav::calculate (  )  [inline]

Definition at line 115 of file zav.h.

References _a, _b, _c11, _c21, _c22, _chisq, _nc, _sav, _sig_inv, _ssav, _szav, _w, _zav, and _zzav.

Referenced by FTTrack::s_zFit().

00115                              {
00116   double sig = _ssav * _w - _sav * _sav;
00117   if (sig!=0) {
00118     _sig_inv = 1/sig;
00119     _a = ( _szav * _w - _sav * _zav ) * _sig_inv;
00120     _b = ( _ssav * _zav - _sav * _szav ) * _sig_inv;
00121     _chisq = _zzav - 2 * _a * _szav - 2 * _b * _zav + _a * _a * _ssav
00122       + _b * _b * _w + 2 * _a * _b * _sav;
00123     _c11 = _w * _sig_inv;
00124     _c21 = - _sav * _sig_inv;
00125     _c22 = _ssav * _sig_inv;
00126   } else {
00127     _sig_inv = 0;
00128     _c11 = _c21 = _c22 = 0;
00129     _chisq = -1;
00130   }
00131   if(_nc==2) {
00132     _chisq = 0;
00133   }
00134   return _chisq;
00135 }

double zav::chisq (  )  const [inline]

Definition at line 16 of file zav.h.

References _chisq.

00016 { return _chisq; }

double zav::chisq (  )  const [inline]

Definition at line 17 of file zav.h.

References _chisq.

Referenced by FTFinder::makeTds(), and FTFinder::VertexFit().

00017 { return _chisq; }

void zav::clear ( void   ) 

void zav::clear ( void   )  [inline]

Definition at line 54 of file zav.h.

References _c11, _c21, _c22, _chisq, _nc, _sav, _sig_inv, _ssav, _szav, _w, _zav, and _zzav.

Referenced by FTTrack::s_zFit().

00054                           {
00055   _w = _sav = _ssav = _zav = _szav = _zzav = 0;
00056   _chisq = -1;
00057   _c22 = _c21 = _c11 = _sig_inv = 0;
00058   _nc = 0;
00059 }

double zav::d ( double  s,
double  z 
) const [inline]

Definition at line 23 of file zav.h.

References _a, and _b.

00023 { return z - _a * s - _b; }

double zav::d ( double  s,
double  z 
) const [inline]

Definition at line 24 of file zav.h.

References _a, and _b.

Referenced by FTTrack::s_zFit().

00024 { return z - _a * s - _b; }

int zav::nc (  )  const [inline]

Definition at line 24 of file zav.h.

References _nc.

00024 { return _nc; }

int zav::nc (  )  const [inline]

Definition at line 25 of file zav.h.

References _nc.

Referenced by FTTrack::s_zFit(), and FTFinder::VertexFit().

00025 { return _nc; }

void zav::set ( const zav  ) 

void zav::set ( const zav  )  [inline]

Definition at line 61 of file zav.h.

References _a, _b, _c11, _c21, _c22, _chisq, _nc, _sav, _sig_inv, _ssav, _szav, _w, _zav, and _zzav.

00061                                  {
00062   if(c) {
00063     _w = c->_w;
00064     _sav = c->_sav;
00065     _ssav = c->_ssav;
00066     _zav = c->_zav;
00067     _szav = c->_szav;
00068     _zzav = c->_zzav;
00069     _sig_inv = c->_sig_inv;
00070     _c11 = c->_c11;
00071     _c21 = c->_c21;
00072     _c22 = c->_c22;
00073     _nc = c->_nc;
00074   } else {
00075     _w = _sav = _ssav = _zav = _szav = _zzav =
00076       _sig_inv = _c11 = _c21 = _c22 = 0;
00077     _nc = 0;
00078   }
00079   _a = _b = 0;
00080   _chisq = -1;
00081 }

double zav::z ( double  s  )  const [inline]

Definition at line 22 of file zav.h.

References _a, and _b.

00022 { return _a * s + _b; }

double zav::z ( double  s  )  const [inline]

Definition at line 23 of file zav.h.

References _a, and _b.

00023 { return _a * s + _b; }


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream o,
const zav z 
) [friend]

Definition at line 137 of file zav.h.

00137                                                        {
00138   o << " zav::w=" << z._w << " sav=" << z._sav << " zav=" << z._zav
00139     << " nc=" << z._nc << " chisq=" << z._chisq << " a=" << z._a
00140     << " b=" << z._b << " c11=" << z._c11 << " c21=" << z._c21
00141     << " c22=" << z._c22 << " sig_inv=" << z._sig_inv << std::endl;
00142   return o;
00143 }

std::ostream& operator<< ( std::ostream o,
const zav z 
) [friend]

Definition at line 137 of file zav.h.

00137                                                        {
00138   o << " zav::w=" << z._w << " sav=" << z._sav << " zav=" << z._zav
00139     << " nc=" << z._nc << " chisq=" << z._chisq << " a=" << z._a
00140     << " b=" << z._b << " c11=" << z._c11 << " c21=" << z._c21
00141     << " c22=" << z._c22 << " sig_inv=" << z._sig_inv << std::endl;
00142   return o;
00143 }


Member Data Documentation

double zav::_a [private]

Definition at line 31 of file zav.h.

Referenced by a(), calculate(), d(), operator<<(), set(), z(), and zav().

double zav::_b [private]

Definition at line 32 of file zav.h.

Referenced by b(), calculate(), d(), operator<<(), set(), z(), and zav().

double zav::_c11 [private]

Definition at line 41 of file zav.h.

Referenced by calculate(), clear(), operator<<(), set(), and zav().

double zav::_c21 [private]

Definition at line 42 of file zav.h.

Referenced by calculate(), clear(), operator<<(), set(), and zav().

double zav::_c22 [private]

Definition at line 43 of file zav.h.

Referenced by calculate(), clear(), operator<<(), set(), and zav().

double zav::_chisq [private]

Definition at line 39 of file zav.h.

Referenced by add(), calculate(), chisq(), clear(), operator<<(), set(), and zav().

int zav::_nc [private]

Definition at line 44 of file zav.h.

Referenced by add(), calculate(), clear(), nc(), operator<<(), set(), and zav().

double zav::_sav [private]

Definition at line 34 of file zav.h.

Referenced by add(), calculate(), clear(), operator<<(), set(), and zav().

double zav::_sig_inv [private]

Definition at line 40 of file zav.h.

Referenced by calculate(), clear(), operator<<(), set(), and zav().

double zav::_ssav [private]

Definition at line 35 of file zav.h.

Referenced by add(), calculate(), clear(), set(), and zav().

double zav::_szav [private]

Definition at line 37 of file zav.h.

Referenced by add(), calculate(), clear(), set(), and zav().

double zav::_w [private]

Definition at line 33 of file zav.h.

Referenced by add(), calculate(), clear(), operator<<(), set(), and zav().

double zav::_zav [private]

Definition at line 36 of file zav.h.

Referenced by add(), calculate(), clear(), operator<<(), set(), and zav().

double zav::_zzav [private]

Definition at line 38 of file zav.h.

Referenced by add(), calculate(), clear(), set(), and zav().


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