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