BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
RecMdcKalTrack.cxx
Go to the documentation of this file.
1/*
2 *
3 * this class models "Kalman Track" used in Mdc Reconstruction
4 *
5 * ********************************************************/
6
7#include "MdcRecEvent/RecMdcKalTrack.h"
8// #include "MdcRecEvent/MdcKalHelixSeg.h"
9
10#include <cstdio>
11#include <fstream>
12
14 HepVector a( 5, 0 );
15 HepSymMatrix Ea( 5, 0 );
16 HepPoint3D poca( 0, 0, 0 );
17 HepPoint3D point( 0., 0., 0 );
18 HepPoint3D pivot( 0., 0., 0 );
19
20 m_ta( 5, 0 );
21 m_tEa( 5, 0 );
22 m_trackId = -1;
23
24 pidSeg = 4;
25
26 for ( int pid = 0; pid < 5; pid++ )
27 {
28 m_lhelixs.push_back( a );
29 m_lerrors.push_back( Ea );
30 // m_fhelixs.push_back(a);
31 // m_ferrors.push_back(Ea);
32 m_lpoints.push_back( point );
33 m_lpivots.push_back( pivot );
34
35 m_length[pid] = 0.0;
36 m_tof[pid] = 0.0;
37 m_nhits[pid] = 0;
38 m_pathSM[pid] = 0.0;
39 m_fiTerm[pid] = 0.0;
40 m_stat[0][pid] = -1;
41 m_stat[1][pid] = -1;
42 m_nster[0][pid] = -1;
43 m_nster[1][pid] = -1;
44 m_firstLayer[0][pid] = 0;
45 m_firstLayer[1][pid] = 0;
46 m_lastLayer[0][pid] = 43;
47 m_lastLayer[1][pid] = 43;
48 m_chisq[0][pid] = 999.0;
49 m_chisq[1][pid] = 999.0;
50 m_ndf[0][pid] = 0;
51 m_ndf[1][pid] = 0;
52 }
53 for ( int i = 0; i < 43; i++ ) { m_pathl[i] = 0.0; }
54 for ( int j = 0; j < 5; j++ ) { m_thelix[j] = 0.0; }
55 for ( int k = 0; k < 15; k++ ) { m_terror[k] = 0.; }
56}
57
59 for ( int i = 0; i < 5; i++ ) m_vechelixsegs[i] = trk.m_vechelixsegs[i];
60}
61
63 HepVector a( 5, -99 );
64 HepSymMatrix Ea( 5, -99 );
65 HepPoint3D poca( -99., -99., -99. );
66 HepPoint3D point( 0., 0., 0 );
67 HepPoint3D pivot( 0., 0., 0 );
68
69 m_ta( 5, 0 );
70 m_tEa( 5, 0 );
71
72 // m_trackId = -1;
73 for ( int pid = 0; pid < 5; pid++ )
74 {
75 // m_pocas.push_back(poca);
76 // m_zhelixs.push_back(a);
77 // m_zerrors.push_back(Ea);
78 m_lhelixs.push_back( a );
79 m_lerrors.push_back( Ea );
80 // m_fhelixs.push_back(a);
81 // m_ferrors.push_back(Ea);
82 m_lpoints.push_back( point );
83 m_lpivots.push_back( pivot );
84
85 m_length[pid] = 0.0;
86 m_tof[pid] = 0.0;
87 m_nhits[pid] = 0;
88 m_pathSM[pid] = 0.0;
89 m_fiTerm[pid] = 0.0;
90
91 m_stat[0][pid] = -1;
92 m_stat[1][pid] = -1;
93 m_nster[0][pid] = -1;
94 m_nster[1][pid] = -1;
95 m_firstLayer[0][pid] = 0;
96 m_firstLayer[1][pid] = 0;
97 m_lastLayer[0][pid] = 43;
98 m_lastLayer[1][pid] = 43;
99 m_chisq[0][pid] = 999.0;
100 m_chisq[1][pid] = 999.0;
101 m_ndf[0][pid] = 0;
102 m_ndf[1][pid] = 0;
103 }
104 for ( int i = 0; i < 43; i++ ) { m_pathl[i] = 0.0; }
105 for ( int j = 0; j < 5; j++ ) { m_thelix[j] = 0.0; }
106 for ( int k = 0; k < 15; k++ ) { m_terror[k] = 0.; }
107}
108
110 if ( &dstrk != this )
111 {
113 HepVector a( 5, 0 );
114 HepSymMatrix Ea( 5, 0 );
115 HepPoint3D poca( -99., -99., -99. );
116 HepPoint3D point( 0., 0., 0. );
117 HepPoint3D pivot( 0., 0., 0. );
118
119 // m_trackId = -1;
120 // m_pocas.clear();
121 // m_zhelixs.clear();
122 // m_zerrors.clear();
123 m_lhelixs.clear();
124 m_lerrors.clear();
125 // m_fhelixs.clear();
126 // m_ferrors.clear();
127 m_lpoints.clear();
128 m_lpivots.clear();
129 m_ta( 5, 0 );
130 m_tEa( 5, 0 );
131 for ( int pid = 0; pid < 5; pid++ )
132 {
133 // m_pocas.push_back(poca);
134 // m_zhelixs.push_back(a);
135 // m_zerrors.push_back(Ea);
136 m_lhelixs.push_back( a );
137 m_lerrors.push_back( Ea );
138 // m_fhelixs.push_back(a);
139 // m_ferrors.push_back(Ea);
140 m_lpoints.push_back( point );
141
142 m_length[pid] = 0.0;
143 m_tof[pid] = 0.0;
144 m_nhits[pid] = 0;
145 m_pathSM[pid] = 0.;
146 m_fiTerm[pid] = 0.;
147 }
148
149 for ( int i = 0; i < 43; i++ ) { m_pathl[i] = 0.0; }
150 for ( int j = 0; j < 5; j++ ) { m_thelix[j] = 0.0; }
151 for ( int k = 0; k < 15; k++ ) { m_terror[k] = 0.; }
152 }
153 return *this;
154}
155
156// 2011-05-06
158 if ( pid >= 0 && pid < 5 ) return m_vechelixsegs[pid];
159 else { return m_vechelixsegs[pidSeg]; }
160}
161
162// 2011-05-06
163void RecMdcKalTrack::setVecHelixSegs( const HelixSegRefVec& vechelixsegs, int pid ) {
164 if ( pid >= 0 && pid < 5 )
165 {
166 m_vechelixsegs[pid] = vechelixsegs;
167 pidSeg = pid;
168 }
169 else std::cout << "RecMdcKalTrack::setVecHelixSegs error, wrong particle id" << std::endl;
170}
171
HepGeom::Point3D< double > HepPoint3D
SmartRefVector< RecMdcKalHelixSeg > HelixSegRefVec
DstMdcKalTrack & operator=(const DstMdcKalTrack &)
RecMdcKalTrack & operator=(const RecMdcKalTrack &)
HelixSegRefVec getVecHelixSegs(int pid=-1) const
void setVecHelixSegs(const HelixSegRefVec &vechelixsegs, int pid=-1)