63 m_trkIdxOrigin.push_back(index);
64 m_tracksOrigin.push_back(
nullptr);
66 int idx = m_trkIdxOrigin.size() - 1;
68 std::cerr <<
"TrackPool: wrong track index " << index <<
", "
69 << m_trkIdxOrigin.size() << std::endl;
72 m_tracksOrigin[idx]->setPidType(m_trkPidOrigin[idx]);
73 m_wtrkInfit.push_back(
wtrk);
74 m_helices.push_back(HepVector(5, 0));
75 vtxfit->
AddTrack(m_trkIdxOrigin[idx], m_wtrkInfit[idx]);
81 m_trkIdxOrigin.push_back(index);
82 m_tracksOrigin.push_back(p);
83 m_trkPidOrigin.push_back(pid);
84 int idx = m_trkIdxOrigin.size() - 1;
86 std::cerr <<
"TrackPool: wrong track index " << index <<
", "
87 << m_trkIdxOrigin.size() << std::endl;
90 m_tracksOrigin[idx]->setPidType(m_trkPidOrigin[idx]);
92 m_tracksOrigin[idx]->
helix(),
93 m_tracksOrigin[idx]->err()));
94 vtxfit->
AddTrack(m_trkIdxOrigin[idx], m_wtrkInfit[idx]);
101 for (uint i = 0; i != m_trkIdxOrigin.size(); ++i) {
102 m_p4Infit.push_back(m_wtrkInfit[i].p());
103 m_x3Infit.push_back(m_wtrkInfit[i].
x());
109 HepSymMatrix evWideVertex(3, 0);
110 evWideVertex[0][0] = 1.0E12;
111 evWideVertex[1][1] = 1.0E12;
112 evWideVertex[2][2] = 1.0E12;
115 wideVertex.
setVx(vWideVertex);
116 wideVertex.
setEvx(evWideVertex);
118 if (vtxfit->m_vpar_infit.size() == 0) {
119 std::cerr <<
"Not set Vertex?" << std::endl;
126 HepVector ZVx = vtxfit->
Vx(0);
127 HepSymMatrix ZEVx = evWideVertex;
130 if (vtxfit->
Fit(0)) {
134 for (uint i = 0; i != m_trkIdxOrigin.size(); ++i) {
135 m_p4Infit[i] = vtxfit->
pfit(i);
136 m_x3Infit[i] = vtxfit->
xfit(i);
141 ZEVx = vtxfit->
Evx(0);
148 if (ZDP.perp() > obeampipe) {
152 for (uint i = 0; i != m_trkIdxOrigin.size(); ++i) {
153 m_tracksOrigin[i]->setPidType(m_trkPidOrigin[i]);
157 m_tracksOrigin[i]->fhelix(), m_tracksOrigin[i]->ferr());
159 vtxfit->
AddTrack(i, m_wtrkInfit[i]);
162 wideVertex.
setVx(ZVx);
164 wideVertex.
setEvx(evWideVertex);
167 vtxfit->
AddVertex(0, wideVertex, m_trkIdxOrigin);
169 if (vtxfit->
Fit(0)) {
174 ZEVx = vtxfit->
Evx(0);
188 for (uint i = 0; i != m_trkIdxOrigin.size(); ++i) {
189 m_tracksOrigin[i]->setPidType(m_trkPidOrigin[i]);
193 m_tracksOrigin[i]->fhelix(), m_tracksOrigin[i]->ferr());
195 vtxfit->
AddTrack(i, m_wtrkInfit[i]);
198 if (vtxfit->
Fit(0)) {
203 ZEVx = vtxfit->
Evx(0);
213 for (uint i = 0; i != m_trkIdxOrigin.size(); ++i) {
214 m_tracksOrigin[i]->setPidType(m_trkPidOrigin[i]);
216 vtxext->
KalFitExt(
vx, m_tracksOrigin[i], m_trkPidOrigin[i]);
221 m_p4Infit[i] = m_wtrkInfit[i].p();
222 m_x3Infit[i] = m_wtrkInfit[i].x();
224 vtxfit->
AddTrack(i, m_wtrkInfit[i]);
229 wideVertex.
setEvx(evWideVertex);
231 vtxfit->
AddVertex(0, wideVertex, m_trkIdxOrigin);
234 if (vtxfit->
Fit(0)) {