BOSS 7.1.1
BESIII Offline Software System
Loading...
Searching...
No Matches
BesError Class Reference

#include <BesError.h>

+ Inheritance diagram for BesError:

Public Member Functions

 BesError ()
 
 BesError (int n)
 
 BesError (const HepSymMatrix &p)
 
 BesError (const BesError &v)
 
BesErroroperator= (const BesError &v)
 
BesErroroperator= (const HepSymMatrix &v)
 
double determineChisq (const HepVector &diff) const
 
BesErroroperator*= (double t)
 
BesErroroperator/= (double t)
 
BesErroroperator+= (const BesError &m2)
 
BesErroroperator-= (const BesError &m2)
 
BesError operator- ()
 
BesErroroperator+= (const HepSymMatrix &m2)
 
BesErroroperator-= (const HepSymMatrix &m2)
 
BesError operator- () const
 
BesErroroperator+= (const HepDiagMatrix &m2)
 
BesErroroperator-= (const HepDiagMatrix &m2)
 
BesError similarity (const HepRotation &rot) const
 
BesError similarity (const HepLorentzRotation &rot) const
 
BesError similarity (const BesError &E)
 
BesError similarity (const HepMatrix &m1) const
 
BesErrorsimilarityWith (const BesError &m, const HepMatrix &m1)
 
double similarity (const HepVector &v) const
 
HepSymMatrix similarity (const HepSymMatrix &m1) const
 

Static Public Attributes

static const double chisqUndef = -1.
 

Friends

BesError operator* (double t, const BesError &m1)
 
BesError operator* (const BesError &m1, double t)
 
BesError operator/ (double t, const BesError &m1)
 
BesError operator/ (const BesError &m1, double t)
 
BesError operator+ (const BesError &m1, const BesError &m2)
 
BesError operator- (const BesError &m1, const BesError &m2)
 
std::ostream & operator<< (std::ostream &out, const BesError &mat)
 
std::istream & operator>> (std::istream &in, BesError &mat)
 

Detailed Description

Definition at line 46 of file BesError.h.

Constructor & Destructor Documentation

◆ BesError() [1/4]

BesError::BesError ( )
inline

Definition at line 51 of file BesError.h.

51: HepSymMatrix() {}

◆ BesError() [2/4]

BesError::BesError ( int n)
inline

Definition at line 53 of file BesError.h.

53: HepSymMatrix(n, 0) {}
const Int_t n

◆ BesError() [3/4]

BesError::BesError ( const HepSymMatrix & p)
inline

Definition at line 58 of file BesError.h.

58: HepSymMatrix(p) {}

◆ BesError() [4/4]

BesError::BesError ( const BesError & v)
inline

Definition at line 61 of file BesError.h.

61: HepSymMatrix() {*this = v;}
**********Class see also m_nmax DOUBLE PRECISION m_amel DOUBLE PRECISION m_x2 DOUBLE PRECISION m_alfinv DOUBLE PRECISION m_Xenph INTEGER m_KeyWtm INTEGER m_idyfs DOUBLE PRECISION m_zini DOUBLE PRECISION m_q2 DOUBLE PRECISION m_Wt_KF DOUBLE PRECISION m_WtCut INTEGER m_KFfin *COMMON c_KarLud $ !Input CMS energy[GeV] $ !CMS energy after beam spread beam strahlung[GeV] $ !Beam energy spread[GeV] $ !z boost due to beam spread $ !electron beam mass *ff pair spectrum $ !minimum v
Definition KarLud.h:35

Member Function Documentation

◆ determineChisq()

double BesError::determineChisq ( const HepVector & diff) const

Definition at line 109 of file BesError.cxx.

110{
111 int ierr;
112 HepMatrix dMat(diff.num_row(), 1);
113
114 for (int i = 0; i < diff.num_row(); i++) dMat[i][0] = diff[i];
115
116 double chisq = (inverse(ierr).similarityT(dMat))[0][0];
117
118 if (ierr == 0) return chisq;
119 else return chisqUndef;
120}
static const double chisqUndef
Definition BesError.h:50

Referenced by BesPointErr::determineChisq(), and BesVectorErr::determineChisq().

◆ operator*=()

BesError & BesError::operator*= ( double t)
inline

Definition at line 97 of file BesError.h.

98 { return (BesError&) HepSymMatrix::operator*=(t); }
TTree * t
Definition binning.cxx:23

◆ operator+=() [1/3]

BesError & BesError::operator+= ( const BesError & m2)
inline

Definition at line 103 of file BesError.h.

104 {
105 HepSymMatrix::operator+=(m2);
106 return *this;
107 }
double double * m2
Definition qcdloop1.h:75

◆ operator+=() [2/3]

BesError & BesError::operator+= ( const HepDiagMatrix & m2)
inline

Definition at line 138 of file BesError.h.

139 {
140 HepSymMatrix::operator+=(m2);
141 return *this;
142 }

◆ operator+=() [3/3]

BesError & BesError::operator+= ( const HepSymMatrix & m2)
inline

Definition at line 122 of file BesError.h.

123 {
124 HepSymMatrix::operator+=(m2);
125 return *this;
126 }

◆ operator-() [1/2]

BesError BesError::operator- ( )
inline

Definition at line 115 of file BesError.h.

116 { BesError temp(*this);
117 return temp; }

◆ operator-() [2/2]

BesError BesError::operator- ( ) const
inline

Definition at line 134 of file BesError.h.

135 { BesError temp(*this);
136 return temp;}

◆ operator-=() [1/3]

BesError & BesError::operator-= ( const BesError & m2)
inline

Definition at line 109 of file BesError.h.

110 {
111 HepSymMatrix::operator-=(m2);
112 return *this;
113 }

◆ operator-=() [2/3]

BesError & BesError::operator-= ( const HepDiagMatrix & m2)
inline

Definition at line 144 of file BesError.h.

145 {
146 HepSymMatrix::operator-=(m2);
147 return *this;
148 }

◆ operator-=() [3/3]

BesError & BesError::operator-= ( const HepSymMatrix & m2)
inline

Definition at line 128 of file BesError.h.

129 {
130 HepSymMatrix::operator-=(m2);
131 return *this;
132 }

◆ operator/=()

BesError & BesError::operator/= ( double t)
inline

Definition at line 100 of file BesError.h.

101 {return (BesError&) HepSymMatrix::operator/=(t); }

◆ operator=() [1/2]

BesError & BesError::operator= ( const BesError & v)
inline

Definition at line 63 of file BesError.h.

64 {
65 if (this != &v) {
66 HepSymMatrix::operator=(v);
67 }
68 return *this;
69 }

◆ operator=() [2/2]

BesError & BesError::operator= ( const HepSymMatrix & v)
inline

Definition at line 71 of file BesError.h.

72 {
73 if (this != &v) {
74 HepSymMatrix::operator=(v);
75 }
76 return *this;
77 }

◆ similarity() [1/6]

BesError BesError::similarity ( const BesError & E)

Definition at line 75 of file BesError.cxx.

76{
77 BesError mret(HepSymMatrix::similarity(E));
78 return mret;
79}

◆ similarity() [2/6]

BesError BesError::similarity ( const HepLorentzRotation & rot) const

Definition at line 63 of file BesError.cxx.

64{
65 HepMatrix mat(4,4);
66 mat(1,1)=rot.xx(); mat(1,2)=rot.xy(); mat(1,3)=rot.xz(); mat(1,4)=rot.xt();
67 mat(2,1)=rot.yx(); mat(2,2)=rot.yy(); mat(2,3)=rot.yz(); mat(2,4)=rot.yt();
68 mat(3,1)=rot.zx(); mat(3,2)=rot.zy(); mat(3,3)=rot.zz(); mat(3,4)=rot.zt();
69 mat(4,1)=rot.tx(); mat(4,2)=rot.ty(); mat(4,3)=rot.tz(); mat(4,4)=rot.tt();
70
71 HepSymMatrix w = similarity(mat);
72 return w;
73}
double w
BesError similarity(const HepRotation &rot) const
Definition BesError.cxx:51

◆ similarity() [3/6]

BesError BesError::similarity ( const HepMatrix & m1) const
inline

Definition at line 157 of file BesError.h.

158 {
159 BesError mret(m1.num_row());
160 mret.similarityWith(*this, m1);
161 return mret;
162 }
double * m1
Definition qcdloop1.h:75

◆ similarity() [4/6]

BesError BesError::similarity ( const HepRotation & rot) const

Definition at line 51 of file BesError.cxx.

52{
53 HepMatrix mat(3,3);
54 mat(1,1)=rot.xx(); mat(1,2)=rot.xy(); mat(1,3)=rot.xz();
55 mat(2,1)=rot.yx(); mat(2,2)=rot.yy(); mat(2,3)=rot.yz();
56 mat(3,1)=rot.zx(); mat(3,2)=rot.zy(); mat(3,3)=rot.zz();
57
58 HepSymMatrix w = similarity(mat);
59 return w;
60}

Referenced by BesPointErr::covRTPMatrix(), BesVectorErr::covRTPMatrix(), BesPointErr::covRZPMatrix(), BesVectorErr::covRZPMatrix(), similarity(), and similarity().

◆ similarity() [5/6]

HepSymMatrix BesError::similarity ( const HepSymMatrix & m1) const
inline

Definition at line 170 of file BesError.h.

171 { return this->HepSymMatrix::similarity( m1 ); }

◆ similarity() [6/6]

double BesError::similarity ( const HepVector & v) const
inline

Definition at line 168 of file BesError.h.

169 { return this->HepSymMatrix::similarity( v ); }

◆ similarityWith()

BesError & BesError::similarityWith ( const BesError & m,
const HepMatrix & m1 )

Definition at line 81 of file BesError.cxx.

83{
84 assert(num_row() == m1.num_row());
85 HepMatrix temp = m1*mat;
86 register double tmp;
87
88 for (int r = 0; r < num_row(); r++) {
89 for (int c = 0; c <= r; c++) {
90 tmp = 0.;
91 for (int k = 0; k < m1.num_col(); k++) {
92 tmp += temp[r][k]*m1[c][k];
93 }
94 (*this)[r][c] = tmp;
95 }
96 }
97 return *this;
98}

Referenced by similarity().

Friends And Related Symbol Documentation

◆ operator* [1/2]

BesError operator* ( const BesError & m1,
double t )
friend

Definition at line 162 of file BesError.cxx.

163 {
164 BesError mret = m1;
165 mret *= t;
166 return mret;
167 }

◆ operator* [2/2]

BesError operator* ( double t,
const BesError & m1 )
friend

Definition at line 155 of file BesError.cxx.

156 {
157 BesError mret = m1;
158 mret *= t;
159 return mret;
160 }

◆ operator+

BesError operator+ ( const BesError & m1,
const BesError & m2 )
friend

Definition at line 183 of file BesError.cxx.

184 {
185 BesError mret = m1;
186 mret += m2;
187 return mret;
188 }

◆ operator-

BesError operator- ( const BesError & m1,
const BesError & m2 )
friend

Definition at line 190 of file BesError.cxx.

191 {
192 BesError mret = m1;
193 mret -= m2;
194 return mret;
195 }

◆ operator/ [1/2]

BesError operator/ ( const BesError & m1,
double t )
friend

Definition at line 176 of file BesError.cxx.

177 {
178 BesError mret = m1;
179 mret /= t;
180 return mret;
181 }

◆ operator/ [2/2]

BesError operator/ ( double t,
const BesError & m1 )
friend

Definition at line 169 of file BesError.cxx.

170 {
171 BesError mret = m1;
172 mret /= t;
173 return mret;
174 }

◆ operator<<

std::ostream & operator<< ( std::ostream & out,
const BesError & mat )
friend

◆ operator>>

std::istream & operator>> ( std::istream & in,
BesError & mat )
friend

Member Data Documentation

◆ chisqUndef

const double BesError::chisqUndef = -1.
static

Definition at line 50 of file BesError.h.

Referenced by determineChisq().


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