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