CGEM BOSS 6.6.5.i
BESIII Offline Software System
Loading...
Searching...
No Matches
zav Class Reference

#include <zav.h>

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)
 

Friends

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

Detailed Description

Constructor & Destructor Documentation

◆ zav() [1/4]

zav::zav ( )
inline

Definition at line 47 of file KalFitAlg/KalFitAlg-00-15-20/KalFitAlg/lpav/zav.h.

47 {
48 _a = _b = _w = _sav = _ssav = _zav = _szav = _zzav = 0;
49 _chisq = -1;
50 _c22 = _c21 = _c11 = _sig_inv = 0;
51 _nc = 0;
52}

◆ zav() [2/4]

zav::zav ( int )
inline

Definition at line 15 of file KalFitAlg/KalFitAlg-00-15-20/KalFitAlg/lpav/zav.h.

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

◆ zav() [3/4]

zav::zav ( )

◆ zav() [4/4]

zav::zav ( int )
inline

Definition at line 14 of file TrackUtil/TrackUtil-00-00-12/TrackUtil/zav.h.

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

Member Function Documentation

◆ a() [1/2]

double zav::a ( ) const
inline

Definition at line 21 of file KalFitAlg/KalFitAlg-00-15-20/KalFitAlg/lpav/zav.h.

21{ return _a; }

Referenced by FTTrack::s_zFit().

◆ a() [2/2]

double zav::a ( ) const
inline

Definition at line 20 of file TrackUtil/TrackUtil-00-00-12/TrackUtil/zav.h.

20{ return _a; }

◆ add() [1/2]

void zav::add ( double s,
double z,
double w )
inline

Definition at line 83 of file KalFitAlg/KalFitAlg-00-15-20/KalFitAlg/lpav/zav.h.

83 {
84 _w += w;
85 double sw = s * w;
86 _sav += sw;
87 _ssav += sw * s;
88 double zw = z * w;
89 _zav += zw;
90 _szav += zw * s;
91 _zzav += zw * z;
92 _chisq = -1;
93 _nc++;
94}
XmlRpcServer s

Referenced by FTTrack::s_zFit().

◆ add() [2/2]

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

◆ b() [1/2]

double zav::b ( ) const
inline

Definition at line 22 of file KalFitAlg/KalFitAlg-00-15-20/KalFitAlg/lpav/zav.h.

22{ return _b; }

Referenced by FTTrack::s_zFit().

◆ b() [2/2]

double zav::b ( ) const
inline

Definition at line 21 of file TrackUtil/TrackUtil-00-00-12/TrackUtil/zav.h.

21{ return _b; }

◆ calculate() [1/2]

double zav::calculate ( )
inline

Definition at line 115 of file KalFitAlg/KalFitAlg-00-15-20/KalFitAlg/lpav/zav.h.

115 {
116 double sig = _ssav * _w - _sav * _sav;
117 if (sig!=0) {
118 _sig_inv = 1/sig;
119 _a = ( _szav * _w - _sav * _zav ) * _sig_inv;
120 _b = ( _ssav * _zav - _sav * _szav ) * _sig_inv;
121 _chisq = _zzav - 2 * _a * _szav - 2 * _b * _zav + _a * _a * _ssav
122 + _b * _b * _w + 2 * _a * _b * _sav;
123 _c11 = _w * _sig_inv;
124 _c21 = - _sav * _sig_inv;
125 _c22 = _ssav * _sig_inv;
126 } else {
127 _sig_inv = 0;
128 _c11 = _c21 = _c22 = 0;
129 _chisq = -1;
130 }
131 if(_nc==2) {
132 _chisq = 0;
133 }
134 return _chisq;
135}

Referenced by FTTrack::s_zFit().

◆ calculate() [2/2]

double zav::calculate ( )

◆ chisq() [1/2]

double zav::chisq ( ) const
inline

Definition at line 17 of file KalFitAlg/KalFitAlg-00-15-20/KalFitAlg/lpav/zav.h.

17{ return _chisq; }

◆ chisq() [2/2]

double zav::chisq ( ) const
inline

Definition at line 16 of file TrackUtil/TrackUtil-00-00-12/TrackUtil/zav.h.

16{ return _chisq; }

◆ clear() [1/2]

void zav::clear ( void )
inline

Definition at line 54 of file KalFitAlg/KalFitAlg-00-15-20/KalFitAlg/lpav/zav.h.

54 {
55 _w = _sav = _ssav = _zav = _szav = _zzav = 0;
56 _chisq = -1;
57 _c22 = _c21 = _c11 = _sig_inv = 0;
58 _nc = 0;
59}

Referenced by FTTrack::s_zFit().

◆ clear() [2/2]

void zav::clear ( void )

◆ d() [1/2]

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

Definition at line 24 of file KalFitAlg/KalFitAlg-00-15-20/KalFitAlg/lpav/zav.h.

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

Referenced by FTTrack::s_zFit().

◆ d() [2/2]

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

Definition at line 23 of file TrackUtil/TrackUtil-00-00-12/TrackUtil/zav.h.

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

◆ nc() [1/2]

int zav::nc ( ) const
inline

Definition at line 25 of file KalFitAlg/KalFitAlg-00-15-20/KalFitAlg/lpav/zav.h.

25{ return _nc; }

Referenced by FTTrack::s_zFit().

◆ nc() [2/2]

int zav::nc ( ) const
inline

Definition at line 24 of file TrackUtil/TrackUtil-00-00-12/TrackUtil/zav.h.

24{ return _nc; }

◆ set() [1/2]

void zav::set ( const zav * c)
inline

Definition at line 61 of file KalFitAlg/KalFitAlg-00-15-20/KalFitAlg/lpav/zav.h.

61 {
62 if(c) {
63 _w = c->_w;
64 _sav = c->_sav;
65 _ssav = c->_ssav;
66 _zav = c->_zav;
67 _szav = c->_szav;
68 _zzav = c->_zzav;
69 _sig_inv = c->_sig_inv;
70 _c11 = c->_c11;
71 _c21 = c->_c21;
72 _c22 = c->_c22;
73 _nc = c->_nc;
74 } else {
75 _w = _sav = _ssav = _zav = _szav = _zzav =
76 _sig_inv = _c11 = _c21 = _c22 = 0;
77 _nc = 0;
78 }
79 _a = _b = 0;
80 _chisq = -1;
81}

◆ set() [2/2]

void zav::set ( const zav * )

◆ z() [1/2]

double zav::z ( double s) const
inline

Definition at line 23 of file KalFitAlg/KalFitAlg-00-15-20/KalFitAlg/lpav/zav.h.

23{ return _a * s + _b; }

Referenced by add(), and d().

◆ z() [2/2]

double zav::z ( double s) const
inline

Definition at line 22 of file TrackUtil/TrackUtil-00-00-12/TrackUtil/zav.h.

22{ return _a * s + _b; }

Friends And Related Symbol Documentation

◆ operator<< [1/2]

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

Definition at line 137 of file KalFitAlg/KalFitAlg-00-15-20/KalFitAlg/lpav/zav.h.

137 {
138 o << " zav::w=" << z._w << " sav=" << z._sav << " zav=" << z._zav
139 << " nc=" << z._nc << " chisq=" << z._chisq << " a=" << z._a
140 << " b=" << z._b << " c11=" << z._c11 << " c21=" << z._c21
141 << " c22=" << z._c22 << " sig_inv=" << z._sig_inv << std::endl;
142 return o;
143}

◆ operator<< [2/2]

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

Definition at line 137 of file KalFitAlg/KalFitAlg-00-15-20/KalFitAlg/lpav/zav.h.

137 {
138 o << " zav::w=" << z._w << " sav=" << z._sav << " zav=" << z._zav
139 << " nc=" << z._nc << " chisq=" << z._chisq << " a=" << z._a
140 << " b=" << z._b << " c11=" << z._c11 << " c21=" << z._c21
141 << " c22=" << z._c22 << " sig_inv=" << z._sig_inv << std::endl;
142 return o;
143}

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