BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
DstMdcKalTrack.cxx
Go to the documentation of this file.
1/*
2 * @class : MdcTrack
3 *
4 * this class models "Kalman Track" from Mdc
5 *
6 * ********************************************************/
7
8#include "DstEvent/DstMdcKalTrack.h"
9
11
13 HepVector za( 5, 0 );
14 HepSymMatrix zea( 5, 0 );
15 HepPoint3D poca( 0, 0, 0 );
16 m_trackId = -1;
17 for ( int pid = 0; pid < 5; pid++ )
18 {
19 m_zhelixs.push_back( za );
20 m_zerrors.push_back( zea );
21 m_fhelixs.push_back( za );
22 m_ferrors.push_back( zea );
23 m_pocas.push_back( poca );
24 m_mass[pid] = 1;
25 m_charge[pid] = 1;
26 m_stat[0][pid] = 0;
27 m_stat[1][pid] = 0;
28
29 m_ndf[0][pid] = 0;
30 m_ndf[1][pid] = 0;
31 m_nster[0][pid] = 0;
32 m_nster[1][pid] = 0;
33 m_nlayer[pid] = 0;
34 m_firstLayer[0][pid] = 0;
35 m_firstLayer[1][pid] = 0;
36 m_lastLayer[0][pid] = 0;
37 m_lastLayer[1][pid] = 0;
38 m_pxy[pid] = 0;
39 m_px[pid] = 0;
40 m_py[pid] = 0;
41 m_pz[pid] = 0;
42 m_p[pid] = 0;
43 m_theta[pid] = 0;
44 m_phi[pid] = 0;
45 m_x[pid] = 0;
46 m_y[pid] = 0;
47 m_z[pid] = 0;
48 m_r[pid] = 0;
49 m_stat[0][pid] = 0;
50 m_stat[1][pid] = 0;
51 m_chisq[0][pid] = 0;
52 m_chisq[1][pid] = 0;
53 m_ndf[0][pid] = 0;
54 m_ndf[1][pid] = 0;
55 }
56}
57
59 : m_trackId( other.m_trackId )
60 , m_pocas( other.m_pocas )
61 , m_zhelixs( other.m_zhelixs )
62 , m_zerrors( other.m_zerrors )
63 , m_fhelixs( other.m_fhelixs )
64 , m_ferrors( other.m_ferrors ) {
65 for ( int i = 0; i < 5; i++ )
66 {
67 m_charge[i] = other.m_charge[i];
68 m_stat[0][i] = other.m_stat[0][i];
69 m_stat[1][i] = other.m_stat[1][i];
70 m_nster[0][i] = other.m_nster[0][i];
71 m_nster[1][i] = other.m_nster[1][i];
72 m_nlayer[i] = other.m_nlayer[i];
73 m_firstLayer[0][i] = other.m_firstLayer[0][i];
74 m_firstLayer[1][i] = other.m_firstLayer[1][i];
75 m_lastLayer[0][i] = other.m_lastLayer[0][i];
76 m_lastLayer[1][i] = other.m_lastLayer[1][i];
77 m_mass[i] = other.m_mass[i];
78
79 m_pxy[i] = other.m_pxy[i];
80 m_px[i] = other.m_px[i];
81 m_py[i] = other.m_py[i];
82 m_pz[i] = other.m_pz[i];
83 m_p[i] = other.m_p[i];
84 m_theta[i] = other.m_theta[i];
85 m_phi[i] = other.m_phi[i];
86 m_x[i] = other.m_x[i];
87 m_y[i] = other.m_y[i];
88 m_z[i] = other.m_z[i];
89 m_r[i] = other.m_r[i];
90 m_chisq[0][i] = other.m_chisq[0][i];
91 m_chisq[1][i] = other.m_chisq[1][i];
92 m_ndf[0][i] = other.m_ndf[0][i];
93 m_ndf[1][i] = other.m_ndf[1][i];
94 m_nhits[i] = other.m_nhits[i];
95 }
96}
97
99 if ( &other != this )
100 {
101 m_trackId = other.m_trackId;
102 m_pocas = other.m_pocas;
103 m_zhelixs = other.m_zhelixs;
104 m_zerrors = other.m_zerrors;
105 m_fhelixs = other.m_fhelixs;
106 m_ferrors = other.m_ferrors;
107 for ( int i = 0; i < 5; i++ )
108 {
109 m_charge[i] = other.m_charge[i];
110 m_stat[0][i] = other.m_stat[0][i];
111 m_stat[1][i] = other.m_stat[1][i];
112 m_nster[0][i] = other.m_nster[0][i];
113 m_nster[1][i] = other.m_nster[1][i];
114 m_nlayer[i] = other.m_nlayer[i];
115 m_firstLayer[0][i] = other.m_firstLayer[0][i];
116 m_firstLayer[1][i] = other.m_firstLayer[1][i];
117 m_lastLayer[0][i] = other.m_lastLayer[0][i];
118 m_lastLayer[1][i] = other.m_lastLayer[1][i];
119 m_mass[i] = other.m_mass[i];
120 m_chisq[0][i] = other.m_chisq[0][i];
121 m_chisq[1][i] = other.m_chisq[1][i];
122 m_pxy[i] = other.m_pxy[i];
123 m_px[i] = other.m_px[i];
124 m_py[i] = other.m_py[i];
125 m_pz[i] = other.m_pz[i];
126 m_p[i] = other.m_p[i];
127 m_theta[i] = other.m_theta[i];
128 m_phi[i] = other.m_phi[i];
129 m_x[i] = other.m_x[i];
130 m_y[i] = other.m_y[i];
131 m_z[i] = other.m_z[i];
132 m_r[i] = other.m_r[i];
133 // m_chi2[i] = other.m_chi2[i];
134 m_ndf[0][i] = other.m_ndf[0][i];
135 m_ndf[1][i] = other.m_ndf[1][i];
136 m_nhits[i] = other.m_nhits[i];
137 }
138 }
139 return *this;
140}
141
143
144const HepLorentzVector DstMdcKalTrack::p4() const {
145 const HepLorentzVector p_LV( px(), py(), pz(), sqrt( pow( mass(), 2 ) + pow( p(), 2 ) ) );
146 return p_LV;
147}
148
149const HepLorentzVector DstMdcKalTrack::p4( double v_mass ) const {
150 const HepLorentzVector p_LV( px(), py(), pz(), sqrt( pow( v_mass, 2 ) + pow( p(), 2 ) ) );
151 return p_LV;
152}
153
154const Hep3Vector DstMdcKalTrack::p3() const {
155 const Hep3Vector p3( px(), py(), pz() );
156 return p3;
157}
158
int pion
DstMdcKalTrack & operator=(const DstMdcKalTrack &)
const HepPoint3D x3() const
const Hep3Vector p3() const
const HepLorentzVector p4() const