BOSS 7.1.0
BESIII Offline Software System
Loading...
Searching...
No Matches
DstMdcTrack.cxx
Go to the documentation of this file.
1
3
5 : m_trackId(0),
6 m_charge(0),
7 m_poca3D(0,0,0),
8 m_a(5,0),
9 m_Ea(5,0),
10 m_stat(0),
11 m_chi2(0),
12 m_ndof(0),
13 m_nster(0),
14 m_nlayer(0),
15 m_firstLayer(0),
16 m_lastLayer(42),
17 m_pxy(0),
18 m_px(0),
19 m_py(0),
20 m_pz(0),
21 m_p(0),
22 m_theta(0),
23 m_phi(0),
24 m_x(0),
25 m_y(0),
26 m_z(0),
27 m_r(0)
28 {
29 for(int i=0;i<5;i++) m_helix[i] = 0;
30 for(int j=0;j<15;j++) m_err[j] = 999;
31 for(int k=0;k<3;k++) m_poca[k] = 0;
32 }
33
35 : m_trackId(other.m_trackId),
36 m_charge(other.m_charge),
37 m_poca3D(other.m_poca3D),
38 m_a(other.m_a),
39 m_Ea(other.m_Ea),
40 m_stat(other.m_stat),
41 m_chi2(other.m_chi2),
42 m_ndof(other.m_ndof),
43 m_nster(other.m_nster),
44 m_nlayer(other.m_nlayer),
45 m_firstLayer(other.m_firstLayer),
46 m_lastLayer(other.m_lastLayer),
47 m_pxy(other.m_pxy),
48 m_px(other.m_px),
49 m_py(other.m_py),
50 m_pz(other.m_pz),
51 m_p(other.m_p),
52 m_theta(other.m_theta),
53 m_phi(other.m_phi),
54 m_x(other.m_x),
55 m_y(other.m_y),
56 m_z(other.m_z),
57 m_r(other.m_r)
58 {
59 for(int i=0;i<5;i++) m_helix[i] = (other.m_helix)[i];
60 for(int j=0;j<15;j++) m_err[j] = (other.m_err)[j];
61 for(int k=0;k<3;k++) m_poca[k] = (other.m_poca)[k];
62 }
63
64
66 if( &h != this ){
70 m_a = h.m_a;
71 m_Ea = h.m_Ea;
72 m_stat = h.m_stat;
73 m_chi2 = h.m_chi2;
74 m_ndof = h.m_ndof;
75 m_nster = h.m_nster;
79 m_pxy = h.m_pxy;
80 m_px = h.m_px;
81 m_py = h.m_py;
82 m_pz = h.m_pz;
83 m_p = h.m_p;
84 m_theta = h.m_theta;
85 m_phi = h.m_phi;
86 m_x = h.m_x;
87 m_y = h.m_y;
88 m_z = h.m_z;
89 m_r = h.m_r;
90
91 for(int i=0;i<5;i++) m_helix[i] = (h.m_helix)[i];
92 for(int j=0;j<15;j++) m_err[j] = (h.m_err)[j];
93 for(int k=0;k<3;k++) m_poca[k] = (h.m_poca)[k];
94 }
95 return *this;
96 }
97
98 void DstMdcTrack::setHelix(double helix[5]) {
99 for(int i=0; i<5; i++){
100 m_helix[i] = helix[i];
101 m_a[i] = helix[i];
102 }
103 }
104
105 void DstMdcTrack::setPoca(double poca[3]){
106 for(int i=0; i<3; i++){
107 m_poca[i] = poca[i];
108 m_poca3D[i] = poca[i];
109 }
110 }
111
112 void DstMdcTrack::setError( double err[15]) {
113 for (int i1=0; i1<15; i1++) {
114 m_err[i1] = err[i1];
115 }
116 for(int i=0, k=0; i<5; i++) {
117 for(int j=i; j<5; j++) {
118 m_Ea[i][j] = m_err[k++];
119 m_Ea[j][i] = m_Ea[i][j];
120 }
121 }
122 }
123
124
125 void DstMdcTrack::setHelix(const HepVector& helix){
126 for(int i=0; i<5; i++){
127 m_helix[i] = helix[i];
128 }
129 m_a = helix;
130 }
131
133 for(int i=0; i<3; i++){
134 m_poca[i] = poca[i];
135 }
136 m_poca3D = poca;
137 }
138
139 void DstMdcTrack::setError(const HepSymMatrix& err){
140 int k = 0;
141 for (int i=0; i<5; i++){
142 for (int j=i; j<5; j++)
143 {
144 m_err[k] = err[i][j];
145 k++;
146 }
147 }
148 m_Ea = err;
149 }
150
151 const HepVector DstMdcTrack::helix() const{
152 return m_a;
153 }
154
155 const HepSymMatrix DstMdcTrack::err() const{
156 /*
157 HepSymMatrix ea(5);
158 for(int i = 0, k = 0; i < 5; i++) {
159 for(int j = 0; j <= i; j++) {
160 ea[i][j] = m_err[k++];
161 ea[j][i] = ea[i][j];
162 }
163 }
164 return ea;
165 */
166 return m_Ea;
167 }
168
169 const HepLorentzVector DstMdcTrack::p4(const double mass) const{
170 return HepLorentzVector(p3(),sqrt(p3()*p3()+mass*mass));
171 }
172
173
double mass
NTuple::Item< double > m_p
Definition: MdcHistItem.h:75
NTuple::Item< double > m_pz
Definition: MdcHistItem.h:78
NTuple::Array< double > m_z
Definition: MdcHistItem.h:114
NTuple::Array< double > m_x
Definition: MdcHistItem.h:112
NTuple::Item< double > m_chi2
Definition: MdcHistItem.h:91
NTuple::Array< double > m_y
Definition: MdcHistItem.h:113
double m_theta
Definition: DstMdcTrack.h:125
double m_x
Definition: DstMdcTrack.h:127
double m_helix[5]
Definition: DstMdcTrack.h:107
double m_y
Definition: DstMdcTrack.h:128
HepVector m_a
Definition: DstMdcTrack.h:111
double m_z
Definition: DstMdcTrack.h:129
double m_px
Definition: DstMdcTrack.h:121
HepPoint3D m_poca3D
Definition: DstMdcTrack.h:110
double m_r
Definition: DstMdcTrack.h:130
double m_chi2
Definition: DstMdcTrack.h:114
HepSymMatrix m_Ea
Definition: DstMdcTrack.h:112
double m_pz
Definition: DstMdcTrack.h:123
const HepSymMatrix err() const
void setError(double err[15])
const HepLorentzVector p4(const double mass) const
int m_firstLayer
Definition: DstMdcTrack.h:117
double m_pxy
Definition: DstMdcTrack.h:120
double m_p
Definition: DstMdcTrack.h:124
DstMdcTrack & operator=(const DstMdcTrack &)
Definition: DstMdcTrack.cxx:65
double m_err[15]
Definition: DstMdcTrack.h:108
void setHelix(double helix[5])
Definition: DstMdcTrack.cxx:98
double m_phi
Definition: DstMdcTrack.h:126
void setPoca(double poca[3])
const HepVector helix() const
......
double m_poca[3]
Definition: DstMdcTrack.h:109
double m_py
Definition: DstMdcTrack.h:122
const HepPoint3D poca() const
Definition: DstMdcTrack.h:40
const Hep3Vector p3() const
Definition: DstMdcTrack.h:43