BOSS
7.1.1
BESIII Offline Software System
Loading...
Searching...
No Matches
TrkExchangePar.cxx
Go to the documentation of this file.
1
//--------------------------------------------------------------------------
2
// File and Version Information:
3
// $Id: TrkExchangePar.cxx,v 1.2 2005/07/18 02:56:08 zhangy Exp $
4
//
5
// Description:
6
//
7
//
8
// Environment:
9
// Software developed for the BaBar Detector at the SLAC B-Factory.
10
//
11
// Authors: Steve Schaffner
12
//------------------------------------------------------------------------
13
#include "
TrkBase/TrkExchangePar.h
"
14
#include "
MdcGeom/BesAngle.h
"
15
#include <assert.h>
16
#include <iostream>
17
using
std::endl;
18
using
std::ostream;
19
20
//----------------------------------------------------------------------
21
TrkExchangePar::TrkExchangePar
(
const
HepVector& inV,
const
HepMatrix& inErr)
22
: paramVec(inV) {
23
//----------------------------------------------------------------------
24
assert(paramVec.num_row() ==
nParam
);
25
assert(inErr.num_row() ==
nParam
);
26
assert(inErr.num_col() ==
nParam
);
27
paramErr.assign(inErr);
28
paramVec[
ex_phi0
] =
BesAngle
(paramVec[
ex_phi0
]).
rad
();
29
}
30
31
//----------------------------------------------------------------------
32
TrkExchangePar::TrkExchangePar
(
const
HepVector& inV,
const
HepSymMatrix& err)
33
: paramVec(inV), paramErr(err) {
34
//----------------------------------------------------------------------
35
assert(paramVec.num_row() ==
nParam
);
36
assert(paramErr.num_row() ==
nParam
);
37
paramVec[
ex_phi0
] =
BesAngle
(paramVec[
ex_phi0
]).
rad
();
38
}
39
40
//----------------------------------------------------------------------
41
TrkExchangePar::TrkExchangePar
(
const
HepVector& inV)
42
: paramVec(inV), paramErr(nParam, 1) {
43
//----------------------------------------------------------------------
44
assert(paramVec.num_row() ==
nParam
);
45
paramVec[
ex_phi0
] =
BesAngle
(paramVec[
ex_phi0
]).
rad
();
46
}
47
48
//----------------------------------------------------------------------
49
TrkExchangePar::TrkExchangePar
(
double
d0In,
double
phi0In,
double
omegaIn,
50
double
z0In,
double
tanDipIn)
51
: paramVec(nParam), paramErr(nParam, 1) {
52
//----------------------------------------------------------------------
53
paramVec[
ex_d0
] = d0In;
54
paramVec[
ex_phi0
] = phi0In;
55
paramVec[
ex_omega
] = omegaIn;
56
paramVec[
ex_z0
] = z0In;
57
paramVec[
ex_tanDip
] = tanDipIn;
58
paramVec[
ex_phi0
] =
BesAngle
(paramVec[
ex_phi0
]).
rad
();
59
}
60
61
//----------------------------------------------------------------------
62
TrkExchangePar::~TrkExchangePar
(){}
63
64
//----------------------------------------------------------------------
65
// Output functions: simple, detailed, and stream
66
67
void
TrkExchangePar::print
(ostream& o)
const
{
68
o <<
"d0="
<<
d0
() <<
" phi0="
<<
phi0
() <<
" omega="
<<
omega
()
69
<<
" z0="
<<
z0
() <<
" tanDip="
<<
tanDip
();
70
}
71
72
void
TrkExchangePar::printAll
(ostream& o)
const
{
73
print
(o);
74
o << endl <<
covariance
() << endl;
75
}
76
77
78
79
ostream&
operator<<
(ostream& o,
const
TrkExchangePar
& helix) {
80
helix.
print
(o);
81
return
o;
82
}
83
BesAngle.h
operator<<
ostream & operator<<(ostream &o, const TrkExchangePar &helix)
Definition
TrkExchangePar.cxx:79
TrkExchangePar.h
BesAngle
Definition
BesAngle.h:18
BesAngle::rad
double rad() const
Definition
BesAngle.h:118
TrkExchangePar
Definition
TrkExchangePar.h:30
TrkExchangePar::nParam
@ nParam
Definition
TrkExchangePar.h:32
TrkExchangePar::phi0
double phi0() const
Definition
TrkExchangePar.h:43
TrkExchangePar::omega
double omega() const
Definition
TrkExchangePar.h:44
TrkExchangePar::z0
double z0() const
Definition
TrkExchangePar.h:45
TrkExchangePar::d0
double d0() const
Definition
TrkExchangePar.h:42
TrkExchangePar::print
void print(std::ostream &o) const
Definition
TrkExchangePar.cxx:67
TrkExchangePar::~TrkExchangePar
~TrkExchangePar()
Definition
TrkExchangePar.cxx:62
TrkExchangePar::ex_phi0
@ ex_phi0
Definition
TrkExchangePar.h:33
TrkExchangePar::ex_omega
@ ex_omega
Definition
TrkExchangePar.h:33
TrkExchangePar::ex_z0
@ ex_z0
Definition
TrkExchangePar.h:33
TrkExchangePar::ex_tanDip
@ ex_tanDip
Definition
TrkExchangePar.h:33
TrkExchangePar::ex_d0
@ ex_d0
Definition
TrkExchangePar.h:33
TrkExchangePar::tanDip
double tanDip() const
Definition
TrkExchangePar.h:46
TrkExchangePar::covariance
const HepSymMatrix & covariance() const
Definition
TrkExchangePar.h:50
TrkExchangePar::printAll
void printAll(std::ostream &o) const
Definition
TrkExchangePar.cxx:72
TrkExchangePar::TrkExchangePar
TrkExchangePar(const HepVector &, const HepMatrix &)
Definition
TrkExchangePar.cxx:21
7.1.1
Reconstruction
MdcPatRec
TrkBase
TrkBase-00-01-12
src
TrkExchangePar.cxx
Generated by
1.12.0