BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
DstMdcTrack.cxx
Go to the documentation of this file.
1
2#include "DstEvent/DstMdcTrack.h"
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 for ( int i = 0; i < 5; i++ ) m_helix[i] = 0;
29 for ( int j = 0; j < 15; j++ ) m_err[j] = 999;
30 for ( int k = 0; k < 3; k++ ) m_poca[k] = 0;
31}
32
34 : m_trackId( other.m_trackId )
35 , m_charge( other.m_charge )
36 , m_poca3D( other.m_poca3D )
37 , m_a( other.m_a )
38 , m_Ea( other.m_Ea )
39 , m_stat( other.m_stat )
40 , m_chi2( other.m_chi2 )
41 , m_ndof( other.m_ndof )
42 , m_nster( other.m_nster )
43 , m_nlayer( other.m_nlayer )
44 , m_firstLayer( other.m_firstLayer )
45 , m_lastLayer( other.m_lastLayer )
46 , m_pxy( other.m_pxy )
47 , m_px( other.m_px )
48 , m_py( other.m_py )
49 , m_pz( other.m_pz )
50 , m_p( other.m_p )
51 , m_theta( other.m_theta )
52 , m_phi( other.m_phi )
53 , m_x( other.m_x )
54 , m_y( other.m_y )
55 , m_z( other.m_z )
56 , m_r( other.m_r ) {
57 for ( int i = 0; i < 5; i++ ) m_helix[i] = ( other.m_helix )[i];
58 for ( int j = 0; j < 15; j++ ) m_err[j] = ( other.m_err )[j];
59 for ( int k = 0; k < 3; k++ ) m_poca[k] = ( other.m_poca )[k];
60}
61
63 if ( &h != this )
64 {
68 m_a = h.m_a;
69 m_Ea = h.m_Ea;
70 m_stat = h.m_stat;
71 m_chi2 = h.m_chi2;
72 m_ndof = h.m_ndof;
73 m_nster = h.m_nster;
77 m_pxy = h.m_pxy;
78 m_px = h.m_px;
79 m_py = h.m_py;
80 m_pz = h.m_pz;
81 m_p = h.m_p;
82 m_theta = h.m_theta;
83 m_phi = h.m_phi;
84 m_x = h.m_x;
85 m_y = h.m_y;
86 m_z = h.m_z;
87 m_r = h.m_r;
88
89 for ( int i = 0; i < 5; i++ ) m_helix[i] = ( h.m_helix )[i];
90 for ( int j = 0; j < 15; j++ ) m_err[j] = ( h.m_err )[j];
91 for ( int k = 0; k < 3; k++ ) m_poca[k] = ( h.m_poca )[k];
92 }
93 return *this;
94}
95
96void DstMdcTrack::setHelix( double helix[5] ) {
97 for ( int i = 0; i < 5; i++ )
98 {
99 m_helix[i] = helix[i];
100 m_a[i] = helix[i];
101 }
102}
103
104void DstMdcTrack::setPoca( double poca[3] ) {
105 for ( int i = 0; i < 3; i++ )
106 {
107 m_poca[i] = poca[i];
108 m_poca3D[i] = poca[i];
109 }
110}
111
112void DstMdcTrack::setError( double err[15] ) {
113 for ( int i1 = 0; i1 < 15; i1++ ) { m_err[i1] = err[i1]; }
114 for ( int i = 0, k = 0; i < 5; i++ )
115 {
116 for ( int j = i; j < 5; j++ )
117 {
118 m_Ea[i][j] = m_err[k++];
119 m_Ea[j][i] = m_Ea[i][j];
120 }
121 }
122}
123
124void DstMdcTrack::setHelix( const HepVector& helix ) {
125 for ( int i = 0; i < 5; i++ ) { m_helix[i] = helix[i]; }
126 m_a = helix;
127}
128
130 for ( int i = 0; i < 3; i++ ) { m_poca[i] = poca[i]; }
131 m_poca3D = poca;
132}
133
134void DstMdcTrack::setError( const HepSymMatrix& err ) {
135 int k = 0;
136 for ( int i = 0; i < 5; i++ )
137 {
138 for ( int j = i; j < 5; j++ )
139 {
140 m_err[k] = err[i][j];
141 k++;
142 }
143 }
144 m_Ea = err;
145}
146
147const HepVector DstMdcTrack::helix() const { return m_a; }
148
149const HepSymMatrix DstMdcTrack::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
163const HepLorentzVector DstMdcTrack::p4( const double mass ) const {
164 return HepLorentzVector( p3(), sqrt( p3() * p3() + mass * mass ) );
165}
double mass
const HepSymMatrix err() const
void setError(double err[15])
const HepLorentzVector p4(const double mass) const
DstMdcTrack & operator=(const DstMdcTrack &)
void setHelix(double helix[5])
void setPoca(double poca[3])
const HepVector helix() const
......