FEDRA emulsion software from the OPERA Collaboration
MATRIX::CMatrix Class Reference

#include <CMatrix.hh>

Inheritance diagram for MATRIX::CMatrix:
Collaboration diagram for MATRIX::CMatrix:

Public Member Functions

— Constructors —
 CMatrix ()
 
 CMatrix (const CMatrix &rhs)
 
 CMatrix (const VtSymMatrix &rhs)
 
 CMatrix (const VtSqMatrix &rhs)
 
 CMatrix (const VtMatrix &rhs)
 
— Access methods —
double x () const
 rtra->cvf[0] More...
 
double x_y () const
 rtra->cvf[1] More...
 
double x_tx () const
 rtra->cvf[3] More...
 
double x_ty () const
 rtra->cvf[6] More...
 
double x_p () const
 rtra->cvf[10] $* Q * -p^2$ More...
 
double y () const
 rtra->cvf[2] More...
 
double y_tx () const
 rtra->cvf[4] More...
 
double y_ty () const
 rtra->cvf[7] More...
 
double y_p () const
 rtra->cvf[11] $* Q * -p^2$ More...
 
double tx () const
 rtra->cvf[5] More...
 
double tx_ty () const
 rtra->cvf[8] More...
 
double tx_p () const
 rtra->cvf[12] $* Q * -p^2$ More...
 
double ty () const
 rtra->cvf[9] More...
 
double ty_p () const
 rtra->cvf[13] $* Q * -p^2$ More...
 
double p () const
 rtra->cvf[14] $* p^4$ More...
 
— Modification of matrix elements —
void set_x (const double x)
 
void set_x_y (const double xy)
 
void set_x_tx (const double xtx)
 
void set_x_ty (const double xty)
 
void set_x_p (const double xp)
 
void set_y (const double y)
 
void set_y_tx (const double ytx)
 
void set_y_ty (const double yty)
 
void set_y_p (const double yp)
 
void set_tx (const double tx)
 
void set_tx_ty (const double txty)
 
void set_tx_p (const double txp)
 
void set_ty (const double ty)
 
void set_ty_p (const double typ)
 
void set_p (const double p)
 
— Error propagation —
double x_prop (double dz) const
 
double x_y_prop (double dz) const
 
double x_tx_prop (double dz) const
 
double x_ty_prop (double dz) const
 
double x_p_prop (double dz) const
 
double y_prop (double dz) const
 
double y_tx_prop (double dz) const
 
double y_ty_prop (double dz) const
 
double y_p_prop (double dz) const
 
void propagate (const double dz)
 propagate all matrix elements More...
 
- Public Member Functions inherited from MATRIX::VtSymMatrix
 VtSymMatrix (const unsigned int dim)
 
 VtSymMatrix (const unsigned int dim, double diag)
 initalize diagonal elements More...
 
 VtSymMatrix (const VtSymMatrix &rhs)
 copy constructor More...
 
 VtSymMatrix (const VtSqMatrix &rhs)
 
 VtSymMatrix (const VtMatrix &rhs)
 
virtual ~VtSymMatrix ()
 
bool invert (const bool use_momentum)
 calc inverse using momentum or not More...
 
bool VtDsinv (int dim=0)
 transform to inverse More...
 
const VtSymMatrix dsinv (int dim=0) const
 return inverse More...
 
virtual double det () const
 compute determinant via CERNLIB dsfact() More...
 
double product (const VtVector &rhs, unsigned int dim=0) const
 compute $v^t*A*v$ More...
 
const VtSymMatrix product (const VtMatrix &rhs) const
 compute $B^t*A*B$ More...
 
virtual void place_at (const VtMatrix &rhs, const unsigned int row, const unsigned int col)
 copy a smaller matrix at a certain place More...
 
void copy (const VtSymMatrix &rhs)
 in case matrix dimensions differ More...
 
const VtSymMatrixoperator= (const VtSymMatrix &rhs)
 copy More...
 
const VtSymMatrixoperator+= (const double rhs)
 $\textbf{A} = (a_{\mu\nu} + \alpha)$ More...
 
const VtSymMatrixoperator-= (const double rhs)
 $\textbf{A} = (a_{\mu\nu} - \alpha)$ More...
 
const VtSymMatrixoperator*= (const double rhs)
 $\textbf{A} = (a_{\mu\nu} \cdot\alpha)$ More...
 
const VtSymMatrixoperator/= (const double rhs)
 $\textbf{A} = (a_{\mu\nu} / \alpha)$ More...
 
const VtSymMatrixoperator+= (const VtSymMatrix &rhs)
 $\textbf{A} = (a_{\mu\nu} + b_{\mu\nu})$ More...
 
const VtSymMatrixoperator-= (const VtSymMatrix &rhs)
 $\textbf{A} = (a_{\mu\nu} - b_{\mu\nu})$ More...
 
const VtSymMatrix operator+ (const VtSymMatrix &rhs) const
 
const VtSqMatrix operator+ (const VtSqMatrix &rhs) const
 
const VtMatrix operator+ (const VtMatrix &rhs) const
 
const VtSymMatrix operator- (const VtSymMatrix &rhs) const
 
const VtSymMatrix operator- (void) const
 
const VtSqMatrix operator- (const VtSqMatrix &rhs) const
 
const VtMatrix operator- (const VtMatrix &rhs) const
 
const VtSqMatrix operator* (const VtSymMatrix &rhs) const
 
const VtSqMatrix operator* (const VtSqMatrix &rhs) const
 
const VtMatrix operator* (const VtMatrix &rhs) const
 
const VtVector operator* (const VtVector &rhs) const
 
virtual void print (std::ostream &os) const
 
- Public Member Functions inherited from MATRIX::VtSqMatrix
 VtSqMatrix (const int row)
 
 VtSqMatrix (const VtSqMatrix &rhs)
 
 VtSqMatrix (const VtMatrix &rhs)
 
virtual ~VtSqMatrix ()
 
bool VtDinv (int dim=0)
 transform to inverse More...
 
const VtSqMatrix dinv (int dim=0) const
 return inverse More...
 
virtual const VtMatrix operator* (const VtMatrix &rhs)
 
const VtVector operator* (const VtVector &rhs) const
 
- Public Member Functions inherited from MATRIX::VtMatrix
 VtMatrix (const unsigned int row, const unsigned int col)
 
 VtMatrix (const VtMatrix &rhs)
 
virtual ~VtMatrix ()
 
unsigned int nrow () const
 no of rows $n$ More...
 
unsigned int ncol () const
 no of columns $m$ More...
 
int size () const
 $m\times n$ More...
 
VtMatrix_row operator[] (int row)
 
VtMatrix_row_const operator[] (int row) const
 
virtual double operator() (unsigned int row, unsigned int col) const
 
virtual double & operator() (const unsigned int row, const unsigned int col)
 
double get (unsigned int row, unsigned int col) const
 
double & get (unsigned int row, unsigned int col)
 
void VtT (void)
 transform into transpose matrix More...
 
const VtMatrix T (void) const
 return transpose More...
 
virtual void place_at (const VtVector &rhs, const unsigned int row, const unsigned int col)
 copy a vector at a certain place More...
 
void copy (const VtMatrix &rhs)
 to be used if matrix dimensions are not equal More...
 
void clear (void)
 set matrix elements to 0 More...
 
const VtMatrixoperator= (const VtMatrix &rhs)
 $\textbf{A} = \textbf{B}$ More...
 
const VtMatrixoperator= (const VtNegMatrix &rhs)
 
const VtMatrixoperator+= (const VtMatrix &rhs)
 $\textbf{A} = (a_{\mu\nu} + b_{\mu\nu})$ More...
 
const VtMatrixoperator-= (const VtMatrix &rhs)
 $\textbf{A} = (a_{\mu\nu} - b_{\mu\nu})$ More...
 
const VtMatrix operator+ (const VtMatrix &rhs) const
 $\textbf{A} + \textbf{B}$ More...
 
const VtMatrix operator+ (const VtNegMatrix &rhs) const
 
const VtMatrix operator- (const VtMatrix &rhs) const
 $\textbf{A} - \textbf{B}$ More...
 
const VtMatrix operator- (const VtNegMatrix &rhs) const
 
const VtNegMatrix operator- (void) const
 $-\textbf{A}$ More...
 
const VtMatrix operator* (const VtMatrix &rhs) const
 $\textbf{A}\cdot\textbf{B} = \sum_{\nu=1}^n a_{\mu\nu}b_{\nu\lambda}$ More...
 
const VtVector operator* (const VtVector &rhs) const
 $\textbf{A}\cdot\vec{v} = (\sum_{\nu=1}^n a_{\mu\nu}v_{\nu})$ More...
 
double * array () const
 return pointer to internal array More...
 

Additional Inherited Members

- Protected Attributes inherited from MATRIX::VtMatrix
double * m
 
double * work
 
unsigned int m_nrow
 
unsigned int m_ncol
 

Detailed Description

$5\times 5$ symmetric matrix class @memo HERA-B Track covariance matrix class

Constructor & Destructor Documentation

◆ CMatrix() [1/5]

MATRIX::CMatrix::CMatrix ( )
inline
67: VtSymMatrix(5) {}
VtSymMatrix(const unsigned int dim)
Definition: VtSymMatrix.hh:53

◆ CMatrix() [2/5]

MATRIX::CMatrix::CMatrix ( const CMatrix rhs)
47:VtSymMatrix(rhs) {}

◆ CMatrix() [3/5]

MATRIX::CMatrix::CMatrix ( const VtSymMatrix rhs)
inline
71: VtSymMatrix(rhs) {}

◆ CMatrix() [4/5]

MATRIX::CMatrix::CMatrix ( const VtSqMatrix rhs)
inline
73: VtSymMatrix(rhs) {}

◆ CMatrix() [5/5]

MATRIX::CMatrix::CMatrix ( const VtMatrix rhs)
inline
75: VtSymMatrix(rhs) {}

Member Function Documentation

◆ p()

double MATRIX::CMatrix::p ( ) const
inline

rtra->cvf[14] $* p^4$

111{ return operator()(4,4); }
virtual double operator()(unsigned int row, unsigned int col) const
Definition: VtMatrix.C:109

◆ propagate()

void MATRIX::CMatrix::propagate ( const double  dz)

propagate all matrix elements

74 {
75 set_x ( x_prop(dz) );
76 set_x_y ( x_y_prop(dz) );
79 set_x_p ( x_p_prop(dz) );
80 set_y ( y_prop(dz) );
83 set_y_p ( y_p_prop(dz) );
84
85 // tx is invariant
86 // tx_ty is invariant
87 // ty is invariant
88 // tx_p is invariant
89 // ty_p is invariant
90 // p is invariant
91 return;
92 }
brick dz
Definition: RecDispMC.C:107
void set_y(const double y)
Definition: CMatrix.hh:125
void set_x_ty(const double xty)
Definition: CMatrix.hh:121
double x_ty_prop(double dz) const
Definition: CMatrix.hh:153
void set_x_y(const double xy)
Definition: CMatrix.hh:117
void set_y_tx(const double ytx)
Definition: CMatrix.hh:127
double x_tx_prop(double dz) const
Definition: CMatrix.hh:151
void set_y_ty(const double yty)
Definition: CMatrix.hh:129
void set_x_tx(const double xtx)
Definition: CMatrix.hh:119
void set_x_p(const double xp)
Definition: CMatrix.hh:123
double x_y_prop(double dz) const
Definition: CMatrix.hh:149
double y_ty_prop(double dz) const
Definition: CMatrix.hh:161
double y_p_prop(double dz) const
Definition: CMatrix.hh:163
double x_p_prop(double dz) const
Definition: CMatrix.hh:155
double y_tx_prop(double dz) const
Definition: CMatrix.hh:159
void set_x(const double x)
Definition: CMatrix.hh:115
double x_prop(double dz) const
Definition: CMatrix.hh:147
double y_prop(double dz) const
Definition: CMatrix.hh:157
void set_y_p(const double yp)
Definition: CMatrix.hh:131

◆ set_p()

void MATRIX::CMatrix::set_p ( const double  p)
inline
143{ operator()(4,4) = p; }
double p() const
rtra->cvf[14] $* p^4$
Definition: CMatrix.hh:111

◆ set_tx()

void MATRIX::CMatrix::set_tx ( const double  tx)
inline
133{ operator()(2,2) = tx; }
double tx() const
rtra->cvf[5]
Definition: CMatrix.hh:101

◆ set_tx_p()

void MATRIX::CMatrix::set_tx_p ( const double  txp)
inline
137{ operator()(2,4) = operator()(4,2) = txp; }

◆ set_tx_ty()

void MATRIX::CMatrix::set_tx_ty ( const double  txty)
inline
135{ operator()(2,3) = operator()(3,2) = txty;}

◆ set_ty()

void MATRIX::CMatrix::set_ty ( const double  ty)
inline
139{ operator()(3,3) = ty; }
double ty() const
rtra->cvf[9]
Definition: CMatrix.hh:107

◆ set_ty_p()

void MATRIX::CMatrix::set_ty_p ( const double  typ)
inline
141{ operator()(3,4) = operator()(4,3) = typ; }

◆ set_x()

void MATRIX::CMatrix::set_x ( const double  x)
inline
115{ operator()(0,0) = x; }
double x() const
rtra->cvf[0]
Definition: CMatrix.hh:83

◆ set_x_p()

void MATRIX::CMatrix::set_x_p ( const double  xp)
inline
123{ operator()(0,4) = operator()(4,0) = xp; }

◆ set_x_tx()

void MATRIX::CMatrix::set_x_tx ( const double  xtx)
inline
119{ operator()(0,2) = operator()(2,0) = xtx; }

◆ set_x_ty()

void MATRIX::CMatrix::set_x_ty ( const double  xty)
inline
121{ operator()(0,3) = operator()(3,0) = xty; }

◆ set_x_y()

void MATRIX::CMatrix::set_x_y ( const double  xy)
inline
117{ operator()(1,0) = operator()(0,1) = xy; }
xy(float X, float Y)
Definition: init.C:303

◆ set_y()

void MATRIX::CMatrix::set_y ( const double  y)
inline
125{ operator()(1,1) = y; }
double y() const
rtra->cvf[2]
Definition: CMatrix.hh:93

◆ set_y_p()

void MATRIX::CMatrix::set_y_p ( const double  yp)
inline
131{ operator()(1,4) = operator()(4,1) = yp; }

◆ set_y_tx()

void MATRIX::CMatrix::set_y_tx ( const double  ytx)
inline
127{ operator()(1,2) = operator()(2,1) = ytx; }

◆ set_y_ty()

void MATRIX::CMatrix::set_y_ty ( const double  yty)
inline
129{ operator()(1,3) = operator()(3,1) = yty; }

◆ tx()

double MATRIX::CMatrix::tx ( ) const
inline

rtra->cvf[5]

101{ return operator()(2,2); }

◆ tx_p()

double MATRIX::CMatrix::tx_p ( ) const
inline

rtra->cvf[12] $* Q * -p^2$

105{ return operator()(2,4); }

◆ tx_ty()

double MATRIX::CMatrix::tx_ty ( ) const
inline

rtra->cvf[8]

103{ return operator()(2,3); }

◆ ty()

double MATRIX::CMatrix::ty ( ) const
inline

rtra->cvf[9]

107{ return operator()(3,3); }

◆ ty_p()

double MATRIX::CMatrix::ty_p ( ) const
inline

rtra->cvf[13] $* Q * -p^2$

109{ return operator()(3,4); }

◆ x()

double MATRIX::CMatrix::x ( ) const
inline

rtra->cvf[0]

83{ return operator()(0,0); }

◆ x_p()

double MATRIX::CMatrix::x_p ( ) const
inline

rtra->cvf[10] $* Q * -p^2$

91{ return operator()(0,4); }

◆ x_p_prop()

double MATRIX::CMatrix::x_p_prop ( double  dz) const
inline
155{ return x_p() + dz * tx_p(); }
double x_p() const
rtra->cvf[10] $* Q * -p^2$
Definition: CMatrix.hh:91
double tx_p() const
rtra->cvf[12] $* Q * -p^2$
Definition: CMatrix.hh:105

◆ x_prop()

double MATRIX::CMatrix::x_prop ( double  dz) const
inline
147{ return x() + 2. * dz * x_tx() + dz*dz * tx(); }
double x_tx() const
rtra->cvf[3]
Definition: CMatrix.hh:87

◆ x_tx()

double MATRIX::CMatrix::x_tx ( ) const
inline

rtra->cvf[3]

87{ return operator()(0,2); }

◆ x_tx_prop()

double MATRIX::CMatrix::x_tx_prop ( double  dz) const
inline
151{ return x_tx() + dz * tx(); }

◆ x_ty()

double MATRIX::CMatrix::x_ty ( ) const
inline

rtra->cvf[6]

89{ return operator()(0,3); }

◆ x_ty_prop()

double MATRIX::CMatrix::x_ty_prop ( double  dz) const
inline
153{ return x_ty() + dz * tx_ty(); }
double x_ty() const
rtra->cvf[6]
Definition: CMatrix.hh:89
double tx_ty() const
rtra->cvf[8]
Definition: CMatrix.hh:103

◆ x_y()

double MATRIX::CMatrix::x_y ( ) const
inline

rtra->cvf[1]

85{ return operator()(0,1); }

◆ x_y_prop()

double MATRIX::CMatrix::x_y_prop ( double  dz) const
inline
149{ return x_y() + dz*(y_tx() + x_ty() + dz * tx_ty()); }
double y_tx() const
rtra->cvf[4]
Definition: CMatrix.hh:95
double x_y() const
rtra->cvf[1]
Definition: CMatrix.hh:85

◆ y()

double MATRIX::CMatrix::y ( ) const
inline

rtra->cvf[2]

93{ return operator()(1,1); }

◆ y_p()

double MATRIX::CMatrix::y_p ( ) const
inline

rtra->cvf[11] $* Q * -p^2$

99{ return operator()(1,4); }

◆ y_p_prop()

double MATRIX::CMatrix::y_p_prop ( double  dz) const
inline
163{ return y_p() + dz * ty_p(); }
double ty_p() const
rtra->cvf[13] $* Q * -p^2$
Definition: CMatrix.hh:109
double y_p() const
rtra->cvf[11] $* Q * -p^2$
Definition: CMatrix.hh:99

◆ y_prop()

double MATRIX::CMatrix::y_prop ( double  dz) const
inline
157{ return y() + 2. * dz * y_ty() + dz*dz * ty(); }
double y_ty() const
rtra->cvf[7]
Definition: CMatrix.hh:97

◆ y_tx()

double MATRIX::CMatrix::y_tx ( ) const
inline

rtra->cvf[4]

95{ return operator()(1,2); }

◆ y_tx_prop()

double MATRIX::CMatrix::y_tx_prop ( double  dz) const
inline
159{ return y_tx() + dz * tx_ty(); }

◆ y_ty()

double MATRIX::CMatrix::y_ty ( ) const
inline

rtra->cvf[7]

97{ return operator()(1,3); }

◆ y_ty_prop()

double MATRIX::CMatrix::y_ty_prop ( double  dz) const
inline
161{ return y_ty() + dz * ty(); }

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